Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

In Editable ALV the BACK/CANCEL/EXIT buttons are not working?

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

sandip_panchal
Explorer
0 Kudos

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....

3 REPLIES 3

sandip_panchal
Explorer
0 Kudos

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....

0 Kudos

Yes, Thank you, its working.

0 Kudos

Hi,

Please assign some other code to it other than BACK. It should work.

Thanks,

Guru