cancel
Showing results for 
Search instead for 
Did you mean: 

SAP gateway query options(filtering,paging sorting and searching).

Former Member
0 Kudos

Dear Gurus,

I have a requirement on SAP gateway service to implement logic on query options(filtering,paging sorting and searching).

1. i have one custom table it contains 5 fields and need to display on sap Ui5 screen.

2. i need to do query operations(filtering ,paging,sorting and searching).

how to implement

IMPORTING

IV_ENTITY_NAME

IV_ENTITY_SET_NAME

IV_SOURCE_NAME

IT_FILTER_SELECT_OPTIONS

IS_PAGING

IT_KEY_TAB

IT_NAVIGATION_PATH

IT_ORDER

IV_FILTER_STRING

IV_SEARCH_STRING

IO_TECH_REQUEST_CONTEXT

EXPORTING

     ET_ENTITYSET

what data i need to IMPORTING and which query operation i need to first and code logic?

Help on this.

Thanks & regards,

bala.

Accepted Solutions (1)

Accepted Solutions (1)

EkanshCapgemini
Active Contributor
0 Kudos

Hi Bala,

Filtering is the very first thing that you need to implement.

Paging is the last thing to implement because you will page on your final result set which is already filtered, sorted &c.

Sorting is done just above Paging.

Regards,
Ekansh

Answers (2)

Answers (2)

AshwinDutt
Active Contributor
0 Kudos

Hello Bala,

If you have an FM  having say A, B & C are inputs and returns an output table as response based on matches found based on inputs, for this case just import this FM in SEGW and implement Get_Entity_Set using 'Map to Data Source' option.

Generate the run-time artifacts.

Code for Searching ( would be same as filtering ) and Paging is automatically implemented by the GW Builder.

For sorting you need to manually implement some logic in Get_Entity_Set method of your DPC_EXT class.

Regards,

Ashwin

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos

Another how to guide for code based implementation you can find here:

Very important:
you have to retrieve the parameters using the IO_TECH_REQUEST_CONTEXT method, NOT using the parameters

IV_ENTITY_NAME IV_ENTITY_SET_NAME IV_SOURCE_NAME IT_FILTER_SELECT_OPTIONS IS_PAGING IT_KEY_TAB IT_NAVIGATION_PATH IT_ORDER IV_FILTER_STRING IV_SEARCH_STRING

ChandraMahajan
Active Contributor
0 Kudos

Question belongs to SAP Gateway and hence moving from to

-Chandra (Moderator)