Quantcast
Channel: SCN: Message List - B2B Integration with SAP Process Orchestration
Viewing all articles
Browse latest Browse all 2291

Re: How to reference multiple occurrences of N2 or N3 elements

$
0
0

Konrad,

 

In my example, you can see that there are two N3 segments, each containing two elements, D_166 and D_166_2.  I need to map the address lines over to the SAP ORDERS Idoc but how they are mapped over and into which Idoc fields depends on which address lines are being sent in the data.

So I need to check to see which address lines exist, then do the mapping logic.

 

<S_N3>

  <D_166>ADDRESS1</D_166>

  <D_166_2>ADDRESS2</D_166_2>

</S_N3>

<S_N3>

  <D_166>ADDRESS3</D_166>

  <D_166_2>ADDRESS4</D_166_2.

</S_N3>

 

So I need to be able to check if there is a value in the D_166 element currently containing ADDRESS1.  I also need to check if there is a value in the D_166 element currently containing ADDRESS3.  However, those two fields have the same name, D_166.  How do I reference the first occurrence of D_166 vs. the second occurrence of D_166? 

 

So I might need to say something like this:

 

If first D_166 exists and second D_166 exists, then map the first D_166 to STRAS and map the second D_166 to STRS2.

 

I hope this makes sense.  Please let me know if you need further clarification.

Thank you for your help.

 

Linda


Viewing all articles
Browse latest Browse all 2291

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>