cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass non key parameter into GET_ENTITY_SET method

arindam_samanta
Participant
0 Kudos

Hi Experts,

I want to pass key field value into GET_ENTITY_SET method as well as non key field value. The key value can be available in lt_key_tab.n Like that where I can get the value or which import parameter hold the non key value in this method, in DPC EXT class?

In that case, what would be possible URI ? How I can pass those non key values in URI which will hit GET HTTP method for GET_ENTITY_SET method when I will test in SAP NETWEAVER GATEWAY CLIENT?

Thanks in advanced,

Regards,

Arindam Samanta.

Accepted Solutions (0)

Answers (4)

Answers (4)

arindam_samanta
Participant
0 Kudos

Hi Andre Fischer , Krishna Kishor Kammaje, Ashwin Dutt R,

Thanks to all for your reply.

@Andre, Actually I am talking about non key fields in Entity type. If I want to pass value for those non key fields from fron end then where I can see those values in GET_ENTITY_ SET METHOD?

But now I got the answer from your replies. You all are absolutely correct. I can see those values in IT_FILTER_SELECT_OPTIONS. These values coming from URL using filter parameter. For Example - http://yyy.yyy.yyy.com:8000/sap/opu/odata/sap/ZAS_SODEXO_SRV/SODEXO_NEW_ADD_SET?$filter=Year eq '2014' and Month eq '07' and Bukrs eq '1001'.


The year,month, bukrs are non key field in my entity type.

Thanks & Regards,

Arindam

kammaje_cis
Active Contributor
0 Kudos

Hey Arindam,

Glad that your query got resolved. May be you can mark the helpful answers and close the thread.? That would help the community.

Reagrds

Krishna

AshwinDutt
Active Contributor
0 Kudos

Hello Arindam,

Irrespective of if its a Key parameter or not a Key parameter, your inputs need to be sent as part of filters to fire ur Query/Get_Entity_Set method.

/ZGWSAMPLE_SRV/BusinessPartnerCollection?$filter=Param1 eq 'abc' and Param2 eq 'xyz'

Please refer Task2 as Krishna and Andre suggested.

Regards,

Ashwin

kammaje_cis
Active Contributor
0 Kudos

Arindam,  you are talking about Filters.

Just to add to Andreas, Task 2 in the above document has the example of URL as well as how to handle it within the ABAP code.

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Arindam,

I am not sure what non-key values you are looking for.

Please have a look at my following whitepaper where I describe how to access query paramters that are sent alongside with a query.

http://scn.sap.com/docs/DOC-43000

Best Regards,

Andre