on 10-19-2010 12:15 PM
i have got a requirement in an IDOC To File Interface ,the IDOC Structure will be like
IDOC : ZCREMASBI.ZCREMAS05 ->E1LFA1M occurance 1...9999(Child to ZCREMASBI.ZCREMAS05)->E1LFM1M occurance 0..9999(Child to E1LFA1M)->E1WYT3M Occurance 0..9999(ChilD to E1LFM1M)
Now in the message mapping iam mapping the record to E1WYT3M ,there is a field name VendorNo under record which iam mapping with E1LFA1M-LIFNR but this field VendorNo should exists for all records.
so iam mapping in this way
E1LFA1M-LIFNR ->use one as many (1st argument as E1LFA1M-LIFNR Context as E1LFA1M) 2nd argument as E1WYT3M Context as E1LFM1M 3rd argument as SEGMENT Context as E1WYT3M ->MAP WITH DEFAULT ->VendorNo
my test scenario is like 1 E1LFA1M-> 1 E1LFM1M ->Many E1WYT3M's
but when i test ithe message mapping it raises the error as below :
Runtime exception when processing target-field mapping /ns0:Vendor_MasterNotification/Vendor_Master/VendorNo; root message: Exception:[com.sap.aii.mappingtool.tf7.FunctionException: Too many values in the first queue in function useOneAsMany. It must have the same number of contexts as the second queue] in class com.sap.aii.mappingtool.flib7.NodeFunctions method useOneAsMany[[Ljava.lang.String;@7b652912, [Ljava.lang.String;@2e6b9c08, [Ljava.lang.String;@1ad0e907, com.sap.aii.mappingtool.tf7.rt.ResultListImpl@972d852.
so can any body help me in providing me the solution.
regards.
Varma
Hi,
Use copyValue funtion.
It will create LIFNR as many times record is getting created.
Regards
Arpil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Arpil.
i dont know about where you want me to put that CopyValue fiunction in the mapping but i have trued by putting the copy value function in ED1_DC40-CREDAT->pass to the First parameter of copy value function but still its not working .
still it raises the same error that i mentioned in the previous thread.
regards.
Varma
Hi Arpil.
i dont know about where you want me to put that CopyValue fiunction in the mapping but i have done by putting the copy value function in ED1_DC40-CREDAT->copy value[0]->first parameter of USE ONE AS MANY function but still its not working .
still it raises the same error that i mentioned in the previous thread.
regards.
Varma
Use it like this:
E1LFA1M-LIFNR>copyValue(0)>VendorNo
this will be applicable if you have single Idoc at a instance in Mapping.
In case of mass extraction of IDOC .... like multiple Idocs in a single source message you will have to use.. useOneAsMany only.
**Remember: 1st input of useOneAsMany should have 1 value only in each context.
Let us know whether your query got solved or not.
Hi Goury.
i have tried with Copy Value function and it is working with the field ED1_DC40-CREDAT but I have got another issue with other field Purchasing Organisation under target structure
here for the field Purchasing Organisation under target structure iam using USE ONE AS Many with the 1st parameter as E1LFM1M-EKORG-MAP WITH DEFAULT ,2nd parameter as E1WYT3M-MAP WITH DEFAULT,3rd paramater as SEGMENT under E1WYT3M-MAP WITH DEFAULT-SplitByValue(Each Value) but when i test with real data and click on Display queue under message mapping it raises the error as below
Exception:[com.sap.aii.mappingtool.tf7.FunctionException: Too few values in the first queue in function useOneAsMany. It must have the same number of contexts as the second queue] in class com.sap.aii.mappingtool.flib7.NodeFunctions method useOneAsMany[[Ljava.lang.String;@3d558f28, [Ljava.lang.String;@3c29aa8d, [Ljava.lang.String;@537c2dd6, com.sap.aii.mappingtool.tf7.rt.ResultListImpl@7da5676b, com.sap.aii.mappingtool.tf7.rt.Context@7628e23e]
regards.
Varma
Hi Gowri.
when iam using the node function USE ONE AS MANY for the other target structure field Purchase Organisation , and when i click on Display Queue of USE ONE AS MANY Function it displays the error as below.
Exception:[com.sap.aii.mappingtool.tf7.FunctionException: Too many values in the first queue in function useOneAsMany. It must have the same number of contexts as the second queue] in class com.sap.aii.mappingtool.flib7.NodeFunctions method useOneAsMany[[Ljava.lang.String;@11010c8e, [Ljava.lang.String;@5bdf475a, [Ljava.lang.String;@1fc594d5, com.sap.aii.mappingtool.tf7.rt.ResultListImpl@64ae3c3e.
can you help me in explaining me on what could be the problem is
will be waiting for your response.
regards.
Varma
Hi,
You dont need to use one as many here also. What I understand is, you have a purchase organization at header in source side and you need to pass the same value to target at multiple places. Correct me if I am wrong.
In this case, map purchase organization to copy value and out put of copy value to required target field. when you execute mapping through Test Tab, you will see value is getting replicated.
-Gouri
Check this link:
http://help.sap.com/saphelp_nwpi71/helpdata/EN/ef/df564b6aa24fc9ab0d685460747de5/content.htm
The error shows that the values in the queue of first input is not equal to the number of contexts in the queue of second input.
Check the inputs mapped especially their contexts.
-Supriya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Supriya.
in the documentation that you provided in the previous thread ,it says
The field that has the occurrence 1..1 is expected as the first parameter;
The field that can occur more than once is expected as the third parameter but in my case the first parameter LIFNR will occur for may times say like 6 times and the field in third parameter E1WYT3M-FIELD will also occur for multiple times say like for examaple 20 times .
the important thing is first parameter and third parameter of USE ONE AS MANY will no toccur for same number of times.
so therefore i couldnt found any solution from the above thread.
will be waiiting for your response.
regards.
Varma
Hi Supriya.
as you said i have tried to change the context of second and third parameters in USE ONE AS MANY but even then as the contest of first parameter occurs for multiple times when i click on display queue it saises the error as below
Exception:[com.sap.aii.mappingtool.tf7.FunctionException: Too few values in the first queue in function useOneAsMany. It must have the same number of contexts as the second queue] in class com.sap.aii.mappingtool.flib7.NodeFunctions method useOneAsMany[[Ljava.lang.String;@5ad4798c, [Ljava.lang.String;@337804ea, [Ljava.lang.String;@c8ab90c, com.sap.aii.mappingtool.tf7.rt.ResultListImpl@677ac942, com.sap.aii.mappingtool.tf7.rt.Context@2e334121].
will be waiitng for your response.
regards.
Varma
Hi Liang
iam using the same Use One As Many Node Function for mapping one target field Creationdate under record structure Vendor_Master from source field ED1_DC40-CREDAT ,iam doing the mapping as the following below
iam assiging the first paramter to USE ONE AS MANY as ED1_DC40-CREDAT(Context as ED1_DC40)->MapwithDefault->
Second parameter to USE ONE AS MANY as E1WYT3M(Context as E1LFA1M) ->map with Default
Third parameter as Segment(under E1WYT3M)(Context as E1LFA1M)->MAP WITH DEFAULT->Split By Value(Each value) after all pass the out put of UseOneAsMany to CreationDate.
byt when i click on Display Queue of UseOneAsMany it raises the error as below
Exception:[com.sap.aii.mappingtool.tf7.FunctionException: Too few values in the first queue in function useOneAsMany. It must have the same number of contexts as the second queue] in class com.sap.aii.mappingtool.flib7.NodeFunctions method useOneAsMany[[Ljava.lang.String;@74c97903, [Ljava.lang.String;@5727efdb, [Ljava.lang.String;@7ef43f90, com.sap.aii.mappingtool.tf7.rt.ResultListImpl@5579480d
can you help me in solving this issue.
regards.
Varma
User | Count |
---|---|
84 | |
25 | |
12 | |
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.