10-22-2010 1:17 PM
I am using my ALV Grid using the following
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
I_CALLBACK_PROGRAM = SY-CPROG
I_GRID_TITLE = 'Main Grid'
I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
i_callback_user_command = 'USER_COMMAND'
is_layout_lvc = gd_layout
it_fieldcat_lvc = I_FIELDCAT[]
TABLES
t_outtab = EDIDC_DATA.
I have implemented in usercommand some logic when a row of ALV Grid is Double clicked. On double clicking i generate a new ALV do some processing and the user then clicks back from the new ALV. On returning to my main GRID i want to DISABLE the double click event on the record that was originaly selected so the user is not able to double click on the same entry again in the GRID that was processed before.
I have tried using style disabled hoping that, that might disable the double click event trigger for the row but does nt work.
Any ideas please?
Edited by: Salman Akram on Oct 22, 2010 2:17 PM
10-22-2010 3:15 PM
Hello Salman
Simply collect the double-clicked rows into an internal table.
The next time the user double-clicks on a row compare whether you have this record already in your itab and then - DO NOT execute the coding in the event handler method.
Regards
Uwe
10-22-2010 3:15 PM
Hello Salman
Simply collect the double-clicked rows into an internal table.
The next time the user double-clicks on a row compare whether you have this record already in your itab and then - DO NOT execute the coding in the event handler method.
Regards
Uwe
10-26-2010 5:55 PM
10-22-2010 4:26 PM
Hi Salman,
As said by Uwe Schieferstein, you can create an internal table and check for that entry. The other way would be to create a column in your final internal table,say CHK of type C. Now, whenever a user double clicks on a row you add set the flag as X to that column. For example :
*&---------------------------------------------------------------------*
*& Form USER_COMMAND
*&---------------------------------------------------------------------*
FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
CASE R_UCOMM.
WHEN '&IC1'.
"Assume final internal Table name as IT_FINAL and the Flag Column as CHK
READ TABLE IT_FINAL INTO WA_FINAL INDEX S_SELFIELD-TABINDEX.
IF WA_FINAL-CHK <> 'X'.
PERFORM DISPLAY_SECONDARY_ALV."Say this is your secndary ALV list
WA_FINAL-CHK = 'X'.
MODIFY IT_FINAL FROM WA_FINAL INDEX S_SELFIELD-TABINDEX TRANSPORTING CHK.
ENDIF.
ENDCASE.
Thanks & Regards,
Faheem