cancel
Showing results for 
Search instead for 
Did you mean: 

SAP SCRIPT PROBLEM

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

thanks..

amit_khare
Active Contributor
0 Kudos

Declare a character variable of length 9 and use UNPACK statement.

Former Member
0 Kudos

move this value to one numeric variable (type n ) and move back again to string

Former Member
0 Kudos

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

Former Member
0 Kudos

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'.

Former Member
0 Kudos

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