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: 

Interactive report

Former Member
0 Kudos

HI friends,

I want to create a menu on the output list of my interactive report. i know that we do this using screen painter anyone please drop u'r inputs with detailed description.

Regards,

Vijay

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Do you mean like a regular menu at the very top of the gui? If so, before writing your list, set the status. In the status, you can define your menu. Put the following line of code in your program before you write the list, double click on the word LIST, system will ask you if you want to create, say yes, from there you can define your menu. If you need help with that, reply back.

SET PF-STATUS 'LIST'.

Regards,

Rich Heilman

6 REPLIES 6

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Do you mean like a regular menu at the very top of the gui? If so, before writing your list, set the status. In the status, you can define your menu. Put the following line of code in your program before you write the list, double click on the word LIST, system will ask you if you want to create, say yes, from there you can define your menu. If you need help with that, reply back.

SET PF-STATUS 'LIST'.

Regards,

Rich Heilman

0 Kudos

Hi Rich,

Thanks for u'r help man but till this i know just let me know what to do next.PLease I hope u would help me.

Thanks...

Regards,

Vijay

0 Kudos

Ok, when you create your gui status, there is a section call "Menu Bar", there is an expand button next to it. click it. Now there are some input fields there, enter your first menu there, lets call it "MAIN". Now Double click the word MAIN, you will see a few more input fields underneath, then the following.. Activate the status and program. Run it, you will see the menu at the top of the gui after executing the report.

FCODE      TEXT
Action1    Action 1 Text
Action2    Action 2 Text

Here is the code for the sample program that I'm working with.



report zrich_0001.



parameters: p_val type i.

start-of-selection.

  set pf-status 'LIST'.

  do 10 times.
    p_val = p_val * sy-index.
    write:/ p_val.
  enddo.

Also, when defining your gui, since you are overriding the standard, you will need to enter the standard FCODEs for green back arrow, enter BACK for this. This will allow you to exit the program.

0 Kudos

Once you have that done, you will need to handle the FCODEs. You will need to handle in the AT USER-COMMAND event. See the sample program below.



report zrich_0001.



parameters: p_val type i.

start-of-selection.

  set pf-status 'LIST'.

  do 10 times.
    p_val = p_val * sy-index.
    write:/ p_val.
  enddo.


at user-command.

  case sy-ucomm.
    when 'ACTION1'.
* do something.
    when 'ACTION2'.
* do something else.

  endcase.

REgards,

Rich Heilman

0 Kudos

Please remember to award points and close this post if your question has been answered. Thanks.

Regards,

RIch Heilman

0 Kudos

HI rich,

Thank you very much man u'r answers are of great help to me to undertand and learn ABAP with ease. I am developing interest in the subject.

Thanks for everythinig. Also I promise to give points with out failure.

Regards,

Vijay