Reputation: 1503
I have two transactions calling the same program/report. I would like to branch behavior of the program based on t-code used to run in it. How do I get the name of the original transaction in ABAP code? Or, do I need to use different approach?
Upvotes: 1
Views: 3640
Reputation: 2651
did you try this? sy-tcode always shows the foreground transaction code, not interested in your background program.
IF sy-tcode = 'A'.
... do your stuff
ELSEIF sy-tcode = 'B'.
... do your stuff
ENDIF.
Upvotes: 8