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

REG Function Module

Former Member
0 Likes
688

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

5 REPLIES 5
Read only

anversha_s
Active Contributor
0 Likes
665

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>

Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
665

Hi,

you can the calling program name from the system filed

sy-cprog.

Regards,

Sesh

Read only

0 Likes
665

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.

Read only

0 Likes
665

if sy-cprog = 'ZZZ_TEST'

endif

Read only

Former Member
0 Likes
665

You can use FM 'SYSTEM_CALLSTACK' in order to find out, if your report is part of the callstack.

Regards,

Thomas