cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping issue

Former Member
0 Kudos

Hi Experts,

I am working on a scenario, where I need to pass a value to the target field validating if the value is not in the first segment in the IDOC then need to pass the value from the segment. Scenario is Invoice02 IDOC to File.

Condition : 'E1EDK03 001 - DATUM, if none, then to get E1EDK03 026 - DATUM.

Can someone help me to do a logic?

Thanks in Advance!!

Accepted Solutions (0)

Answers (3)

Answers (3)

sahithi_moparthi
Contributor
0 Kudos

Hi,

Please try as below:

Here in the below Example i have taken IDOC to IDOC.You can  apply the same logic with your target structure.

If possible share your target structure.

former_member187587
Contributor
0 Kudos

You can try and add an IF-Else shape.

with the function node "Exists" this will return true if the field exists in the source and then you pass the value. else pass the value from E1EDK03 026 - DATUM.

if this dont work you can write a common Java function that check for null values or checl the length of the value send in the E1EDK03 001 - DATUM if length=0 then it is empty..

Former Member
0 Kudos

you can use node function if then else to achieve.

Try like below

Former Member
0 Kudos

Hi Ram Kumar,

You mean to write a UDF to check whether the value coming or not(Not Null)? Can we use isnil function?

Basically, logic is based on E1EDK03 segment in the IDOC...

Former Member
0 Kudos

No need for UDF.. you can just use Boolean and Text functions in graphica lmapping-

refer the thread

http://scn.sap.com/thread/2122556

Former Member
0 Kudos

The logic provided would not work in my case...

sahithi_moparthi
Contributor
0 Kudos

Hi,

Please try below logic:

Former Member
0 Kudos

Hi Sahithi,

Tried the logic, but by default it is sending the else value.

giridhar_vegi
Participant
0 Kudos

Hi hanumantha rao,

                              Could you please send your source xml required target screenshot

Thanks

Giridhar

giridhar_vegi
Participant
0 Kudos

Hi hanumanthrao ,

                         As per my Unerstanding you need to pass the value of E1EDK03001 Segment of datum if it exists or else you need to pass the value of E1EDK03026 segment of datum right?

Thanks

Giridhar

former_member182412
Active Contributor
0 Kudos

Hi

Please use below mapping. in below screen shot business = your target field.

Regards,

Praveen

Former Member
0 Kudos

Yes

Former Member
0 Kudos

Hi Praveen,

As per your logic, if condition passes then will send the value but if the doesn't, will send the blank value. So, the req. doesn't satisfy.

former_member182412
Active Contributor
0 Kudos

Hi

If i understood correctly if the condition doesn't satisfy then the blank value is not coming right?? then after the DATUM field use mapWithDefault for both if then else then it will pass the blank value.

Regards,

Praveen.