02-02-2007 4:02 PM
Hi
I need to display values in a script. but the alignment getting distrubed if it is less than 20 charaters, for exmple material descirption is only displaying 20 characters in script. if it is less than 20 charcters the alignment getting changed.
please help me ...urgent..
thanks in advance...
02-02-2007 4:06 PM
hi Sapein,
use FM
STRING_LENGTH
to calculate the length .
you can even use this logic
LENGTH = STRLEN( STRING ).
regards,
Santosh
02-02-2007 4:06 PM
Hi,
You can count the no of characters using STRLEN(field name).
regards,
madhu
02-02-2007 4:10 PM
why not set the output in ALV. not much extra work and looks better than write statement and never have to worry about alignment problems anymore
otherwise look at help on function FIND match LENGTH len
Message was edited by:
A. de Smidt
02-02-2007 4:13 PM
02-02-2007 4:16 PM
solution to this problem in script is not to count the characters but to align them based on positions .
1.
Use the tab positions for that paragraph format to display the values in a finite format .
In this u need to give the position start and position end length and use the same in the script as
p ,,&itab-f1&
say my value has to print from position 125mm to 155 mm
i take one tab position for this paragraph format P and maintain the same in the output.
here ,, is the tab position .
See whether it is one character or 20 character it has to behave the same way it should not be misaligned .
check the tab position for that paragraph format in Tabs ..
regards,
vijay.