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

Непонятное поведение SELECTION-SCREEN со SKIP.



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP
View previous topic :: View next topic  
Author Message
Batman
Участник
Участник



Joined: 13 Aug 2008
Posts: 18
Location: Украина

PostPosted: Thu Aug 21, 2008 3:40 pm    Post subject: Непонятное поведение SELECTION-SCREEN со SKIP. Reply with quote

Здравствуйте.
Подскажите, пожалуйста, почему происходит следующая ситуация.

Есть программа для вывода отчета в АLV-grid. В программе, в блоке для объявления SELECTION-SCREEN вставил SKIP, для того что бы отступить вниз несколько строк. Все нормально, но вот если вставить еще один SKIP то программа начинает работать немного по другому. А именно: После вывода данных для отчета и нажатия на F3 появляется не SELECTION-SCREEN а пустой экран. SELECTION-SCREEN появляется если нажать на F3 еще раз. Если второй SKIP убрать то все становить нормально. Я в недоумении. Shocked

Question Объясните пожалуйста новичку как это происходит и как правильно называется этот самый пустой экран?

Текст программы:
Code:
REPORT  ZTEST.

type-pools slis.

types:
      begin of trep,
        field_1  type char30,
        field_2  type num5,
     end of trep.

types : t_tab_my_item type table of trep.


SELECTION-SCREEN:                                                       
  SKIP 9.                                                                 
  SKIP.                                                     " C этой строкой появляется пустой экран.
  SELECTION-SCREEN begin OF BLOCK f_kontr WITH FRAME TITLE text-001.   
    PARAMETERS s_VID(20) TYPE c LOWER CASE.                             
  SELECTION-SCREEN end OF BLOCK f_kontr.                               

START-OF-SELECTION.

PERFORM main.

"------------Подпрограммы--------------

form main.
  data lt_items type t_tab_my_item.
  perform fill_test_data using lt_items.
  perform show_alv_grid using lt_items.
endform.

form fill_test_data changing lt_items type t_tab_my_item.

  data ls_line type line of t_tab_my_item.
  clear lt_items.

  ls_line-field_1 = 'Some data'.
  ls_line-field_2 = '4444'.
  append ls_line to lt_items.

  ls_line-field_1 = 'Some other data'.
  ls_line-field_2 = '4445'.
  append ls_line to lt_items.

  ls_line-field_1 = 'More data'.
  append ls_line to lt_items.

endform.

form show_alv_grid changing tab_output type t_tab_my_item.

  data: it_fieldcat type slis_t_fieldcat_alv,
        gt_events type slis_t_event,
        ls_fieldcat type slis_fieldcat_alv,
        it_layout type slis_layout_alv.

  ls_fieldcat-tabname = 'IT_DENIK'.
  ls_fieldcat-ref_tabname = 'EKKO'.

  ls_fieldcat-fieldname = 'FIELD_1'.
  ls_fieldcat-reptext_ddic = 'Title of 1st column'.
  append ls_fieldcat to it_fieldcat.

  ls_fieldcat-fieldname = 'FIELD_2'.
  ls_fieldcat-reptext_ddic = 'Title of 2nd column'.
  append ls_fieldcat to it_fieldcat.

  clear it_layout.
  it_layout-detail_popup = ' '.
  it_layout-detail_titlebar = ' '.
  it_layout-info_fieldname = ' '.
  it_layout-header_text = 'Our title'.
  it_layout-no_colhead = ' '.
  it_layout-no_hotspot = ' '.
  it_layout-window_titlebar = it_layout-header_text.
  it_layout-list_append = ' '.
  it_layout-item_text = ' '.

  call function 'REUSE_ALV_LIST_DISPLAY'
  exporting
    i_callback_program = sy-repid
    it_fieldcat = it_fieldcat
    it_events = gt_events[]
    is_layout = it_layout
  tables
    t_outtab = tab_output.
 
endform.
Back to top
View user's profile Send private message Send e-mail
John Doe
Модератор
Модератор


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

PostPosted: Thu Aug 21, 2008 3:46 pm    Post subject: Reply with quote

После SKIP 9 поставьте запятую.
SELECTION-SCREEN SKIP и просто SKIP - разные операторы. Первый работает на селекционнике, а второй - в листинге.
Back to top
View user's profile Send private message Blog
Batman
Участник
Участник



Joined: 13 Aug 2008
Posts: 18
Location: Украина

PostPosted: Thu Aug 21, 2008 4:23 pm    Post subject: Reply with quote

А-а-а. Теперь понял. Idea Так как у меня второй оператор должен был выполняться в листинге, то листинг и появлялся.
Спасибо и сорри за невнимательность. Embarassed
Back to top
View user's profile Send private message Send e-mail
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.