1. Tr-CD:SEGW SAP Gateway service
2. 再定義(redefine)
3. /IWFND/MAINT_SERVICE (/o/IWFND/MAINT_SERVICE)
Add Service:Alias
Test:
GetEntitySet: /sap/opu/odata/sap/ZADRC_SRV/ZADRCSet [GET]
GetEntity: /sap/opu/odata/sap/ZADRC_SRV/ZADRCSet('00001') [GET]
Create: /sap/opu/odata/sap/ZADRC_SRV/ZADRCSet [POST]
Update: /sap/opu/odata/sap/ZADRC_SRV/ZADRCSet('00001') [PUT]
DELETE:/sap/opu/odata/sap/ZADRC_SRV/ZADRCSet('00001') [DELETE]
GET KEY:(Get from Parameter IT_KEY_TAB)
DATA: LS_KEY_TAB TYPE /IWBEP/S_MGW_NAME_VALUE_PAIR,
LV_KEY TYPE ZTBLTEST-ZEMPID.
READ TABLE IT_KEY_TAB INTO LS_KEY_TAB WITH KEY NAME = 'Zempid'.
LV_KEY = LS_KEY_TAB-VALUE.
LV_KEY TYPE ZTBLTEST-ZEMPID.
READ TABLE IT_KEY_TAB INTO LS_KEY_TAB WITH KEY NAME = 'Zempid'.
LV_KEY = LS_KEY_TAB-VALUE.
GET ALL FIELDS:(Get from Parameter IO_DATA_PROVIDER )
DATA: LS_INPUT TYPE ZCL_ZTESTPRJ_MPC=>TS_ZTEST.
IO_DATA_PROVIDER->READ_ENTRY_DATA( IMPORTING ES_DATA = LS_INPUT ).
4.SAP Fiori Lauchpad Tr-code:/UI2/FLP
SEPM_DG
5. Front
Controller.js----->Get OData Service
onInit: function() {
var oModel = new sap.ui.model.odata.ODataModel(
"proxy/http/netweaver:8000/sap/opu/odata/sap/ZXXX_SVR");
this.getView().setModel(oModel);
}
Submit
onSave:function() {
oData.request({
requestUri: "proxy/http/netweaver:8000/sap/opu/odata/sap/ZXXX_SVR",
requestUri: "GET",
headers:{
"X-Requested-Width": "XMLHttpRequest",
"Content-Type": "application/atom+xml",
"DataServiceVersion": "2.0",
"X-CSRF-Token": "Fetch"
}
},
function (data,response ){
}
)
}