cancel
Showing results for 
Search instead for 
Did you mean: 

A problem on the implementation of DPC_EXT.(GET_ENTITY Method) Resource not found for segment 'PROJE'

Former Member
0 Kudos

Hello all,

I have problem with GET_ENTITY Method. When I wrote code on ABAP for my method GET_ENTITYSET there is no problem I can get data for my entityset but for single entity I failed.

I wrote this code on GET_ENTITY method :


DATA : lt_proj TYPE STANDARD TABLE OF proj,

            ls_proj TYPE                   proj,

            ls_key_tab   TYPE /iwbep/s_mgw_name_value_pair,

            lv_pspid   TYPE proj-pspid.

     READ TABLE it_key_tab WITH KEY name = 'PspID' INTO ls_key_tab.

      lv_pspid = ls_key_tab-value.

SELECT SINGLE * FROM proj INTO ls_proj WHERE pspid = lv_pspid.

       MOVE-CORRESPONDING ls_proj TO er_entity.

But I have an error like this:


<errordetail>

<code>/IWBEP/CX_MGW_BUSI_EXCEPTION</code>

<message>Resource not found for segment 'PROJE'</message>

<propertyref/>

<severity>error</severity>

<target/>

</errordetail>



Could you please help me for get data for GET_ENTITY method.


Thank you,

Accepted Solutions (0)

Answers (2)

Answers (2)

AshwinDutt
Active Contributor
0 Kudos

Hello Ogulcan,

You get this error when you are trying to access a property which is not defined in your GW Model.

Can you please share the GW Model details and the URL here ?

Regards,

Ashwin

Former Member
0 Kudos

Hello Ashwin

Here is my screenshots from SEGW and Gateway Service Builder.

If you need more information I can write you again.

From SEGW:

From Service Builder:

And also if I want to get data from entityset no problem:

But for single entity there is a problem:

Could you please help me ?

Thank you,

AshwinDutt
Active Contributor
0 Kudos

Ok i see that you need to specify the EntitySet name ' PROJESet ' in the URL ->

....../sap/opu/odata/sap/Z_XXXXXX_SRV/PROJESet('K.SBY')

Former Member
0 Kudos

In the URL I've tried as you said: Z_FIILI_GIRTEYIT_SRV/PROJESet('K.SBY') I think the problem is about from ABAP code but couldn't find where is the problem.

brian_zhu
Explorer
0 Kudos

hi Ogulcan,

Do you still have the same problem like "PROJESet resouce not found"?

if yes, you need to reload the metadata as follows:

1) Run transaction /IWFND/MAINT_SERVICE

2) Choose service Z_FIILI_GIRTEYIT_SRV/

3) Click button Reload the metadata and refresh catalog

if not, as you mentioned you have already set an external breakpoint there in the get_proje_entity method, i recommend you to go to debug mode to assign initial value to the output parameter er_entity. this should work if the metadata works.

regards,

Yueqiang

ChandraMahajan
Active Contributor
0 Kudos

Discussion belong to SAP Gateway and moving from to

Regards,

Chandra (Moderator)