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: 

system variables

Former Member
0 Kudos
177

hi

what is the diff bet the system variables sy-repid and sy-cprog thanku

1 ACCEPTED SOLUTION

Former Member
0 Kudos
138

Hi,

sy-repid will give the current main program name.

sy-cprog will give u the calling program name.

Prajith

4 REPLIES 4

Former Member
0 Kudos
139

Hi,

sy-repid will give the current main program name.

sy-cprog will give u the calling program name.

Prajith

Former Member
0 Kudos
138

hi

CPROG Runtime: Main program

REPID Program: Name of ABAP/4 program

hope it helps..

reward if useful

regards

dinesh

0 Kudos
138

Hi,

sy-cprog:

In procedures called externally, the name of the calling program, Otherwise the name of the current program. If a procedure called externally calls another external procedure, sy-cprog contains the name of the framework program, and is not set to the name of the framework program of the subsequent calling program.

sy-repid

Name of the current ABAP program. For procedures called externally, name of the framework program of the procedure. sy-repid when transferring actual parameters to an external procedure, before release 6.10, the formal parameter was not set to the name of the caller, but to the name of the procedure instead. As of release 6.10, sy-repid can be transferred to procedures without help fields.

Regards,

Sesh

Former Member
0 Kudos
138

hi..

<b>SY-REPID / SY-CPROG</b>

SY-REPID is the Name of the current ABAP program, SY-CPROG is he name of the current program OR the name of the calling program within a procedure (perform externaly, call function)

<b>Reward points if useful</b>

Regards

Ashu