Skip to Content
0
Jul 20 at 02:33 PM

Performance issue in SAP BTP when trying to call external API(S4 HANA Odata)

334 Views

Hi All,

When I try to call external API "API_PRODUCT_SRV" using SAP BTP - CAP (Node.JS) service, It's encountering huge performance issue. Do you have any idea how to improve to read multiple articles or multiple entity sets per article in one call.

Currently, below code is being used.

*************************************

service getMasterDataService @(impl : './getMasterData-service.js') {

@cds.persistence.skip

@readonly

entity Description asprojectionon externalAPIProd.A_ProductDescription;

@cds.persistence.skip

@readonly

entity SalesDelivery asprojectionon externalAPIProd.A_ProductSalesDelivery {

Product, ProductSalesOrg, ProductDistributionChnl, SalesMeasureUnit, BaseUnit

};

@cds.persistence.skip

@readonly

entity UnitsOfMeasure asprojectionon externalAPIProd.A_ProductUnitsOfMeasure {

Product, AlternativeUnit, QuantityNumerator, QuantityDenominator, GlobalTradeItemNumber, BaseUnit

};

@cds.persistence.skip

@readonly

entity UnitsOfMeasureEAN asprojectionon externalAPIProd.A_ProductUnitsOfMeasureEAN {

Product, AlternativeUnit, ProductStandardID, IsMainGlobalTradeItemNumber,

};

***************************************************

var descriptions = await dt.getDescriptions(dbAPIProd, Description);

var salesDeliveries = await dt.getSalesDeliveries(dbAPIProd, SalesDelivery);

var unitsOfMeasures = await dt.getUnitsOfMeasures(dbAPIProd, UnitsOfMeasure);

var unitsOfMeasureEANs = await dt.getUnitsOfMeasureEANs(dbAPIProd, UnitsOfMeasureEAN);

Regards,

Om