cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Query

Former Member
0 Kudos

Hi All,

How can we implement the the condition as source fields does not exist?

We can implement whether the field exists or not using exist in graphical mapping.

Sp I tried to compare the output of exist with constant value 0 as exist returns either true or false value that is 0 or 1.Is it correct?

But still I could not implement it.

Can you plese help me?

Thanks in advance

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

answered

sunil_singh13
Active Contributor
0 Kudos

Hi Shweta,

How can we implement the the condition as source fields does not exist?

Can be implemented using the Node Function "exists" if the output of this node function is false it means the field in the source does not exists.

Then you can give the output of "exists" function to "ifWithoutElse" that will pass the value only if the condtion is 'true' else it will supress it.

I tried to compare the output of exist with constant value 0 as exist returns either true or false value that is 0 or 1.Is it correct?

No its not the way "exists" work. The output of "exists" is boolien value.. while 0 or 1 is not boolean.

Also you can not not directly assign the value of field to "ifwithoutelse" unless the fields holds some boolean (true or false) value. The solution given by one of frnd has correction.

Thanks,

Sunil

Former Member
0 Kudos

Except the above suggestion, there is standard function called MapWithDefault.

It take a node input, if input does not exist, you can give default value in output. It is equivalent to: exist() plus if().

Regards

Liang

Former Member
0 Kudos

Hi,

You can make use of ifWithoutElse function as well for this requirement.

First compare the source fiels value against the constant[] that is a null.

Output of this is given to the first input of the ifWithoutElse and the second input would be Source field itself.

Output of ifWithoutElse is given to target field.

This way, if field exists then then its value will be given to target field and if it doesn't exist then it will be suppressed.

-Supriya.

Former Member
0 Kudos

Hi,

About exists:

You can use this function to determine whether a particular source field exists in the XML instance to be processed. If it does, exists() returns the value true, otherwise it returns the value false.

You can give output of exists to "Boolean if".

Use below link for more details:

[http://help.sap.com/saphelp_nwpi71/helpdata/EN/c8/b78d406b305537e10000000a1550b0/frameset.htm]

Thanks,

Prashant

former_member208856
Active Contributor
0 Kudos

There is one STANDARD Function in NODE Functions.

NODE Functions --> EXISTS.

Use this EXISTS function for the node, if node will be exists, the data will be pass in this condition.

If you are looking for data value, so use BLANK SPACE ( ) for comparision instead of ZERO (0).