Skip to Content
Former Member
Apr 07, 2009 at 12:06 PM

Regarding select statement



i hav written select as below

SELECT a~ebeln "PO Number

a~bsart "Document type

a~bsakz "Control indicator for PO/STO

a~aedat "Date Created on

a~ekorg "Purchase Organisation

a~lifnr "Supplier

a~reswk "Supplying site

b~ebelp "PO item Number

b~matnr "Article Number

b~werks "Receiving site

b~menge "PO Quantity

c~mtart "Article Type

c~matkl "Merchandise Category

c~zeiar "Department

c~zeifo "Sub Brand

c~labor "Gender

c~saiso "Season Category

FROM ( ( ekko AS a INNER JOIN ekpo AS b ON aebeln = bebeln )

INNER JOIN mara AS c ON bmatnr = cmatnr )

INTO TABLE it_ekko

WHERE a~aedat IN s_date

AND a~ebeln = p_ponum

AND ( absart EQ 'NB' OR absart EQ 'UDS')

AND ( absakz EQ ' ' OR absakz EQ 'T' )

OR a~ekorg EQ p_purorg

OR a~reswk EQ p_spsite

AND a~lifnr EQ p_vendor

AND b~werks EQ p_resite.

now the issue is if i give date it should bring all the purchase orders in that date range....

if i give both po and date it should give that particular record............

but if i give onli date it is giving no records..........thogh there are records........