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

Decimal issue while displaying output

sreekanth_n2
Active Participant
0 Likes
2,101

Hi Experts,

Im fetching amount BSEG-DMBTR to display in Report output.

to field catalog , passing DMBTR  as reference only.

Even during debugging I observed that the amount in the internal table is same as FB03 document/BSEG-DMBTR. But in output, decimal is being removed and displaying the whole amount i.e., amount is being multplied by 100.

Please help in resolving the issue.

Regards,

Sree

1 ACCEPTED SOLUTION
Read only

Clemenss
Active Contributor
0 Likes
1,905

Use CURRENCY addition of WRITE statement which will control the number of decimals.

in ALV/SALV: google helps

Basic question.

Regards Clemens

6 REPLIES 6
Read only

shruthi_nr
Explorer
0 Likes
1,905

Hello Sreekanth,

you can try using WRITE statement rather MOVE for amount fields while filling output table.

Regards,

Shruthi

Read only

Former Member
0 Likes
1,905

With currencies,  you have to specify the currency to be used when displaying the value.  With the WRITE statement this is done using the CURRENCY clause,  in ALV grids,  this is done by naming     the associated currency field in the CFIELDNAME (?) field in the Field Catalog.

The same applies to quantities where the UNIT clause for the WRITE command is used,  or the QFIELDNAME field in the field catalog for ALV grids.

Rich

Read only

0 Likes
1,905

Hi,

Could you please provide the field catalogue details what exactly its filled for DMBTR field?

Read only

0 Likes
1,905

You need to add your currency field in your catalog,


FIELD_CAT-CFIELDNAME = FIELDNAME.       "DMBTR in your case

also look at problem in currency in fieldcatalog | SCN

Hope this helps.

Read only

Clemenss
Active Contributor
0 Likes
1,906

Use CURRENCY addition of WRITE statement which will control the number of decimals.

in ALV/SALV: google helps

Basic question.

Regards Clemens

Read only

Former Member
0 Likes
1,905

Or read my reply.....