on 05-17-2007 1:18 AM
Hello Gurus,
I am actually printing the value &vbdpa-kwmeng& --- quantity in sales order in Scripts. The requirement is if the quantity is 1...it should be converted into words as ONE.i am new to Scripts...can anyone pls tell me how to do it..?
Thanks in Advance,
Anky
Hi,
In your script use a perform statement and define the form in SE38 program. Use command like in layout
/: PERFORM (V_NAME) IN PROGRAM (V_PROGNAME)
/: USING 'VAR1'.
/: USING 'VAR2'
/: CHANGING 'VAR3'
/: ENDPERFORM.
Goto SE38 transaction and create program V_PROGNAME.
Use the FM SPELL_AMOUNT. this FM is used to give the amount in words
FORM (V_nAME) USING ITCSY STRUCTURE.
*........data declaration
*..............
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
AMOUNT = PAMOUNT
CURRENCY =
FILLER = SPACE
LANGUAGE = 'E'
IMPORTING
IN_WORDS = T_SPELL
EXCEPTIONS
NOT_FOUND = 1
TOO_LARGE = 2
OTHERS = 3.
ENDFORM.
ENDFORM.
Hope this helps.
Regards,
Richa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi anky,
we have a FM named as HR_** but it will start with HR only boss.
i think this will sove ur problem.
reward me if sound useful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
here is an example
/: PERFORM GETTOTAL IN PROGRAM ZINNERDOCTEST3
/: USING &BSEG-WRBTR&
/: CHANGING &SUM&
/: ENDPERFORM
Code in SAP scripts
DATA:GLOBAL TYPE n .
FORM GETTOTAL TABLES IN_TAB STRUCTURE ITCSY OUT_TAB STRUCTURE ITCSY.
READ TABLE IN_TAB INDEX 1. <b>or read with key 'BSEG-WRBTR'</b>
DATA:SUM1 TYPE n .
SUM1 = IN_TAB-VALUE.
READ TABLE IN_TAB INDEX 1.
GLOBAL =IN_TAB-VALUE.
<b>call FM here and do processing</b>
READ TABLE OUT_TAB INDEX 1.<b>results returned in out_tab</b>
LOOP AT OUT_TAB.
OUT_TAB-VALUE = GLOBAL.
MODIFY OUT_TAB INDEX sy-tabix.
ENDLOOP.
ENDFORM.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can not call Function module in Layout (SE71),
so use perform routine..
use command like in layout
/: PERFORM (NAME) IN PROGRAM (PROG NAME)
/: USING 'VARIABLE'.
/: USING 'VARAIBLE'
/: CHANGING 'VARIABLE'
/: ENDPERFORM.
GOTO SE38 TRANSACTION CREATE PROGRAM..
NOW USE YOUR LOGICE.
FORM (NAME) USING ITCSY STRUCTURE.
HERE YOU NEED WRITE lOGIC
ENDFORM.
Reward Points if it is helpful
Thanks
Seshu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.