on 02-11-2008 11:37 AM
Hi all,
I am printing a SAP Script and in one of the windows i need to print the following data..
I need to print the amount in 9 digits..
Suppose:: The amount is $ 300.00
Then i need to print it as 000030000
if the amount is $ 1300.00
Then print it as 000130000
Please suggest how to achieve it..
<REMOVED BY MODERATOR - REQUEST OR OFFER POINTS ARE FORBIDDEN>
Regards,
Arun
<LOCKED BY MODERATOR - USE APPROPRIATE TITLES>
<MOVED BY MODERATOR TO THE CORRECT FORUM>
<LOCKED BY MODERATOR - DUPLICATED THREAD>
Edited by: Alvaro Tejada Galindo on Jan 8, 2009 4:23 PM
thanks..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Declare a character variable of length 9 and use UNPACK statement.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
move this value to one numeric variable (type n ) and move back again to string
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
move this value to one numeric variable (type n) and move back again to string
Edited by: ganesh prasad on Feb 12, 2008 7:56 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
write the following code in your program and store it in a new variable:
for eg : $ 300.00
replace all ocurrences of '$' in <variable name> with '000'.
then again
replace all ocurrences of '.' in <variable name> with '0'.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Arun,
First send the value into one string type variable and then find the length of the string, based on tht u can padded the zeros left side to tht string variable.
I think this vl help u.
Regards,
Sastry
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.