3 weeks ago
Hi All,
I am currently following the learning journey as below and have been working on the Describing the ABAP RESTful Application Programming Model -> Exploring Architecture:
https://learning.sap.com/learning-journeys/acquire-core-abap-skills
I have followed the necessary steps for this, but facing the below issue after I publish the Service:
Error:
Log-dbg.js:499 2024-05-10 15:39:46.750600 [FUTURE FATAL] Failed to load component for container __container0 - Error: /sap/opu/odata4/sap/zXXXXXX_ui_flight_o4/srvd/sap/zXXXXXX_flight/0001/$metadata: Unsupported OData version 4.01
Error: /sap/opu/odata4/sap/zXXXXXX_ui_flight_o4/srvd/sap/zXXXXXX_flight/0001/$metadata: Unsupported OData version 4.01
at o.finalize (library-preload.js:2340:345)
at r.convertXMLMetadata (library-preload.js:2298:1478)
at h (library-preload.js:2304:402)
The steps performed were to generate the ABAP Repository objects for a table that I created.
My table definition is as follows:
@EndUserText.label : 'Flight_Modes'
@AbapCatalog.enhancement.category : #NOT_EXTENSIBLE
@AbapCatalog.tableCategory : #TRANSPARENT
@AbapCatalog.deliveryClass : #A
@AbapCatalog.dataMaintenance : #RESTRICTED
define table zXXXXXXaflgt {
key client : abap.clnt not null;
key uuid : sysuuid_x16 not null;
carrier_id : /dmo/carrier_id;
connection_id : /dmo/connection_id;
airport_from_id : /dmo/airport_from_id;
city_from : /dmo/city;
country_from : land1;
airport_to_id : /dmo/airport_to_id;
city_to : /dmo/city;
country_to : land1;
price : /dmo/price;
currency_code : /dmo/currency_code;
local_created_by : abp_creation_user;
local_created_at : abp_creation_tstmpl;
local_last_changed_by : abp_locinst_lastchange_user;
local_last_changed_at : abp_locinst_lastchange_tstmpl;
last_changed_at : abp_lastchange_tstmpl;
}
I am trying to understand what could be the issue for this and how do I fix this.
Any help on this would be appreciated.
Hi,
the error is thrown by the v4.ODataModel of SAPUI5 which does not support OData version 4.01 so far. It only supports version 4.0. The typical cause for RAP to switch to 4.01 is that one of the Decimals has the scale="floating" which is caused by using the ABAP type DECFLOAT. Here, the scale="floating" may be used for the price. To be sure you will have to look at the OData metadata that are generated for your service. The solution would then be to use another numerical type than DECFLOAT.
Best regards
Mathias.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.