Skip to Content

SAP PI - One Source Field many Target fields

Hello experts,

I have created a mapping-scenario where the source fields is once per context filled with data and I want that data in a target field in ten Idocs.

You can see an example in the pictures I added below.

Thanks in advance,

David

queue-problem.pngidoc-problme.png

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Jul 16, 2020 at 08:48 AM

    The screenshots do not help very much (at least to me) but I would assume

    • input data looks like this
    <recordset>
    	<record>
    		<data1>a1</data1>
    		<data2>a2</data2>
    		<data3>a3</data3>
    		<!-- more data -->
    	</record>
    	<record>
    		<data1>b1</data1>
    		<data2>b2</data2>
    		<data3>b3</data3>
    		<!-- more data -->
    	</record>
    	<!-- more records -->
    </recordset
    
    • You have some data that is an identifier to the record set or at least some data that is always there in the record, whereas other data might be there or might be not. Let's call this special data "key" shall we?
    • You want to create a multi mapping resulting in an "COND_A02" IDoc (I don't even know what that is for :-) ) per record?

    If that's the case I think you wouldn't even need useOneAsMany which Praveen suggested. You could simply map the record to the "multi-root-node" (the one below message node) of multi mapping and then work your way down using one-to-one mapping and using map with default where appropriate. If it is a really deeply nested IDoc you surely must look into useOneAsMany, look at contextes or other "node functions".

    Cheers

    Jens

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi, Jens,
      I have not solved the mapping in this way because different fixed values are to be written to the fields in each IDoc.
      Thank you for linking the instructions for XSLT mapping.

      PS: After searching for the error in the mapping all morning, it turned out that the source data was incorrect...

      But thanks for your help anyway.

      Best Regards,

      David

  • Posted on Jul 16, 2020 at 08:12 AM

    Hi David Faßhauer,

    Could you please try Node function use-one-asMany.

    https://help.sap.com/viewer/0b9668e854374d8fa3fc8ec327ff3693/7.3.19/en-US/4bf416edeaca4c86e10000000a42189e.html

    Hope this helps !

    thanks and regards,

    Praveen T

    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.