09-08-2009 6:01 PM
I am having one string field...
data : lv_str type string...
i m passing lfa1-name1 which is having around 10 char(suppose)...in the output i need to set this field as 24 chars..
if pass lv_str = 'RAM'.
the left space for the string field set as 24 chars i need to pass as null spaces...
so..for this lv_str in the output i need tp show RAM and 21 blank spaces after it...
09-08-2009 6:09 PM
Hi,
Check this.
Instead of string try with char
data : lv_str(24) type c.
lv_str = 'RAM'.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = lv_str
IMPORTING
OUTPUT = lv_str.
write: lv_str.
Regards,
Vikranth
09-08-2009 6:09 PM
Hi,
Check this.
Instead of string try with char
data : lv_str(24) type c.
lv_str = 'RAM'.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = lv_str
IMPORTING
OUTPUT = lv_str.
write: lv_str.
Regards,
Vikranth
09-08-2009 6:18 PM
09-08-2009 7:16 PM
Hi,
Well then if ur meaning 21 zero's before the value and you have to use only string, even this will work
data : lv_str(24) type string.
lv_str = 'RAM'.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = lv_str
IMPORTING
OUTPUT = lv_str.
write: lv_str.
Regards,
Vikranth
09-09-2009 5:26 PM
yes..i want 21 blank spaces after the name...
use of FM 'conversion_exit..' is not working...
09-09-2009 6:01 PM
Hi, Ravi
By the way you Remove the message added by Moderator ?
Your Subject Line is also against the Forum Rules Please Check Link for Forum Rules
Please always USE Meaningful Subject Line
Faisal
09-09-2009 6:04 PM
Hi,
A string will consider zeros with space and thus using string alone you cant do this. Declare one more char variable and try this.
data: var type string.
data: var1(24) type c.
var = 'RAM'.
var1 = var.
translate var1 using '0'.
write: var1.
Regards,
Vikranth
09-09-2009 7:24 PM
data : lv_str type string,
lv_int typ i.
lv_str = 'RAM'.
lv_int = strlen( lv_str ).
lv_int = 24 - lv_int.
do lv_int times.
concatenate lv_str space into lv_str.
enddo.
09-09-2009 7:41 PM
data : lv_str type string,
lv_int typ i.
lv_str = 'RAM'.
lv_int = strlen( lv_str ).
lv_int = 24 - lv_int.
do lv_int times.
concatenate lv_str space into lv_str.
enddo.
will this work???
as i am sending the output to txt file....will i be able to see spaces in txt file?
09-09-2009 7:44 PM
09-08-2009 6:53 PM