Simple...Just write one select statement to retrieve data from your custom table.
- First declare Internal table type, internal table and work area.
- Types: begin of ty_itab,
vbeln type vbeln,
posnr type posnr,
end of ty_itab.
Data: itab type standard table of ty_itab,
wa_itab like line of itab.
- Select VBELN POSNR from Ztable into table itab.
- Now your itab is containing values you require.
Regards,
Philip.