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

Push button (urgent)

Former Member
0 Likes
1,012

Hi experts,

i have never use push button before in my screen layout.

Can anybody teach me how to delcare push button in flow logic?

I have 3 push button. I need to direct each button press to another program. How do i code that?

Anyone see this post please reply me as soon as possible.

Very urgent. Thanks alot!

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
882

Hi,

You can create a push button in the screen in dialog program by drag & drop otion on the screen in se51.

Also you can controll the events by sy-ucomm, as it will be having unique ok-code on the screen.

Regards,

Brijesh Patel

7 REPLIES 7
Read only

Former Member
0 Likes
883

Hi,

You can create a push button in the screen in dialog program by drag & drop otion on the screen in se51.

Also you can controll the events by sy-ucomm, as it will be having unique ok-code on the screen.

Regards,

Brijesh Patel

Read only

0 Likes
882

hi thanks but what do u mean by unique code? any sample code?

Read only

0 Likes
882

Hi

Jus as wad Nishant Gupta posted.

The function code can be created in the screen painter.

Step1) create a push button

Step 2) double click on the button

Step 3) a pop out screen will show

Step 4) enter the function code eg. PUSH in the fct field

You have successful create the function code next pasted the code from Nishant Gupta. Remember put in the PAI of the module.

Read only

Former Member
0 Likes
882

hi,

In PAI

in user command module.

case sy-ucomm.

when 'PUSH1'.

submit program.

when 'PUSH2'.

Submit program.

when 'PUSH3'.

do wat ever u want to do.

endcase.

PUSH1, PUSH2 , PUSH3 r the function codes of three push buttons

Regards,

Nishant Gupta

Read only

Former Member
0 Likes
882

Hi,

Here is a sample program in the system... DEMO_DYNPRO_PUSH_BUTTON

Reward the points for the helpful answer..

Regards,

Brijesh Patel

Read only

Former Member
0 Likes
882

hi ,

in ur screen layout (se51) . GO to element list tab . write down OK_CODE for the last entered element (type ok).

now in the screen create three buttons with okcode PUSH1,PUSH2,PUSH3 .

in the PAI module :

PROCESS AFTER INPUT.

MODULE USER_COMMAND_0120.

click on it to create a module in ur mail program.

In ur program define :

DATA: OK_CODE LIKE SY-UCOMM ,

DIS_CODE LIKE SY-UCOMM .

DIS_CODE = OK_CODE.

clear ok_code.

CASE DIS_CODE.

WHEN 'PUSH1'.

-


code here----


WHEN 'PUSH2'.

-


code here----


WHEN 'PUSH3'.

-


code here----


WHEN OTHERS.

endcase.

Read only

Former Member
0 Likes
882

Hi Eileen,

You have to first create three push buttons on your screen. Then you write the following code

case sy-ucomm.

when BUTTON1.

call program.

when BUTTON2.

call program.

when BUTTON3.

call program.

endcase.

Regards

kaushik