on ‎2023 Mar 05 9:47 AM
I'm trying to create an attachment using create_stream method of dpc_ext class in SAP Odata.
Even I'm able to create the attachment and save that into DB. But the challenge is the attachment should be saved against the reference number which is present at UI side. How to get this from from UI.
I'm aware of slug which we can pass in the header. But I saw there is one input parameter IT_KEY_TAB how to use this?
How can I pass data to this from gateway client?
Thanks in advance
Prasanna CD
Request clarification before answering.
Dear imprasannacdp
it_key_tab is an importing parameter which holds the KEY fields in the form of name-value pair which are passed from the URI.
The name should be same as the entity type property name & it is case sensitive.
For example:
If your Odata request is
/ety_codeSet(Carrid='AA')You can read as shown below
data(lv_carrid) = conv s_carr_id( it_key_tab[ name = 'Carrid' ]-value ).You may do the same for attachment entityset
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Abdul Waheed,
I understand the use of IT_KEY_TAB in Get methods but in Post method how it works?
Because during post we won't use any filters or we won't pass any key fields in the URL part ryte
For post always we pass data in payload but incase of create stream how can we pass data apart from Slug is the question
Regards,
Prasanna CD
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 6 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.