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 buttons

Former Member
0 Kudos

Hi,

I need to add 3 push buttons to the output screen.

select all

deselect all

remove.

Can you please give me an idea, how to do this.

Thank you.

Veni.

5 REPLIES 5

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

If you are referring to a custom program with a dynpro, you can do this with screen painter, there is a UI element on the left hand side for push buttons, simply create this button anywhere on your screen, double click this button to get the attributes dialog, assign the icon, and the function code. Then in the PAI, you will need to handle the FCODEs that you have created for the buttons.

case ok_code.
  when 'SELALL'.
    clear ok_code.
    ...
  when 'DESALL'.
    clear ok_code.
    ...
  when 'REMOVE'.
    clear ok_code.
    ...
endcase.

Regards,

Rich Heilman

0 Kudos

Hi Rich,

How should I create these buttons.

Thanks

Veni.

0 Kudos

You need to create your own PF-status in SE41, add those buttons( &icons) & tie it your program..

~Suresh

Former Member
0 Kudos

Hi Veni,

Goto SE51 (screen painter) or double click on the screen number in the statement

CALL SCREEN <screen number> .

in the main program and then clicking on Layout button.

Now you can drag and drop your push buttons in the screen. Give each button a name and Function Code (say FC1)

Now activate the screen and uncomment PAI module.

In PAI Module, write the code to respond to the button click.

<u>PAI MODULE</u>

case sy-ucomm.

when 'FC1'.

      • write the code here

endcase.

This is the general procedure...

Regards,

SP.

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

If you are referring to putting pushbuttons directly on the screen and not on the application toolbar, then you need to create these buttons via screen painter, click on the "pushbutton" ui element on the left, then create it in the screen itself within screen painter, click and drag in the screen to the desired length.

Regards,

Rich Heilman