03-02-2009 4:29 PM
Hi Frn's ,
how can i mantain space in a string type varaible ....
senario is like .....
1) abc .
2) 10 spaces .
3) def .
now i want to put "abc" than 10 spaces and than "def " in a variable of type string .
thanks and Regards ..
Priyank
03-02-2009 4:33 PM
03-02-2009 4:33 PM
03-02-2009 4:45 PM
03-02-2009 4:48 PM
Rich I have question please
CONCATENATE v_field1 '%%%%%%%%%%' v_field2 into v_result.
TRANSLATE v_result using '% '.
if v_field1 or v_field2 contains the value of % then ?
a®
03-06-2009 8:17 AM
> Rich I have question please
> if v_field1 or v_field2 contains the value of % then ?
> a®s
As OP said the values of first variable would be "ABC" and third variable 'DEF',it means those values would be constant forever. So there is no reason if these values contains %.
Okay I agree if these values contains % than you may use & as place holder
Cheers,
Amit.
03-02-2009 4:37 PM
hI,
I hope it will take only 1 char space even if we put more space in between abc & def. I remembered that there is no solution for this because even if we put space, it automatically deleted. You can use symbol instead of space when you pass the data and remove while displaying.
Regards,
~Satya
03-02-2009 4:38 PM
Hi,
use with single-quote (') ,here u can write a string with spaces in between.
Regards,
jaya
03-02-2009 4:41 PM
Try this way also
report zars no standard page heading
line-size 170
line-count 65(4).
data: v_field1 type string.
data: v_field2 type string.
data: v_field3(10) type c value space.
data: v_result type string.
v_field1 = 'ABC'.
v_field2 = 'DEF'.
CONCATENATE v_field1 v_field3 v_field2 into v_result respecting blanks.
write : v_result.
a®