‎2009 Sep 10 8:47 AM
Dear frnds,
I have to create an ALV in a report using ALV Grid display function in such a way that the user could able to select rows and can perform udation and deletion ect.But i am having problem with the navigation.Whenever a user double click the row to select that row the coursor position sets to the first line.Eg.when double clicked in the 100th row the row is selected but coursor position resets to row 1.what i can do ...i am pasting the code portion below....pls help me
FORM user_command USING u_com LIKE sy-ucomm
sel_field TYPE slis_selfield.
CASE u_com.
WHEN '&IC1'.
TEMP_INDEX = sel_field-tabindex.
READ TABLE i_final INTO wa_final INDEX TEMP_INDEX.
IF sy-subrc = 0.
IF wa_final-status EQ space OR wa_final-status = '@02@'.
wa_final-status = '@01@'.
ELSEIF wa_final-status = '@01@'.
wa_final-status = '@02@'.
ENDIF.
wa_final-chkbx = 'X'.
MODIFY i_final FROM wa_final INDEX sy-tabix
TRANSPORTING status
chkbx.
CLEAR wa_final.
ENDIF.
sel_field-refresh = 'X'.
endif.
Endform.
‎2009 Sep 10 9:03 AM
Hi
U need to indicate to keep the position after refreshing the list:
FORM USER_COMMAND USING U_COM LIKE SY-UCOMM
SEL_FIELD TYPE SLIS_SELFIELD.
CASE U_COM.
WHEN '&IC1'.
TEMP_INDEX = SEL_FIELD-TABINDEX.
READ TABLE I_FINAL INTO WA_FINAL INDEX TEMP_INDEX.
IF SY-SUBRC = 0.
IF WA_FINAL-STATUS EQ SPACE OR WA_FINAL-STATUS = '@02@'.
WA_FINAL-STATUS = '@01@'.
ELSEIF WA_FINAL-STATUS = '@01@'.
WA_FINAL-STATUS = '@02@'.
ENDIF.
WA_FINAL-CHKBX = 'X'.
MODIFY I_FINAL FROM WA_FINAL INDEX SY-TABIX
TRANSPORTING STATUS
CHKBX.
CLEAR WA_FINAL.
ENDIF.
SEL_FIELD-REFRESH = 'X'.
SEL_FIELD-COL_STABLE = 'X'. "<---Keep the colunm
SEL_FIELD-ROW_STABLE = 'X'. "<---Keep the row
ENDIF.
ENDFORM. "user_commandMax
‎2009 Sep 10 9:03 AM
Hi
U need to indicate to keep the position after refreshing the list:
FORM USER_COMMAND USING U_COM LIKE SY-UCOMM
SEL_FIELD TYPE SLIS_SELFIELD.
CASE U_COM.
WHEN '&IC1'.
TEMP_INDEX = SEL_FIELD-TABINDEX.
READ TABLE I_FINAL INTO WA_FINAL INDEX TEMP_INDEX.
IF SY-SUBRC = 0.
IF WA_FINAL-STATUS EQ SPACE OR WA_FINAL-STATUS = '@02@'.
WA_FINAL-STATUS = '@01@'.
ELSEIF WA_FINAL-STATUS = '@01@'.
WA_FINAL-STATUS = '@02@'.
ENDIF.
WA_FINAL-CHKBX = 'X'.
MODIFY I_FINAL FROM WA_FINAL INDEX SY-TABIX
TRANSPORTING STATUS
CHKBX.
CLEAR WA_FINAL.
ENDIF.
SEL_FIELD-REFRESH = 'X'.
SEL_FIELD-COL_STABLE = 'X'. "<---Keep the colunm
SEL_FIELD-ROW_STABLE = 'X'. "<---Keep the row
ENDIF.
ENDFORM. "user_commandMax