Convert Amount in word

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

DATA:amount            TYPE DECIMALS 2,
     amt_in_words(255TYPE 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.
CLEARlv_text1,lv_text2.
SPLIT amt_in_words AT 'Rupees' INTO lv_text1 lv_text2.
CONDENSElv_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

all user exit mv45afzz (implicit user exit )

How to Give Dropdown in alv report in sap abap programming Language

Long Text in input and output field in module pool