My requirement was to show Amount with Currency Code in List report (e.g. 25 USD), So I have followed this approach. I hope, its helpful for others too.
I assume that you are aware of basics of SAP oData services.
While creating your oData service, Make changes in data model as mentioned below
- Define the semantics “currency-code” in the property where you will pass currency code (for me it is “CurrencyCode”).
2. Assign the currency property in “unit property name” of Amount property. (I have assigned it into “Amount”).
Generate runtime artifacts and redefine the GET_ENTITYSET method.
You can notice “unit” and “semantics” in metadata.
Final Output –
We saw “How easily we can show Amount with currency code in List Report”.
In the similar way we can show unit-of-measure too.
Happy learning 🙂