05-23-2006 12:34 PM
hi all.
I have to concatenate 2 fields wherein the first field should be allowed to retain its trailing blanks..
is there any way one can do this..
the problem is knvv-kunnr to be concatenated by knvv-vkorg and knvv-spart. Now kunnr has a length of 10 but in the prgram only 5 spaces filled and the remaining 5 blank spaces are to be retained...please can anybody help me on this ..
thanks a lot..
05-23-2006 12:38 PM
Hi try something like this :
data : w_final_field(16)
w_final_field(10) = knvv-kunnr.
w_final_field+10(4) = knvv-vkorg.
w_final_field+16(2) = knvv-spart.
Hope it helps,
Erwan
05-23-2006 12:40 PM
hi,
dont concatenate these fields with trailing blanks for those fields before concatenate you need to convert those all fields with conversion exits, and then do cancatenation.
cheers,
Bujji
05-23-2006 12:40 PM
Hi,
if the trailing blank spaces are fixed, then you can concatenate the spaces also using ' ' 5 times. or else you can use conversion_exit FM before the concatenation.
Regards,
Aswin
05-23-2006 12:41 PM
Hi arup,
1. we can do like this using OFFSET,
in two steps.
2. just copy paste in new program,
it will give output.
12345@@@@@abcdef
where @ = space.
3.
report abc.
data : kunnr like kna1-kunnr.
data : s(25) type c.
kunnr = '12345'.
concatenate kunnr '' into s.
concatenate 'abc' 'def' into s+10(15).
write 😕 s.
regards,
amit m.
05-23-2006 12:43 PM
Hi Arup,
If you know the number of spaces then you can use
the concatenate statement using the ` character(The key above tab in the keyboard.
concatenate matnr ` ` ...into..v_str.
05-23-2006 12:43 PM
Hi,
try that :
1) fm LINEITEM_ALPHAFORMAT : fill with leading zero
2) concatenate your 3 fields
3) move space to your_field(5)
Andreas