on 12-08-2009 6:13 AM
Hello Experts,
We have a concern in our message mapping structure. The target field is "Sold-To id" at line level and source filed is "Customer No" which appears in the header node. We are using a series of concat functions while mapping these two fields. Now, the issue is that the second concact function's input queue does not read all the values passed from the first concat function's output queue. We have checked their respective contexts but could not find the cause of this behaviour.
Due to this the mappiing fails and the target field is not populated with the required values.
Kindly advice.
Thanks in advance,
Elizabeth Jacob.
Hi Suraj,
ACTUALLY, The mapping format used by us works on any XI system but fails to work on PI systems. We have similar interfaces maped exactly the same way in XI with concat functions and they are working well. But the same mapping when used in PI system is not working.
The issue is that the output of first concat function looks like this:
<null>
<400012300>
<context change>
<400012310>
<context end>
whereas input of the second concat function looks like this, it should not have brought the null value as input to the 2nd concat function as shown below:
<null>
<400012300XX>
<contextchange>
<null value>
<end of context>
CONCAT (1ST) -
> concat (2ND)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you All for your suggestions.
Resolved the issue by adding a CopyValue function after KUNNR field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
One simple solution could be using the Global variable rather using UseOneAsMany. And you can also see the benefit of using Global Variable.
/people/william.li/blog/2006/03/21/minimize-memory-usage-during-message-mapping-when-replicating-an-element
After getting the KUNNR in global variable you can concatenate it easily with rest of the fields.
Regards,
Sarvesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Elizabeth,
Unequal number of queues is the issue, it seems.
Try the solution provided by Susraj in the above thread and revert if still you are getting the same issue.
-Tanaya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Elizabeth,
Can you pls tell, which 2 fields are you using at the start of the first concat function?
Also, pls check the queue lengths for both the fields, if it is equal or not?
-Tanaya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tanaya,
Thanks for the reply.
The first two fields are Customer No (KUNNR) & field VTWEG. The result of their conact is again concatenated with field SPART. The result of this second concat is the concern.
As said the queue of KUNNR has only 1 entry as it is part of the haeder node, whereas queues of VTWEG and SPART contain 2 entries each. Context of VTWEG and SPART is set at line level node, wheras the context of Customer No (KUNNR) is at header node.
Is this an issue?
Hi Elizabeth,
You have
1 KUNNR value
2. VTWEG values
2 SPART values
And you wan two output to be generated (1 for each concatenated value of KUNNR, VTWEG and SPART). Is this right??
If yes then use the node function useoneasmany with KUNNR, so that KUNNR get repeated twice(one for each value of VTWEG and SPART)
Your mappign shoudl be like this
KUNNR --------------------------------|
VTWEG (context line)----------------| useoneasmany---------------------------------------| concat -----------------------------------| concat
VTWEG( do not change context) --| VTWEG( do not change context) --| SPART do not change context) --|
Regards
Suraj
Hello Suraj,
I tried using the given solution but it still does not work. Mapping throws an exception at runtime as given below:
Exception:[com.sap.aii.mappingtool.tf7.FunctionException: Too many values in the second queue in function useOneAsMany. The number of values for all contexts must be the same as the number of values for the third queue] in class com.sap.aii.mappingtool.flib7.NodeFunctions method useOneAsMany[[Ljava.lang.String;@6a85ebba, [Ljava.lang.String;@7e3736f8, [Ljava.lang.String;@5afa1484, com.sap.aii.mappingtool.tf7.rt.ResultListImpl@585914c5, com.sap.aii.mappingtool.tf7.rt.Context@4062bed3]
Please advice...
Hi Elizabeth,
I guess you are new to useoneasmany node function, can you paste here the display queue value for the three inputs given to this node function..
Also check these links
http://help.sap.com/saphelp_nw04/helpdata/en/ef/df564b6aa24fc9ab0d685460747de5/content.htm
Regards
Suraj
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
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.