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: 

Push Button on Output Screen

Former Member
0 Kudos

Hi,

I am having a requirement in which, I need to display the report, in the output screen I should have a push button which when pressed the report output should be stored in the Application Layer.

Thanks and Regards,

V.K.

5 REPLIES 5

Former Member
0 Kudos

HI Vikram,

You can create push button in the output list. You have to use SET PF-STATUS statement.

Just follow these stepts for creation of PUSH BUTTON.

1. write SET PF-STATUS 'TEST'.

2. double click on TEST.

3. It will ask you to create status object. click on YES.

4. give the short description and press enter.

5. next screen you will find three things like... MENU BAR, APPLICATION TOOL BAR and FUNCTION KEYS.

6. click on the down arrow that appears next to APPLICATION TOOL BAR.

7. in the items, in first box write your name and press down the text. one popup box will come. press enter.

8. give the function text and press enter.

9. assign key for your push button. and press enter.

10. press enter and activate.

and run your program. you will get push button on output list.

Adding event for the PUSHBUTTON

For the pushbutton use an sy-ucomm ie SAVE to appln toolbar

AT USER-COMMAND.

CASE sy-ucomm.

WHEN 'SAVE'.

write your code here to save in the appln server

Edited by: Raj on Jun 26, 2008 7:32 PM

former_member181962
Active Contributor
0 Kudos

Put a push-button on the application tool bar using

set pf-status statement:

See example program: demo_list_menu_painter

and then in the at user-command section, write the following code.

AT USER-COMMAND.
  CASE sy-ucomm.
    WHEN 'CLICK'.
open dataset <filename> for output in text mode.
loop at itab.  "Itab is the table that is displayed as the list
concatenate itab-field1 itab-field2 itab-field3 into v_string.
tranfer v_string to <filename>.
endloop.
close dataset <filename>.
  ENDCASE.

Regards,

Ravi

former_member598013
Active Contributor
0 Kudos

Hi Vikram,

First create one PF-STATUS.

and then handle the button by the event at user-command.

&*******Reward Point if helpful*********&

0 Kudos

HI,

Thanks for the reply, but I am using ALV to display the final report, I have followed all the steps but not getting the required result.

Please let me know how I can do this requirement.

Thanks,

V.K.

Former Member
0 Kudos

Hi,

Set the PF-STATUS and add one Fcode at the application toolbar it will come as Button.

Then use Event AT USER-COMMAND and write your code for storing the list ouput i.e. internal table into an file on application server i.e. using OPEN DATASET Statement.

you will find example on this in SAP also just going to F1 help on Open dataset statement.

I hope this will help you.

Help children of U.N World Food Program by rewarding points and encourage others to answer your queries.