Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

output

Former Member
0 Likes
644

hi to all

if i gave in the selection screen

ex:1,00,000

its should print the out put as : one lack..

points will be added for your suggestion

5 REPLIES 5
Read only

Former Member
0 Likes
627

Hi

Use the fun module

SPELL_AMOUNT for the code and pass this selection screen paramter and display the SPELL-WORD field as output

<b>Reward points for useful Answers</b>

Regards

Anji

Read only

Former Member
0 Likes
627

Hello,

Try using the FM SPELL_AMOUNT

Vasanth

Read only

Former Member
0 Likes
627

<b>PROGRAM TO DISPLAY AMOUNT IN WORDS ....</b>

REPORT  zdemo_alvgrid                 

TABLES SPELL.

DATA : T_SPELL LIKE SPELL .  "OCCURS 0 WITH HEADER LINE.
parameter : PAMOUNT LIKE SPELL-NUMBER  .


PERFORM SPELL_AMOUNT USING PAMOUNT .

WRITE:  T_SPELL-WORD  .
FORM SPELL_AMOUNT USING PAMOUNT .

  CALL FUNCTION 'SPELL_AMOUNT'
       EXPORTING
            AMOUNT    = PAMOUNT
*            CURRENCY  = PWAERS
*            FILLER    = SPACE
            LANGUAGE  = SY-LANGU

       IMPORTING
            IN_WORDS  = T_SPELL
       EXCEPTIONS
            NOT_FOUND = 1
            TOO_LARGE = 2
            OTHERS    = 3.
ENDFORM.

reward points if it is usefull ....

Girish

Read only

Former Member
0 Likes
627

hi,

use the function module SPELL_AMOUNT.

Read only

Former Member
0 Likes
627

try this



PARAMETERS : P_VAL TYPE I.
DATA : V_VAL TYPE P DECIMALS 2,
       V_TXT(50).

V_VAL = P_VAL.

CALL FUNCTION 'HR_IN_CHG_INR_WRDS'
  EXPORTING
    AMT_IN_NUM               = V_VAL
 IMPORTING
   AMT_IN_WORDS             = V_TXT
* EXCEPTIONS
*   DATA_TYPE_MISMATCH       = 1
*   OTHERS                   = 2
          .
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

REPLACE  'Rupees' WITH SPACE INTO V_TXT .

WRITE : / V_TXT.

regards

shiba dutta