Skip to Content

Fill payload into SNDPRN

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 01, 2005 at 03:22 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 01, 2005 at 07:51 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • 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

  • Posted on Dec 01, 2005 at 05:09 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.