Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2800

Re: IT_KEY_TAB in GET_Entityset method

$
0
0

Hi Siddharth,

 

I will not repeat same thing again to use Filters for sending values to Gateway Service as suggested by Ashwin Dutt R and Gowtham Raja M

 

Let me tel you how you can use this Filter Option and make your application work:

 

See below code :

 

var filterJson = [],

  pTypeFilterJson = [];

  var oFilter1 = new sap.ui.model.Filter("<your field name1>", sap.ui.model.FilterOperator.EQ, custID);

  filterJson.push(oFilter1);

  var oFilter2 = new sap.ui.model.Filter("<your field name2>", sap.ui.model.FilterOperator.EQ, ordID);

  filterJson.push(oFilter2);

 

var allFilter = new sap.ui.model.Filter(filterJson, true);      //true will add AND condition in betewwn parameter if you want OR condition then pass false.

 

//Finally set Filter

 

 

  oComponent.setFilter(allFilter, true);

//If you want to navigate to some other View use below lines else you are done for UI5 changes.

 

  var router = new sap.ui.core.UIComponent.getRouterFor(this);

  router.navTo("order_listing");

 

 

 

Now lets see how you can access these parameters in your Gateway methods:

 

Go to your *DPC_EXT method.

 

use below code to get Filter values

Data:

lt_filters            TYPE                   /iwbep/t_mgw_select_option,

ls_filter             TYPE                   /iwbep/s_mgw_select_option, " MGW Framework: Selection

 

Option Parameters for db selects

*-->get filter

  lt_filters = io_tech_request_context->get_filter( )->get_filter_select_options( ).

 

lt_filters will get all your Filter values which you have send.


Now you can read values from lt_filters as below

READ TABLE lt_filters WITH TABLE KEY property = '<Parameter Name>' INTO ls_filter.

if sy-subrc is initial.

// your code will be here

endif.

 

 

 

 

Thanks-

Abhishek



Viewing all articles
Browse latest Browse all 2800

Trending Articles