cancel
Showing results for 
Search instead for 
Did you mean: 

Error /IWCOR/CX_DS_BAD_REQUEST while using Deep Insert

Former Member
0 Kudos

Hello fellow SAP GW experts. I have found myself stuck with an issue trying to test my code for a Deep Insert Service.

The structure of the entities is something of the sort:

-LoanRequest

Contains: Loan Data, this is a header data

     -Customers:

       Contain: Customer Data, this is a table, the loan request may have associated 1 or n customers to it

      -CustomerLoanProperties:

        Contains: The corresponding customer's conditions for the loan, like the amounts, card numbers and such.

The relationship is as follows:

Loan can have 1 or n Customers, and Customers can only have 1 loan properties each.

In order to generate the payload we redefined the expand_entity method given that a simple $expand wouldn't let us generate a real payload for this case given the relation/navigation properties as far as I tried, I might be wrong tho.

The issue on question is that, once we get a succesfull answer from the expand entity method we redefined, we use it as a payload, however once we change it to a POST method, the error we're gettng is:

/IWCOR/CX_DS_BAD_REQUEST: The Data Services Request could not be understood due to malformed syntax


Logs give the same text so there's no real way to pinpoint where in the XML the syntax is wrong.



I'll also add the payload request for more clarity on this issue.


In any case if you guys could advice me in any tool that could help me analyze this better, since the logs are too generic to understand the issue. Or what would be a better way to achieve the creation of payloads for DEEP INSERT operations.


Thank you guys in advance.


Cheers.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Sorry for the late answer.

I did as you said, even with that the error was the same.

However I've figured what was the issue, I wasn't filling up some requiered fields. Once I did that I didn't get the error.

Now the error I'm getting is regarding a numeric field, It's giving me an error where it cannot understand numeric fields with characters such as periods and commas. I do understand what's the error, I just want to figure out the best way to solve this 'Issue' as I know that marking the field as String is not the correct way to workaround and as requirement I need my fields to come with periods and commas for currency fields.

Any insight on this would be highly appreciated.

AshwinDutt
Active Contributor
0 Kudos

Hello Emmanuel,

I see in screen shot ' Content Type ' is not passed in the Headers.

Please pass ' Content Type ' and its value as ' application/xml ' and check again.

Content-Type - application/xml

Regards,

Ashwin

NagaPrakashT
Contributor
0 Kudos

Hi Emmanuel,

Please place a break-point in CREATE_DEEP_ENTITY method and check whether you were able to trigger the break point and also make sure the name used in the association should be the same name you used in CREATE_DEEP_ENTITY method to get the values.

These blogs may help you.

Deep Insert in SAP OData Service

Thanks,

Naga