cancel
Showing results for 
Search instead for 
Did you mean: 

Handle Error in Mapping

Former Member
0 Kudos

Hi,

I have a scenario on PI where we are sending lots of messages(IDOCs) to outer system(Oracle DB).

Our problem is that in some cases IDOCs do not produce messages for outer system. In that case we are

sending empty msg to JDBC receiver, which does nothing in this case. I would like to avoid that. Question is what is the best way to do that. For example, conditions to decide to produce output message or not is pretty complicated and it is not best/easiest way to do it on receiver determination. Can I somehow stop process in mapping and put msg in status that will not be processed any more. Error I would like not to raise, because in case of some other error, customer will not be aware of some problems or it ill come to late to conclusion of missing messages. Any suggestions?

kr

mario

Accepted Solutions (1)

Accepted Solutions (1)

former_member187587
Contributor
0 Kudos

As I see it (as a rule of thumb) a scenario where an IDoc is send

from a backend system to a 3rd party application is because the data is required in this 3rd party application\a transactional action took place and needed to be implemented in the target system.

therefor you design seems abnormal.

what is the cause\logic for this Empty IDocs?

Former Member
0 Kudos

This interface has long history. It is interface between SAP IS-R and POS on Oracle. When ERP sends assortment list IDOC,

which is frequently, amount of data is huge and it is hampering POS backend system A LOT. So what we did? Wi did the reduction of IDOCs on PI, to send only particular segments in case that master data has changed. Also other case are condition data and in that case we are "cutting out" segments that contains master data. Logic is not so complicated but any how not appr. for XPath and receiver determination. Whole logic is implemented in ABAP mapping on PI. So during tests we didn't figure it out, that some IDOCs producing empty SQL that flows to POS backend. As we are using queuing mechanism, we don't want to condition data comes before master data, we have unnecessary XMLs, which are in queue, waiting to be processed.

In fact interface is working fine, but I want to "squeeze" much as I can from it.....

More and more I think about it, enh. RD is the solution or change the logic on ERP side to implement some logic there.

Edited by: Mario Slopar on Oct 11, 2010 11:42 AM

former_member187587
Contributor
0 Kudos

Basically , if you are looking to distribute only the changed data

your logic should be :

On event of change in a the SAP docuement , an Idoc will be send to XI

XI will insert\update the change in mirror tables\ stored procedure.

Logic in SP .

Even changes in assortments might have a standard handling as IDoc.

stefan_grube
Active Contributor
0 Kudos

> More and more I think about it, enh. RD is the solution or change the logic on ERP side to implement some logic there.

As RD comes before mapping, you have no other choice.

Answers (4)

Answers (4)

Former Member
0 Kudos

If you REALLY need (or can not avoid, though I'm sure more elegant solutions exist), you could issue SELECT SYSDATE FROM DUAL like statements when IDOCs do not contain usable payload ?

Chris

former_member187587
Contributor
0 Kudos

Hi there Mario,

Is it part of the customer requirement to produce an Empty JDBC statment?

Please ellaborate, what is the exact scenario (type of buisness data,IDoc type,number of tables needed to eb updated, special reciever determinationrules you configured)

Former Member
0 Kudos

Hi,

you can use a dynamic(extended) receiver determination. then receiver will be identified based on mapping you specifiy in the receiver determination instead of evaulating xpath conditions. you can handle your logic mapping and then decide if to send the message to the receiver or not. check this for details-

http://help.sap.com/saphelp_nwpi711/helpdata/en/48/ce53aea0d7154ee10000000a421937/content.htm

--more details on how to use this feature

/people/venkataramanan.parameswaran/blog/2006/03/17/illustration-of-enhanced-receiver-determination--sp16

http://wiki.sdn.sap.com/wiki/display/XI/Enhanced%2bReceiver%2bDetermination%2bin%2bSAP%2bXI

On the other hand if you want to throw exception from a mapping then it can be done as mentioned in this blog

/people/alessandro.guarneri/blog/2006/01/26/throwing-smart-exceptions-in-xi-graphical-mapping

regards,

francis

Edited by: Francis Antony on Oct 8, 2010 6:39 PM

Former Member
0 Kudos

I'm using ABAP mapping, and if I raise CX_MAPPING_FAULT system creates alert, which is not needed in this case.

Can this process simply be stopped i nmapping, without raising alerts.

kr

mario

p.s: enh. receiver determination is option, but not first, it requiers more changes on interface

stefan_grube
Active Contributor
0 Kudos

> Can this process simply be stopped i nmapping, without raising alerts.

No, this is not possible.

sbuttler77
Active Participant
0 Kudos

You can throw an exception

throw new RuntimeException("Reason");

and configure Receiver determination to discontinue processing of erroneous

messages.