Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8623

Re: display of currency in indian rupee format

$
0
0

hi Ram

use this code

 

REPORT ZAMOUNT_CONVERSION.

DATA : RESULT1(20).

PARAMETERS : NUM TYPE P DECIMALS 2.

DATA : num2 type STRING.

DATA col_amt(20) type n,"15

         col_b type i,

         num_1(20) type C,"15

         Length type i.

num_1 = num.

 

write : 'default format      :',num.

uline.

skip.

IF ( num >= 999999999 ).

       write num_1 using edit mask 'RR__,__,__,__,______' to col_amt.

 

       CONDENSE col_amt.

       length = STRLEN( col_amt ).

       if length = 16.

         REPLACE first OCCURRENCE OF ',' in col_amt with space.

         write :/'amount indian format:',col_amt.

       else.

       write :/'amount indian format:',col_amt.

       endif.

ELSEIF NUM < 999999999 AND NUM >= 9999999.

       write num_1 using edit mask 'RR__,__,__,______' to col_amt.

       condense col_amt .

       length = STRLEN( COL_AMT ).

       if length = 13.

         REPLACE first OCCURRENCE OF ',' in col_amt with space.

         write :/'amount indian format:',col_amt.

       else.

         write :/'amount indian format:',col_amt.

      endif.

ELSEIF NUM < 9999999  AND NUM >= 99999.

       write num_1 using edit mask 'RR__,__,______' to col_amt.

       condense col_amt .

       length = STRLEN( COL_AMT ).

       write :/'amount indian format:',col_amt.

 

ELSEIF NUM < 99999.

 

   data : dumy(10) type c.

   dumy = num .

   CONDENSE dumy.

   length = STRLEN( dumy ).

     if length <= 6.

 

       write :/'amount indian format:',num.

       else.

       write num_1 using edit mask 'RR__,______' to col_amt.

       write :/'amount indian format:',col_amt.

      endif.

   ENDIF.

   uline.


Viewing all articles
Browse latest Browse all 8623

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>