Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

OData Error while fetching single record

1,440

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.
    endif.
  endmethod.
2 REPLIES 2
Read only

former_member667434
Active Participant
1,052

pratikkumarsbg25

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.

-Ashutosh

Read only

0 Likes
1,052

Hello ashutosh.anand,

Thanks for the reply. I have sorted it out. Error was in parameter I was passing.

Thanks,

Pratik