Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

ALEAUD chooses bad success message for IDOC wrapped around BAPI when 2+ msg

I created a custom BAPI...something...CREATE to create data, and we created one IDOC message type via BDBG transaction.

Now we use ALEAUD to return the error or success message.

Unfortunately, it does not return the most appropriate message when the BAPI returns several messages, among which warning and information messages:

- If BAPI creates the object and it returns a warning followed by a success, the IDOC is created with messages reversed (success followed by warning), thus ALEAUD returns the warning (always the last message of idoc), so we miss the id of object created.

- If BAPI doesn't create it, and returns a warning followed by an error, the IDOC is created with messages reversed, the ALEAUD returns the warning (status 51).

The problem is really the reversal algorithm.

I found that it is located in the ZIDOC_INPUT_* function module generated by BDBG: messages of the bapi are transferred to idoc_status with "INSERT idoc_status INDEX 1". Why don't SAP just use "APPEND idoc_status"?

Did you have this problem, and how did you solve it?

Do you know if SAP recommends something about BAPIs returning warning or information messages?

Thx a lot !

Not what you were looking for? View more on this topic or Ask a question