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: 

re:alv grid display

Former Member
0 Kudos

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&regards

rahul

3 REPLIES 3

Former Member
0 Kudos

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

former_member555112
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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