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: 

error message issue

Former Member
0 Kudos

HI All,

Am facing an unusual problem.

I have designed a screen program and once i enter an invalid material in the screen , am showing an error message ...now the issue is once the error message is displayed am unable to change the material,if i try changing to valid material and press enter its directly exiting out of the screen.....,,After displaying the error message even am unable to debug the screen after entering valid material.

Hope the issue is clear. Pls sugges me with the alternatives.

thanks

-suresh

12 REPLIES 12

brad_bohn
Active Contributor
0 Kudos

Your flow logic isn't correct. See the help on FIELD, CHAIN, and MODULE. Set your NEXT SCREEN value for the screen correctly in the screen definition as well.

Former Member
0 Kudos

HI Brad,

Thanks for ur reply.

Actually its an alv container designed in the screen.

In the container if i ADD an invalid material am giving error message ,but at the same time am unable to give the valid material and press enter nor debug ...its going back to the main sap screen.

Would this Chain.....endchain helpful for me..?

thanks

-suresh

Former Member
0 Kudos

Hi

Use Return after the message / Set the screen to the screen which you are giving the input .

Hope it works

Former Member
0 Kudos

Hello,

it may be due to system behavior after the message, because it depends on the message type and on the context of the message. For example - the message type W will behave differently in the PAI module and the START-OF-SELECTION block.

Try changing the message type to S - it will be shown on the status screen.

Below you can find more about the messages behavior in various contexts:

[http://help.sap.com/saphelp_46c/helpdata/en/9f/dbaae335c111d1829f0000e829fbfe/content.htm ]

Former Member
0 Kudos

Hi,

Try changing the type of message

try Message e001(<Message class name >) display like 'I'.

Former Member
0 Kudos

Its simple. Instead of displaying error message display the success message as error and clear the ok codes used for screen navigation (moving to different screen).

CONSTANTS : c_msg_typ_e TYPE char1 VALUE 'E'.

Clear ok_code.

MESSAGE s001(ZMessage_class) DISPLAY LIKE c_msg_typ_e.

Awards points if useful

0 Kudos

HI Amit,

Thanks for the reply!

I have tried the option Message s035(00) with 'Invalid Material' display like 'E' .., but the problem is if i enter an invalid material the system still allows me to add another valid material which is not at all correct.

The requirement is whenever I add an invalid material in the alv container of that screen, I should throw an error message in that screen and block further processing of adding another material ,.

thnks

-suresh

0 Kudos

Hi,

you ca try chain endchain on this particular field

within this chain endchain u can check for valid material number

0 Kudos

If you are using ALV OO, then try to use the event DATA_CHANGED. This event is triggered when a value is changed in the ALV. So, just turn on this event and check the value, which user has specified. If it's invalid, clear the cell or do whatever you want and give the user information in the status bar (by message type S).

Write, if you need more help with this.

0 Kudos

Hi,

I think your are so sad.

In your module pool program it fine.

What is actually happaned in you program. In moudle you wrote code to check material is invalid.

If invalid material found display error message block all input fields.

But you are call screen to display ALV for invalid material and display error message in ALV. It's gives runtime error.

When you diplay message type 'E' in ALV it is terminated by system. I also face such type of problem before.

I don't know exact cause of error but may be It is normal processing of Module pool with ALV.

Now you try to display message type 'S' then all fiedls are input inabled. it is also normal apbap processing.

I am giving you alternate solution to avoid it.

Don't call alv if invalid material found display error message only. Give user button on screen or toolbar (with function code type E i.e exit ) to display invalid material.

Display error message on initial screen if invalid material found, It's disable all the input fields and user need to click on push button on appliation toolbar or on screen to display the invalid material in ALV.

Kind Rgds

Ravi Lanjewar

0 Kudos

Any Replies??

0 Kudos

ANY REPLIES???