05-19-2006 2:06 PM
Hello all, I'm using this BAPI to update some materials and I'm having problems handling the error messages.
This is my code:
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
headdata = header
plantdata = w_marc
plantdatax = w_marcx
valuationdata = w_mbew
valuationdatax = w_mbewx
IMPORTING
return = return
TABLES
returnmessages = return_msg.
as you can see I have seted the table returnmessages, but for some reason, there are some erros that are showed up in a window on the screen and the user must press ok for the procces to continue. Is there any way to avoid this kind of errors on a BAPI?
05-19-2006 2:15 PM
05-19-2006 2:16 PM
Mauro,
Ideally a BAPI is not supposed to throw any errors on the screen.I went through the source code of 'BAPI_MATERIAL_SAVEDATA' and found out at certain conditions some messages are being output instead of being stored in the return table.You cannot suppress them.However what you can do is to ensure that the data being passed is as correct as possible.
Additionally i tried looking for some import parameter which will suppress these forced messages.Seems there is no such parameter available.
Reward helpful answers
Cheers
Nishanth
Message was edited by: Nishanth Bhandar
06-01-2007 7:47 PM
Hi,
I had the same issue with another BAPI. It turned out to be a config problem and someone added a substitution rule that caused the pop up. Check config. If it is pop up messages that you are getting, you can debug the dialog and from there you can see what is wrong.
Good luck,
seema
12-29-2007 6:03 AM
dera mauro,
could you plz send me you code...i am using this bapi for the first time