Application Development and Automation 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: 
Read only

type casting

Former Member
0 Likes
461

hi,

how to display an hiphan for default value of currency field in alv..???

3 REPLIES 3
Read only

Former Member
0 Likes
438

Hi,

If u want to display hyphen(-) for default value of currency field in alv...u need to do the following:

for watever field to which u wish to display hyphen(-) for default currency ,

wa_fieldcat-cfieldname = '-' "cfieldname is the currency field for the respective field.

append wa_fieldcat to fieldcat.

clear wa_fieldcat.

Rewards points if found useful..

Regards,

abc xyz

Read only

0 Likes
438

what should be the cfieldname.. i am not getting it..

would u plz explain it with example..

Read only

Former Member
0 Likes
438

Hi,

Hi,

In the field catalog internal table..For the currency field you have to populate the cfieldname 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..

<b>Reward points</b>

Regards