Unfortunately you need to be more specific than that to get any help with this. This is a general message. Likely there would be a dump (in txn ST22 in the BW system) which may tell what the problem was.
You can't trap ABAP exceptions when calling from an external system. This is because there isn't an abap context which called the function call which would receive the function module's exceptions up the program callstack and make use of them. In other words you can only use those exceptions when you are calling the FM from ABAP.
There's an alternative approach utilised with many BAPIs which are RFM enabled FMs intended for SAP and third party system use.
They have as TABLES parameter an object called a return table. This table contains messages in a standard format which you can receive into your third party system (or SAP system if RFC) and then handle from there. Search for BAPI* in SE37 to find examples, click the TABLES tab.
You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
Add a comment