06-29-2007 3:38 PM
06-29-2007 3:46 PM
Hi,
Just declare a variable of type I and C.
Assign value of variable type p to type i variable.
Then assign the value of type i value to c varaiable.
Data : a type i,
b(10) type c
c type p.
a = c. "This is to round off if there are any decimal values.
b = a.
Reward if helpful.
06-29-2007 3:49 PM
Hi,
FM: 'SPELL_AMOUNT'
Example:
REPORT ZSPELL.
TABLES SPELL.
DATA : T_SPELL LIKE SPELL OCCURS 0 WITH HEADER LINE.
DATA : PAMOUNT LIKE SPELL-NUMBER VALUE '1234510'.
SY-TITLE = 'SPELLING NUMBER'.
PERFORM SPELL_AMOUNT USING PAMOUNT 'USD'.
WRITE: 'NUMBERS', T_SPELL-WORD, 'DECIMALS ', T_SPELL-DECWORD.
FORM SPELL_AMOUNT USING PWRBTR PWAERS.
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
AMOUNT = PAMOUNT
CURRENCY = PWAERS
FILLER = SPACE
LANGUAGE = 'E'
IMPORTING
IN_WORDS = T_SPELL
EXCEPTIONS
NOT_FOUND = 1
TOO_LARGE = 2
OTHERS = 3.
ENDFORM. " SPELL_AMOUNT
Regards,
Bhaskar
06-29-2007 3:49 PM
Hi Kanti,
There is no need of any FM.
Just directly assign P value to the variable of type C.
Reward points if useful.
Regards,
Atish
06-29-2007 4:34 PM
PACK_CHAR_CONVERSION to convert type P to type C
CHAR_PACK_CONVERSION to convert type C to type P
Sagar
Allways urs
06-29-2007 4:36 PM
Use FM Pack_Char_Conversion to convert from type P to type C
Use FM Char_Pack_Conversion to convert from type C to type P
Sagar
Allways urs
06-29-2007 4:47 PM