Skip to Content
0

Issue in CREATE_DEEP_ENTITY for Header/Items insert

Mar 21, 2017 at 05:10 AM

45

avatar image

Hi Experts,

I have a requirement to insert the Header and Item kind of data in ECC Back end system. SAPUI5 based app is developed and it will pass the Header and Multiple Items in a single ODATA service call to SAP Gateway system.

for achieving this, i have created the Data model objects as with proper Associations and Navigation property as shown below.

info1.png

I have redefined the Create_Deep_Entity method in DPC EXT class and have also defined the Deep Type structure as per the guideline that is by keeping the Deep structure name same as Navigation property name. NO ISSUE UP TO THIS POINT.

For testing, using the Gateway client tool, first by using the EXPAND command along with the Navigation Property name, getting the Header and Inline multiple Items using the HTTP GET Method, THIS IS ALSO WORKING FINE.

Issue Details

Now using the HTTP RESPONSE Message of GET operation as HTTP Request message for the HTTP POST operation (Request message contains the INLINE Tag and hence it is expected to call the CREATE_DEEP_ENTITY method instead of the CREATE_ENTITY method).

Request Payload is as shown below along with the HTTP URL. After execution in Response, I am getting the below message. Even external break point was not reached in CREATE_DEEP_ENTITY method.

info2.png

For Resolving this error, from SDN I found I need to alter the HTTP REQUEST message Manually as shown below and also I have to change the HTTP Header parameter content-type as shown below. (Removed the very first FEED Tag and changed the first ENTRY TAG and also changed the content type as shown below)

info3.png

After doing this, CREATE_DEEP_ENTITY method is started to call and i can see all the Header and Item data are coming properly and i am getting the desired result as well (HTTP Response code as 201 with proper Response message).

Please confirm is such manual change is the right approach to test the CREATE_DEEP_ENTITY operation through the local Gateway client Tool.

if YES, then is there point (Guideline) to be considered when UI5 developers consume this ODATA service in their code?


please experts, suggest me, your suggestion would be very helpful to me.

Regards,

Jagesh

info1.png (12.6 kB)
info2.png (188.6 kB)
info3.png (154.5 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers