on 07-28-2016 6:42 PM
Hi,
I have my source idoc as below, where E1WPA01 is the parent node and you have many E1WXX01 child nodes in it.
Now if a condition for the fields in the E1WXX01 is true then we have to populate a field from E1WPA01 in target structure and if the condition fails we have to populate a blank value. I am able to populate the field from E1WPA01 if the condition is true but when I try to populate the blank value the mapping fails(using else condition)
In the above FLDGRP,FLDNAME and FLDVAL are from child node E1WXX01 and ARTIKELNR is from E1WPA01. Now can you please help me to populate the blank value if the condition fails?
Thanks
Hi Richa!
At first sight I can suppose that you have wrong contexts count in your If and Then queues.
In If condition you have context change after each element in queue but in Then condition with UseOneAsMany you have all elements for E1WPA01 segment in one context.
So you can use "IfThenElse" finction with constant value in "Else" condition, but try putting "SplitByValue" finction after "UseOneAsMany".
Regards, Evgeniy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Evgeniy,
My target structure is below. My field for this mapping "AssociationGrpId" is under Data_1.
when I test it in test tab the field is populating with only blank values but not the required value when the condition is true.How ever in display queue I can see the values.
my target structure after testing in test tab.
Thanks,
Richa.
Hi Richa!
It looks like you have incorrect sequence of elements in your output queues for Data_1 and AssociationGrpId.
As I can see from your mapping you must have Data_1 output queue without context changes and AssociationGrpId output queue with context change after each item.
Please check if your element's indexes in both queues are equal: first element of Data_1 queue - element from first context of AssociationGrpId queue, second element - value from second context and so on.
Regards, Evgeniy.
Hi Evigeniy,
My Data_1 output queue:
As you said it does nt have any context changes.
My AssociateGrpId display queue:
It has context changes as you can see above. Now what should I do?
I have mapping for other fields and it was working fine..but for this field it is behaving strangely.
Thanks for your help in advance,
Richa
Hi,
I could solve this with using Not condition(i.e to populate blank value) in if and actual mapping in else part.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Richa,
In order to populate a blank value for the else you would need to switch the boolean usage to if/then/else instead of if/then. In that case you would set a blank value constant for the else condition.
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.
Richa,
if the condition is true but when I try to populate the blank value the mapping fails(using else condition)
What error you get when you have else condition ? is it failing in the udf which is present after ifthen if yes then can you please let us know what exactly this udf is doing.
Br,
Manoj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Manoj,
The udf which is present after if then condition is used to just remove suppress values.
Here in my case for each E1WPA01 only one condition from E1WXX01 segment will be true. So, if the condition is true then it populates the ARTIKELNR from E1WPA01 correctly. But if is fails it has to populate the blank value, so when I am giving constant in else condition, it is checking all the other E1WXX01 segments and populating suppress values.
My sap system is down right now. I will give the queue how the values are coming as soon as it is up.
Thanks
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
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.