Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

amt_in_num = act.

call function 'HR_IN_CHG_INR_WRDS'


exporting
amt_in_num
= w_total
importing
amt_in_words = amt_in_words.
if sy-subrc <> 0.
* Implement suitable error handling here
endif.
call function 'ISP_CONVERT_FIRSTCHARS_TOUPPER'
exporting
input_string = amt_in_words
importing
output_string = amt_in_words.

if w_sitab-waers ne 'INR'.
replace all occurrences of 'Rupees' in amt_in_words with
'And'.
replace all occurrences of 'Paise' in amt_in_words with
'Cents'.
concatenate w_sitab-waers amt_in_words 'Only' into amt_in_words separated by s
pace.
else.
replace all occurrences of 'Rupees' in amt_in_words with
'And'.
concatenate 'Rs.' amt_in_words 'Only' into amt_in_words separated by space.
endif.
split c_amt_in_num at '.' into lv1 lv2.
if lv2 is initial.
replace all occurrences of 'And Only' in amt_in_words with
'Only'.
endif.

You might also like