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 and container



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


Age: 38
Joined: 21 Jun 2010
Posts: 10
Location: Сургут

PostPosted: Tue Sep 28, 2010 3:30 pm    Post subject: selection-screen and container Reply with quote

Добрый день!
Подскажите пожалуйста как добавить экран выбора в контейнер. Контейнеры создаются програмно и хотелось бы чтоб в верхнем левом размещался экран выбора. Или просто редактируемые поля, что б к ним можно было словарь подцепить.
Так создаю контейнеры, В одном из них дерово хранится.
Code:
 
METHOD constructor.
    DATA: events TYPE cntl_simple_events,
          event LIKE LINE OF events,
          event_handler TYPE REF TO screen_handler,
          container_left TYPE REF TO cl_gui_container,
          container_right TYPE REF TO cl_gui_container,
          container_top TYPE REF TO cl_gui_container,
          container_bottom TYPE REF TO cl_gui_container,
          container_center TYPE REF TO cl_gui_container.

    CREATE OBJECT splitter_h
           EXPORTING
           parent = cl_gui_container=>screen0
           rows = 1
           columns = 2.

    CALL METHOD splitter_h->set_border
      EXPORTING
        border = cl_gui_cfw=>false.

    CALL METHOD splitter_h->set_column_mode
      EXPORTING
        mode = splitter_h->mode_relative.

    CALL METHOD splitter_h->set_column_width          EXPORTING id = 1
         width = 30.

    container_left  = splitter_h->get_container( row = 1 column = 1 ).
    container_right = splitter_h->get_container( row = 1 column = 2 ).

    CREATE OBJECT splitter_v
           EXPORTING
           parent = container_left
           rows = 3
           columns = 1.

    container_bottom = splitter_v->get_container( row = 1 column = 1 ).

    CALL METHOD splitter_v->set_border
      EXPORTING
        border = cl_gui_cfw=>false.

    CALL METHOD splitter_v->set_row_mode
      EXPORTING
        mode = splitter_v->mode_relative.

    CALL METHOD splitter_v->set_row_height
      EXPORTING
        id     = 1
        height = 10.

    CALL METHOD splitter_v->set_row_height
      EXPORTING
        id     = 2
        height = 70.

    container_top    = splitter_v->get_container( row = 1 column = 1 ).
    container_center = splitter_v->get_container( row = 2 column = 1 ).
    container_bottom = splitter_v->get_container( row = 3 column = 1 ).




    CREATE OBJECT g_tree
    EXPORTING
      parent              = container_center
      node_selection_mode = cl_gui_list_tree=>node_sel_mode_single
      item_selection     = 'X'
      with_headers       = ' '
    EXCEPTIONS
      cntl_system_error           = 1
      create_error                = 2
      failed                      = 3
      illegal_node_selection_mode = 4
      lifetime_error              = 5.
    IF sy-subrc <> 0.
      MESSAGE 'A000' TYPE 'E'.
    ENDIF.

    CREATE OBJECT  event_handler
           EXPORTING container = container_right.

    event-eventid = cl_gui_list_tree=>eventid_node_double_click.
    event-appl_event = ' '.   "system event, does not trigger PAI
    APPEND event TO events.

    event-eventid = cl_gui_list_tree=>eventid_item_double_click.
    event-appl_event = ' '.
    APPEND event TO events.

    CALL METHOD g_tree->set_registered_events
      EXPORTING
        events = events.
    SET HANDLER event_handler->handle_node_double_click FOR g_tree.
    SET HANDLER event_handler->handle_item_double_click FOR g_tree.
    CALL METHOD: me->fill_tree.
  ENDMETHOD.                    "CONSTRUCTOR
Back to top
View user's profile Send private message
John Doe
Модератор
Модератор


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

PostPosted: Thu Sep 30, 2010 1:03 pm    Post subject: Reply with quote

Посмотрите пример в программе DD_ADD_FORM_INPUT
Back to top
View user's profile Send private message Blog
ask
Участник
Участник


Age: 38
Joined: 21 Jun 2010
Posts: 10
Location: Сургут

PostPosted: Thu Oct 07, 2010 1:33 pm    Post subject: Reply with quote

спасибо. пример помог
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.