Convert Amount in word

Some time requirments to convert amount in word here example to converting amount in word

DATA:amount            TYPE p DECIMALS 2,
     amt_in_words(255) TYPE c,
     lv_text1          TYPE string,
     lv_text2          TYPE string.
amount  = gs_finalt-amount.
CALL FUNCTION 'HR_IN_CHG_INR_WRDS'
  EXPORTING
    amt_in_num         = amount
  IMPORTING
    amt_in_words       = amt_in_words
  EXCEPTIONS
    data_type_mismatch = 1
    OTHERS             = 2.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
CLEAR: lv_text1,lv_text2.
SPLIT amt_in_words AT 'Rupees' INTO lv_text1 lv_text2.
CONDENSE: lv_text1,lv_text2.
CONCATENATE 'Rupees' lv_text1 lv_text2 INTO amnt_wrds
                            SEPARATED BY space.
*  AMNT_WRDS = amt_in_words.

Comments

Popular posts from this blog

Business senario : FB60 AND FB70 validation and subsituation

MB_MIGO_BADI THIS BADI USED TO POSTING DATA IN MIGO

all user exit mv45afzz (implicit user exit )