01-10-2007 10:51 AM
hi guys,
i have a data in internal table.
i need to call a report RFTBFF00 using SUBMIT statement. and this internal table should go as a input flat file in the report RFTBFF00 for which there a field present.
can you help me.
thankx
ahmed
01-10-2007 10:54 AM
hi,
1st look to the etailed documentation of that report with se38
A.
01-10-2007 11:10 AM
Hi Ahmed,
You can use SUBMIT statement only if the report type is 1(i.e. executable).
I am not sure this will work or not. But try this.
You can use the following code:
w_jobname type tdtcjob-jobname,
w_job_cnt type tdtcjob-jobcount.
&----
*& Form JOB_OPEN
&----
FORM job_open .
w_jobname = sy-repid.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = w_jobname
IMPORTING
jobcount = w_job_cnt
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE e055 WITH text-m09.
ENDIF.
ENDFORM. " JOB_OPEN
&----
*& Form JOB_SUBMIT
&----
FORM job_submit .
DATA : l_repid TYPE sy-repid.
l_repid = sy-repid.
SUBMIT (l_repid)
WITH (Enter the selection screen parameters)
USER sy-uname VIA JOB w_jobname NUMBER w_job_cnt
AND RETURN.
IF sy-subrc <> 0.
MESSAGE e108(04) WITH text-t01.
ELSE.
MESSAGE s295(zsd001) WITH w_jobname.
ENDIF.
ENDFORM. " JOB_SUBMIT
&----
*& Form JOB_CLOSE
&----
FORM job_close .
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = w_job_cnt
jobname = w_jobname
strtimmed = 'X'
EXCEPTIONS
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
OTHERS = 8.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
NEW-LINE.
NEW-LINE.
WRITE : text-t04.
ENDIF.
ENDFORM. " JOB_CLOSE
01-10-2007 11:11 AM
Hi Ahmed,
1. Prepare the final internal table and download the data.
2. Pass the file name what you are downloading to RFTBFF00 as input,
SUBMIT RFTBFF00 WITH FILE = p_file.
" p_file ==> downloaded file name
if you want to check through screen, then
submit RFTBFF00 via selection-screen with FILE = p_file.
Regards
Eswar
01-10-2007 11:18 AM
hi
ESHWAR
i didnt get u can u bit elaborate.
how to pass the internal table data to P_FILE
thankx
01-10-2007 11:41 AM
Hi ahmed,
i use it inj this way:
...
PARAMETERS: P_REP_E LIKE RSVAR-REPORT MODIF ID DSP
VISIBLE LENGTH 10
DEFAULT 'RFTBFF00'.
...
PARAMETERS: P_VARI_E LIKE RSVAR-VARIANT MODIF ID DSP
DEFAULT 'TEL_KURSE_ECHT'.
...
SUBMIT (P_REP_E) VIA SELECTION-SCREEN
USING SELECTION-SET P_VARI_E AND RETURN.
regards, Dieter
01-10-2007 12:05 PM
Hi ahmed,
1. we should do the following steps.
2. ITAB---->download to a local file (with some path&filename)
submit and passthe filename with path.
3. Like this.
4.
report abc.
DATA : ITAB LIKE T001 OCCURS 0 WITH HEADER LINE.
data : filename type string.
data : file(100) type c.
*----
SELECT * FROM T001 INTO TABLE ITAB.
filename = 'd:\zz.txt'.
file = filename.
*----- fIRST Download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
FILENAME = filename
FILETYPE = 'ASC'
TABLES
DATA_TAB = itab
.
<b>*----- Then submit
submit RFTBFF00
with file = FILE.</b>
regards,
amit m.
01-10-2007 2:55 PM
Hi,
In u'r scenario try sending the the internal table using IMPORT/EXPORT methods give an ID , In report RFTBFF00 the file field has a memory ID assigned
in the selection screen. So before submiting it first the import the internal table data to a file and then take that path set it to the memory ID using EXPORT and then submit it .
Regards,
Aravind