on 04-21-2016 9:38 AM
Hi Gp members ,
Currently i am facing issue while sending date parameter to SAP via BAPI . Need to update the given record which is already having date field in format (2016-01-03 09:25:22)
The data type details defined in SAP system is as follow
<item>
<FIELDNAME>STARTTIME</FIELDNAME>
<OFFSET>000083</OFFSET>
<LENGTH>000020</LENGTH>
<TYPE>C</TYPE>
<FIELDTEXT>Char 20</FIELDTEXT>
</item>
so it is having char type defined , and same BAPI is working in se37 with the value (2016-01-03 09:25:22)
Test data in xml as below
<STARTTIME>2016-01-03 09:25:22</STARTTIME>
But while running the BLS , I am getting error as
[ERROR] Unable to make RFC call Exception: [Number 2016-01-03 09:25:22 cannot be encoded as a BCD of length 15 with 0 decimal places at field STARTTIME]
I even tried with standard sap format (although it is char datatype mentioned)
dateformat(Transaction.InputXml{/root/item/STARTTIME}, "yyyy-MM-dd HH:mm:ss", "yyyyMMddHHmmss")
But in that case getting error as
[ERROR] Unable to make RFC call Exception: [Error in module RSQL of the database interface]
I have referenced below threads but not able to resolve the same .
https://scn.sap.com/thread/549122
https://scn.sap.com/thread/3269242
http://scn.sap.com/thread/823772
http://scn.sap.com/thread/823743
Regards
Ravish
Hi Ravish,
Which BAPI are you calling?
Please check what error you are getting by hardcoding the date value "" instead of directly mapping from the XML to the BAPI column.
Also try this: first save the datevalue from the XML in any local variable and then map the local variable to pass to the BAPI and see if any success.
Regards,
Saptaparna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Its custom BAPI ,
Currently the issue got resolved. Actually in backed the datatype had been changed so clearing the jco cache fixed that one .
http://<server>/XMII/JCOProxy?Mode=Reset
User | Count |
---|---|
8 | |
4 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.