cancel
Showing results for 
Search instead for 
Did you mean: 

help on Mapping logic

Former Member
0 Kudos

Hi,

i am doing a file-file scenario.. some times the source fields might come empty and sometimes with values..

When a source field value is blank then it shouldnt create a field on target side,if it has some value it has to be passed as iti is..

Can you gimme some idea on this.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Use Equal function comparing <empty> value.

Former Member
0 Kudos

When i copied the payload given by user.. and just gave a test using lenght function..its returning 5..

Why is the blank value is having lenght as 5?

Former Member
0 Kudos

Just check for spaces....

have u implemented the logic for your requirement ?

Former Member
0 Kudos

I guess there will be 5 blank spaces (check the xml source), If yes then XI will consider it as value and in that case node will be generated at target side.

But if you don't want to generate the target node for this case, then use the "Trim" function in your mapping just after the source field. You can find "trim" under "Text" function.

Answers (3)

Answers (3)

Former Member
0 Kudos

Use "IfWithoutEsle", "EqualS", "Constant" and "NOT" functions.. eg.

Logic: If not source equals empty then map source.

Former Member
0 Kudos

Still the field is populated with blank value on target side

Former Member
0 Kudos

Kiran,

A ver basic question, would have appreciated if you have searched a bit and then asked your doubt (if any)

Still..follow the below logic:

Source>equalsS Constant (blank)> Not>Ifwithoutelse->Target

Source> then--


>Target

former_member463616
Contributor
0 Kudos

Hi Kiran,

Use mapWithDefault standard function.

Please see the below link, it might be helpful to you.

[mapWithDefault|http://help.sap.com/saphelp_nwpi71/helpdata/en/43/c4cdfc334824478090739c04c4a249/frameset.htm]

Regards,

P.Rajesh

Former Member
0 Kudos

Rajesh,

MapwithDefault wouldnt work here as Kiran doesnt want to create the target field when the input is blank.