You are on page 1of 1

Saturday, August 17, 2019 3:14 PM

data LS_VBAP type VBAP.


data LT_VBAP type table of VBAP.
data LV_COMMA type C.

select * from VBAP into table LT_VBAP up to 1000 rows.

loop at LT_VBAP into LS_VBAP.


at new VBELN.
write :/ 'Sales document ', LS_VBAP-VBELN, ' with item(s) ('.
endat.

write: LV_COMMA, LS_VBAP-POSNR.


LV_COMMA = ','.

at end of VBELN.
write ')'.
clear LV_COMMA.
endat.
endloop.

Pasted from <http://www.kodyaz.com/sap-abap/loop-at-new-at-end-in-abap.aspx>

loop Page 1

You might also like