cancel
Showing results for 
Search instead for 
Did you mean: 

Using Function Module in SAP Script

Former Member
0 Kudos

Dear Friends,

how can i use function modules in sap scripts?. i want to use call function SPELL_AMOUNT in sap script?

in text element using perform statement hw can i use?

Regarding i search related articles but, i am not getting any solution.

Plz help Me.

Regards,

K.S.Kannan

Accepted Solutions (0)

Answers (3)

Answers (3)

shaik_sajid
Active Contributor
0 Kudos

Dear Kanan,

You can do it in two ways:

Way1

your Amount will be in some variable say VAR_AMT1 and want in words in field say VAR_SPELL.

In your report program you can use the function module SPELL_AMOUNT and pass the VAR_AMT1 to it and you will get the words in VAR_SPELL.

So now in your sap script you can use the variable VAR_SPELL to print the amount in words.

we normally use this above method.

WAY2

You are inside Sap script and you can write the following code in the sap Script window.

/: PERFORM AMT_TEXT IN PROGRAM ZF_REPORT USING &VAR_AMT1& CHANGING &VAR_SPELL&
/: ENDPERFORM

In the Tag Column when you press F4 you can see various symbols like

/: =  ( / /= /( /: /* /E

. Select

/:

.

In the program ZF_REPORT (any report) you should have the perform AMT_TEXT where you should use the function module SPELL_AMOUNT to convert the amount into words.

Hope its Clear.

Former Member
0 Kudos

Hi,

Create a subroutine pool program and call the same in sap scripts. define variables in sap script using statement DEFINE and pass those values to subroutine pool and get the change values as desired.

Regards,

Chandra kavali

Former Member
0 Kudos

Hi..

It would be better if you will export the amount field using FORM-PERFORM in SAP Script to the Z-program, then call the SPELL_AMOUNT in the Z-prog., and then import the Amount in words in the Script using .

Regards,

Karthik