on 08-31-2010 6:02 AM
Hi,
WE have one sap script and print program in print program for some amount I have use function module amount spell the detail code as given below, in my print program I am getting proper spell in field ZAMOUNT but in SAP script that spell amount is not getting printed
find below the coe
PRINT PROGRAM ************************
DATA: zamount_SPELL like spell-word,
zamount TYPE IN_WORDS.
data : v_amt(20).
data : v_cur type SY-WAERS.
data : spell type SPELL.
*TABLES: RF02D.
v_amt = KOMVD-KWERT.
v_cur = KOMVD-AWEIN.
shift v_amt left deleting leading space.
shift v_cur left deleting leading space.
CALL FUNCTION 'Z_BM_SPELL_AMOUNT'
EXPORTING
CURRENCY = v_cur
AMOUNT = v_amt
IMPORTING
IN_WORDS = ZAMOUNT_SPELL
EXCEPTIONS
ERROR = 1
OTHERS = 2.
ZAMOUNT = ZAMOUNT_SPELL.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'SUM_LINE'.
as per above code i am getting proper spell amount in ZAMOUNT , ZAMOUNT_SPELL
*********SAP SCRIPT CODE ******************** .
SU Final amount in words : &ZAMOUNT&
*as per above in print I am only getting
Final amount in words :
ZAMOUNT Value is not getting printed
regards,
zafar
Moderator Message: Please post the questions in the right forum and enclose your code in Your Code tags.
Edited by: kishan P on Aug 31, 2010 10:49 AM
Try this -->
SPLIT <zamount> AT '.' INTO: rs_amt paise_amt.
SPLIT rs_amt AT ',' INTO: amount1 amount2 amount3.
CONCATENATE amount1 amount2 amount3 INTO amount1.
<amount> = amount1.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try to use Condense ZAMOUNT in print program.
Regards,
Srini.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
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.