Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Date format error for BAPI webservice call

Former Member
0 Likes
1,105

Hello Gurus,

I am getting an "data is not vaild" when I give date in the purchase date field of BAPI_SALESORDER_CREATEFROMDAT2.

I have tried with the following date formats

1. 01.04.2008

2. 01042008

3. 01-04-2008

4. 2008-04-01

5. 2008.04.01

6. 20080401

Every time I get the same error. What is format that SAP takes??

I have tried with 01.04.2008 and 01042008 these two were supported in SAP from SE37, but dont understand why it was not supported from webservice.

please help.

Thanks,

Suma

8 REPLIES 8
Read only

Former Member
0 Likes
880

Hi

Use Write sy-datum to MM/DD/YY

Read only

Former Member
0 Likes
880

Try This.

call function 'converstion_exit_idate_output'

exporting

input = sy-datum

importing

output = lcdate.

concatenate lcdate(2) lcdate2(3) lcdate5(4) into lcdate seperated by '/'.

Regards

Read only

0 Likes
880

Hello Rahaman,

Where do, I need to try that??

Try This.

call function 'converstion_exit_idate_output'

exporting

input = sy-datum

importing

output = lcdate.

concatenate lcdate(2) lcdate2(3) lcdate5(4) into lcdate seperated by '/'.

Thanks,

Suma

Read only

0 Likes
880

Resloved my self

Thanks......

Read only

0 Likes
880

It's very kind of you to let us participate in your solution...

Read only

0 Likes
880

The correct format is: yyyy-mm-dd

Read only

0 Likes
880

Hello Suma B,

Moderator message - Please see before posting

Regards,

José Gabriel.

Edited by: Rob Burbank on Nov 9, 2009 11:39 AM

Read only

Former Member
0 Likes
880

Please find the detailed error as below:

- <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">

- <soap-env:Body>

- <soap-env:Fault>

<faultcode>soap-env:Client</faultcode>

<faultstring xml:lang="en">Deserialisation failed</faultstring>

- <detail>

- <n0:SimpleTransformationFault xmlns:n0="http://www.sap.com/transformation-templates">

<MainName>/1BCDWB/WSS0080402060221531000</MainName>

<ProgName>/1BCDWB/WSS0080402060221531000</ProgName>

<Line>95</Line>

<Valid>X</Valid>

- <DeserialisationFault>

<DescriptionText>An error occurred when deserializing in the simple transformation program /1BCDWB/WSS0080402060221531000</DescriptionText>

<DescriptionDetailText>01.04.2008 is not a valid date</DescriptionDetailText>

<TreePosition />

<ClassName>CX_SY_CONVERSION_NO_DATE_TIME</ClassName>

</DeserialisationFault>

- <Caller>

<Class>CL_SRG_RFC_PROXY_CONTEXT</Class>

<Method>IF_SXML_PART~DECODE</Method>

<Positions>1</Positions>

</Caller>

</n0:SimpleTransformationFault>

</detail>

</soap-env:Fault>

</soap-env:Body>

</soap-env:Envelope>