‎2008 Aug 12 8:40 AM
hi experts
when I use write to output a varient, the vaule of varient is '0000123456', but why the resule turns to 123456.... 0 got missed...
many thanks
‎2008 Aug 12 8:42 AM
HI
wat is the data type of work field that you are trying to write.
BR
Lavanya
‎2008 Aug 12 8:42 AM
HI
wat is the data type of work field that you are trying to write.
BR
Lavanya
‎2008 Aug 12 8:45 AM
‎2008 Aug 12 8:51 AM
If its numeric or Integer then output will be right justified and may zeros are skipped due to length constraints.
‎2008 Aug 12 8:52 AM
hi Lavanya
actually, the data type refer to a data element, the data element is char10.
and my varient is just ok with leading 0, but when I write it out, the 0 got lost.
‎2008 Aug 12 8:53 AM
Hi,
At data element check whether are there any conversion exits or not..
Good luck
Narin
‎2008 Aug 12 8:47 AM
Hi,
Is your variable of Integer type.. if so integer does not display leading zero. Assign the value to character so that it will display the zeros too..
In general there will be some conversion exits already created by SAP due to which the leading zeros may be deleted during output..
Try checking that in debug what exactly the variable is holding.. I think in debugging it will hold the zeros too but during displaying it does not display zeros.
Hope this would solve your issue.
Good luck
Narin
‎2008 Aug 12 8:49 AM
Use FM CONVERSION_EXIT_ALPHA_OUTPUT
Pass it the variable which is without zeros..
It will return you the output with zeros infront of it
Hope this helps!
‎2008 Aug 12 8:52 AM
‎2008 Aug 12 8:52 AM
hi,
First of all to get the Zeros back in your variable that you are using to display should be of 10 characters.
Now, for displaying the values with Zeros,you should use the command:
UNPACK <variable> to <Variable>
for eg:
v_number type char10 value '123456'.
UNPACK v_number to v_number.
Write:/v_number.
the output will be '0000123456'.
Since this v_number is of char10 it will put Zeros before that number.
Hope this helps.
thanks,
Rashmi.