cancel
Showing results for 
Search instead for 
Did you mean: 

IDOC AAE sender adapter

former_member198060
Participant
0 Kudos

Dear all,

I have a question about the IDOC AAE adapter on a PI 7.31 java only system with an ERP --IDoc--> PI --File--> FTP scenario

In my scenario I would need to change IDOC DC40 Segment information before the IDOC is being processed in the PI pipeline. Unforutnately I cannot change the header information directly on the sending system.

The processing on PI will fail due to the faulty DC40 settings, therefore I would like to correct the Segment before PI is processing the file.

I thought about using the PutPayloadValue bean to replace values in the IDOC XML structure but this does not seem to work. If I call the bean before "CallSapAdapter" in the module chain, this will result in the following error: "while trying to invoke the method org.w3c.dom.Node.appendChild(org.w3c.dom.Node) of an object loaded from local variable 'template_parent". Is this because the idoc xml is generated on the PI only after the CalSapAdater step and not already on the ERP? Or might it be due to miss-configuration? (I did not provide a namespace in the module settings of the bean as the IDoc XML structure has no namespace)

What other options would I have on PI to edit the DC40 segment before the pipeline processing?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I had a similar issue on a different adapter type.

Please make sure to insert the appropriate namespace in parameter xmlns AND in the put value. Example:

xmlns                              xmlns:ns0="http://www.test.com"

put:/ns0:root/ns0:field1    "value"

If the xpath is not correct (you can test it here, for instance Simple online XPath tester) the insertion of the value into the node will fail.

Regards,

Antonio

ps. if you like to DEBUG, the .class bytecode of ALL SAP PI Standard Adapters can be found here: com.sap.aii.af.ejb.zip\com\sap\aii\af\app\modules

former_member198060
Participant
0 Kudos

Any ideas would be appreciated.

anand_shankar10
Active Participant
0 Kudos

hey Peter,

What exactly do you want to obtain?

If you want to change the DC40 segment values in PI, we can do it in Graphical mapping by either using some set of field values or using constants but what I am assuming from your writeup is that you are facing issues for IDOC whcih is confusing me.

My point is that if you have a clear mapping requirement we can try to achieve this in mapping in PI and irrespective of DC40 segment values coming in IDOC we can obtain our result.

Thanks

Anand