Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Currency field ALV

Former Member
0 Kudos

hi experts,

i have a field which has decimals values and i am displaying them in ALV.

while display the colum is not aligned according to the decimal point.

i have refered this field from a currency field in standard table.

eg..

12.54

1.56

3646.90

but i want like this

12.54

1.56

3646.90

please help

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

In the field catalog internal table..For the currency field you have to populate the <b>cfieldname</b> with the currency field name..

Ex..

DATA: BEGIN OF ITAB OCCURS 0,

VALUE TYPE MBEW-STPRS,

CURRENCY TYPE WAERS,

END OF ITAB.

  • Field catalog..

S_FIELDCATALOG-FIELDNAME = 'VALUE'.

S_FIELDCATALOG-cfieldname = 'CURRENCY'.

S_FIELDCATALOG-TABNAME = 'ITAB'.

This will display the decimal places according to the currency in the column CURRENCY..

Thanks,

Naren

1 REPLY 1

Former Member
0 Kudos

Hi,

In the field catalog internal table..For the currency field you have to populate the <b>cfieldname</b> with the currency field name..

Ex..

DATA: BEGIN OF ITAB OCCURS 0,

VALUE TYPE MBEW-STPRS,

CURRENCY TYPE WAERS,

END OF ITAB.

  • Field catalog..

S_FIELDCATALOG-FIELDNAME = 'VALUE'.

S_FIELDCATALOG-cfieldname = 'CURRENCY'.

S_FIELDCATALOG-TABNAME = 'ITAB'.

This will display the decimal places according to the currency in the column CURRENCY..

Thanks,

Naren