Application Development and Automation 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: 
Read only

oops alv back button

Former Member
0 Likes
1,558

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
Read only

satykumar
Product and Topic Expert
Product and Topic Expert
0 Likes
1,448

use stmt

leave to screen 0.

Read only

Former Member
0 Likes
1,448

use

set screen 0.

leave screen.

regards

shiba dutta

Read only

Former Member
0 Likes
1,448

Hi Kiran ,

Use the command

Leave to screen 0.

Regards

Arun

Read only

0 Likes
1,448

still it coming to program but not selection screen

Read only

0 Likes
1,448

use

CALL SELECTION-SCREEN 1000.

Read only

0 Likes
1,448

AND MY ALV IS OBJECT ORIENTED USING CONTAINERS

Read only

0 Likes
1,448

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

Read only

0 Likes
1,448

Hi,

jus use "set screen 0".

regards,

bharat.

Read only

0 Likes
1,448

try this

call selection-screen 1000.
set screen 0.

Read only

former_member194669
Active Contributor
0 Likes
1,448

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

Read only

former_member194669
Active Contributor
0 Likes
1,448

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

aRs

Read only

0 Likes
1,448

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

Read only

0 Likes
1,448

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

Read only

0 Likes
1,448

change the function code of the BACK button to BAC and

case r_ucomm.

when 'BAC'.

set to screen 0.

Read only

Former Member
0 Likes
1,448

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