Skip to Content
0
Former Member
Oct 19, 2007 at 10:50 AM

Order by & Group by

24 Views

Hi

I need some help.

I hv a list of PO for a Plant with different release dates,I just need to display the 1st release date for each PO .

The query i had written is like :

SELECT ekkoebeln ekkobedat SUM( netwr ) ekkolifnr ekkowaers ekkobsart ekkowkurs ekpowerks cdhdrudate cdhdr~utime

INTO TABLE t_display FROM ( ( ekko JOIN ekpo ON ekkoebeln = ekpoebeln ) JOIN cdhdr ON ekkoebeln = cdhdrobjectid )

WHERE

ekko~bsart EQ s_doc AND

ekpo~werks IN s_plant AND

ekpo~loekz EQ space AND

ekko~frgke EQ 'R' AND

ekko~waers IN s_cur AND

cdhdr~udate IN s_date AND

cdhdr~tcode = 'ME29N'

GROUP BY ekkoebeln ekkobedat ekkolifnr ekkowaers ekkobsart ekkowkurs ekpowerks cdhdrudate cdhdr~utime.

Now the the probem is that PO can released,than can be changed in a day 2-3 times,released every time again. so i just need to display the PO relesed on very 1st time.SO this cab be done by sorting the udate,utime for table cdhdr.but i am unable to do. so plz any one can help me out.to how to do?As i am in trouble ,so plz help me out with the quries reguired.

if not clr wid the problem plz respond....

Regards

Vipin.