Monday 26 September 2011

TO display the currency in different format in scripts(22,234.00)



DATA:  gds_current LIKE rf140-saldo ,
      gds_current1(17type c ,
      gds_current2(17type c
gds_current1 = gds_current.

  WHILE gds_current1 is not INITIAL.
    if sy-index = 1.
      CONCATENATE gds_current2 gds_current1+13(3into gds_current2.
    else.
      CONCATENATE gds_current1+13(3) gds_current2  into gds_current2.
    endif.
    shift gds_current1 by 3 places right.
    check sy-index <> 1.
    if gds_current1 is not INITIAL.
      CONCATENATE  ',' gds_current2 INTO gds_current2.
    endif.
    ENDWHILE.
  MOVE gds_current2 TO gdt_out_tab-value.

No comments:

Post a Comment