03-16-2011 12:53 PM
Hello,
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'.
EXPORTING
i_callback_user_command = 'PICK'
IMPORTING
EXCEPTIONS
IF sy-subrc <> 0 =================> its stopping at this point!
ENDIF.
Pls. let me know why system is not recognising that i hv a PICK form (SAVE and Double clicks are working fine)?
Thank you
03-16-2011 1:00 PM
Hi,
Actually BACK is standard user command so it is not stopping and going to selection screen.
Give some other use command like 'BCK' and try....
03-16-2011 1:00 PM
Hi,
Actually BACK is standard user command so it is not stopping and going to selection screen.
Give some other use command like 'BCK' and try....
03-16-2011 1:16 PM
03-16-2011 2:03 PM
Hi,
Please assign some other code to it other than BACK. It should work.
Thanks,
Guru