Skip to Content

Bad Request error while posting data using SMP 3.0

Sep 14, 2017 at 10:50 AM


avatar image

We have a SOAP web service created using existing function module. We have tested the web service using SOAP UI and after passing the payload we are able to create an entry into the table as desired

Now, using this soap service, we have created OData service using SMP 3.0 (SP 9 or higher) using Eclipse.

Here is the request and response mapping

Once deployed, I am able to access metadata

But when I test using POSTMAN client by using the below payloads, I get Bad Request HTTP 400 error and not much information from the logs. What may be the issue here?

Payload 1:

<?xml version="1.0" encoding="UTF-8"?> <atom:entry xmlns:atom="" xmlns:d="" xmlns:m=""> <atom:content type="application/xml"> <m:properties> <d:LIFNR>0086326827</d:LIFNR> <d:RECFRM>0086326827</d:RECFRM> <d:YYCROPYR>2017-18</d:YYCROPYR> <d:NAME1>1</d:NAME1> <d:STREET>1</d:STREET> <d:CITY1>11</d:CITY1> <d:REGION>01</d:REGION> <d:POSTCODE>1</d:POSTCODE> <d:GEO_CRD>2</d:GEO_CRD> <d:TOT_HECTARES>1.000</d:TOT_HECTARES> <d:PLNT_HECTARES>3.051</d:PLNT_HECTARES> <d:CANOLA_PCNT>4.044</d:CANOLA_PCNT> <d:FORM_SIGNED>2</d:FORM_SIGNED> <d:DETAILS_COMPLETE>3</d:DETAILS_COMPLETE> <d:NON_CONFORMITIES>7</d:NON_CONFORMITIES> <d:Conformity m:type="oData.Conformity"> <d:GROWER>0086326831</d:GROWER> <d:RECEIVE_FROM>0086326831</d:RECEIVE_FROM> <d:YYCROPYR>aa</d:YYCROPYR> <d:N_CFRM_NO>01</d:N_CFRM_NO> <d:N_CFRM_FD>a</d:N_CFRM_FD> <d:N_CNRM_RES>a</d:N_CNRM_RES> </d:Conformity> </m:properties> </atom:content> </atom:entry>

Payload 2:

{ "LIFNR":"0086326827", "RECFRM":"0086326827", "YYCROPYR":"2017-18", "NAME1":"1", "STREET":"1", "CITY1":"11", "REGION":"1", "POSTCODE":"012", "GEO_CRD":"1", "TOT_HECTARES":"4.000", "PLNT_HECTARES":"4.000", "CANOLA_PCNT":"1.000", "FORM_SIGNED":"11", "DETAILS_COMPLETE":"1", "NON_CONFORMITIES":"012", "Conformity" : {"GROWER":"0086326831", "RECEIVE_FROM":"0086326831", "YYCROPYR":"2017-18", "N_CFRM_NO":"01", "N_CFRM_FD":"2", "N_CNRM_RES":"3" } }


handleError(): failed to serve request for URI /gateway/odata/SAP/SETISCC/ComplianceSet, message = An exception occurred.: Transaction ID :eb7b12e7-1d3c-469e-9777-eaeb8b242cfa#

cap111.png (59.1 kB)
reqm.png (52.2 kB)
reqm.png (52.2 kB)
respmap.png (52.9 kB)
meta1.png (78.8 kB)
meta2.png (18.7 kB)
posterror.png (53.8 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers