cancel
Showing results for 
Search instead for 
Did you mean: 

Fill payload into SNDPRN

Werner_Magerl
Participant
0 Kudos

Hello,

I know, it is a old problem, but mayber I have something overseen.

Scenario: XML ->XI->Idoc Adapter to R/3

I want to fill the field SNDPRN of the control record with a value of the XML payload.

I can not work with header mapping or identifiers, as the messages come from the same sender party and service.

But I need different partner profiles in the R/3 system, and the partner name is in the payload of the message.

Does anybody know how this can work?

How can I prevent the IDOC adapter from overwriting the value I fill into SNDPRN in the mapping....

best regards

Werner

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Werner,

within the IDoc receiver adapter you can mark the chechbox for "Sender aus Payload übernehmen". This will prevent the IDoc adapter from overwriting the SNDPRN value you have assigned in your mapping. If you only mark "Use control record values from payload" the system will overwrite the value in SNDPRN. For further information refer to SAP note 728792, where you can find a detailed list how the fields are filled in the different cases.

Best regards

Christine

MichalKrawczyk
Active Contributor
0 Kudos

let's remember that this is only possible with >= SP14

Regards,

michal

Werner_Magerl
Participant
0 Kudos

Hi,

SP14, this is the solution....

Ok, but we are still on SP10.

Is SP14 the only solution???

best regards

Werner

Former Member
0 Kudos

yes, that's true. this property has been newly added....

for SP10 i don't see a direct solution other than using header mapping...

Werner_Magerl
Participant
0 Kudos

Hello,

yes I know, but this does not work here,

because SenderParty,Service and ReceiverParty,Service are the same for all the different messages.

but anyway

thanks for your help.

I asked for SP14, and I will get it in february

best regards

Werner

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Werner,

Since you're < SP14 checking "Use control record values from payload" won't set the 6 sender and receiver related fields (SNDPOR, SNDPRT, SNDPRN, RCVPOR, RCVPRT, RCVPRN) based on the payload.

You can use header mapping even with your constraint. It's a common requirement.

I'll give an example, but then you can also reference "How To Sample IDoc Scenarios within XI3.0" or the Note that was previously mentioned.

Let's say you have an Order coming in as XML from a customer, you map it to an ORDERS05 IDoc and you want to set the following fields in the IDOC Control Record:

SNDPRN 00000123 (customer number)

SNDPRT KU (customer)

SNDPFC AG (sold-to - this will convert to SP in SAP, but you need to send it as AG)

Map the customer number to some field in the IDoc. You can actually use SNDPRN or any other field.

In the Receiver Agreement:

1) Check Sender Party under Header Mapping.

2) Specify an XPath to the location of the customer number (ORDERS05/IDOC/EDI_DC40/SNDPRN for example)

3) Specify the Agency as a constant - XI -

I can't remember but I think that in this scenario you can set this to anything. I don't think it's used, since it's not being related to Identifiers in a Communication Channel. We set it to XI and it works fine.

4) Specify the Schema as a constant - ALE#KU#AG

It you need to set the partner type and role to something other than KU and AG, you can use the following format. ALE#<partner-type>#<partner-role>.

To get this to work and match the Partner Profile, you may also need to have the receiver fields set correctly too. If you don't do this the receiver port doesn't get set correctly by the IDoc adapter and the IDoc won't match the partner profile.

In the Receiver Agreement:

1) Check Receiver Service under Header Mapping:

2) Specify the business system name for your R/3 system (R3D_100 for example)

I hope this helps.

Thanks,

Jesse

Werner_Magerl
Participant
0 Kudos

Hello Jesse,

thank you for your help.

Now I can fill (and map) the two different values I need in the mapping.

We use identifiers (for normal 1:1 connections) in the IDOC adapter, but when I enter a XPATH in the header mapping, they are ignored.

Or I did not find out how it could works.

best regards

Werner

STALANKI
Active Contributor
0 Kudos

I think this should be possible by clicking the add control records from payloads option in idoc adapter.

we have done it and we can populate sndprn from the payload.