01-30-2008 12:11 PM
hi,
im using 'HR_IN_CHG_INR_WRDS ' FM to display amount in words.the value is getting displayed as 'TWENTY TWO
Rupees' .but i want it to display as 'Twenty two' only and there should not be 'Rupees' at the end.for this i tried to copy std.FM into ZHR_IN_CHG_INR_WRDS along with new Zfunction group.it's not allowing me to copy like this.it's asking access key.please provide me solution.
Thanks
k srinivas
01-30-2008 12:19 PM
It should allows you to copy it to a Z FM. First you have to create a z function group and make sure that it is activated.
Then try to copy it to a Z FM and make sure that the Function Group is your Z FG.
01-30-2008 12:19 PM
01-30-2008 12:22 PM
hi
translate the text using
translate v_text to lower case
or pass the text to FM to get the first letter of the word in CAPS
Test for function group OLDS
Function module STRING_UPPER_LOWER_CASE
Uppercase/Lowercase
Runtime: 215 Microseconds
Import parameters Value
DELIMITER 10
STRING1 SAP INDIA
Export parameters Value
STRING Sap india
OR THIS
Test for function group JYKE
Function module ISM_CONVERT_TO_LOWER_CA
Uppercase/Lowercase
Import parameters Value
INPUT SHIVA
Export parameters Value
OUTPUT shiva
01-30-2008 12:46 PM
"After your FM write this code..
DATA :itab TYPE TABLE OF string.
DATA : wa_itab TYPE itab.
DATA : amount(255) VALUE 'TWENTY TWO Rupees'.
DATA : amount_words TYPE string .
SPLIT amount AT space INTO TABLE itab.
LOOP AT itab INTO wa_itab.
TRANSLATE wa_itab TO LOWER CASE.
TRANSLATE wa_itab+0(1) TO UPPER CASE.
IF wa_itab EQ 'Rupees'.
wa_itab = space.
ENDIF.
MODIFY itab FROM wa_itab.
CONCATENATE amount_words wa_itab INTO amount_words
SEPARATED BY space.
ENDLOOP.
WRITE 😕 amount_words.