Skip to Content
0
Former Member
Feb 27, 2007 at 04:22 AM

sales orders and delivery creation

19 Views

Hi :

im selecting sales orders , items and schedule line

from a custom table based on plant, shipping point and delivery creation date.

Is there any relation between Schedule lines and delivery creation date.

For delivery creation date d_date = SY-DATUM, and should select Mat Avail dt MBDAT or Trans. planning dt TDDAT which ever comes earlier.

vbep-edatu = itab-d_date.

select a1belnr a1posnr vbep~etenr into corresponding fields of table itab from a1 inner join vbap

on a1belnr = vbapvbeln

inner join vbep on a1posnr = vbepposnr

where a1~werks = p_werks

AND vbap~vstel = p_vstel

AND vbep~edatu = p_edatu

AND (vbep~mbdat <= p_edatu OR

vbep~tddat <= p_edatu ).

can anyone help me with this select statement.

Thanks.

Raghu