2010 Aug 12 6:28 AM
Dear All,
I have created an ALV Grid Control and have one column as a check box.
when i tick one checkbox in a line item i pop up a message saying "Do you wish to continue".
If the user selects NO then i automatically want to deselect the checkbox.
I tried clearing the work area of the internal table in the data change event.
But when the alv is refreshed the checkbox is still ticked.What should be done to avoid this.
Is freeing the custom container and creating it again everytime the user selects NO a good option?
Kindly suggest.
Regards,
Varun
Dear All,
I have created an ALV Grid Control and have one column as a check box.
when i tick one checkbox in a line item i pop up a message saying "Do you wish to continue".
If the user selects NO then i automatically want to deselect the checkbox.
I tried clearing the work area of the internal table in the data change event.
But when the alv is refreshed the checkbox is still ticked.What should be done to avoid this.
Is freeing the custom container and creating it again everytime the user selects NO a good option?
Kindly suggest.
Regards,
Varun
2010 Aug 12 6:37 AM
In ALV you put check box like
X_FIELDCAT-FIELDNAME = 'CHK'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 1.
X_FIELDCAT-INPUT = 'X'.
X_FIELDCAT-EDIT = 'X'.
X_FIELDCAT-CHECKBOX = 'X'.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
in between you put logic
IF CHK = 'X'
*---popup_to_continue_yes_no
PERFORM POPUP_TO_CONT_YES_NO.
endif.
FORM POPUP_TO_CONT_YES_NO .
CALL FUNCTION 'POPUP_CONTINUE_YES_NO'
EXPORTING
TEXTLINE1 = 'Click OK to leave program'
TITEL = 'POPUP_CONTINUE_YES_NO'
IMPORTING
ANSWER = ANS.
IF ANS = 'J'.
LEAVE PROGRAM.
ENDIF.
ENDFORM. " POPUP_TO_CONT_YES_NO
2010 Aug 12 6:44 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |