SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

leave to screen 0.



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP
View previous topic :: View next topic  
Author Message
rstiv
Специалист
Специалист


Age: 44
Joined: 29 Oct 2008
Posts: 68
Location: Питер

PostPosted: Tue Nov 16, 2010 6:40 pm    Post subject: leave to screen 0. Reply with quote

Привет, всем!
Code:
&---------------------------------------------------------------------*
*&      Module  PAI_0100  INPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE pai_100 INPUT.

  CASE g_ok_code.
    WHEN '&F03'. " Finish program
      IF NOT g_docking_container_1 IS INITIAL.
        " destroy tree containers (detroys contained tree control, too)
        CALL METHOD g_docking_container_1->free
          EXCEPTIONS
            cntl_system_error = 1
            cntl_error        = 2.
        IF sy-subrc <> 0.
          MESSAGE a001.
        ENDIF.
        CALL METHOD cl_gui_cfw=>flush
          EXCEPTIONS
            cntl_system_error = 1
            cntl_error        = 2.
        IF sy-subrc <> 0.
          MESSAGE a001.
        ENDIF.
        CLEAR g_docking_container_1.
        CLEAR gt_outtab.
      ENDIF.
       leave to screen 0.
       "LEAVE PROGRAM.
        WHEN '&F12' OR '&F15'.
        IF NOT g_docking_container_1 IS INITIAL.
        " destroy tree containers (detroys contained tree control, too)
        CALL METHOD g_docking_container_1->free
          EXCEPTIONS
            cntl_system_error = 1
            cntl_error        = 2.
        IF sy-subrc <> 0.
          MESSAGE a001.
        ENDIF.
        CALL METHOD cl_gui_cfw=>flush
          EXCEPTIONS
            cntl_system_error = 1
            cntl_error        = 2.
        IF sy-subrc <> 0.
          MESSAGE a001.
        ENDIF.
        CLEAR g_docking_container_1.
        CLEAR gt_outtab.
        ENDIF.LEAVE PROGRAM.
 ENDCASE.

* CAUTION: clear ok code!
  CLEAR g_ok_code.
ENDMODULE.                    "pai_100 INPUT

Есть вот такое вот добро. Дело в том, что надо при нажатии кнопки назад идьти на сел экран, и при выход-отмена выходить. При назад использую leave to screen 0 и почему то вываливаюсь из транзакции. На сел экран не выхожу. Помогите плиз как это победить?

_________________
Строчечку написал, стопочку пропустил...
Back to top
View user's profile Send private message
rstiv
Специалист
Специалист


Age: 44
Joined: 29 Oct 2008
Posts: 68
Location: Питер

PostPosted: Tue Nov 16, 2010 9:14 pm    Post subject: Reply with quote

После прохода строки с leave to screen 0, проваливаются сюда
'SAPLS38E'
там след код
Code:

process before output.
  module set_pfstatus.
  module wb_manager.
  module set_focus.
*
process after input.
  module get_cursor.
*  module set_fcode.
  module wb_manager.
  module execute_editor_function.
*  module get_fcode.
  module process_fcode_0400.
  module new_screen.

и после этого уже выходит из программы, не возвращаясь на сел экранSad

_________________
Строчечку написал, стопочку пропустил...
Back to top
View user's profile Send private message
John Doe
Модератор
Модератор


Age: 45
Joined: 05 Nov 2007
Posts: 725
Location: КраснАдар

PostPosted: Tue Nov 16, 2010 9:31 pm    Post subject: Reply with quote

Зависит в каком событии call screen прописан. По идее leave screen должен нормально работать, если экран за пределами селекционника вызывается. А для выхода совсем - leave program.
Back to top
View user's profile Send private message Blog
rstiv
Специалист
Специалист


Age: 44
Joined: 29 Oct 2008
Posts: 68
Location: Питер

PostPosted: Tue Nov 16, 2010 10:06 pm    Post subject: Reply with quote

хых, активировал повторно инклюд с вариантом для ALV ничего в нем не меняя и заработалоSmile)) Спасибо, натолкнули на верный путь!
_________________
Строчечку написал, стопочку пропустил...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.