on 07-10-2014 5:48 PM
Hi Experts,
I am facing problem with mapping for standard SalesOrder Idoc ORDERS.ORDER05.
My Source Structure is: X12 EDI850
<G_SPO1> (occrance 1..100000)
<S_PO1> (occurance is 1..1)
<D_234/>
<D_234_2/>
<D_234_3/>
<D_234_4/>
<D_234_5/>
<D_234_6/>
<D_234_7/>
<D_234_8/>
<D_234_9/>
<D_234_10/>
</S_PO1>
</G_SPO1>
Target Structure is:
E1EDP01
--->E1EDP19
--->IDTNR
Functionality is passing material numbers of EDI customers to IDTNR field in E1EDP19 filed under segment E1EDP01.
From source i will get set of material numbers, for one set 10 material numbers(In source you can find 10 fields for 10 material numbers)
Requirement: I need to send those material numbers to IDTNR (One to one mapping ).
For getting 10 material numbers i just duplicated segment E1EDP19 in target side and mapped one field of source to IDTNR target in each segment. Totally mapped 10 source fields in 10 segments.
If 20 material numbers I will get two sets <G_SPO1> will repeat two times, each time 10 material numbers. So I mapped G_SPO1 to E1EDP01
S_PO1 to E1EDP19.
My out put is coming as 10 E1EDP19 segments under E1EDP01 if 10 materail numbers.
But problem is ECC team asking to get one E1EDP19 line item value under E1EDP01 line item header. They are not accepting duplicate E1EDP19 segments under header E1EDP01.
How to acheive this with my requirement.
Appreciate your hellp on this.
Thanks & Regards,
A.Neelima.
Hi Neelima,
One possible option is to duplicate E1EDP01 10 times and map with D_234 to D_234_10. When you get 2 sets of S_PO1 then you get 2 D_234 and E1EDP01 will repeat accordingly.
regards,
Harish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Are you using the B2B add-on supplied by SAP or some other EDI solution? If you are using the B2B add-on then they do include some queue functions which will assist in combining the values D_234...D_234_10 into a queue and then you can use something like what Harish has mentioned:
queue of values at G_SP01 -> E1EDP01 and for fields
blank constant -> E1EDP19 since it looks like it will always be created once per E1EDP01
queue of values at G_SP01 -> splitByValue -> IDTNR
Regards,
Ryan Crosby
Hi Harish,
I have created 10 E1EDP01 duplicate segments in target structure, Mapped D_234 to D_236_10 to IDTNR field under E1EDP19 in each segment.
Mapped S_PO1 to E1EDP19
Below is the mapping for E1EDP01. If i pass two sets with one material number in each, I should get 2 E1EDP01 segments as result, but i am getting 10.
Thnaks & Regards,
A.Neelima.
Hi Harish,
Below is the input XML which i have tested.
<G_SPO1>
<S_PO1>
<D_234>1</D_234>
<D_234_2/>
<D_234_3/>
<D_234_4/>
<D_234_5/>
<D_234_6/>
<D_234_7/>
<D_234_8/>
<D_234_9/>
<D_234_10/>
</S_PO1>
</G_SPO1>
<G_SPO1>
<S_PO1>
<D_234/>
<D_234_2>4<D_234_2>
<D_234_3/>
<D_234_4/>
<D_234_5/>
<D_234_6/>
<D_234_7/>
<D_234_8/>
<D_234_9/>
<D_234_10/>
</S_PO1>
</G_SPO1>
Thanks & Regards,
A.Neelima.
Hi Harish, Ryan,
Now i am getting two P01 segements as exected if i give two sets of input data with one material number in each.
Another problem
If i give two sets of data with two material numbers in each, i should get 4 P01 segments rights. Still i am getting only two P01 segments I am troubling you alot... But requirement is demanding me like that
One more thing, I have changed context of D_234 (1 to 10) fields from S_PO1 to G_SPO1, still facing the problem.
Appreciate your help.
Thanks & Regards,
A.Neelima.
Small correction, The above mapping suggested by Ryan is working only for one set of set. If i give 5 material numbers in first set iam getting 5 P01 segments, If i give two sets of data, its not working.
It taking only first occurance of G_SPO1. Whats the change we need to do for taking second occurance of G_SPO1.
Mapping:
D_234 to D_234_10 ----> IDTNR
S_PO1 ----> P19
P01 segment maping is below.
Thanks & Regards,
A.Neelima.
Hi Harish,
I have changed the context to parent level and tried, but no luck.
If I display the queue for Target segment E1EDP01 is showing two values which i have passed in two sub trees.
But in output only one segment E1EDP01 creating with 9876 (Value in first tree), Its not creating with 1234 (Value in second tree).
What will be the problem, Normally it should create two segments right.
Thanks & Regards,
A.Neelima.
Hi Harish,
One more doubt on the same mapping.
Here under E1EDP19 KTEXT field is there, for which value will come from different source field, not from G_SPO1.
Source structure:
S_ST
S_PID
D_356
G_SPO1
S_PO1
D_234(1 to 10)
Target Structure: (These are 10 segments as discussed in above chain)
E1EDP01
E1EDP19
IDTNR
KTEXT
Now mapping is fine for IDTNR, I am getting KTEXT field for only first tree, not getting KTEXT for remaining sub trees.
Mapping for KTEXT i kept one to one.
Thanks & Regards,
A.Neelima.
There is no relation between D_234 and D_356.
I want to pass D_356 to KTEXT in all E1EDP01 segments which ever i will get based on the condition we implemented for E1EDP01.
Present its coming only for E1EDP01 first segment (for which i used condition with D_234), its not coming for remaining 9 E1EDP01 segments (for which i used conditions with D_234_2 to D_234_10)
If i pass sample input payload:
<S_ST>
<S_PID>
<D_350>Description</D_350>
</S_PID>
<G_SPO1>
<S_PO1>
<D_234>1</D_234>
<D_234_2/>2</D_234_2>
<D_234_3/>
<D_234_4/>
<D_234_5/>
<D_234_6/>
<D_234_7/>
<D_234_8/>
<D_234_9/>
<D_234_10/>
</S_PO1>
</G_SPO1>
<G_SPO1>
<S_PO1>
<D_234>3</D_234>
<D_234_2>4<D_234_2>
<D_234_3/>
<D_234_4/>
<D_234_5/>
<D_234_6/>
<D_234_7/>
<D_234_8/>
<D_234_9/>
<D_234_10/>
</S_PO1>
</G_SPO1>
</S_ST>
Coming Output Now: (KTEXT field is missing in last two segments)
<E1EDP01>
<E1EDP19>
<IDTNR>1</IDTNR>
<KTEXT>Decription</KTEXT>
</E1EDP19>
</E1EDP01>
<E1EDP01>
<E1EDP19>
<IDTNR>3</IDTNR>
<KTEXT>Decription</KTEXT>
</E1EDP19>
</E1EDP01>
<E1EDP01>
<E1EDP19>
<IDTNR>2</IDTNR>
</E1EDP19>
</E1EDP01>
<E1EDP01>
<E1EDP19>
<IDTNR>4</IDTNR>
</E1EDP19>
</E1EDP01>
Expected Output:
<E1EDP01>
<E1EDP19>
<IDTNR>1</IDTNR>
<KTEXT>Decription</KTEXT>
</E1EDP19>
</E1EDP01>
<E1EDP01>
<E1EDP19>
<IDTNR>3</IDTNR>
<KTEXT>Decription</KTEXT>
</E1EDP19>
</E1EDP01>
<E1EDP01>
<E1EDP19>
<IDTNR>2</IDTNR>
<KTEXT>Decription</KTEXT>
</E1EDP19>
</E1EDP01>
<E1EDP01>
<E1EDP19>
<IDTNR>4</IDTNR>
<KTEXT>Decription</KTEXT>
</E1EDP19>
</E1EDP01>
Thnaks & Regards,
A.Neelima.
Hi Harish,
Thanks for your reply.
I have same text, and that same text i need to pass to all D_234 segments from D_234 to D_234_10 in al P01 segments. I have used copy value but its not working.
Its working only for D_234 if i give two sets of material numbers with two D_234 numbers i am getting KTEXT field in both two P01 segments. It not working for remaining fields D_234_2 to D_234_10.
Thanks & Regards,
A.Neelima.
Hi,
Can you share an a sample of your source XML related to PO1 segments with multiple groups and then the expected target XML for the IDoc structure?
Regards,
Ryan Crosby
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ryan,
Here you go.
Sample Input XML:
<G_SPO1>
<S_PO1>
<D_234>1</D_234>
<D_234_2>2</D_234_2>
<D_234_3>3</D_234_3>
<D_234_4>4</D_234_4>
<D_234_5>5</D_234_5>
<D_234_6>6</D_234_6>
<D_234_7>7</D_234_8>
<D_234_8>8</D_234_8>
<D_234_9>9</D_234_9>
<D_234_10>9</D_234_10>
</S_PO1>
</G_SPO1>
<G_SPO1>
<S_PO1>
<D_234>11</D_234>
<D_234_2>12</D_234_2>
<D_234_3>13</D_234_3>
<D_234_4>14</D_234_4>
<D_234_5>15</D_234_5>
<D_234_6>16</D_234_6>
<D_234_7>17</D_234_8>
<D_234_8>18</D_234_8>
<D_234_9>19</D_234_9>
<D_234_10>20</D_234_10>
</S_PO1>
</G_SPO1>
Expected Output XML: (I Just kept dots in between, it means same structure should continue from number 5 to 19, IDTNR value should come from 1 to 20 in each E1EDP01 segment).
<IDOC>
<E1EDP01>
<E1EDP19>
<IDTNR>1</IDTNR>
</E1EDP19>
</E1EDP01>
<E1EDP01>
<E1EDP19>
<IDTNR>2</IDTNR>
</E1EDP19>
</E1EDP01>
<E1EDP01>
<E1EDP19>
<IDTNR>3</IDTNR>
</E1EDP19>
</E1EDP01>
<E1EDP01>
<E1EDP19>
<IDTNR>4</IDTNR>
</E1EDP19>
</E1EDP01>
:
:
:
:
:
<E1EDP01>
<E1EDP19>
<IDTNR>20</IDTNR>
</E1EDP19>
</E1EDP01>
</IDOC>
Let me know if you need more details.
Thanks & Regards,
A.Neelima.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.