‎2007 Apr 14 9:56 AM
Hi all
I wanna know how to display 3 fields in a row without any gap in list. ex: mara - matnr. But If I use NO-GAP statement its not working.
Will reward points.
Thanks,
KSR
‎2007 Apr 14 10:03 AM
hI
Do you mean no gaps between field in output list??
wrtite : itab-matnr,itab-mtart,itab-mbrsh.
‎2007 Apr 14 10:13 AM
hi R K
yes i mean in the output list,
If i try "wrtite : itab-matnr,itab-mtart,itab-mbrsh. " the default field length is creatin gap between fields....I wanna display exactly like this: matnr type mara-matnr.
i tried no-gap.
Its not wroking.
kindly help me in this.
Regards,
KSR
‎2007 Apr 14 12:00 PM
Hi..,
take a character field of sufficient length !!
<b>
data w_char(60) type c.
concatenate itab-matnr itab-mtart itab-mbrsh into w_char.
condense w_char no-gaps.</b>
reward if it helps u..
sai ramesh
‎2007 Apr 14 10:17 AM
Hi Srikanth,
without using no-gap in ur list u will be having one character gap b/w the fields and by using no-gap u can clear that gap. just see the code below.
data t_vbak like vbak occurs 0 with header line.
select * from vbak into table t_vbak.
loop at t_vbak.
write 😕 t_vbak-vbeln no-gap,t_vbak-erdat.
endloop.
Here in the output u can still see the gaps b/w vbeln and erdat fields that is because the length of vbeln is 10 characters but the data is of 6 or 7 characters but the one character gap b/w the fields is cleared . U can check that by executing the above code again without using no-gap
‎2007 Apr 14 12:10 PM
Hello Sri ,
The Best way is to Concatenate your three fields into Single field and then pass this field for output .
If there are any gaps between fields u can also use ..Condense ..
Thanks .
Praveen .