on 10-11-2010 11:40 AM
Hi All,
i have a requirement like i need to pass the Null Value as input to stored procedure if that field diesnt exist.
Let me explain clearly.
I have a scenario SAP-PI-DB, suupose i have 10 fileds as input to SP,the requirement from the DB is they want PI to pass all the fileds as input eventhough if any field doent exist,i need to send a null value if any field doesnt exist.
Suppose i have a field Name which is mapped to EMname in SAP,if this doesnt exist in SAP,i need to send a NULL(not string,jdbc null value) value for this field to SP.
Please let me know if any more info is required.
Thanks,
Hemanth.
You have to create an "empty string" as target.
You can use function mapwithdefault, that faunction create an element when it is missing in source.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can easily handle this in mapping, use 'mapWithDefault' node function & put the default value as null.
When the source field is missing in the source payload, the default value (null) will be given to the target.
-Supriya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Hemanth,
You can pass the following values (which means DB null value)
For Oracle DB - DbNull.Value
For MSSQL Server - System.DBNull.Value
as input parameters to the SP that your are calling on the Receiver Side.
OR else,
"Interpreation of empty string value as null" can also be tried as suggested by all.
I hope this helps.
Regards, Gaurav.
Edited by: Kumar Gaurav on Oct 11, 2010 1:19 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hI,
Use "Interpreation of empty string value as null" in ur JDBC receiver channel.
http://help.sap.com/saphelp_nw70/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm
Thanks
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Hemanth,
See option of your Receiver Communication Channel, in tab "Processing" and option "Interpretation of empty String values" = NULL value or Empty value.
Maybe that will resolve your issue.
Regards.
Mickael.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Hemanth,
I think you can make this work with a Java UDF function. I suppose the hex value of a JDBC null value would be '00', so you could create a UDF function which outputs this value.
kr,
Peter Glas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.