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

dialog programming

Former Member
0 Likes
753

hi,

I have some problem with screen programming.

In my program

1) i m displaying selection screen

2) after executing it one ALV grid is displayed on (below )same selection screen only.

3) On that alv grid there is one button after clicking on that one list is displayed.

Now what i want is after clicking on back button on that list i want to display the previous selection screen with that alv grid.

regards,

Kirti

6 REPLIES 6
Read only

Former Member
0 Likes
724

Hi,

Create two subscreens for grid and list.

You can write the flow logic in PAI.

You can call the screens as you wish.

Regards

Read only

Former Member
0 Likes
724

Hi,

write this code..

after clicking back


PROCESS AFTER INPUT.
* Module Screen Exit and Cancel Operation
  MODULE exit_screen AT EXIT-COMMAND.

MODULE exit_screen INPUT.
  CASE ok_code.
    WHEN 'BACK'.
           LEAVE TO SCREEN 1020.    "write you screen number what ever you want or write the screen which is having alv report
    WHEN 'EXIT'  or  'CANCEL'.
*     Leave the program or /n
      LEAVE PROGRAM.
  ENDCASE.
ENDMODULE.                 " EXIT_SCREEN_  INPUT

or


"call the belwo function module instead of creating subscreen.

"it will showe you the report in alv format in the POP_UP  once you close the window or
" click back the old scree will apeear

  CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
    EXPORTING
      i_title               = "sub screen"
      i_selection           = 'X'
      i_screen_start_column = 5
      i_screen_start_line   = 5
      i_screen_end_column   = 70
      i_screen_end_line     = 20
      i_tabname             = 'T_BATCH'         "table name
      it_fieldcat           = gt_fieldcat_drd[]    "field catalog
    IMPORTING
      es_selfield           = gc_selfield
    TABLES
      t_outtab              = t_batch               "outptu table
    EXCEPTIONS
      program_error         = 1
      OTHERS                = 2.
  IF sy-subrc <> 0.
  ENDIF.


Prabhudas

Edited by: Prabhu Das on May 21, 2009 5:22 PM

Read only

Former Member
0 Likes
724

HI Kirti,

just use Leave to screen <Screen No> in pai of the list screen.

Ex.

case sy-ucomm.

WHEN 'BACK'

LEAVE TO SCREEN 107.

endcase.

hope this will work..

Read only

Former Member
0 Likes
724

Hi..

Specify the screen number as 0.

case sy-ucomm.

WHEN 'BACK'

LEAVE TO SCREEN 0.

endcase.

Read only

Former Member
0 Likes
724

thanks all

regards,

kirti

Read only

Former Member
0 Likes
724

in the code, see this line

when 'back'.

leave to screen 0.

here 0 means the nitial out-put screen, and other number means the screen number which u want to go when clicked on back button.