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

module poll

Former Member
0 Likes
464

i want add the filed in modulepool progrram if pai

field name mwskx -


and i want put enter button and cancel button

can you help in this

3 REPLIES 3
Read only

gopi_narendra
Active Contributor
0 Likes
435

goto SE51 give the prog Name and screen Number and check the radio button Layout Editor.

there u can jsut drag drop the controls on the left side of the window.

u can see a control Input / Output Field

and PushButton.

fill in the properties for the controls

and in PAI and PBO u need to wirte the logic for the buttons

For examples on Dialog Programming see the tcode ABAPDOCU and DWDM

Regards

- Gopi

Read only

Former Member
0 Likes
435

Hi Suresh,

it is very simple to create Push bottons in the module pool program.

in the screen painter choose 2 push buttons, (1 for Enter, 2 for cancel), for those 2 push buttons specify the Text's and Function code.

after this come to the Flow logic area and create one include program under PAI event. and write the logic as follows....

OKCODE = SY-UCOMM.

CLEAR SY-UCOMM.

CASE OKCODE.

WHEN 'ENTER' . (function code)

LEAVE TO SCREEN 200.

WHEN 'CANCEL'. (Function code)

LEAVE PROGRAM.

ENDCASE.

if helpful reward me.

Thanks,

Murali

Read only

Former Member
0 Likes
435

GO to SE38 and give your program name .

Now go to SE51 and give the same name.give your screen number too( screen number except 1000).

You will have severeal elements ,go to Layout editor.

Now you can choose the push buttons and create them as you want.

For the Pushbuttons give the function codes(they should be at the max 4 character in length) For eg say as fun1 and fun2 for your requirement.

Now got to the Flow logic element in the SE51.

There you will have a PAI module.

Here write the code that you want to happen when u press the pushbuttons.

The function codes that you press would get stored in SY-UCOMM.

so write as

CASE SY-UCOMM.

WHEN 'FUN1'.

/*do some operations.

WHEN 'FUN2'.

/*do some operations.

ENDCASE.

other option is u can make use of OK_CODE too instead of SY-UCOMM .

Do reward point if it was useful.

Message was edited by:

sudha kumarappan