Application Development 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: 

DAte field trouble consuming web service

Former Member
0 Kudos

Hi Guys

I have developed a Webservice from a FM.

When i try to test it it gives me the error deserialization failed. I think is due to the date fields.

How can i solve it?

Thanks!!

Jon

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Jon,

Change the format to the date fields (or any other field for that matter) to the format that is required by the FM. How are you testing the webservice? When testing the webservice from the Abap stack (specifically SPROXY for services designed in SAP PI) you get a test request structure that's automatically generated so you can see the required formats & then you can add your own customized variants. Do you perhaps similar when testing FM's?

Regards, Trevor

3 REPLIES 3

Former Member
0 Kudos

Hi Jon,

Change the format to the date fields (or any other field for that matter) to the format that is required by the FM. How are you testing the webservice? When testing the webservice from the Abap stack (specifically SPROXY for services designed in SAP PI) you get a test request structure that's automatically generated so you can see the required formats & then you can add your own customized variants. Do you perhaps similar when testing FM's?

Regards, Trevor

0 Kudos

I solved it, putting date fields as strings.

Thanks!!

Jon

0 Kudos

That's not solving the problem Jon, that's working around it.

Now you're bypassing the built-in Abap validation. You will now need to add additional code to cater for any consumer that might send the date in the incorrect format.

Why add additional code when it can be handled by standard functionality? But you are free to choose the approach that best suits you...

Regards, Trevor