03-31-2008 12:27 PM
hi friends,
can u pls help me out.
i've 4 fields in internal table. those are
employee no.
type of work
hours
date
for example i've records like this.
1 st 8 1/2/2008
1 ot 7 1/2/2008
1 ot2 7 1/2/2008
1 st 8 2/2/2008
1 ot 7 2/2/2008
1 ot2 7 2/2/2008
1 st 8 3/2/2008
1 ot 7 3/2/2008
1 ot2 7 3/2/2008
1 st 8 4/2/2008
1 ot 7 5/2/2008
1 ot2 7 6/2/2008
and also have the same records for different employees.
st----straight time
ot----over time
ot2----extra over time
and in the selection screen allow the user to give date range.
for example he has given date range 1/2/2008 to 7/2/2008.
the date range should be 7 days only.
so i want the output in alv like this.......
-
A B 1 2 3 4 5 6 7
1 st 8 8 8 8
1 ot 7 7 7 7
1 ot2 7 7 7 7
2 st 8 8 8 8
2 ot 7 7 7 7
2 ot2 7 7 7 7
where
A------employee no.
B------type of work
1-----1/2/2008
2-----2/2/2008
3----3/2/2008
AND 4,5,6,7
so, pls help me in this asap.
if possible send me the code.
best answers will be appreciated,.
thanks®ards
rahul
06-10-2009 7:38 AM
Hi,
You display the contents in 2 seperated ALV's.
i.e Ist or Header ALV should contain only 3 fields -
Emp Name, Type of Work, Summary of working HR's
when the user clicks or selected an recod from the header ALV, You can display the 2nd ALV which will display the details. Itshould contain 2 fields - Date, Hrs. The title should convey the type of work.
Regards,
Jey
Edited by: Jey on Jun 10, 2009 12:12 PM
06-10-2009 4:55 PM
Hi,
Can you be more clear?
I could not exactly understand your requirment.
Will the columns increase dynamically in your output?
If that is the case you can go for ALV grid object.
Regards,
Ankur Parab
06-11-2009 8:21 AM
Hi Rahul,
As per your requirement, you need to declare one more internal table for final output.
That should have exactly 7 fields.
Employee Name, Work Type, Day1, Day2, Day3, Day4, Day5, Day6, Day7.
During read from first internal table you can calculate the different days activities to Day1, Day2... Fields within the loop.
Hoping report run for weekly purpose only.
In Header you can display dates for the Week.
Regds,
Anil