cancel
Showing results for 
Search instead for 
Did you mean: 

Abap proxy exception Handling

Former Member
0 Kudos

I have a scenario File -> Synchronous Abap proxy .

In the Abap proxy i am doing some data validation before executing a Function module to update the data in R3.

The file is placed in a folder on a server and after the update the file is placed in a folder 'Archive'.

Everything works correctly but i want to raise an exception whenever there are invalid data in the file. The file will be placed on a folder 'Faults'.

In the abap proxy i am using the following code:

RAISE EXCEPTION TYPE zpicx_fmt_nir

EXPORTING

standard = ls_fault.

On the sxmb_moni from R3 the message got the status 'Application error manual restart possible' .

But on the XI/PI side it got the status 'Successfull'.

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

> I have a scenario File -> Synchronous Abap proxy .

That does not make sense.

Scenarios with file adapter have to be asynchronous always.

What you can do is following:

The abap proxy receives data, gathers error data and creates a message call with an outbound ABAP proxy. This message goes to a file adapter which writes the error file.

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks Alex and Stefaan, i am going to have a look at those solutions.

Point rewarded

alex_cook
Active Participant
0 Kudos

Hi Tony,

Christophe is correct, on the PI side the status is successful because it has done it's job for this message - in this case it has delivered to the target system.

If you want to do something with the archived file during processing of the proxy in ECC, you will have to have the name of the file in the payload of the target message, so that once you've raised the exception you can retrive the file and do something with it (ie put it in the faults folder).

Check this link for details on how to get the filename and make it part of your message mapping:

Step 1 talks about creating a UDF in the message mapping - you shouldn't have to worry about the other steps.

http://wiki.sdn.sap.com/wiki/display/XI/CombiningthreedifferentaspectsofPIinoneshot

Alex

Edited by: Alex Cook on Jan 29, 2010 2:27 AM

Former Member
0 Kudos

Not sure, but I think from a PI POV, the msg has been successfully delivered to the target system ... Now, becuz you're using proxy technology, msg is handled locally by your R/3 IE, this is where you'll have to deal with the msg reprocessing/fixing/etc

Chris