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 logic for module pool

Former Member
0 Likes
4,070

I have 3 radio buttons ( group) and 2 buttons

ok and cancel

When the user selects a radio button and clicks on ok button i need to include an include program ( another program)

if the user clicks on cancel button , i need to exit out of the screen

Please send some logic for this. I am new to module pool programming.

I will reward for helpful answers, immediately

Thanks in advance

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,639

Write down under PAI Event ...

do not use sy-ucomm always except sub screen..

case ok_code.

when 'OK'.

use ur include program logic'.

when 'CANC'.

leave to screen 0.

endcase.

always Function should be 4 Char.

Reward Points if it is helpful.

Thanks

Seshu

3 REPLIES 3
Read only

Former Member
0 Likes
1,639

You need to define PBO and PAI modules in your Dynpro.

Assign Function Code to your buttons and do something like this (After creating the OK_CODE in the Dynpro).


MODULE USER_COMMAND_0100 INPUT.
OK_CODE = SY-UCOMM.
CASE OK_CODE.
WHEN 'OK'.
CALL TRANSACTION 'ME21'.
WHEN 'CANCEL'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE.

Greetings,

Blag.

Read only

Former Member
0 Likes
1,640

Write down under PAI Event ...

do not use sy-ucomm always except sub screen..

case ok_code.

when 'OK'.

use ur include program logic'.

when 'CANC'.

leave to screen 0.

endcase.

always Function should be 4 Char.

Reward Points if it is helpful.

Thanks

Seshu

Read only

0 Likes
1,639

Can any one send some code.I am unable to clear my issue