Hi,
I created a CDS view with explicitly defined parameters and generated a Gateway OData service on top using SADL. Now I want to use OData custom query options to map them to the CDS parameters. I'm quite sure that this will not work automatically.
I'm already able to set the CDS parameters in the OData service DPC_EXT class manually, using the method if_sadl_gw_query_control~set_query_options.
METHOD if_sadl_gw_query_control~set_query_options.
IF ( iv_entity_set = 'POIPARAMSet' ).
IF sy-subrc = 0.
io_query_options->set_entity_parameters(
it_parameters = VALUE #( (
entity_alias = 'POIPARAMSet' parameters = VALUE #( (
name = 'P_PurchaseOrderNetAmount' value = '10'
) )
) )
)
ENDIF.
ENDIF.
ENDMETHOD.
However, I want to use custom query options (URL parameters) and want to map them to CDS parameters within the DPC_EXT class.
The URL looks like:
...ZBF_POIPARAM02MAN_SRV/POIPARAMSet?P_Material='STANDARD'
Unfortunately, these custom query options are obviously not parsed by Gateway. I can't find them anywhere in the data structures of MR_REQUEST_DETAILS or MO_CONTEXT. Fields like PARAMETERS, MT_PARAMETERS or URI_PARAMETERS are empty or containing other stuff. The custom query options only appear in the ~request_uri header parameter in a non-parsed way like
....?param1=1¶m2=2¶m3=3.... [figure01]
Of course I can parse the query string myself but I believe there must be an other way to access them. However, I also read in a SCN post from 2012, that SAP doesn't support this aspect of the OData standard. Is this still true?
>> Query parameters in CRUD operations
Kind regards, Tobias