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

How can you determine the calling program?

Former Member
0 Likes
673

I know if you want to determine the calling tcode you do sy-tcode but how can I determine what the calling program was?

I have an output requirement and, right now, there is an if statement like the following:

if sy-tcode = 'vf01' or sy-tcode = 'vf02'
perform vf02_routine.
else.
perform va02_routine
endif.

I want to add a check to see if the calling program was SAPMV60S, is there a way to do that?

Regards,

Davis

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
640

check SY-CPROG

Regards,

RIch Heilman

check SY-CPROG

Regards,

RIch Heilman

4 REPLIES 4
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
641

check SY-CPROG

Regards,

RIch Heilman

Read only

0 Likes
640

Ah, thanks. I was trying sy-program. Is there a listing of all sy-#### calls?

Davis

Read only

0 Likes
640

open structure SYST in se11, you will get all SY variables