Application Development 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: 

Again doubt in SAP SCRIPT

Former Member
0 Kudos

How we can print Words in SAP SCRIPT for e.g if we have total of some purchase order as 2450.50

Now how to print this value in sapscript as Two thousand four hundred and fifty Rupees and Fifty Paise.

I have seen of Function by name SPELL-AMOUNT now how to call this function from SAP-SCRIPT.

2 REPLIES 2

Former Member
0 Kudos

Sometimes it's easier to modify a copie of the report

you use to print the form.

Just Call the fonction before printing the considered text element in the report and print the string in your form.

Sincerely

0 Kudos

Another option is to use a perform in your layout set to call a subroutine in another program.

Example:

/: PERFORM F_ROUTINE IN PROGRAM ZPROGRAM

/: USING &VAR1&

/: USING &VAR2&

/: CHANGING &VAR3&

/: CHANGING &VAR4&

/: ENDPERFORM

The USING parameters need to be global variables recognized in your layout set/print program.

In the ZPROGRAM, the SAPScript variables are stored in a table with structure itcsy. To define the form:

FORM F_ROUTINE tables in_par structure itcsy

out_par structure itcsy.

<< here you can read in_par for any variables passed from your form, do any needed logic, and then update the out_par table for any of the variables passed back to your form. >>

ENDFORM