on 09-20-2010 12:13 PM
Hi Experts,
I am using (INVOIC )Idoc to file scenario. As per requirement I have mapped segment EIEDP01 to target structure RECORD. Because all (5) fields comes under this segment . But only one field Invoice_No falls in different segment i.e E1EDK01
If I excecute present mapping it is showing below output.
But I want is Invoice _No should be appear in 2nd target structure as well.
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:MT_INVOICE_FILE xmlns:ns0="http://tempuri.org">
- <RECORD>
<Invoice_No>1091902118</Invoice_No>
<Name> POWER TECH</Name>
<Item_No>000001</Item_No>
<Plant>PG01</Plant>
<Quantity>150.000</Quantity>
<Item_Code>G1</Item_Code>
</RECORD>
- <RECORD>
<Name>POWER TECH</Name>
<Item_No>000002</Item_No>
<Plant>PG01</Plant>
<Quantity>95.000</Quantity>
<Item_Code>F1103A050150</Item_Code>
</RECORD>
</ns0:MT_INVOICE_FILE>
There is one more simple solution. Rather using UseOneAsMany you can also use CopyValue(0). You can find CopyValue under Constants node. Your mapping will be like this...
Invoice_No>CopyValue(0)>Invoice_No.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try this mapping:
BELNR -
E1EDP01--
E1EDP01 -
In the mapping, right click on function useOneAsMany and check the 'Dispaly Queue' option.
If any error is there (especially, the length of the queues in case of useOneAsMany), then it wil be displayed.
If the issue is there, change the context of second argument (assign it to next higher level) and try again.
-Supriya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you can use also copyValue standar function, by this way you can reuse that value many times.
if that solution does not apply go later for useOneAsMany
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use "useOneAsMany" function.
/people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
Thanks
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anshul,
Is the Segment E1EDK01 with field Invoice_No is repeating as many no of times as the segment EIEDP01?
If yes, then it is just one to one mapping.
But if not, then you have to use 'useOneAsMany' node function and have to repeat the filed Invoice_No based on the segment EIEDP01.
-Supriya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for inputs.Yes, I need field Invoice_No should be repeat no of times as the segment EIEDP01
I used u201CUse one as Manyu201D function and as there are 3 (Invoice_No=BELNR) in Sender Idoc side.
I mapped E1EDK01 ->BELNR in Idoc context |
Mapped E1EDP02 -> BELNR with Idoc context | ---> Invoice_No (BELNR)
E1EDK02- > BELNR with 3rd context |
But it is not creating Target, showing below error:-
Runtime exception when processing target-fieldmapping /ns0:MT_INVOICE_FILE/RECORD/Invoice_No; r~</SAP:Stack>
Where I am wrong ?
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.