cancel
Showing results for 
Search instead for 
Did you mean: 

ALV in webdynpro with multiple row data for single entry.

prajyotp_demapure
Participant
0 Kudos

Hello experts/guru's ,

I have requirement to display the time  and attendance data in Web application.

Below is the format to display the data in ALV.

Employee No. Date 1Date 2Date 3Date 4Date 5Date 6Date 7Date 8Date 9Date 10Date 11Date 12Date 13Date 14
10001Time_In9.00 am0.00am9.00 am











Time_Out6.00 pm0.00pm2.00 pm











StatusPresentabscenthalf day


























Employee No. Date 1Date 2Date 3Date 4Date 5Date 6Date 7Date 8Date 9Date 10Date 11Date 12Date 13Date 14
10002Time_In9.00 am0.00am9.00 am











Time_Out6.00 pm0.00pm2.00 pm










StatusPresentabscenthalf day










I have a question is this possible to display data in such format in Webdynpro.

If yes please guide me else suggest some possible format or way to display such data.

Thanks & Regards

Prajyot.

Accepted Solutions (0)

Answers (1)

Answers (1)

guillaume-hrc
Active Contributor
0 Kudos

Hi,

There are several things that will require some effort:

1) if you sort the first column, you should activate value grouping (so as not to repeat the value for each row)

http://scn.sap.com/thread/511450

2) the time is not displayed that way in standard so you have to convert it somehow (in text, with a dedicated conversion exit maybe, ...)

3) for the 2nd column (Time_In, Time_Out, Status), I would add an invisible technical column in order to sort it correctly on the server side (it might not be in the "right" order for all languages you are using) and forbid sorting on this 2nd column

4) for the date columns, you will have to set the title at runtime (check this document http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0b6a153-a132-2d10-bcb3-ac5853325... with the column header objet and the SET_TEXT method

Hope it helps!

Best regards,

Guillaume

Former Member
0 Kudos

Hi Prajyot,

You need to set the sort on the first field ie Employee number.

For that you need to configure your ALV.

Get the model ref using

   lo_cmp_usage =   wd_this->wd_cpuse_<alv usage name>( ).

   IF lo_cmp_usage->has_active_component( ) IS INITIAL.

     lo_cmp_usage->create_component( ).

   ENDIF.

   lo_interfacecontroller = wd_this->wd_cpifc_<alv usgae name>( ).

   lo_model = io_interfacecontroller->get_model( ).

* Set the sort property for the field

   lt_fields = lo_model->if_salv_wd_field_settings~get_fields( ).\

   Now select your column using the fieldname and apply the sort property.

READ table lt_fields into ls_field where fieldname = 'EMP_NUM'.

        ls_field-r_field->if_salv_wd_sort~create_sort_rule( ).

I have implemented the same and its working fine..