Skip to Content
0
Former Member
Jan 06, 2007 at 06:26 AM

script output display

18 Views

Hai all ,

here am getting the Amt displayed in script output gives like this

amt = 1.45240000000000E+07 instead of 1,45,24,000.

here is the code

FORM get_rupee_amt TABLES in_tab STRUCTURE itcsy

ot_tab STRUCTURE itcsy.

  • DATA: prin_amt TYPE p decimals 2 .

  • DATA: bench_amt TYPE p decimals 2.

  • DATA: rupee_amt TYPE p decimals 2 .

  • DATA: val_amt TYPE c.

DATA: prin_amt TYPE f.

DATA: bench_amt TYPE f.

DATA: rupee_amt TYPE f.

DATA: val_amt(20) TYPE c .

READ TABLE in_tab INDEX 1.

IF sy-subrc EQ 0.

  • replace ALL OCCURRENCES OF ','in in_tab-value with space.

replace ALL OCCURRENCES OF ',' in in_tab-value with ' '.

CONDENSE in_tab-value.

prin_amt = in_tab-value.

ENDIF.

READ TABLE in_tab INDEX 2.

IF sy-subrc EQ 0.

  • replace ALL OCCURRENCES OF ',' in in_tab-value with space.

replace ALL OCCURRENCES OF ',' in in_tab-value with ' '.

CONDENSE in_tab-value.

bench_amt = in_tab-value.

ENDIF.

rupee_amt = prin_amt * bench_amt.

  • val_amt = rupee_amt.

move rupee_amt to val_amt .

WRITE val_amt TO ot_tab-value.

  • WRITE rupee_amt TO ot_tab-value.

MODIFY ot_tab INDEX 1 TRANSPORTING value.

CLEAR ot_tab.

ENDFORM. "get_rupee_amt

regards,

Max.