Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Call transaction Method

Former Member
0 Likes
1,118

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.

9 REPLIES 9
Read only

andreas_mann3
Active Contributor
0 Likes
1,011

Hi,

i think you can only program: call transaction OR submit report (but not call transaction AND submit report)

Andreas

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,011

Try pass the parameters thru the SUBMIT statement using the WITH <parameter> = P_parm syntax or the SELECTION-TABLE extension.

Regards,

Rich Heilman

Message was edited by: Rich Heilman

Read only

0 Likes
1,011

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

Read only

0 Likes
1,011

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.

Read only

0 Likes
1,011

Please implement the sample program I've provided above. This will tell you what you need to do.

Regards,

Rich Heilman

Read only

0 Likes
1,011

I shall try the new posts by Heilman and Sasi Kumar and let u know my status...

Thanks

Ravi.

Read only

0 Likes
1,011

Thanks guys .. Submit with Selection-table works ..

-Ravi.

Read only

Former Member
0 Likes
1,011

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

Read only

Former Member
0 Likes
1,011

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