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: 

How to programmatically obtain the input parameters for a report?

Former Member
0 Kudos

Hi,

Is there a programmtic way to obtain the list of input parameters for a report?

Thank you in advance for your help.

Pradeep

5 REPLIES 5

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Here is a sample.



report zrich_0003.


data:
      selctab type table of rsscr with header line.

data:  syrepid type sy-repid.


parameters: p_chk type c.
select-options: s_chk for sy-datum.

syrepid = sy-repid.


load report syrepid part 'SSCR' into selctab.


loop at selctab.

  if selctab-kind = 'S'
    or selctab-kind = 'P'.

    write:/ selctab-name, selctab-kind.
  endif.

endloop.

check sy-subrc = 0.

Regards,

Rich Heilman

Former Member
0 Kudos

Hi Pradeep,

Could you give more detail about your requirement?

Best Regards,

Sasi.

0 Kudos

or you could use the following function module.

<b>RS_REPORTSELECTIONS_INFO</b>

just pass the report name and get back all the parameters /select-options details along with their DB reference filed info and defaults as well.

Regards

Raja

0 Kudos

Thank you all for your help.

Here is the background on what I need to accomplish.

I am creating an ABAP report that in turn must call other ABAP reports and aggregate the output of all these reports. To run a report, it appears that I need to call "Submit" with a report name. Is this right? How do I pass the parameters to submit?

Thank you once again for your help.

Pradeep

0 Kudos

Yes, you are correct. You can pass the paramters using the WITH extension.

SUBMIT report_name 
         with P_PARM1 = "Whatever"
         and return.

Here P_PARM1 is a parameter in the <report_name> program. It works with select-options in a simular fashion. You can do F1 help for more info.

Also, please remember to award points for helpful answers. Thanks.

Regards,

Rich Heilman