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: 

oops alv back button

Former Member
0 Kudos

Hi i hav a selection screen after exexuting it is displaying alv o/p in pf status i defind back button when ever user presses back button i want to back to selection screen if i write leave program it is coming to program

15 REPLIES 15

satykumar
Product and Topic Expert
Product and Topic Expert
0 Kudos

use stmt

leave to screen 0.

Former Member
0 Kudos

use

set screen 0.

leave screen.

regards

shiba dutta

Former Member
0 Kudos

Hi Kiran ,

Use the command

Leave to screen 0.

Regards

Arun

0 Kudos

still it coming to program but not selection screen

0 Kudos

use

CALL SELECTION-SCREEN 1000.

0 Kudos

AND MY ALV IS OBJECT ORIENTED USING CONTAINERS

0 Kudos

it is working after coming to selection screen if i press back button it is going back to o/p of alv

0 Kudos

Hi,

jus use "set screen 0".

regards,

bharat.

0 Kudos

try this

call selection-screen 1000.
set screen 0.

former_member194669
Active Contributor
0 Kudos

Hi,

This may not be a good soluation, but you can try.



start-of-selection.
perform f_get_selections_values.

when back button pressed

 call method g_custom_container->free.
  call method cl_gui_cfw=>flush.
  submit yc0012 with selection-table i_seltab via selection-screen.


*********** FORM F_GET_SELECTIONS_VALUES

form f_get_selections_values.
  v_program = sy-repid.
  call function 'RS_REFRESH_FROM_SELECTOPTIONS'
    exporting
      curr_report     = v_program
    tables
      selection_table = i_seltab
    exceptions
      not_found       = 1
      no_report       = 2.
  if sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
            with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  endif.

aRs

former_member194669
Active Contributor
0 Kudos

in the ALV PF-status declare ok code BACK as BAC1 .

aRs

0 Kudos

Trry this:

declare-

data: g_alv type ref to cl_gui_alv_grid

case ok_code.

when 'BACK'.

call method g_alv->check_changed_data

importing

e_valid = e_valid.

leave to screen 0.

Message was edited by:

Shweta Verma

0 Kudos

still i am not getting any one help me and it is alv with oops.

0 Kudos

change the function code of the BACK button to BAC and

case r_ucomm.

when 'BAC'.

set to screen 0.

Former Member
0 Kudos

HI.

First u need to find fetch code(function code) of BACK button from your your program. and write code as follows. assume your fetch code as BACK

CASE OK_CODE.

WHEN 'BACK'.

LEAVE TO SCREEN 0.

ENDCASE.

i hope it will work.

reward if its help full.

Regards.

Jay