Application Development 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: 

sales orders and delivery creation

Former Member
0 Kudos

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

2 REPLIES 2

Former Member
0 Kudos

Hi,

Modify the Selec as below:

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

on a1belnr = vbapvbeln

inner join vbep

<b>on vbapvbeln = vbepvbeln and vbapposnr = vbepposnr</b>

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 ).

Regards,

Anji

0 Kudos

Hey Anji,

i solved my problem ....i used ur input too.

points r rewarded .

Thx

Raghu