‎2006 Jul 05 11:52 PM
Hi,
I have a small code line as follows:
Data: w_qty type int4.
w_qty = EKET-MENGE.
Now w_qty has many leading spaces, so if I use
shift w_qty left deleting leading spaces.
It gives error that w_qty should be C,N or string type.
But If I define w_qty as Char5 or something, then if the value of EKET-MENGE is 5000, it does not convert automatically to 5,000 but if it is an int4 then it converts itself automatically to 5,000.
Hence I want to delete the leading spaces as well as I want to have it format getting converted to comma format as defined in user profile in system...
‎2006 Jul 05 11:56 PM
hi Tushar,
Do this way
Data: w_qty type i,
w_final type i.
w_qty = EKET-MENGE.
w_final = w_qty.
Write : w_final.you get the values in the required format now
‎2006 Jul 05 11:56 PM
‎2006 Jul 05 11:56 PM
hi Tushar,
Do this way
Data: w_qty type i,
w_final type i.
w_qty = EKET-MENGE.
w_final = w_qty.
Write : w_final.you get the values in the required format now
‎2006 Jul 06 12:04 AM
But I am wondering that this may not solve problem because if I define it as type C then at the time of outputting on form it will not convert itself to comma format I mean 5,000 or 10,000.
It only does it when its not type C...
‎2006 Jul 06 12:06 AM
hi Tushar,
Did you try the above method as i have specified in my previous post????.....
‎2006 Jul 06 12:07 AM
If it is type c, then it will show whatever is in the field. Since in my example, I am using the WRITE statement, it is formatting with a comma, as the thousands separator(via user specific setting). If my user settings was to have '.' as the separator, it will write that as well. You form will show the separator as you need it to.
Regards,
Rich Heilman
‎2006 Jul 06 12:13 AM
‎2006 Jul 06 12:19 AM