on 12-02-2014 4:59 AM
Hi Expertise
I am new Odata services, I need help in calling
CREATE_DEEP_ENTITY method of DPC_EXT class
Consider my parent entity set name as :- EMP_DET & my child entity set EMP_SALARY & navigation name EMP_SALARY_NAVIG
So help for building URI to call method
Thanks ...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Nandish,
Just to remind you that you need to fire your GET operation by passing the navigation property defined between your Header and Item entities.
The response of this should be used as the payload.
When you do this way you will not get these kind of errors.
So please check.
Property names are Case Sensitive.
You need to make sure that you pass same Property Names which are mentioned in your Gateway Model.
Please check the property names and pass them in payload accordingly.
Its easy to build your payload manually as well XML or JSON ->
See below how you can build manually :
You can also build JSON payload for the above XML format as well.
Sample JSON :
Were Header entity has Id , Name and Name2 as properties
and Item entity has Id , Name as properties.
HeaderToItem is the navigation property.
While firing pass the below Header ->
Content-Type - application/json
{
"Id":"01",
"Name":"John",
"Name2":"Bell",
"HeaderToItem":[
{"Id":"10","Name":"TestO1"},
{"Id":"20","Name":"TestO2"}
]
}
Regards,
Ashwin
Hello Nandish,
Keep a external break point in the code, where you are calling your BAPI. I hope you must be creating it already. The above error is because, no return GET enetity is called. To avoid this, in the create_deep_entity method, at the end, add the below code to get the return values.
copy_data_to_ref(
EXPORTING
is_data = custome_create_deep_entity
CHANGING
cr_data = er_deep_entity
).
I hope it will solve your 500 Error.
Thanks,
SK
Hi,
The highlighted error might be coming because of malformed request payload. Each field that is being used in payload should be exactly same as defined in entity type. The field names are case sensitive also.
Its also important to put navigation name in relation section of payload.
Regards,
Aashika
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.