‎2005 Sep 20 2:46 PM
Hi
This doubt may be silly,I am just curious if we can try this way .
Can we use the CALL TRANSACTION method to populate the Selection Screen of a report and then SUBMIT to memory and read the contents of the REPORT.
Thanks
Ravi.
‎2005 Sep 20 2:51 PM
Hi,
i think you can only program: call transaction OR submit report (but not call transaction AND submit report)
Andreas
‎2005 Sep 20 2:52 PM
‎2005 Sep 20 2:59 PM
Example..... this program calls MB51 transactions passing some parmeters to the selection screen.
report zrich_0002 .
DATA: SELTAB TYPE TABLE OF RSPARAMS,
SELTAB_WA LIKE LINE OF SELTAB.
MOVE: 'MATNR' TO SELTAB_WA-SELNAME,
'S' TO SELTAB_WA-KIND, " SELECT-OPTION
'I' TO SELTAB_WA-SIGN,
'BT' TO SELTAB_WA-OPTION,
'40000000' TO SELTAB_WA-LOW,
'40000010' TO SELTAB_WA-HIGH.
APPEND SELTAB_WA TO SELTAB.
MOVE: 'BUDAT' to seltab_wa-selname,
'S' to seltab_wa-kind,
'I' TO SELTAB_WA-SIGN,
'EQ' TO SELTAB_WA-OPTION,
sy-datum TO SELTAB_WA-LOW.
APPEND SELTAB_WA TO SELTAB.
submit RM07DOCS via selection-screen
with selection-table seltab and return.
Regards,
Rich HEilman
‎2005 Sep 20 3:26 PM
Hi Heilman,
I tried with the Submit option using SELECTION-TABLE,I donno if i am doing the correct thing, but i guess we can only enter the names of Selections Fields, not values, Values seems to come from some where else.
I Used:
SUBMIT <progName> with SELECTION-TABLE seltab.
seltab has a structure of RSPARAMS.
I populated the seltab Structure for a report using the FM 'RS_REFRESH_FROM_SELECTOPTIONS'. Now i get the Field names for all the Selection Screen Fields.
Structure of Seltab like RSPARAMS:
Selname
kind
sign
option
Low
High
For example, my selection screen has a field by name Material Number(MATNR) but where should i enter its values ('0000010010')
Thanks
Ravi.
‎2005 Sep 20 3:28 PM
‎2005 Sep 20 3:33 PM
I shall try the new posts by Heilman and Sasi Kumar and let u know my status...
Thanks
Ravi.
‎2005 Sep 20 3:44 PM
‎2005 Sep 20 2:55 PM
hi,
if the report program has the tcode you can use the call transaction. but you try with this
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 report_name
USING SELECTION-SET 'VARIANT1'
WITH ARBGB CP 'A*'
WITH SELECTION-TABLE SELTAB
AND RETURN.
and in the calling report you export the value to memory by using Export
cheers,
sasi
‎2005 Sep 20 3:36 PM
I am curious as to why you asked this. Why do you want to do a call transaction and a submit? Call transaction mechanism is meant to replace manual entry of values/actions on the screen(s) of the transaction. So you can do a call transaction of your report, by entering the fields of your selection screen and the action of executng it(F8 or ONLI). But that results in your report being executed and the output is sent to spool or screen depending on how you executed it. So where do you think you can interrupt this process and then do a SUBMIT of the same report.
If you have specific need in mind, please let us know.
Srinivas