Skip to Content

OData Error while fetching single record

I have created an oData service calling few entities from vbak table. Get_entityset method is fetching the complete data but get_entity is giving error " Resource not found for segment " and error log shows " Task facade not implemented for provider ".

get_entity code given below:

method table1set_get_entity.
    data: ls_key_tab type /iwbep/s_mgw_name_value_pair,
          lv_vbeln   type vbak-vbeln,
          ls_vbak    type vbak.

    READ table it_key_tab with key name = 'Vbeln' into ls_key_tab.
    lv_vbeln = ls_key_tab-value.

    select single * from vbak into ls_vbak where vbeln = lv_vbeln.
    if sy-subrc eq 0.
      er_entity-vbeln = ls_vbak-vbeln.
      er_entity-ernam = ls_vbak-ernam.
      er_entity-auart = ls_vbak-auart.
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Jul 23, 2020 at 10:23 AM

    Pratik Kumar

    The error comes when the URL Parameter values doesn't matches. Property is case sensitive. What ever you define the Parameter Name in GW same needs to be passed from UI in same casing.


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.