Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

report to show Min (start date) and Max of End date from same table as one record

Hi,

I have a req in Webi report where I need to show the following

Table 1

Person               StartDate          EndDate

100                     25/01/1995        15/02/1995

100                     07/10/1991         24/10/1995

I want to show the webi report output as

Person                    Min(start date)            Max (End Date)

100                         07/10/1995                  15/02/1995

SELECT DISTINCT PERSON, START_DATE, END_DATE FROM TABLE WHERE PERSON = 100 AND


( START_DATE = (SELECT MIN ( START_DATE ) FROM TABLE WHERE PERSON = 100) )


AND


( END_DATE = (SELECT MAX ( END_DATE ) FROM TABLE WHERE PERSON = 100) )


This does not work. If I comment the End_date in where condition, it selects the Min date in Start_date but gets the corresponding End_date.


I tried Order by end date ASC etc. additions. I know in ABAP I can do a loop on the table and re-arrange the field values but I am a bit new to BO reporting (Webi 4.1)


When I try to write 2 queries, in Webi report, it does not allow me...


Please help...


Kind Regards

Krishna


Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question