Skip to Content
1
Nov 22, 2022 at 01:03 PM

Get description text from S4 system

262 Views Last edit Nov 22, 2022 at 01:07 PM 4 rev

Hello,

We have the same challenge in almost every project (CAP Java).

We are using a S4 API or a custom CAP entity. A foreign key is stored in a property.

For example the field "Plant" in Purchase Order Item. Now often comes the requirement that the description text should also be displayed in the Fiori Elements App.

API Reference | Purchase Order | SAP API Business Hub

Mostly we build a Z-OData Service with a listing of all Plants and PlantName. We import this in the CAP Project and offer this also as value help.

Now we extend the name field to the structure in the CAP Project. In the handler in the after event we add and read the name using the Z-OData service.

This is somewhat inperfomant for many and redundant queries like in a List Report.

For expands, like Purchase Order on Purchase Order Items, we must also always have to make sure that "read after" is implemented.

It seems a bit cumbersome to always re-read normal text like that.

What experiences have you made?
Do you have more elegant approaches?