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: 

Can I determine the originating Tcode in a Smartform's Print Program?

Former Member
0 Kudos
127

Hi,

I need to use different Control Parameters (ssfctrlop) for the same Smartform depending on which Tcode (VL71 or VL03N) was used.

Is there a way in the Print Program to determine which Tcode was used to enter the Program?

Hope that makes sense.

Thanks for your help!

Andy

1 ACCEPTED SOLUTION

rosenberg_eitan
Active Contributor
0 Kudos
91

Hi,

SY-TCODE is no good ?

Regards.

6 REPLIES 6

rosenberg_eitan
Active Contributor
0 Kudos
92

Hi,

SY-TCODE is no good ?

Regards.

former_member185537
Participant
0 Kudos
91

Hi Andrew,

Sy-tcode variable differentiates.

kiran_k8
Active Contributor
0 Kudos
91

Andrew,

May be you can go by the program name and then determine the corresponding t-code.You can use the new debugger and then explore NEW TOOL>>SPECIAL TOOLS>>LOADED PROGRAMS.You can get the list of called programs using the FM SYSTEM_CALLSTACK.

K.Kiran.

Former Member
0 Kudos
91

Excellent...I never even thought of that.  I was looking at the global variables in the debugger but never thought of sy-tcode at all.  Thank you very  much!

Andy

0 Kudos
91

Andrew,

A word of caution.....not everytime we can go by the sy-tcode.There will be some instances where SY-TCODE will be blank etc.... So,we have to check from all the aspects and also see if we have to use T180-TRTYP in addition to sy-tcode.Check SCN regarding the usage of T180.

K.Kiran.

0 Kudos
91

Thank you K...I'll look into that as well.

Andy