‎2006 Oct 30 8:37 AM
Hai all,
I am calling a FM ZZZ_FM in a report zzz_test.Now in the report i have to check tht if the calling preogram is my report zzz_report then i have to do retrive certain data.how can i check it. Plz help me.
Regards
GAnesh
‎2006 Oct 30 8:40 AM
Hi ,
chk the system variable.
sy-cprog
or
sy-repid.
it contain the program name. u can chk these variable.
eg:
<b><i>DATA: wf_program LIKE sy-cprog
if wf_program = 'Z_PGM_NAME'.
endif.</i></b>
rgds
anver
if hlpd pls mark points
<i>kindly close the thread if ur issue solved.</i>
‎2006 Oct 30 8:40 AM
Hi,
you can the calling program name from the system filed
sy-cprog.
Regards,
Sesh
‎2006 Oct 30 8:45 AM
hi sesh,
I have used it and checked that
data ws_repid type sy-cprog.
if ws_repid = 'ZZZ_TEST"
cond1.
but still it is not enteringf the loop.
wht shall i do.
‎2006 Oct 30 8:49 AM
‎2006 Oct 30 9:57 AM
You can use FM 'SYSTEM_CALLSTACK' in order to find out, if your report is part of the callstack.
Regards,
Thomas