cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping failure in Null fields passing

Former Member
0 Kudos

Hi

We are facing some problem in null fields passing to RFC side.. some times the JDBC colums not having the data ,

so that time our map is failing to call RFC.

Please let me know any prevent methodologies for this?

Target side field occurances are 0...1

Regards

rambarki

Accepted Solutions (1)

Accepted Solutions (1)

arunneerolil
Contributor
0 Kudos

Hi Rambarki,

Use the NodeFunction "exists" to check whether your JDBC field exists or not and then map.

If not existing you can pass some default values if required.

Cheers

Chemmanz

Former Member
0 Kudos

HI,

Pls check the standard mapping function "mapWithDefault"....

This will map the default value specofied to the output queue, if the input queue does not have a value in it...

Thanks,

Renjith.

Former Member
0 Kudos

Hi

Still i'm getting problem while sending null values to target side..

It is showing Cannot insert the NULL into column , when RFC trying to send null values to jdbc , i'm getting this problem.

I changed occrances as 0..1(target)..becuase some times its allow to insert values and some time not. but it is also not working... if i take the constant value then it able to inserting..!

exists and mapWithDefault functions..could n't workout..please let me know any other ways..

regards

sankar

Former Member
0 Kudos

Hi,

Does the Sender XML message in XI have the corresponding node? It looks like this node itself is absent, as against the node existing with a blank value.

If this is the case, in the node mapping, you may have to use the 'Exists' function in conjunction with an 'If' or 'IfWithoutElse' function.

If you had already tried this, check if the Target node has some attributes, such as length or pattern restrictions.

Hope this helps,

Bhanu

Former Member
0 Kudos

Hi Rambarki,

In the JDBC receiver adapter under

XML Schema Interpreter

There is a option like

<b>Interpretation of Empty String values</b>

In that drop down try giving Empty string...

I dont know how far this will help u...

Any way give it a shot.

Regards,

Sudharshan

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Rambarki,

since your target field is optional, you can map your target only if the value is present in the source, do not map if it is null.

Also are you getting any specific error ?

Have a look at this thread aswell..

Regards

Anand