I wrote a editable FM based ALV, working fine that when user changes the data and press SAVE button, values are transfering into prog. But, i need to put a validation that, if user changes the values and press BACK/CANCEL/EXIT button, i need to popup the message that "Do you want to save changes", my PF-STATUS is good(because, SAVE is working).
But, its not working that when user done changes and press BACK button (forgot to press SAVE button), system taking me to selection screen/screen 0!! I my code is as below,
FORM pick USING v_ucomm TYPE syucomm it_selfield TYPE slis_selfield. DATA: v_answer TYPE char1. READ TABLE it_z_tbl INDEX it_selfield-tabindex INTO w_z_tbl. CASE v_ucomm. WHEN '&IC1'. " working fine this functionality ELSE. MESSAGE i000 WITH 'Double click on key field'. ENDIF. WHEN 'SAVE'. " working fine this functionality WHEN BACK' " OR 'CANCEL' OR 'EXIT'. PERFORM popup_for_user_decision CHANGING v_answer. CHECK v_answer = '1'. PERFORM now_update. ENDCASE. ENDFORM.
when i put the break point on the first line of this piece of code, its not stopping on pressing BACK/CANCEL/EXIT buttons!! (its stoppig for SAVE press or double click)
Its stopping at this point,
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'.
i_callback_user_command = 'PICK'
IF sy-subrc <> 0 =================> its stopping at this point!
Pls. let me know why system is not recognising that i hv a PICK form (SAVE and Double clicks are working fine)?