2010 Oct 26 8:45 AM
In my program , there is some logic based on the tcode running..
i write the logic based on tcode...
if sy-tcode = 'XXX'.
write : / 'XXX'.
else.
write : / ABC.
endif.
it is working fine in foreground.. but not able to handle the sy-tcode in background..
please guide me on this..
2010 Oct 26 8:50 AM
What is the exact requirement ? system variable SY-CPROG may be helpful.
2010 Oct 26 10:19 AM
Exact Requirement :
For one Executable program we are creating 4 trnasaction codes.
When the user run the trnasaction code and enter the selection screen parameters and run the program in background ( F9 ).
Based on the transaction code some text needs to be displayed in the log...
this is the requirement.
i write the code..
example...
if sy-tcode = 'TCODE_1'.
write : 'First Tcode'.
elseif sy-tcode = 'TCODE_2'.
write : 'Second Tcode'.
endif.
if is working fine in foreground.. but not in background..
please guide me on this....
2010 Oct 26 11:01 AM
2010 Oct 26 11:08 AM
Hi,
Try the following:
Create 4 variables,say W_VAR1,W_VAR2,W_VAR3,W_VAR4.
Under SELECTION-SCREEN OUTPUT event set the flags based on your T.Code. Change your conditions from SY-TCODE to W_VAR1,W_VAR2,W_VAR3,W_VAR4.
Thanks & Regards,
Faheem.
2010 Oct 26 11:31 AM