on 03-09-2015 8:12 AM
All,
I face a mapping problem using useOneAsMany, but I think that is my only option to accomplish this…
This is my source message
Segment ORU_R01.ORDER_OBSERVATION can occur multiple times.
Within that segment, segment ORU_R01.OBSERVATION can occur multiple times.
Segment ORU_R01.OBSERVATION contains a field with a specific value.
In case that value is e.g not AA, a target segment needs to be created, that is OK.
Now, I need to map other values too, contained in the OBR segment within ORU_R01.ORDER_OBSERVATION, were value is not AA.
I tried with this mapping…
… but I receive this error: 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;@28250819,
I already played around with context changes, but still facing this error.
Can somebody help me out please?
Thanks a lot.
Dimitri
Hi Dimitri,
The problem seems to be that your second paramerter (second queue) in the useOneAsMany has less context changes that the first parameter (first queue): useOneAsMany - Managing Services in the Enterprise Services Repository - SAP Library
Could you share the input queues of useOneAsMany?
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I tested some more and these are my queue now
Still the same error.
I see 2 context changes and that is correct. Values 87 and 88 should be used in the output.
Also, my second and third statement look ok, no? But all together it still seems wrong. But I've no idea where that could be.
Kind regards,
Dimitri
Hi Dimitri,
Your first queue has 1 context change and the second none. Your second has to have one context change, the number of items in each context determine the iterations in the first queue values. Your third queue has more values than the second one, this queue will determinate the context changes in your output.
Regards.
Hi Dimitri,
To useOneAsMany first and second queues number of context changes should be same (fiirst queue should be single values in the context, second queue multiple values in the each context), second and third queues the number of values should be same without taking considerations of number of contexts (third queue each context should be only one value)
I hope it clarifies your question.
Regards,
Praveen.
Hi Dimitri,
The second queue got three contexts so you must have first one also 3 contexts but in your case only two values, you must pass three values in the first queue, have you changed the context of CE4 field that is first queue in your case like below then it will pass three values in the first queue.
Regards,
Praveen.
Hi Praveen,
Please find the source file attached...
Check segment ORU_R01.OBSERVATION -> OBX.2
In case that is NOT EQUAL to ED, use it in the target.
To fill the target segment further, I need ORU_R01.ORDER_OBSERVATION -> OBR -> OBR.4 -> CE.4. The value of that field must go to the QuestionnaireId in the target structure.
I don't see any value for the first occurance of
/ns0:ORU_R01/ns0:ORU_R01.PATIENT_RESULT/ns0:ORU_R01.ORDER_OBSERVATION/ns0:OBR/ns0:OBR.4/ns0:CE.4
Raise the context for the CE.4 field and set it to OBR then useoneasmany queue will work as you'll have equal number of inputs.
CE4(OBR context) -> map with default ->use one as many -> collapse context -> split by value -> target
Not sure of target structure.. If that doesn't work, can you please share the target structure as well?
Hi Dimitri,
It depends on target structure also, i dont how is your target structure, i created the target structure like below i have done the mapping.
My Target Structure which i created my side:
Target Node ORU01_TARGET mapping:
Target Node OBR mapping:
Field1 mapping:
Result:
You need to adjust according to your target structure, the mapping will work according my target structure, you just need to adjust contexts according to your structure but the concept is same. If it did not work for your structure give me the target structure then i can help you.
Regards,
Praveen.
User | Count |
---|---|
93 | |
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.