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 pool program

Former Member
0 Likes
586

hi all ,

i'm now working on module pool program and my requirement is in the screen with some fields if i've entered any data which is not in the database then a pop up should rise and object me and if i perform any action on that popup like exit or cancel then it should direct me to the same screen where i can enter the correct data. Can anyone help me with this.

Thanks in advance.

5 REPLIES 5
Read only

Former Member
0 Likes
561

Vamsi,

Do a chain - endchain for all the fields that you want to validate. Get the possible data from DB. Check the value entered for these fields against the contents fetched from DB. If anything other than the contents from DB, throw a pop up.

* The module mentioned in chain - endchain gets called when any of the fields mentioned in chain - endchain is not initial.

Thanks,

Vikram.M

Read only

0 Likes
561

WRT what I had said above, I am hoping these fields are master data fields which have a few entries in DB. This will not be a good idea to follow for fields like MATNR which will have lot of entries.

Read only

Former Member
0 Likes
561

Hi Enoch,

The custom screen you have created will have PAI and PBO events. You will have to validate the entry entered by the user on the custom screen at PAI event. You can give error message here.

You can check any module pool programs for reference. These programs start with SAPM*

Hope this helps!

Read only

Former Member
0 Likes
561

Hi Enoch

you can use chain endchain for all the fields to validate

OR

You can try this :

1.Extract all the data from the database table into an internal table in the PBO itself.

2.Now when the user enters data in all the fields and press on submit button.

3.You can write in PAI : In the fields on selection screen will be having data (variables with the same name ), you can binary search in the table with the field or read internal table with data

4.and for pop up :

if sy-subrc ne 0.

then use FM POPUP_TO_CONFIRM .

else its fine.

endif.

Read only

Former Member
0 Likes
561

Hi,

Have a look at these function modules

POPUP_FOR_INFORMATION

POPUP_TO_DECIDE_WM

POPUP_WITH_2_BUTTONS_TO_CHOOSE

POPUP_WITH_3_BUTTONS_TO_CHOOSE

POPUP_TO_CONFIRM

POPUP_CONTINUE_YES_NO

These function modules will let you know what action was performed on the pop-up.

Hope this helps.

Thanks,

Tooshar Bendale