09-28-2010 3:49 PM
Hi All,
I am using the FM L_TO_CREATE_SINGLE. to create a TO. There are three situations in which this FM is run:
1. Custom Code runs in foreground
2. Custom Code (same code) runs in backgound.
3. The FM is called from LT01.
Now for the situation one I am getting an error message. I debugged this and strangely enough the statement for message is
MESSAGE W104 WITH LTAP-NLPLA LTAP-MATNR.
.
The message type is warning and still I get the error message. Now in situation 2 and 3 same statement is executed. for situation 3 I see I am getting a warning (as per the statement it looks correct). For Situation 2 I am not sure but since the TO is created I am assuming its warning message.
Now the question is why am I getting an error message when the statement clearly says W as the message type. And what can be done to fix it.
P.S.: Previous posts on this do not provide any solution so posting it as new questions.
Thanks
Anuj
09-28-2010 5:17 PM
Do you mean that SAP changes the W to E, or that SAP pops up a screen with the Warning, like it does for error messages? If so, this is a user setting that controls whether pop-up or bottom of screen. If you con't want the user to see, wrap logic around when it should appear.... you know how the program was called and how it;s being executed...
09-28-2010 8:31 PM
The statement that is getting executed is the same. Message W104...
But in one case (LT01) I get a warning message (it flashes a yellow message at the bottom and you can proceed by hitting enter).
When the custom code runs I get the message as error (Red message at the bottom).
10-14-2010 5:25 PM
we have decided to use a generic exception (ERROR_MESSAGE) to handle this situation. This is not the cleanest solution but works for our situation. Closing the thread.