Professional Documents
Culture Documents
____________________________________
Fetching data based on SEARCH string :
________________________________________
For eXample :
search=VIJAYENDAR
_GET_ENTITYSET method
= IO_TECH_REQUEST_CONTEXT->get_Search_String( ).
--------------------------------------
IO_TECH_REQUEST_CONTEXT->GET_SEARCH_STRING( ).
< 12000.
=
'FRESHER'.
= 'AVERAGE'.
elseif sALARY
STATUS
> 30000.
= 'GOOD'.
endif.
If country = 'INDIA'.
currency
= 'INDIAN RUPEE'.
= 'US DOLLAR'.
endif.
________________________________________________
Note : STATUS , CURRENCY is not physically available in the data base
so, STATUS , CURRENCY can be generated virtually at SERVICE LEVEL
____________________________________________________________________________
NOTE :
rties
with 12
with 12
save
goto properties section of ENTITY TYPE
and remove "DDIC ABAP STRUCTURE"
----------------------------save
click on "GENERATE RUNTIME OBJECTS"
open DATA PRovider EXTENSION CLASS
chose change,
select GET_ENTITYSET
lt_itab.
ls_itab-SALARY
<= 30000.
ls_itab-STATUS = 'AVERAGE'.
elseif ls_itab-SALARY > 30000.
ls_itab-STATUS
= 'GOOD'.
endif.
if ls_itab-COUNTRY = 'INDIA'.
ls_itab-CURRENCY = 'INDIAN RUPEE'.
elseif ls_itab-COUNTRY = 'US'.
ls_itab-CURRENCY = 'US DOLLAR'.
endif.
append ls_itab to lt_itab2.
endloop.
ET_ENTITYSET = lt_itab2.
________________________________________________
activate the class, and
REgister the service
MAintain the service
and goto GATEWAY client.
and provide
/sap/opu/odata/SAP/ZDBPROJECT55_SRV/USERSet
and execute.
__________________________________________________________________________
Note :