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 display of messages 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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Deepthi,

Like Rob said, you should do it by yourself.

LOOP AT SCREEN.

IF SCREEN-NAME = 'XXXX'.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Regards,

Ravi

Note : Please mark the helpful answers

9 REPLIES 9

Former Member
0 Kudos

Rather than a message, try doing it programatically after the save. In the PBO after a save, loop at the screen and make the input fields display only.

This is a duplicate post. Please close the other one.

Rob

Former Member
0 Kudos

Deepthi,

Like Rob said, you should do it by yourself.

LOOP AT SCREEN.

IF SCREEN-NAME = 'XXXX'.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Regards,

Ravi

Note : Please mark the helpful answers

0 Kudos

Hi Ravi,

Please tell me where to write this code in PAI or PBO.

Iam new to this field .

LOOP AT SCREEN.

IF SCREEN-NAME = 'XXXX'.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

what does it exactly do and what screen-name means.

Please let me know i can send my code.

Waiting for your reply

Deepthi

0 Kudos

Hi

Every code used to change the attributes of a screen has to be placed in PBO:

PROCESS PBO

MODULE LOOP_SCREEN.

PROCESS PAI.

MODULE USER_COMMAND.

MODULE LOOP_SCREEN.

CHECK FL_INPUT_OFF = 'X'.

LOOP AT SCREEN.

IF SCREEN-NAME = 'XXXX'.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

SCREEN-NAME is the field where the name of input field is stored, so if you can control that field to de-active only certain fields, but if all fields havn't to be available for input, you can use this code:

LOOP AT SCREEN.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDLOOP.

ENDMODULE.

MODULE USER_COMMAND.

CASE OK_CODE.

WHEN 'SAVE'. FL_INPUT_OFF = 'X'.

...........

ENDMODULE.

Max

Former Member
0 Kudos

Hi Max,

Thanks for your time.

I am little confused .Let me explain my situation.

I have 2 screens say 100 and 200.where 100 is my first screen when i press new button i go to 200 screen.

In 200 screen , i have a table control in which i have few columns like date ,material no etcc which are my inputs when i press enter the remain fields like material description get populated.

Once i am done with this and when i click save , i need a message showing DATA SAVED and i want the table control to be deactivated so that the user can do nothing i.e he cannot enter new record etccc....

1)if i use message type I its not deactivationg the screen.If i used Message type W its deactivating but now when i enter back button which needs to take me 100 screen but it displaying the same screen and after that if i press once again its taking me to 100 screen.

Now i need two things to be done.

1)What of message type do you suggest me to use i.e

A,E,I,S,W

2)If i use that message type,i shouldnot be able to do anything with that screen i.e after saving i.e i should not be add a new recordi.e the table control should be deactivated.

If this is satisfied if i press back icon then it should take me to screen 100.

Hope iam clear .

Help me out ,iam stuck at this point. I need to get this done.

Thanks in advance

Waiting for your replies

In

0 Kudos

Deepthi,

As suggested before you should not use the message to deactivate the screen elements. Use the S message type to display the success message if the save is success else, you encounter a error use the E message type.

SCREEN is a table, which holds all the details of the screen elements that you have put on the screen. This should be done on the PAI of the screen of 200 as that is where you are displaying the data and the user is saving the data.

Regards,

Ravi

Note : Please mark all the helpful answers

0 Kudos

Hi Ravi,

If i don't use message type S saying data is saved

But once data is saved i am able to give a new record as input,which i don't want to.

So i thinking of disabling the table control so i that i won't be able to enter new record.But i want back and exit should be active and leave to previous screen if i press back.Please let me know

Now what you want me to do.

Waiting for your reply

Thanks in advance

Nandini

0 Kudos

sorry

If i use message type S iam able to enter new record which i dont want

Thanks

0 Kudos

So, you disable the fields first and then give the S message, that should work right?

Regards,

Ravi

Note : Please mark all the helpful answers