cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC adapter

Former Member
0 Kudos

Iam working on proxy to jdbc scenario where i have a condition like if field(xxx) is blank,have to send one space else need to send field value.

In this case when conditions is false able to send field value......but when condition fails ...message gettting failed at jdbc adapter level.

I changed the condition to two spaces when condition fails....in this case iam able to successfully processing the message to the jdbc adapter.

Can anyone hepl me why this happing in PI?

Accepted Solutions (0)

Answers (5)

Answers (5)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Yes, What Shabarish says is correct. I agree.

You need to decide how to handle the empty value in that column of table either as Null or empty string. In your case, I would recommend to set Interpretation of Empty String values as Empty string not as NULL in the jdbc reciever comm channel. If you set value for that field NULL and pass empty string then jdbc adapter does not insert the value for that column. If that field is mandatory for the table then you cannot insert or update the statement. That's what happening now.

Shabarish_Nair
Active Contributor
0 Kudos

refer - Interpretation of Empty String Values in http://help.sap.com/saphelp_nw04/helpdata/EN/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm

do the required settings so that your adapter doesnt fail the message

Former Member
0 Kudos

Hai!

If your field value is not a mandatory field ,then use mapWithDefault function available in the NODE FUNCTION.

The function of this Node Function is it will retur when the field contain a value otherwiae it will return blank value.

Try this i think this will help u.

regard's

Preethi.

former_member200962
Active Contributor
0 Kudos

I hope you are using the below logic:

Source_Field ->
            --> equalS --> Not --> IfWithElse (Source_Field --> Then; Constant (Give one space)) --> Target_Field
Constant (blank) ->

This should create one space in the target field

but when condition fails ...message gettting failed at jdbc adapter level
in this case iam able to successfully processing the message to the jdbc adapter.

I am confused what you want to say....do you say that the Database is reporting an error with one space and giving success for two spaces?

If yes then this is something which the DB admins has to look into....if it is about mapping then the above logic will work.

Former Member
0 Kudos

Hi,

Can you try out populating "" instead of " " ..and check if it works?

Check out the solution given in the below thread..Similar issue

Regards,

Manjusha