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 a transaction

former_member184495
Active Contributor
0 Likes
1,450

hi,

my requirement is...

i have a "ZA" transaction which is old,

i want to create a generic transaction "ZB"

now say if user uses the transaction "ZA" it should

take him directly to "ZB" , now "ZB" should identify that the user had used "ZA", so how do i capture this.

thanks,

Aditya.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,424

Hi Aditya,

check the value of sy-tcode in the initialization event of ur report, if ur program is a module pool program then check the value of sy-tcode in the PBO of ur initial screen of the transaction

8 REPLIES 8
Read only

Former Member
0 Likes
1,424

Hi,

You will have to change the definition of ZA to specify it as a transaction with parameters and specify ZB in there.

But inside the code it will still sy-tcode will still point to ZB transaction and not ZA.

Regards,

Ravi

Note : Please mark the helpful answers

Read only

Former Member
0 Likes
1,424

Hi Aditya,

change the program for the transaction in SE93...a transaction is nothing but a short cut to execute a program..so u can replace the old program in ZA with ur new one...

hope it helps..

Read only

Former Member
0 Likes
1,425

Hi Aditya,

check the value of sy-tcode in the initialization event of ur report, if ur program is a module pool program then check the value of sy-tcode in the PBO of ur initial screen of the transaction

Read only

Former Member
0 Likes
1,424

Hi Aditya,

Transaction ZA.

Change the program code

REPORT ZTEST_11 .

data f type c.

f = 'A'.

SET PARAMETER ID 'PID' FIELD f.

leave to transaction 'ZB'.

*****************************************

Tranaction ZB.

Add program code

data f type c.

GET PARAMETER ID 'PID' FIELD f.

if f = 'A'.

write 😕 'ZA'. * Action for ZA.

else.

write 😕 'ZB'. * Action for ZB.

endif.

clear f.

SET PARAMETER ID 'PID' FIELD f.

*****************************************

Hope it was useful.

Thanks,

Susmitha

Read only

0 Likes
1,424

hi

whenever user calls ZA in ur report attached to ZA

submit the program associated with ZB using SUBMIT statement and it'll call the ZB Selection screen but sy-tcode will have the ZA ...

reward points if it helps

gunjan

Read only

Former Member
0 Likes
1,424

Hi,

You can do it by Maintain Transaction.

1. Run TCode SE93.

2. Input your "ZA" Tcode in Transaction Code field.

3. Click button Changed.

4. Changed field Program with "ZB" Program and other necessary field.

5. Click button Saved.

Regards,

Read only

Manohar2u
Active Contributor
0 Likes
1,424

Hi Aditya,

Here you have two option to retain your original TCode.

1. You should export main TCode and import the same in Second TCode to find whether user has came from ZA or not.

2. If you jump to ZB-program from ZA program then the TCode will be of ZA program. i.e., by submitting ZB program in ZA program.

Regds

Manohar

Read only

former_member184495
Active Contributor
0 Likes
1,424

answered