Application Development 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: 

Calling a transaction from another program

Former Member
0 Kudos
221

Hi all,

am trying to call a program by its transaction code from another program.

i need to pass on the values for selection screen .for both programs the selection screen variants are same and am hiding the selection screen for the called program.how do i pass the values.

thanks,

kavitha

5 REPLIES 5

gopi_narendra
Active Contributor
0 Kudos
108

Instead you can do it this way.

var = 'INACTIVEUSERS'.
 
SUBMIT zrsusr200 USING SELECTION-SET var " selection-set VAR passes the variant 'INACTIVEUSERS'
             TO SAP-SPOOL
             WITHOUT SPOOL DYNPRO
             SPOOL PARAMETERS pripar
            AND RETURN.
  " Make sure the variant exists in your system before running the program.

Regards

Gopi

0 Kudos
108

Hi Gopi,

Thanks for the reply but how do i define the variant

uwe_schieferstein
Active Contributor
0 Kudos
108

Hello Kavitha

Alternatively you can use function module <b>ABAP4_CALL_TRANSACTION</b>. This fm has TABLES parameters for SET/GET parameters and BDC data.

Regards

Uwe

Former Member

Former Member
0 Kudos
108

Kavitha,

Instead of using the Tcode, submit the program directly using the Submit command

Report Calling_Program.

Parameter: P_1(2).

select-options: S_1 for usr02-bname.

submit Called_program ing

with P_1 = P_1 " 1st P_1 is called parameter, 2nd is calling

S_1 = S_1 " 1st S_1 is called sel_opt, 2nd is calling

and return.

Bruce