cancel
Showing results for 
Search instead for 
Did you mean: 

FM exception in BW system

Former Member
0 Kudos

Dear colleagues,

It seems a function module (developed in a BW system) cannot raise an exception when called from an external system through a middleware.

Any hint? Thanks.

Ray

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

What seems to you is correct.

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.

Former Member
0 Kudos

Fair enough. I'll work out a more specific explanation: the thing is it actually seems as if all the logic of exceptions developed in the function module (IF... then RAISE...) doesn't exist at all. The logic flow may go through a specific path that ends up in an exception raise, but the actual behaviour, the actual result, is that the exception is not raised: the function module finishes its execution without having the exception raised, and neither terminating the program through a dump which - if existing - might be investigated through st22. So it's sort of scary, nothing that can be really followed up through a debugging.

Does it ring a bell?

Former Member
0 Kudos

Hi

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.

Hope that helps.

GB

Answers (0)