cancel
Showing results for 
Search instead for 
Did you mean: 

How to display leading zeros in RAP Fiori App key field?

HugoJ
Product and Topic Expert
Product and Topic Expert
998

Hi, I'm implementing a RAP-based Fiori Application in S/4HANA On-Prem.

My current issue is figuring out how to display the main Key field - Document Number - with leading zeros. It is a NUMC 10 field in the database, with output length 10 in the domain.

How it currently displays:

HugoJ_3-1719100411344.png

How I would like it to display:

HugoJ_2-1719100365532.png

I have tried to create a duplicate field in the main CDS View and force the leading zeros:

key docnr                                     as Docnr,
cast(lpad(docnr,10,'0') as abap.char(10))     as DocnrLong,

However the frontend seems to always delete the leading zeros, maybe if I change something in BAS files, like formatter.js, is there a way?

Thank you

Accepted Solutions (1)

Accepted Solutions (1)

HugoJ
Product and Topic Expert
Product and Topic Expert

Solution provided in the original question was already OK.

 

Gabriel9
Explorer
0 Kudos
thx had the same issue !

Answers (0)