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: 

How to remove comma, zero for field of type currency in alv output

Former Member
0 Kudos

Iam getting value like 2,007.00 for filed of type currency in alv output.

Expected is 2007 ( excluding comm and decimal part)

Can you help me out.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

Move your currency field to a CHARATCER field.

Cheers

Ravish

3 REPLIES 3

Former Member
0 Kudos

Hi

Move your currency field to a CHARATCER field.

Cheers

Ravish

Former Member
0 Kudos

Hi Subramani,

You can handle this issue with field catalog.

You have fields like DATATYPE, INTTYPE etc. in field catalog, where you can change the data type for display and hence control the commo and zeros.

Best Regards,

Ram.

Edited by: ram Kumar on Dec 18, 2008 10:15 AM

Former Member
0 Kudos

pass the reference table name and fieldname in the field cat

ls_fieldcat-fieldname = 'ANSAL'

ls_fieldcat-tablename = 'GT_TAB' "--->ur internal table

ls_fieldcat-cfieldname = 'ANCUR' " this needs to be there

ls_fieldcat-ctabname = 'GT_TAB' " this needs to be there

ls_fieldcat-datatype = 'CURR' " this needs to be there

make sure u have this adjustment in the fieldcat .

here cfieldname in some structureus can be as reffieldname

suppress the decimals .

vijay.