Skip to Content

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

wanted selected rows details in alv

Hi all this is the code i am using for viewing the details.

CALL METHOD w_grid->get_selected_rows

IMPORTING

et_index_rows = i_selected_rows.

CLEAR sy-pfkey. "#EC WRITE_OK

SET PF-STATUS 'ALV1' IMMEDIATELY.

REFRESH int_detail.

CLEAR int_detail.

LOOP AT i_selected_rows INTO w_selected_rows.

READ TABLE INT_FINAL INTO W_FINAL INDEX w_selected_rows-INDEX.

PERFORM CONVRT_MONTH_INT.

LOOP AT INT_CATSDB_FINAL INTO W_CATSDB_FINAL WHERE PERNR = W_FINAL-PERNR.

IF W_CATSDB_FINAL-WORKDATE+4(2) = LOC_MONTH_INT .

W_DETAIL-PERNR = W_CATSDB_FINAL-PERNR.

W_DETAIL-ENAME = W_CATSDB_FINAL-ENAME.

W_DETAIL-DATE = W_CATSDB_FINAL-WORKDATE.

W_DETAIL-AWART = W_CATSDB_FINAL-AWART.

W_DETAIL-HOURS = W_CATSDB_FINAL-CATSHOURS.

MOVE W_DETAIL TO INT_DETAIL.

APPEND INT_DETAIL.

CLEAR INT_DETAIL.

ELSEIF W_CATSDB_FINAL-WORKDATE+4(2) NE LOC_MONTH_INT AND W_FINAL-MONTH_NAME = 'Others'. "#EC NOTEXT

W_DETAIL-PERNR = W_CATSDB_FINAL-PERNR.

W_DETAIL-ENAME = W_CATSDB_FINAL-ENAME.

W_DETAIL-DATE = W_CATSDB_FINAL-WORKDATE.

W_DETAIL-AWART = W_CATSDB_FINAL-AWART.

W_DETAIL-HOURS = W_CATSDB_FINAL-CATSHOURS.

MOVE W_DETAIL TO INT_DETAIL.

APPEND INT_DETAIL.

CLEAR INT_DETAIL.

IF W_DETAIL-DATE4(2) = p_month or W_DETAIL-DATE4(2) = p_pabrp AND

( p_month = ' ' or p_pabrp = ' ' ).

CLEAR INT_DETAIL[].

ENDIF.

ENDIF.

ENDLOOP.

ENDLOOP.

but if i select more than one record for viewing the details of that record i am not getting the details.

waiting for the details.

regards,

giri.

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