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: 

regarding messages display in module pool programming

Former Member
0 Kudos

Hi

I have screen 100 in which i save button .Once i click save the empty rows should get deactivated i.e i should not be able enter any values.Iam getting that by using message type E OR W ,but the problem is when i use back button instead of going to PAI(where i have written code for back button) it is continuing from the next line i.e the line after error or warning message line so its going to PBO and displaying the data .After pressing back button once again its going to previous screen i.e i need to press back button twice. Is there any other to go about this thing.I tried to give I message type but it doesn,t inactivate the empty rows and columns

PBO

Module x (display code)

Pai

module a (back button code)

module b (save button code)

Have a nice week end

Waiting for your replies

Nandini

2 REPLIES 2

Manohar2u
Active Contributor
0 Kudos

Hi Nandini,

If you want to show the records in display mode once it is saved, then you can show with screen groups and loop at screen logic, but am not clear why you have raised E/w messages here.

Raising of messages of E or W is making you to click BACK button twice.

Regds

Manohar

<b></b> PLEASE DON'T POST DUPLICATE POSTINGS<b></b>

Message was edited by: Manohar Reddy

Former Member
0 Kudos

Hi Nandini

If you wish to modify the display of the screen, you can do it only by looping the screen in the PBO module and not in PAI, so when you click the SAVE button, the fcode is stored in sy-ucomm.

ANALYSIS OF YOUR PROBLEM:

On the SAVE button, if you give an Error or a Warning message, the process will be interrupted and system returns to the screen display deactivating all the fields outside the CHAIN. FIELD: <fieldname> ENDCHAIN.(as you noticed) without triggering the event PBO. If no change is made in the fields that are ready for input, the PAI process is continued with the FIELD statement and all the previous statements are not processed. This is the reason, why you need to press the Back button twice.

SOLUTION:

You need to set the group1 field of all the coloumns in table control, say G1.

In PAI

In user-command module

case sy-ucomm.

when 'SAVE'.

message 'Records Saved' TYPE S.

when ...

endcase.

In PBO, you can have the module modify_screen.

MODULE modify_screen output.

if sy-ucomm = 'SAVE'.

loop at screen.

case screen-group1.

when 'G1'.

screen-input = '0'. "it is zero and not O

modify screen.

endcase.

endloop.

endif.

Now the table control will be in display mode and when you click the back button once, you will reach the previous screen.

Your objective for displaying the message for Storing the data and returning to screen 100 will be accomplished.

Navneet

PS: Please award points and close the thread.

Message was edited by: Navneeth Saraogi