on 06-15-2011 3:15 PM
Hi All,
I have a requirement to print amount padded with * at beginning. e.g. if the amount field is 13 + 2 places of decimals and my amount value is 68.75, then it will print '$***********68.75'. Please let me know how can i achieve this.
Thanks in advance.
Ajay
i belive you are printing checks,
here is what i did,
GV_AMNT(18) type c,
WRITE reguh-rwbtr TO gv_amnt LEFT-JUSTIFIED.
gv_len = STRLEN( gv_amnt ).
WHILE gv_len < 13 .
CONCATENATE '*' gv_amnt INTO gv_amnt.
gv_len = gv_len + 1.
ENDWHILE..
CONCATENATE '$' gv_amnt INTO gv_amnt.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks all for the qick reply. I wish to know if there is any code we can use within SAPSCRIPT for this type of printing. I saw below code mentioned for printing amount in words with '**' at beginning and '*' at end. I am right now working on F110_PRENUM_CHCK SAPSCRIPT changes. I also wish to know if any code is mentioned in RFFOUS_C to print amout with ''.
/ &'*** 'SPELL-WORD& ®UD-WAERS&&' and 'SPELL-DECIMAL(2)'/100 '&***
Thanks in advance.
Regards
Ajay
Edited by: Ajay Kumar Jha on Jun 16, 2011 6:41 AM
Hi,
We can use the code in sap script like wht your mentioning. for that code prints amount in words '***'
at beginning and '***' at end. It will print like
SIX THOUSAND FIFTY PAISE ***
if you want to print amount with before '' use &val(F)&. it will print like
*6,000.50******
Regards,
Dhina.
Edited by: Dhina DMD on Jun 16, 2011 6:44 AM
It depends on the tool used to produce the output : is it classic listing, ALV, SapScript, Smartforms ?
e.g. &field(F*)& in Smartforms
Regards,
Raymond
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In sapscripts, leading spaces in a value can be replaced with a fill character. The F option is
used, and the character immediately following the F in the specification is used
as the fill character.
As Raymond suggested, print amount in below format in script.
&amount(F*)&
F stands for Fill character
-> fill character
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.