cancel
Showing results for 
Search instead for 
Did you mean: 

Blank keys when using two key fields for GET_ENTITY in SEGW - strange bug

Former Member
0 Kudos

Hi all,

I'm implementing a service in SEGW. My problem is with a GET_ENTITY request using two key fields. It's mapped to a RFC FM.

My GET_ENTITY_SET (ComplianceSet) works fine and shows the link to the Entity e.g:


<link href="ComplianceSet(Equipment='1',Aoid='1235')" rel="self" title="Compliance"/>

entry>

When I navigate to the specific compliance I get a "Resource not found for segment 'Compliance'."

This is due to the key fields not being passed into the function module. I've traced it back to the DPC class and specifically the method:

io_tech_request_context->get_converted_keys

The ABAP checks that:

IF mr_request->*-technical_request-navigation_path IS INITIAL.

...which it fails and therefore sets the two key fields to blank, the weird thing about this is when I look in the debugger the "navigation_path" table is not initial and contains the valid key values etc.

I have implemented a few other services in a similar fashion but with only single keys so I'm guessing there is either a bug with multiple keys or (more likely) I have missed something in the setup in SEGW.

Anyone had anything similar?

Thanks,

Gregor

Screenshot of field failing INITIAL check but not really initial:


Accepted Solutions (1)

Accepted Solutions (1)

ChandraMahajan
Active Contributor
0 Kudos

Hi Gregor,

You can use importing parameter IT_KEY_TAB of your method <YOUR_ENTITY>_GET_ENTITY from your class DPC_EXT.

alternatively you can use below code to retrieve keys 

DATA: lt_keys TYPE /iwbep/t_mgw_tech_pairs,

    ls_key TYPE /iwbep/s_mgw_tech_pair,

    lt_keys = io_tech_request_context->get_keys( ).

Regards,

Chandra

Former Member
0 Kudos

Hi Chandra,

Thanks for the tip, I was using similar code in the DPC class and the service was working but obviously this was getting reset every time I refreshed/activated in SEGW.

Presumably the DPC_EXT class is used for exactly this purpose so I will put some ABAP in there to fetch the Entity. Possibly a bug in SEGW?

Thanks,

Gregor

ChandraMahajan
Active Contributor
0 Kudos

Hi Gregor,

there is no bug in SEGW. you should always write your ABAP code in DPC_EXT classes only.

Regards,

Chandra

ChandraMahajan
Active Contributor
0 Kudos

Please refer

Regards,

Chandra

Former Member
0 Kudos

Hi Chandra,

When I say bug I mean that SEGW alone works for this type of association perfectly fine when using a single key, without the need to write any ABAP. The problem happens when I try to use two keys.

Gregor

Answers (0)