on 11-05-2008 4:45 AM
Moderator message - please use a meaningful subject in future. I've changed it for you this time. Also, moved to the correct forum
Hi Friends,
In SAP Script how to convert numbers into words with out using the function module in the driver program.
examplae 21 kg as twenty one kg.
Please help me to solve this problem.
Thanks in advance.
Gayathri S
Edited by: Matt on Nov 5, 2008 9:15 AM
Your requirement is not to modify the driver program, can you modify the sap script. Then call external program using the key word (PERFORM) from the layout to do your job.
Prabhu Rajesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In the SAP Script, you can call the perform like below:
Syntax in a form window:
/: PERFORM <form> IN PROGRAM <prog>
/: USING &INVAR1&
/: USING &INVAR2&
......
/: CHANGING &OUTVAR1&
/: CHANGING &OUTVAR2&
......
/: ENDPERFORM
You can create a separate include or use an existing include related to your script and create the above <form> in that <prog>.
The syntax for creating the form in the include is as below:
FORM <form> TABLES IN_TAB STRUCTURE ITCSY
OUT_TAB STRUCTURE ITCSY.
...
ENDFORM.
Example:
In your script,
/: PERFORM GET_BARCODE IN PROGRAM ABCDE
/: USING &PAGE&
/: USING &NEXTPAGE&
/: CHANGING &BARCODE&
/: ENDPERFORM
And in the report ABCDE, create the form like this:
REPORT ABCDE.
FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY
OUT_PAR STRUCTURE ITCSY.
DATA: PAGNUM LIKE SY-TABIX, "page number
NEXTPAGE LIKE SY-TABIX. "number of next page
READ TABLE IN_PAR WITH KEY 'PAGE'.
CHECK SY-SUBRC = 0.
PAGNUM = IN_PAR-VALUE.
READ TABLE IN_PAR WITH KEY 'NEXTPAGE'.
CHECK SY-SUBRC = 0.
NEXTPAGE = IN_PAR-VALUE.
READ TABLE OUT_PAR WITH KEY 'BARCODE'.
CHECK SY-SUBRC = 0.
IF PAGNUM = 1.
OUT_PAR-VALUE = '|'. "First page
ELSE.
OUT_PAR-VALUE = '||'. "Next page
ENDIF.
MODIFY OUT_PAR INDEX SY-TABIX.
ENDFORM.
Hope this helps.
Regards,
Suganya
Hi Gayathri,
You need to use the FORM ENDFORM and inside the subroutine call the fm to convert the number into words and then return the word to the sap script in CHANGING parameter.
Thanks,
Chidanand
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
if u dont want to call Fm in the driver program
u can call it in..
perform
..
end perform
script command..
Deepak
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gayatri,
With out Changing the print program its not possible, if you donot want to change the Driver Program then write a subroutine in the script and call the function module in that subroutine.
Regards
Kumar M
Edited by: mukesh kumar on Nov 5, 2008 6:01 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.