When working with RFC-enabled Function Modules I often add custom return messages. These are defined as message classes with IDs and parameters. Now I receive those messages perfectly in my calling program, but since the caller can be on a different system the message classes I defined on the source system are unknown. Standard output of these messages to a message manager or application log fails as the text can't be generated.
What is the best practice for making these types of messages meaningful in the calling environment?
Is there an alternative to filling the text field in the source program, for instance by using MESSAGE_TEXT_BUILD
? If I fill that text will standard SAP code not try to overwrite it from a non-existent message class?
MESSAGE_TEXT_BUILD
to fill theMESSAGE
field of theBAPIRET2
structure. This works as long as the calling system doesn't regenerate the text from the message parameters. – Lilienthal