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: 

what is sy-repid?

Former Member

what is sy-repid? Is it predefined constant in ABAP? How can i search for predefined constants?

1 ACCEPTED SOLUTION

Former Member

it is a system variable which will hold the value of report name

create a program

report test.

write : sy-repid.

you can find all these variable in table <b>SYST</b>

15 REPLIES 15

Former Member

it is a system variable which will hold the value of report name

create a program

report test.

write : sy-repid.

you can find all these variable in table <b>SYST</b>

No more a "variable": it's a constant in every program since ABAP 6.10 (~2001), as said in the official documentation https://help.sap.com/doc/abapdocu_753_index_htm/7.53/en-US/index.htm?file=abennews-610-system.htm#&a...:

The system field sy-repid is no longer a component of the structure SY in the ABAP program or the 
structured type SYST in ABAP Dictionary. Instead, from Release 6.10, every program contains the 
predefined constants sy-repid and syst-repid, which both contain the name of the current program. 
There are also two predefined types sy-repid and syst-repid. The obsolete type references 
LIKE syst-repid and TYPE sy-repid are, therefore, still possible. 

Former Member
0 Kudos

Hi ajay,

sy-repid is a system variable that stores the current program name. all the system variables can be found in the table 'SYST'(tcode se11->SYST) these variables hold the values at runtime.

Regards,

Vidya.

0 Kudos

Thanks but i was confused because when i doubleclick the sy-repid, its showing its a predefined constant instead of gng to the syst structure.

0 Kudos

What version are you on? I guess since 47 & upward REPID is no longer part of the SYST structure.

~Suresh

0 Kudos

Hi ajay,

yes suresh is righh..

in 4.6 , if you double click on sy-repid it will take you to SYST structure

in ECC 5.0 try with SY-CPROG , it will take you to SYST structure

0 Kudos

*----


REPORT ZCHKSYREPID.

break-point.

start-of-selection.

write : / sy-repid, sy-cprog.

submit ZCHKSYREPID2 and return.

PERFORM r2 in program ZCHKSYREPID2.

*----


REPORT ZCHKSYREPID2.

start-of-selection.

write : / sy-repid, sy-cprog.

------ Form r2 -


form r2 .

write : / sy-repid, sy-cprog.

endform. " r2

amit_khare
Active Contributor
0 Kudos

SY-REPID is use for REPORT ID.

These are system commands and can be find in the Structure SYST in SE11.

Regards,

Amit

Reward all helpful replies.

Former Member
0 Kudos

hi,

its an system field.

which gives program id.

reward the helpful answers

thanks

shyam

former_member189631
Active Contributor
0 Kudos

Hi ajay,

sy-repid [system report identifier] is a system variable from which you can find your report program name.

Former Member
0 Kudos

hi abay,

sy-repid is a system field which contains the current report prg name.

u can obtain all system fields in SYST structure.

goto SE!11 -> in tables -> SYST -> display

then u ll get all system fields in that.

if helpful reward some points.

with regards,

suresh babu aluri.

Former Member
0 Kudos

Sy-Repid is a system field which returns the current program....

ferry_lianto
Active Contributor
0 Kudos

Hi,

SY-REPID

Name of the current ABAP program. For externally-called procedures, it is the name of the main program of the procedure. If you pass SY-REPID as an actual parameter to an external procedure, the formal parameter does not contain the name of the caller, but that of the main program of the procedure. To avoid this, assign SY-REPID to an auxiliary variable and use that in the call, or use the system field SY-CPROG.

For more information, please check this link.

http://help.sap.com/saphelp_46c/helpdata/en/7b/fb96c8882811d295a90000e8353423/content.htm

Regards,

Ferry Lianto

Former Member
0 Kudos

Hi ,

<u><b>sy-repid</b></u> stores the Name of the current ABAP program. For procedures called externally, name of the framework program of the procedure. <u><b>sy-repid</b></u> 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.

Hope this may help...

Thanks & Regards

Jitendra

Former Member
0 Kudos

Hi Ajay

Sy-repid is nothing but the system variable to return the report name..

This variable is often used to generate ALV Reports...

If you wanna see all system variable just Goto SE11 and type SYST as table name you will get all the system variables available...

REWARD IT IF USEFUL....!!!