Skip to Content
0
Former Member
Feb 09, 2009 at 07:15 AM

Table control amount is wrong for currency without decimal place

522 Views

Hi experts,

I have a table control that allow display and entry for amount, which currently appear correctly for all currencies except those without decimal points, eg INR, JPY.

The problem: When first enter the screen, the amount is shown correctly, eg, INR 100. However, when the screen is refreshed (for sorting or saving etc), 2 zeros are added to the screen, eg INR 10,000. Then another refresh, will be INR 1,000,000.

The Codes and Findings:

PROCESS AFTER INPUT.

LOOP WITH CONTROL TBDATA1.

MODULE READ_TABLE_CONTROL1_0200.

ENDLOOP.

MODULE READ_TABLE_CONTROL1_0200 INPUT.

MODIFY ITAB1 FROM IDATA1 INDEX TBDATA-CURRENT_LINE.

ENDMODULE.

Note - IDATA1-AMOUNT has the format CURR and ref field IDATA1-WAERS.

During the 2nd PAI, the amount 100 becomes 100.00 at IDATA1, therefore it is displayed as 10,000 on the screen. During the next PAI, it will become 10000.00 which display as 1,000,000.

Have someone encounter such problem before? Does anyone have the solution?

Thanks and regards,

Yuki