on 03-15-2016 8:28 AM
Hello Experts,
I am new to OData service creation and looking for sample code which can be used in order to implement GET_ENTITYSET function.
I am using BAPI- BAPI_CUSTOMER_GETLIST and scenario here is to filter certain set of customers from KNA1 table to display output.
Can any of you please help me with sample code to implement this method? I have below code which needs to be populated properly.
Thanks,
Megha
1. Create a simple RFC implementing the scenario with valid import and export parameters at ABAP Backend.
2. Create entity through import RFC in SEGW transaction.
3. Select properties of the entity and make them filterable in the structure.
4. Implement Get Entity Set using the same RFC and generate the runtime artifacts
5._GetEntitySet Method will be automatically created with filter options and respective code
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Ashwin,
Thanks for your reply. I am following this document already but could not find code to implement filter in OData query. I see below in the link but what exactly do I need to code in GET_ENTITYSET method? Could you help with that?
UserCollection?$filter=UserID eq '123' and LastName eq 'Mahajan' | IT_FILTER_SELECT_OPTIONS and IV_FILTER_STRING | DATA: my_filter_options TYPE /iwbep/t_mgw_select_option, my_filter_string TYPE string. my_filter_options = io_tech_request_context->get_filter( )->get_filter_select_options( ). my_filter_string = io_tech_request_context->get_filter( )->get_filter_string( ). | Yes |
Thanks,
Megha
User | Count |
---|---|
96 | |
11 | |
11 | |
10 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.