on 11-18-2023 4:05 AM
Hello Experts,
I find myself in need of some assistance. I'm trying to find where the backend implementation is for data coming into an oData service built in SEGW. We have a custom front-end SAPUI5 application in which a field is receiving the wrong data for display. I went into SEGW and opened the oData project in the service builder and looked at the Service Implementation. In that I found the 'Set' which is bringing in the wrong data but it isn't using mapping to an ABAP structure. It only has the CRUDQ implemented. In the Runtime Artifacts I looked at both *_DPC and *_DPC_EXT also *_MPC and *_MPC_EXT classes and found the structure but the structure is all string types. I found the particular field in question but I cannot locate where that field is getting the data assigned to it. Are there any suggestions how I can locate where this structure is getting its assignments? Below is the code that get the data for the 'Set' I need to change one of the fields for.
In the Importing there a structure called et_entityset that gets assigned the getorderdetailss_get_entityset. In the Changing part cr_data gets assigned the er_entityset. When I forward navigate to these it takes me to the structure definitions but not exactly where the structure gets assigned the data. I suspect this is where the change would need to be made, but I can't locate that code!
Thank you for your time.
WHEN 'GetOrderDetailsSet'.
* Call the entity set generated method
getorderdetailss_get_entityset(
EXPORTING
iv_entity_name = iv_entity_name
iv_entity_set_name = iv_entity_set_name
iv_source_name = iv_source_name
it_filter_select_options = it_filter_select_options
it_order = it_order
is_paging = is_paging
it_navigation_path = it_navigation_path
it_key_tab = it_key_tab
iv_filter_string = iv_filter_string
iv_search_string = iv_search_string
io_tech_request_context = io_tech_request_context
IMPORTING
et_entityset = getorderdetailss_get_entityset
es_response_context = es_response_context
).
* Send specific entity data to the caller interface
copy_data_to_ref(
EXPORTING
is_data = getorderdetailss_get_entityset
CHANGING
cr_data = er_entityset
).
Forward navigation takes me to
DATA getorderdetailss_get_entityset TYPE zcl_create_order_mpc=>tt_getorderdetails.
This is the structure that gets filled but I can't find where it gets filled.
begin of TS_GETORDERDETAILS,
VBELN type string,
VKORG type string,
KUNNR type string,
AUART type string,
CONTRACTCODE type string,
CONDTYPE1 type string,
CONDTYPE2 type string,
CONDTYPE3 type string,
CONDTYPE4 type string,
NETWR type P length 8 decimals 3,
NETWR1 type P length 8 decimals 3,
NETWR2 type P length 8 decimals 3,
NETWR3 type P length 8 decimals 3,
DATUM type string,
POSID type C length 24,
AUFNR type string,
CURRENCY type string,
KOSTL type string,
REQDELDATE type string,
ORDERCOMP type string,
COMPLETEDELIVERY type string,
DELBLOCK type string,
BILBLOCK type string,
SALES_NO type string,
RESPONSE type string,
NET_TOTAL type P length 8 decimals 2,
SHIPPING_HANDLING type P length 8 decimals 2,
TAXES type P length 8 decimals 2,
LAYOUT_SETHEADER type string,
LAYOUT_SETHEADER_FLAG type string,
TERMS_PAYMENT type string,
TERMS_PAYMENT_FLAG type string,
INCOMP_FLAG type C length 1,
PO_TYPE type string,
BILLING_DATE type string,
ENQUEUE_MESSAGE type string,
PRICE_DATE type string,
end of TS_GETORDERDETAILS .<br>
types:
TT_GETORDERDETAILS type standard table of TS_GETORDERDETAILS .
PS.
I can think of 3 things:
Curious about this one!
Kr,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Vincente, Thanks for your response and questions, my responses are below
Only GetOrderDetailsSet is present in the service, the singular form is not implemented. In fact even the SET implementation is empty, with commented code, but yet when I look in the Javascript code of the controller, the call is being invoked in the onCopyPressed method. I included the code above.
I've 20 times checked this over that I have the right oData service in context!
Our frontend system is different to our backend. We have a Fiori front end server where our SAPUI5 apps get deployed to. Our backend system is our S/4 HANA ERP system where the data is retrieved from.
P.
In that case, I assume that your frontend system its also the gateway for the OData services, and in that case, you could check the routing configuration just to verify where the OData calls are being routed to.
You can go to SEGW and expand your OData service, then double click on GATEWAYSERVER. Then click on toolbar button Maintain and a new window will open up with configuration information about that service.
Please take a look or share a screenshot and share here, maybe there is something useful there.
Vincente,
When I'm in SEGW and I expand my oData project. I only see Data Model, Service Implementation, Runtime Artifacts and Service Maintenance. There isn't GATEWATSERVER. I can go to IWFND/MAINT_SERVICE and find the service there too. But that only shows me the service and navigate to the Gateway Client.
In the call to the service from the app.controller.js, the call is configured as follows:
var sOption = {"$expand": "GetHeaderItemNavigation,GetHeaderPartnerNavigation,GetHeaderConditionNavigation,HeaderElectronicNavigation"};
var sPath = "/GetOrderDetailsSet(DocNo='" + this.byId("docNumInputId").getValue() + "',OrderType='" + this.byId("orderTypeSelectId").getSelectedKey()
+"',SalesOrg='" + this.byId("salesOrganizationSelectId").getSelectedKey() + "',SoldToParty='',Operationflag='SEL')";
models.callQuery(sPath, null, null, sOption, fnSuccess, fnError, this);
P.
User | Count |
---|---|
74 | |
8 | |
8 | |
7 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.