‎2006 Mar 03 4:03 PM
Hi,
I am actually a Basis admin so this might be easy for you ABAPers.
I want to modify a function module to execute a report (without any variables or variants) somewhere in the beginning of the function module and then carry on with the rest of the funtion module.
What is the syntax for this?
Thanks!
‎2006 Mar 03 4:09 PM
Normally FM is called like
DATA:GWY_GWHOST LIKE GWY_STRUCT-GWHOST,
GWY_GWSERV LIKE GWY_STRUCT-GWSERV.
CALL FUNCTION 'SYSTEM_GET_CURRENT_GATEWAY'
EXPORTING
STARTCOMP = STARTCOMP
IMPORTING
GWHOST = GWHOST
GWSERV = GWSERV.
‎2006 Mar 03 4:14 PM
Hi Adriaan,
Use statement <b>SUBMIT</b>.
For example:
<b>SUBMIT REPORT01
VIA SELECTION-SCREEN "this is optional
AND RETURN.</b>
‎2006 Mar 03 4:24 PM
Hi Adriaan,
you can call the report , using SUBMIT in your FM.
if you don't have any selection screen then you can directly say SUBMIT ZREPORT and RETURN.
if you have selection screen then fill the selection screen variables and pass it .check this sample..
DATA: SELTAB TYPE TABLE OF RSPARAMS,
SELTAB_WA LIKE LINE OF SELTAB.
MOVE: 'LANGU' TO SELTAB_WA-SELNAME,
'S' TO SELTAB_WA-KIND, " SELECT-OPTION
'I' TO SELTAB_WA-SIGN,
'BT' TO SELTAB_WA-OPTION,
'D' TO SELTAB_WA-LOW,
'I' TO SELTAB_WA-HIGH.
APPEND SELTAB_WA TO SELTAB.
MOVE: 'E' TO SELTAB_WA-SIGN,
'EQ' TO SELTAB_WA-OPTION,
'F' TO SELTAB_WA-LOW,
SPACE TO SELTAB_WA-HIGH.
APPEND SELTAB_WA TO SELTAB.
CLEAR SELTAB_WA.
MOVE: 'ARBGB' TO SELTAB_WA-SELNAME,
'P' TO SELTAB_WA-KIND, " PARAMETER
'XX' TO SELTAB_WA-LOW.
APPEND SELTAB_WA TO SELTAB.
SUBMIT REPORT00
USING SELECTION-SET 'VARIANT1'
WITH ARBGB CP 'A*'
WITH SELECTION-TABLE SELTAB
AND RETURN.
Regards
vijay