Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

no-gap between fields.

Former Member
0 Likes
1,323

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

5 REPLIES 5
Read only

Former Member
0 Likes
980

hI

Do you mean no gaps between field in output list??

wrtite : itab-matnr,itab-mtart,itab-mbrsh.

Read only

0 Likes
980

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

Read only

0 Likes
980

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

Read only

Former Member
0 Likes
980

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

Read only

Former Member
0 Likes
980

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 .