The gateway library hides information unnecessarily and in a weird convoluted way that makes it harder to use for some incomprehensible reason.
data(request) = new zcl_gw_request( io_tech_request_context ).
-
Generate SQL WHERE condition string (basically for $filter operation, although it also supports a search with the full ID):
data(sql_where_string) = request->sql_where( ).
-
Generate SQL fields string (handles $select query option for you, for free):
data(sql_fields_string) = request->sql_fields( ).
-
Get the OData model (why shouldn't you able to in the first place smh):
data(odata_model) = request->model( ).
-
Access the full original request (tis but a wrapper, this object of mine):
data(full_request) = request->original( ).