on 07-25-2014 9:47 AM
Hi Experts,
I have created a service which has 2 entities.
DeliveryHeader
DeliveryItems
StatusOutput
Association has been defined for DeliveryHeader and DeliveryItems.
I am using deep insert option.
My input request message is:
{
"DN_No" : "123",
"ShipTo" : "CNZ",
"DeliveryItems" : [{
"DN_No": "123",
"Item_No": "1",
"Quantity": "10'
}]
}
I want my output to be different entity structure that is of StatusOutput.
{
"StatusOutput" : {
"Code": "100",
"Text" : "Successfully created DN"
}
}
But I am getting output same as input.
What I have to do to get the desired output? Please help!
In my create_deep_entity I have coded like this:
TYPES: BEGIN OF t_output.
TYPES: StatusOutput TYPE ycl_prj_create_dn_mpc_ext=>TS_STATUSOUTPUT,
END OF t_output.
x_output-StatusOutput-code = "100".
x_output-StatusOutput-text = "Successfully created DN".
copy_data_to_ref(
EXPORTING
is_data = x_output
CHANGING
cr_data = er_deep_entity ).
Thanks
Gopal
Hi Gopal,
"What I have to do to get the desired output?"
Firstly, I think you are confusing Gateway with RFC, they are not the same thing. I suggest you learn OData before touching Gateway to avoid this confusion.
Asking that same question again, the answer is - nothing. You do not need anything like this "status output" in your model, just accept the HTTP response, which is doing what you want - telling you if it succeeded or failed.
Someone will probably point you at function imports, but that would be a wrong answer to the question
Regards
Ron.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.