Indian Currency Amount to Word

In the following program we are converting an amount into words. The amount is Indian currency which is converted into text. Here we are calling a standard function module HR_IN_CHG_INR_WRDS  and after that we are converting the case of words.

REPORT zsr_test NO STANDARD PAGE HEADING.

PARAMETERS p_amt TYPE pc207-betrg.
DATA v_amt TYPE char100.

CALL FUNCTION 'HR_IN_CHG_INR_WRDS'
  EXPORTING
    amt_in_num         p_amt
  IMPORTING
    amt_in_words       v_amt
  EXCEPTIONS
    data_type_mismatch 1
    OTHERS             2.

CALL FUNCTION 'ISP_CONVERT_FIRSTCHARS_TOUPPER'
  EXPORTING
    input_string  v_amt
    separators    ' '
  IMPORTING
    output_string v_amt.

WRITE'Amount in Words: 'v_amt.




LihatTutupKomentar