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

syntax for report statemnt..?

Former Member
0 Likes
468

please tell me why is ( ) required around sy-repid? in:

REPORT (SY-REPID)

NO STANDARD PAGE HEADING

LINE-COUNT 65

LINE-SIZE 255

MESSAGE-ID OIUH.

Thanks

Charles

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
391

I've actually never seen a REPORT statement that had the report name as a variable, but that is the reason why the parenthsis are required. I didn't know that that actually worked.

You see, usually the report statement is like so.

REPORT  ZRICH0001.

where ZRICH0001 is simply the static report name, but in your example, SY-REPID is a system variable, and you don't want the report name to be "SY-REPID", you want it to be the value of SY-REPID. That is why you need the parenthesis, this tells the runtime that the variable value is to be used.

Again, I've never seen this done before.

Regards,

Rich Heilman

2 REPLIES 2
Read only

raja_thangamani
Active Contributor
0 Likes
391

Because Report Name will be populated <b>at runtime dynamically</b>. so it's mentioned with in (). REPORT (SY-REPID).

Raja T

Message was edited by:

Raja Thangamani

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
392

I've actually never seen a REPORT statement that had the report name as a variable, but that is the reason why the parenthsis are required. I didn't know that that actually worked.

You see, usually the report statement is like so.

REPORT  ZRICH0001.

where ZRICH0001 is simply the static report name, but in your example, SY-REPID is a system variable, and you don't want the report name to be "SY-REPID", you want it to be the value of SY-REPID. That is why you need the parenthesis, this tells the runtime that the variable value is to be used.

Again, I've never seen this done before.

Regards,

Rich Heilman