Docking Container Problem - 2 GRID's in one screen

Hi Friends,
I am not getting any output from the below code. Help me to achieve this.
Regards,
Viji.
REPORT ZTEST_ALV1234567 .
TYPE-POOLS: slis.
* Tables
TABLES: mara.
TYPES: BEGIN OF ty_name,
        name TYPE char10,
        age TYPE i,
       END OF ty_name.
TYPES: BEGIN OF ty_marks,
        sub1 TYPE i,
        sub2 TYPE i,
        total TYPE i,
       END OF ty_marks.
TYPES: BEGIN OF ty_phone,
        phnum TYPE char10,
       END OF ty_phone.
TYPES: BEGIN OF ty_addr,
        address TYPE char20,
       END OF ty_addr .
* Output internal table
DATA: itab TYPE TABLE OF ty_name,
      wa TYPE ty_name,
      itab1 TYPE TABLE OF ty_marks,
      wa1 TYPE ty_marks.
* ALV Grid
DATA: r_grid TYPE REF TO cl_gui_alv_grid,
      r_grid1 TYPE REF TO cl_gui_alv_grid,
      g_dock TYPE REF TO cl_gui_docking_container,
      g_dock1 TYPE REF TO cl_gui_docking_container,
      it_fieldcat TYPE lvc_t_fcat,
      it_fieldcat1 TYPE lvc_t_fcat,
      wa_fieldcat TYPE lvc_s_fcat.
START-OF-SELECTION.
  wa-name = 'TEST01'.
  wa-age = '1'.
  APPEND wa TO itab.
  wa-name = 'TEST02'.
  wa-age = '2'.
  APPEND wa TO itab.
  wa-name = 'TEST03'.
  wa-age = '3'.
  APPEND wa TO itab.
  wa1-sub1 = '11'.
  wa1-sub2 = '22'.
  wa1-total = wa1-sub1 + wa1-sub2.
  APPEND wa1 TO itab1.
  wa1-sub1 = '22'.
  wa1-sub2 = '33'.
  wa1-total = wa1-sub1 + wa1-sub2.
  APPEND wa1 TO itab1.
  CALL SCREEN 100.
*& Module STATUS_0100 OUTPUT
* text
MODULE status_0100 OUTPUT.
  SET PF-STATUS 'LISTOUT1'.
  SET TITLEBAR 'LIST1'.
  wa_fieldcat-fieldname = 'NAME'.
  wa_fieldcat-seltext = 'NAME OF THE STUDENT'.
  wa_fieldcat-coltext = 'NAME OF THE STUDENT'.
  APPEND wa_fieldcat TO it_fieldcat.
  CLEAR wa_fieldcat.
  wa_fieldcat-fieldname = 'AGE'.
  wa_fieldcat-seltext = 'AGE OF THE STUDENT'.
  wa_fieldcat-coltext = 'AGE OF THE STUDENT'.
  APPEND wa_fieldcat TO it_fieldcat.
  wa_fieldcat-fieldname = 'SUB1'.
  wa_fieldcat-seltext = 'SUBJECT1'.
  wa_fieldcat-coltext = 'SUBJECT1'.
  APPEND wa_fieldcat TO it_fieldcat1.
  wa_fieldcat-fieldname = 'SUB2'.
  wa_fieldcat-seltext = 'SUBJECT2'.
  wa_fieldcat-coltext = 'SUBJECT2'.
  APPEND wa_fieldcat TO it_fieldcat1.
  wa_fieldcat-fieldname = 'TOTAL'.
  wa_fieldcat-seltext = 'TOTAL'.
  wa_fieldcat-coltext = 'TOTAL'.
  APPEND wa_fieldcat TO it_fieldcat1.
  IF g_dock IS INITIAL.
    CREATE OBJECT g_dock
          EXPORTING repid = sy-repid
                    dynnr = sy-dynnr side = g_dock->dock_at_top
                    extension = 300.
    CREATE OBJECT r_grid
          EXPORTING i_parent = g_dock.
  ENDIF.
  IF g_dock1 IS INITIAL.
    CREATE OBJECT g_dock1
          EXPORTING repid = sy-repid
                    dynnr = sy-dynnr side = g_dock1->dock_at_bottom
                    extension = 300.
    CREATE OBJECT r_grid1
          EXPORTING i_parent = g_dock1.
  ENDIF.
    IF NOT itab[] IS INITIAL.
      CALL METHOD r_grid->set_table_for_first_display
            CHANGING it_outtab = itab
                     it_fieldcatalog = it_fieldcat.
    ENDIF.
    IF NOT itab1[] IS INITIAL.
      CALL METHOD r_grid1->set_table_for_first_display
            CHANGING it_outtab = itab1
                     it_fieldcatalog = it_fieldcat1.
    ENDIF.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE user_command_0100 INPUT.
  CASE sy-ucomm.
    WHEN 'BACK'.
      LEAVE PROGRAM.
  ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Module EXIT INPUT
* text
MODULE exit INPUT.
  CALL METHOD g_dock->free.
  CALL METHOD g_dock1->free.
ENDMODULE. " EXIT INPUT

I am getting the output.. if you are not getting the output still then ....
The issue is that you didn't uncomment the PBO and PAI modules. try to uncomment them and test it again.
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100.

Similar Messages

  • Docking Container - Custom Container

    Hi Friends,
    I have the following doubts.
    1. What all are the advantages of Docking and Custom Container.
    2. Under what scenario's we use Docking over Custom Container.
    3. I want to have 2 ALV GRID's in one screen one below another. Shall I use Docking Container?
        internal table I_MARA with 10 records and I_MARC with 20 records.
        Explain how to achieve this using Docking Container with code.
    Regards,
    Viji.

    hi vijayalakshmi
    you can use 2 custom containers in that screen for two ALV grid
    *& Report  ZLISTBOX1                                                   *
    REPORT  zlistbox1                               .
    *parameters: date like sy-datum.
    TABLES: lfa1,ekko.
    TYPE-POOLS: slis,sdydo.
    *select-options: vendor for lfa1-lifnr.
    DATA: itab TYPE TABLE OF ekko,
          identity TYPE REF TO cl_gui_custom_container,
          l_list TYPE slis_t_listheader,
          l_logo TYPE sdydo_value,
          l_identity TYPE REF TO cl_gui_custom_container,
          l_tree TYPE REF TO cl_gui_alv_tree_simple,
          tree TYPE REF TO cl_gui_alv_tree_simple,
          fcat TYPE lvc_t_fcat,
          sort_b TYPE lvc_t_sort,
          sort_w TYPE lvc_s_sort.
    CALL SCREEN 100.
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE user_command_0100 INPUT.
      CASE sy-ucomm.
        WHEN 'DISPLAY'.
          PERFORM col_head.
          PERFORM output.
          PERFORM sort.
          IF l_identity IS INITIAL.
            CREATE OBJECT l_identity
            EXPORTING
            container_name = 'LOGO'.
            CREATE OBJECT l_tree
            EXPORTING
            i_parent = l_identity.
            PERFORM logo USING l_logo.
            CALL METHOD l_tree->create_report_header
              EXPORTING
                it_list_commentary = l_list
                i_logo             = l_logo.
          ENDIF.
          IF identity IS INITIAL.
            CREATE OBJECT identity
            EXPORTING
            container_name = 'JANAGAR'.
            CREATE OBJECT tree
            EXPORTING
            i_parent = identity.
            CALL METHOD tree->set_table_for_first_display
              CHANGING
                it_outtab       = itab
                it_fieldcatalog = fcat
                it_sort         = sort_b.
          ENDIF.
    *refresh itab.
          CALL METHOD tree->refresh_table_display.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Form  logo
          text
         -->P_LOGO     text
    FORM logo USING p_logo.
      p_logo = 'ENJOYSAP_LOGO'.
    ENDFORM.                    "logo
    *&      Form  col_head
          text
    FORM col_head.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
       EXPORTING
      I_BUFFER_ACTIVE              =
         i_structure_name             = 'EKKO'
      I_CLIENT_NEVER_DISPLAY       = 'X'
      I_BYPASSING_BUFFER           =
      I_INTERNAL_TABNAME            = ITAB
        CHANGING
          ct_fieldcat                  = fcat.
    EXCEPTIONS
      INCONSISTENT_INTERFACE       = 1
      PROGRAM_ERROR                = 2
      OTHERS                       = 3
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    "col_head
    *&      Form  output
          text
    FORM output.
      SELECT * FROM ekko INTO TABLE itab WHERE lifnr = lfa1-lifnr.
    ENDFORM.                    "output
    *&      Form  sort
          text
    FORM sort.
      sort_w-spos = 1.
      sort_w-fieldname = 'EBELN'.
      APPEND sort_w TO sort_b.
      sort_w-spos = 2.
      sort_w-fieldname = 'AEDAT'.
      APPEND sort_w TO sort_b.
      sort_w-spos = 3.
      sort_w-fieldname = 'BUKRS'.
      APPEND sort_w TO sort_b.
    ENDFORM.                    "sort
    cheers
    s.janagar

  • Resize docking container at runtime

    Hi container addicts,
    My report has a selection screen. Below I create a docking container (with SALV grid) docked at bottom with calculated extension that the select-options are still visible.
    The customer wants a toggle button to extend the control to the full screen area and make it small again to have the selections visible.
    Will I have to destroy the container and then recreate container and grid with different size or can I re-size the container at run time dynamically?
    Thanks for useful hints.
    Regards,
    Clemens

    Thank you Rich,
    this works fine. Obviously the extension is measured in something like points or pixels.
    I tied a dynamic solution regarding the actual screen size with constants for the selection screen area (mc_rows_selection_area. = 4) and estimated pixels per row mc_graph_units_per_row = 12.
    It works approximately, but not too exact. Are you aware of any methods to determine the full screen size (without standard tool bar) in the kind of units we need for SET_EXTENSION method?
    * provide dynamic screen space
      IF sy-srows <= mc_rows_selection_area.
        lv_srows = mc_rows_selection_area.
      ELSE.
        lv_srows = sy-srows - mc_rows_selection_area.
      ENDIF.
    * extension in pixels(?) as n pixels per row
      lv_extension = mc_graph_units_per_row * lv_srows.
      set_docking_extension( lv_extension ).
    Thanks a lot.
    Regards,
    Clemens

  • Display Multiple ALV layouts on one screen

    Hi,
    I have created 4 ALV Catalogues named: ALVCAT1, ALVCAT2, ALVCAT3, ALVCAT4
    I have also created the corresponding internal tables with data for each catalogue: ALVITAB1, ALVITAB2, ALVITAB3, ALVITAB4
    I have so far used the following function to generate each of the catalogues above:
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          I_PROGRAM_NAME     = SY-CPROG
          I_INTERNAL_TABNAME = 'ALVITAB1'
          I_INCLNAME         = SY-CPROG
        CHANGING
          ct_fieldcat        = ALVCAT1[].
    And I have used the following function module to display the table as ALV:-
    *DISPLAYING REPORT AS ALV GRID
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM      = SY-CPROG
          I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
          i_callback_user_command = 'USER_COMMAND'
          IT_FIELDCAT             = ALVCAT1[]
         i_screen_start_column = 10
         i_screen_start_line   = 15
         i_screen_end_column   = 200
         i_screen_end_line     = 20
        TABLES
          t_outtab                = ALVITAB1.
    How can I now using the above function modules or similar function modules to DISPLAY multiple ALV layouts on a single SCREEN. Each layout should be treated separately with their own ALV tool bar etc.
    In this case i need to display 4 screens but I have scenarios where i need to also display 5.
    Would be really grateful for your guidance with source code to achieve this.....
    Thnx
    Salman
    Edited by: Salman Akram on Sep 20, 2010 2:47 PM

    Hi
    Try this [Link|http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=61243570] or the below program
    BCALV_TEST_GRID_DRAG_DROP
    or else
    Try to use splitter container to display multiple ALVs on one screen
    here is the demo program RSDEMO_SPLITTER_CONTROL
    the below code will help you to call grid using splitter control
         EXPORTING
            container_name = 'CUSTOM'.
        CREATE OBJECT splitter
          EXPORTING
            parent  = container
            rows    = 1
            columns = 1
            align   = 15.
        CALL METHOD splitter->set_row_height
          EXPORTING
            id     = 1
            height = 1.
        CALL METHOD splitter->get_container
          EXPORTING
            row       = 1
            column    = 1
          RECEIVING
            container = container_1.
        CREATE OBJECT grid1
          EXPORTING
            i_parent = container_1.
        CALL METHOD grid1->set_table_for_first_display
          EXPORTING
            is_layout       = gss_layout
            is_variant      = lwa_variant
            i_save          = 'A'
          CHANGING
            it_outtab       = gt_report_list
            it_fieldcatalog = gtt_fld_cat.
    Regards
    Edited by: Anesht on Sep 20, 2010 11:49 PM

  • Problem in passing data from 1 screen to another using BBP_DOC_CHANGE_BADI.

    Hi Experts,
    i am new to the SRM, i am facing problem in passing data from one screen to another.
    my requirement is that when we select one shopping cart and press the PROPOSE SOURCES OF SUPPLY button, we will fetch all the contracts that are attached to the shopping cart.
    we have implemented a BADI implementation of BBP_SOS_BADI (method BBP_SOS_CHECK) for passing some changed values to the contracts of the shopping cart into the popup screen that is displayed when we press PROPOSE SOURCES OF SUPPLY button and when we select any contract and press ASSIGN ONLY button in the popup screen the badi BBP_DOC_CHANGE_BADI is triggered.
    i have implemented another BADI implementation of BBP_DOC_CHANGE_BADI for fetching the selected contract and pass the values to another screen, but the problem is that when we select one contract and press the assign only button we are fetching the wrong contract number ( that is in the BADI method BB_SC_CHANGE parameter IT_ITEM we are fetching the wrong contract), if we again do the same procedure for the second time we are getting the correct contract.
    i am unable to understand why we are getting the wrong contract in the first time( that is we are getting contract other than the selected one).
    as per my understanding i think when we are passing data to the popup screen using BBP_DOC_CHANGE_BADI we are not updating the shopping cart with the changed data.
    can anyone tell me how we can update the SHOPPING CART with the changed contracts data, i have used BBP_PD_SC_UPDATE, BBP_PD_SC_SAVE and other shopping cart FM but nothing is happening.
    Thanks
    Tanveer

    Hello,
    What version of SRM are you on?  Have you check for OSS Notes?  I have had trouble with BBP_DOC_CHANGE_BADI but it was because of other issues.  The BADI works pretty well and it is called almost every time something happens to the shopping cart.
    I have noticed that sometimes that values are not changed til the second calling of the BADI.  I have yet understand why but I think it has to do with prompt processing. Usually, we train our requisitioners to click the 'Check'  button to flush things out.
    I don't know if I was helpful.... another thought.... could there be an error caught by BBP_DOC_CHECK_BADI that is preventing change in BBP_DOC_CHANGE_BADI?
    Regards, Dean.

  • Background Execution Problem-Docking Container with 2 ALV Grids in one scre

    Hi Friends,
    I have created 2 ALV Grids in one screen - one below another using DOCKING CONTAINER.
    The objects are 'g_dock_cont' and 'g_dock_cont1'.
    I am getting the foreground output as expected with 2 ALV Grids.
    While executing in background (F9), I am getting only output of first ALV grid. Second ALV is not getting displayed in BACKGROUND(F9) mode.
    How to solve this.
    FORM create_objects.
    * Materials with data
      IF   g_dock_cont IS INITIAL.
       IF sy-batch NE 'X'.
    *CREATE THE OBJECT FOR DOCKING CONTAINER
        CREATE OBJECT g_dock_cont
          EXPORTING
            side                  = cl_gui_docking_container=>dock_at_top
            extension             = 300.
        ENDIF.
    *CREATE THE OBJECT FOR ALV GRID
        CREATE OBJECT g_alvgrid
               EXPORTING i_parent = g_dock_cont.
        wa_layout-grid_title =
              'Materials with Data'.
      ENDIF.
    IF NOT I_DETAIL[] IS INITIAL.
    CALL METHOD g_alvgrid->set_table_for_first_display
      EXPORTING
        IS_VARIANT                    = WA_VARIANT_STX
        IS_LAYOUT                     = wa_layout
      CHANGING
        it_outtab                     = I_DETAIL
        IT_FIELDCATALOG               = LIT_FIELDCATALOG[]
      EXCEPTIONS
        INVALID_PARAMETER_COMBINATION = 1
        PROGRAM_ERROR                 = 2
        TOO_MANY_LINES                = 3
        others                        = 4
    IF sy-subrc <> 0.
    ENDIF.
    ENDIF.
    *MATERIALS WITHOUT DATA
      IF   g_dock_cont1 IS INITIAL.
       IF sy-batch NE 'X'.
    *CREATE THE OBJECT FOR DOCKING CONTAINER
        CREATE OBJECT g_dock_cont1
          EXPORTING
            side                  = cl_gui_docking_container=>dock_at_bottom
            extension             = 300.
       ENDIF.
    *CREATE THE OBJECT FOR ALV GRID
        CREATE OBJECT g_alvgrid1
               EXPORTING i_parent = g_dock_cont1.
        wa_layout1-grid_title =
              'Materials without Data'.
      ENDIF.
    IF NOT I_MARA[] IS INITIAL.
    CALL METHOD g_alvgrid1->set_table_for_first_display
      EXPORTING
        IS_LAYOUT                     = wa_layout1
      CHANGING
        it_outtab                     = I_MARA
        IT_FIELDCATALOG               = i_fieldcat[]
      EXCEPTIONS
        INVALID_PARAMETER_COMBINATION = 1
        PROGRAM_ERROR                 = 2
        TOO_MANY_LINES                = 3
        others                        = 4
    IF sy-subrc <> 0.
    ENDIF.
    ENDIF.
    ENDFORM.                    " create_objects
    Regards,
    Viji.

    Hi,
    What i was saying is that you need to code again for background mode of execution.
    AT END OF SELECTION.
    IF SY-BATCH EQ 'X'.
      PERFORM DISPLAY1.
      PERFORM DISPLAY2.
    In DISPLAY1 use REUSE_ALV_LIST_DISPLAY to display data from outtab1.
    In DISPLAY2 use REUSE_ALV_LIST_DISPLAY to display data from outtab2.
    For example : execute this report in background mode.this will not execute in online mode.
    After execution you will get two spools one for KNA1 and one for LFA1 data. Spool can be controlled via IS_PRINT structure.
    report  zrbackground.
    data gt_lfa1 type standard table of lfa1.
    data gt_kna1 type standard table of kna1.
    start-of-selection.
      select * from lfa1 into table gt_lfa1 up to 10 rows.
      select * from kna1 into table gt_kna1 up to 20 rows.
    end-of-selection.
      if sy-batch eq 'X'.
        perform display_lfa1.
        perform display_kna1.
      endif.
    *&      Form  DISPLAY_LFA1
          text
    -->  p1        text
    <--  p2        text
    form display_lfa1 .
      call function 'REUSE_ALV_LIST_DISPLAY'
        exporting
          i_callback_program = sy-repid
          i_structure_name   = 'LFA1'
        tables
          t_outtab           = gt_lfa1
        exceptions
          program_error      = 1
          others             = 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.
    endform.                    " DISPLAY_LFA1
    *&      Form  DISPLAY_KNA1
          text
    -->  p1        text
    <--  p2        text
    form display_kna1 .
      call function 'REUSE_ALV_LIST_DISPLAY'
        exporting
          i_callback_program = sy-repid
          i_structure_name   = 'KNA1'
        tables
          t_outtab           = gt_kna1
        exceptions
          program_error      = 1
          others             = 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.
    endform.                    " DISPLAY_KNA1
    Please let me know if its not clear or you need more info.
    Thanks,
    Abhishek
    Edited by: abhishek sinha on May 8, 2009 7:42 PM
    Edited by: abhishek sinha on May 8, 2009 8:45 PM

  • Problem with ALV in Docking container

    Dear All,
    I have created an <b>editable ALV</b> in a <b>docking container</b>. In this ALV there are some custom buttons in the toolbar. In case a custom activity, in the toolbar, is executed some checks are performed which when fail an error message issued.
    The problem: After the error msg is received if the user corrects the error and re-executes the toolbar custom activity the execution of the program is being terminated and it takes me out of the transaction which should not be the case. I tried to debug/place a hard break-point at the piece of code which should be executed but no success..
    Note: In case i use a custom control then everything is working fine. The reason i want to use a docking container over a custom container, is that if the ALV is placed in a docking container it occupies the complete screen area irrespective of the resolution of the screen.
    Can anyone help as to why this problem is happening and how it can be resolved.
    Thanks in advance for your help.
    regards
    Nitesh

    Well, if you want to try to use a custom container, the trick is to make the screen really big, and then make the container just as big, then double click on the control in screen painter, and set the vertical and horizontal resizing.   Doing this will make the ALV adjust depending on screen resolution. 
    Regards,
    RIch Heilman

  • I/O Field in a Docking Container

    Hii Experts,
    I have created a Docking Container, which i have splitted into two containers. First one should contain ALV, second one should have a couple of i/o fields and pushbuttons placed on it. I have placed the Pushbuttons using Toolbar Class (cl_gui_toolbar). I want to know how to place an i/o field in this container.
    Thanks in Advance,
    rama

    Hi all,
    i have the same problem. I have to create a closing cockpit for FI and i use 4 docking containers, in the upper container (header) i like to place dynamicaly some input fields.
    While sitting in the bathroom i had the idea to load a 2 column (or more) editable ALV into the container.
    In the first line and the first (non editable) column is the field label, in second (editable) column the data can be entered. The changed values i get back via events.
    If i need more paramters, i append more lines in the ALV tables.
    if i need more parameters as i can place in one colum in the upper container, i use 1. col for field label, 2. col for input, 3. col as colored filler, 4. col as field label, 5. col as input value and so on.
      col 1       col 2       col 3  col 4  col 5
      label       value      filler   label   value
    BUKRS
    DE19
    KORKS
    DE01
    PERIO
    005.2009
    RLDNR
    I0
    I will give feetback if my bathroom solution is useabel.
    Kind regards,
    Wolfgang
    Edited by: Wolfgang Boehm on May 15, 2009 11:53 PM

  • Distance of a Docking Container from the Top

    Hello,
    it is possible to distance an docking container from the top. The container is class CL_GUI_DOCKING_CONTAINER.
    I want to show an textfield above the container in my dynpro.
    German:
    Servus,
    ich habe ein Problem.
    Ich erzeuge einen Docking Container der Klasse CL_GUI_DOCKING_CONTAINER und möchte nun, dass dieser zum Top einen Abstand hat, damit auf meinem Dynpro noch ein Textfeld überhalt angezeigt wird.
    Ist dies möglich?

    Hi Sebastian,
    Check the below code......
    I hav used selection screen as base screen and a docking container at top (for texteditor) and a docking container at bottom (for ALV grid).........
    PARAMETER p.                           " Dummy
    DATA : container1  TYPE REF TO cl_gui_docking_container,
            container2  TYPE REF TO cl_gui_docking_container,
            text_editor TYPE REF TO cl_gui_textedit,
            alv_grid    TYPE REF TO cl_gui_alv_grid,
            lt_mara     TYPE TABLE OF mara       WITH HEADER LINE,
            lt_texttab  TYPE soli_tab.
    AT SELECTION-SCREEN OUTPUT.
       CHECK container1 IS NOT BOUND.
       CREATE OBJECT container1 EXPORTING repid      = sy-repid
                                          dynnr      = sy-dynnr
                                          side       = cl_gui_docking_container=>dock_at_top
                                          extension  = '100' .
       CREATE OBJECT text_editor EXPORTING parent            = container1
                                           wordwrap_mode     = '1'.
       APPEND 'First line in TextEditControl' TO lt_texttab.
       text_editor->set_text_as_r3table( EXPORTING table = lt_texttab[] ).
       CHECK container2 IS NOT BOUND.
       CREATE OBJECT container2 EXPORTING repid      = sy-repid
                                          dynnr      = sy-dynnr
                                          side       = cl_gui_docking_container=>dock_at_bottom
                                          extension  = '300' .
       CREATE OBJECT alv_grid EXPORTING i_parent = container2.
       SELECT * FROM mara INTO TABLE lt_mara UP TO 20 ROWS.
       alv_grid->set_table_for_first_display( EXPORTING i_structure_name = 'MARA'
                                              CHANGING  it_outtab        = lt_mara[] ).
    Cheers,
    Jose.
    Edited by: Jose on Jun 6, 2008 10:58 AM

  • How can I pass a docking container to a program in a non-simple context?

    Dear colleagues,
    I want to pass a docking container like the one in SE80 to another program.
    The following code works fine:
    REPORT z_moving_dock.
    DATA: cl_docker type REF TO cl_gui_docking_container.
    PARAMETERS: test.
    INITIALIZATION.
      CREATE OBJECT cl_docker EXPORTING no_autodef_progid_dynnr = 'X'.
    END-OF-SELECTION.
      WRITE:/ test.
    But I cannot extend this to my current program. There I sourced out anything related to the GUI into a function group to obey the MVC paradigma. (That's maybe the error in reasoning, but I'm following the book Design Patterns in Object-Oriented ABAP from SAP Press and -- of course -- good and healthy programming style.)
    So it's a function group which knows the dynpros and controls, the main program knows only the data.
    Now I have a docking container like the one in SE80. We have many working older programs and I want to switch to them carrying the docking container with me. I have searched the Demos in SAP, the Online Help, the SAP Library, Books, the Web, this Forum, but none of them goes beyond the simpler examples that always work.
    I tried the LINK method on the docking container. I tried it before calling the new program (btw. by SUBMIT). I tried it afterwards from the called program (via a function module from the aforementioned group -- but the group is tied to the old program context and therefore I am in a new "instance" of it). I tried different values for REPID and DYNNR in LINK. I debugged SE80 -- too complicated!
    If it works well I get the container back when I return to the calling program. If it works badly the container is completely lost.
    Perhaps I should export something to memory?
    But I strongly would prefer not to alter the called programs: In the future I might also want to call a SAP standard program.
    I also didn't find some documentation explaining what is going on in the background so I could figure out in which direction to "think".
    I also tested the following code on SAP R/3 4.7 and SAP ERP 2005 with the same results.
    In the meantime I also created a minimal example. First the triggering report:
    REPORT z_moving_docking_container.
    DATA: g_example TYPE REF TO zcl_moving_docking_container.
    CREATE OBJECT g_example.
    This obviously calls the main class ZCL_MOVING_DOCKING_CONTAINER which has only this constructor:
    METHOD constructor.
      CALL FUNCTION 'Z_SHOW_DYNPRO'.
    ENDMETHOD.
    Normally this class should handle the business logic. Here it only calls this function module. In the appropriate function group, say Z_MOVING_DOCKING_CONTAINER, I have these declarations in the TOP-Include:
    FUNCTION-POOL z_moving_docking_container.
    DATA:
      gv_okcode TYPE ui_func,
      go_docker TYPE REF TO cl_gui_docking_container.
    The function group also contains a dynpro 9000 with this flow logic:
    PROCESS BEFORE OUTPUT.
      MODULE status_9000.
    PROCESS AFTER INPUT.
      MODULE user_command_9000.
    The modules are straightforward:
    MODULE status_9000 OUTPUT.
      SET PF-STATUS '9000'.
      IF go_docker IS INITIAL.
        CREATE OBJECT go_docker
               EXPORTING no_autodef_progid_dynnr = 'X'.
      ENDIF.
    ENDMODULE.
    with at least the function code ONLI defined in PF-status 9000 and
    MODULE user_command_9000 INPUT.
      IF gv_okcode = 'ONLI'.
        SUBMIT z_sample_report AND RETURN.
      ELSE.
        LEAVE PROGRAM.
      ENDIF.
    ENDMODULE.
    The report Z_SAMPLE_REPORT can be any report you like.
    At last the function module contains the following code:
    FUNCTION z_show_dynpro.
    *"*"Lokale Schnittstelle:
      CALL SCREEN 9000.
    ENDFUNCTION.
    As I see this, this is a straightforward application of the working example at the top and the principles of MVC and encapsulation of the dynpro logic (to "avoid" global variables as best as possible).
    Clearly in some sense this is an academic question, but I have built a fairly big application like that up to now ...
    </edit>
    Thanks for reading and contemplating,
    Thomas
    Edited by: Thomas Geiß on Feb 4, 2009 11:03 AM
    Edited by: Thomas Geiß on Feb 4, 2009 11:59 AM
    Edited by: Thomas Geiß on Feb 4, 2009 12:01 PM

    You'll either have to pass the data in as parameters in the applet tags or create a JavaScript tag and have the JavaScript pass it in. If the array is very large then you open a connection between the Applet and a servlet and pass the data that way.

  • I have an Ipad 2 and are having problems sending out emails in one of my email address. I always get a message reading the email was not sent because the server does not allow relaying. This is an email account POP3. I have no such problem with gmail.

    I have an Ipad 2 and are having problems sending out emails in one of my email address. This is a POP3 email Account? I always get a message reading that the email was not sent because the server does not allow relaying. I have no such problem with gmail. What could be the problem and how do I resolve this. Is it about settings?
    Richard.

    Welcome to the Apple community.
    If you are unable to remember your password, security questions, don’t have access to your rescue address or are unable to reset your password for whatever reason, your only option is to contact Apple ID Support, upon speaking to an operator you should explain that your problem is related to your Apple ID, this way you will not be charged for assistance, even if you don’t have an AppleCare plan.
    The operator will take you through some steps you may have already tried, however they need to be sure they have exhausted all usual approaches before trying to reset your account, so you should try to be helpful and show patience with the procedure.
    The operator will need to verify they are speaking to the account holder and may ask you some questions that only the account holder could know, and you will need to answer them if the process is to proceed.
    Once the operator has verified your identity they will send a message through to your device which contains an alpha numeric code, which you will need to read back to them.
    Once this has been completed they will send an email to your iCloud email address after a period of 24 hours, so you should check that mail is enabled in your devices iCloud settings.
    Upon receipt of the email, use the reset link provided to reset your password, after which you should be able to make the adjustments to iCloud that you wish to do.

  • How to set background color in a docking container?

    Hi guys!
    Is it possible to set a background color for a docking container?
    I don't find any appropriate method to do that.
    Is there actually a way?

    Hi,
    Please refer the below program as a reference for Color using Docking Container Concept.
    REPORT zcuitest_alv_07.
    * Use of colours in ALV grid (cell, line and column)            *
    * Table
    TABLES : mara.
    * Type
    TYPES : BEGIN OF ty_mara,
              matnr         LIKE mara-matnr,
              matkl         LIKE mara-matkl,
              counter(4)    TYPE n,
              free_text(15) TYPE c,
              color_line(4) TYPE c,           " Line color
              color_cell    TYPE lvc_t_scol,  " Cell color
    END OF ty_mara.
    * Structures
    DATA  : wa_mara     TYPE ty_mara,
            wa_fieldcat TYPE lvc_s_fcat,
            is_layout   TYPE lvc_s_layo,
            wa_color    TYPE lvc_s_scol.
    * Internal table
    DATA : it_mara     TYPE STANDARD TABLE OF ty_mara,
           it_fieldcat TYPE STANDARD TABLE OF lvc_s_fcat,
           it_color    TYPE TABLE          OF lvc_s_scol.
    * Variables
    DATA : okcode LIKE sy-ucomm,
           w_alv_grid          TYPE REF TO cl_gui_alv_grid,
           w_docking_container TYPE REF TO cl_gui_docking_container.
    PARAMETERS : p_column AS CHECKBOX,
                 p_line   AS CHECKBOX,
                 p_cell   AS CHECKBOX.
    START-OF-SELECTION.
      PERFORM get_data.
    END-OF-SELECTION.
      PERFORM fill_catalog.
      PERFORM fill_layout.
      CALL SCREEN 2000.
    *&      Module  status_2000  OUTPUT
    *       text
    MODULE status_2000 OUTPUT.
      SET PF-STATUS '2000'.
    ENDMODULE.                 " status_2000  OUTPUT
    *&      Module  user_command_2000  INPUT
    *       text
    MODULE user_command_2000 INPUT.
      DATA : w_okcode LIKE sy-ucomm.
      MOVE okcode TO w_okcode.
      CLEAR okcode.
      CASE w_okcode.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
      ENDCASE.
    ENDMODULE.                 " user_command_2000  INPUT
    *&      Module  alv_grid  OUTPUT
    *       text
    MODULE alv_grid OUTPUT.
      IF w_docking_container IS INITIAL.
        PERFORM create_objects.
        PERFORM display_alv_grid.
      ENDIF.
    ENDMODULE.                 " alv_grid  OUTPUT
    *&      Form  create_objects
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM create_objects.
    * Ratio must be included in [5..95]
      CREATE OBJECT w_docking_container
        EXPORTING
          ratio                       = 95
        EXCEPTIONS
          cntl_error                  = 1
          cntl_system_error           = 2
          create_error                = 3
          lifetime_error              = 4
          lifetime_dynpro_dynpro_link = 5
          others                      = 6.
      CREATE OBJECT w_alv_grid
        EXPORTING
          i_parent          = w_docking_container.
    ENDFORM.                    " create_objects
    *&      Form  display_alv_grid
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM display_alv_grid.
      CALL METHOD w_alv_grid->set_table_for_first_display
        EXPORTING
          is_layout                     = is_layout
        CHANGING
          it_outtab                     = it_mara
          it_fieldcatalog               = it_fieldcat
        EXCEPTIONS
          invalid_parameter_combination = 1
          program_error                 = 2
          too_many_lines                = 3
          OTHERS                        = 4.
    ENDFORM.                    " display_alv_grid
    *&      Form  get_data
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM get_data.
      SELECT * FROM mara UP TO 5 ROWS.
        CLEAR : wa_mara-color_line, wa_mara-color_cell.
        MOVE-CORRESPONDING mara TO wa_mara.
        ADD 1                   TO wa_mara-counter.
        MOVE 'Blabla'           TO wa_mara-free_text.
        IF wa_mara-counter = '0002'
        AND p_line = 'X'.
    * Color line
          MOVE 'C410' TO wa_mara-color_line.
        ELSEIF wa_mara-counter = '0004'
        AND p_cell = 'X'.
    * Color cell
          MOVE 'FREE_TEXT' TO wa_color-fname.
          MOVE '5'         TO wa_color-color-col.
          MOVE '1'         TO wa_color-color-int.
          MOVE '1'         TO wa_color-color-inv.
          APPEND wa_color TO it_color.
          wa_mara-color_cell[] = it_color[].
        ENDIF.
        APPEND wa_mara TO it_mara.
      ENDSELECT.
    ENDFORM.                    " get_data
    *&      Form  fill_catalog
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM fill_catalog.
    * Colour code :                                                 *
    * Colour is a 4-char field where :                              *
    *              - 1st char = C (color property)                  *
    *              - 2nd char = color code (from 0 to 7)            *
    *                                  0 = background color         *
    *                                  1 = blue                     *
    *                                  2 = gray                     *
    *                                  3 = yellow                   *
    *                                  4 = blue/gray                *
    *                                  5 = green                    *
    *                                  6 = red                      *
    *                                  7 = orange                   *
    *              - 3rd char = intensified (0=off, 1=on)           *
    *              - 4th char = inverse display (0=off, 1=on)       *
    * Colour overwriting priority :                                 *
    *   1. Line                                                     *
    *   2. Cell                                                     *
    *   3. Column                                                   *
      DATA : w_position TYPE i VALUE '1'.
      CLEAR wa_fieldcat.
      MOVE w_position TO wa_fieldcat-col_pos.
      MOVE 'MATNR'    TO wa_fieldcat-fieldname.
      MOVE 'MARA'     TO wa_fieldcat-ref_table.
      MOVE 'MATNR'    TO wa_fieldcat-ref_field.
      APPEND wa_fieldcat TO it_fieldcat.
      ADD 1 TO w_position.
      CLEAR wa_fieldcat.
      MOVE w_position TO wa_fieldcat-col_pos.
      MOVE 'MATKL'    TO wa_fieldcat-fieldname.
      MOVE 'MARA'     TO wa_fieldcat-ref_table.
      MOVE 'MATKL'    TO wa_fieldcat-ref_field.
    * Color column
      IF p_column = 'X'.
        MOVE 'C610'     TO wa_fieldcat-emphasize.
      ENDIF.
      APPEND wa_fieldcat TO it_fieldcat.
      ADD 1 TO w_position.
      CLEAR wa_fieldcat.
      MOVE w_position TO wa_fieldcat-col_pos.
      MOVE 'COUNTER'  TO wa_fieldcat-fieldname.
      MOVE 'N'        TO wa_fieldcat-inttype.
      MOVE '4'        TO wa_fieldcat-intlen.
      MOVE 'Counter'  TO wa_fieldcat-coltext.
      APPEND wa_fieldcat TO it_fieldcat.
      ADD 1 TO w_position.
      CLEAR wa_fieldcat.
      MOVE w_position  TO wa_fieldcat-col_pos.
      MOVE 'FREE_TEXT' TO wa_fieldcat-fieldname.
      MOVE 'C'         TO wa_fieldcat-inttype.
      MOVE '20'        TO wa_fieldcat-intlen.
      MOVE 'Text'      TO wa_fieldcat-coltext.
      APPEND wa_fieldcat TO it_fieldcat.
    ENDFORM.                    " fill_catalog
    *&      Form  fill_layout
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM fill_layout.
    * Field that identify color line in internal table
      MOVE 'COLOR_LINE' TO is_layout-info_fname.
    * Field that identify cell color in inetrnal table
      MOVE 'COLOR_CELL' TO is_layout-ctab_fname.
    ENDFORM.                    " fill_layout

  • Refresh cl_salv_table= factory attached to a Docking Container

    Hi Gurus!!
    I have a issue with a cl_salv_table=>factory attached to a Docking Container.
    Here is my code set up, which might be wrong actually:
    I've created a simple report, with a TOP and some include for PBO, PAI and routines. In the Report, I call a Screen, here 2000.
    The TOP contains
    DATA: docking_container     TYPE REF TO cl_gui_docking_container,
          gc_table_alv          TYPE REF TO cl_salv_table.
    The Screen Flow is basic:
    PROCESS BEFORE OUTPUT.
      MODULE status_2000.
    PROCESS AFTER INPUT.
      MODULE user_command_2000.
    With status_2000:
    MODULE status_2000 OUTPUT.
      SET PF-STATUS 'STATUS'.
    *  SET TITLEBAR 'xxx'.
    * Initialization of docking container
      IF docking_container IS INITIAL.
        CREATE OBJECT docking_container
          EXPORTING
            side   = cl_gui_docking_container=>dock_at_bottom
          EXCEPTIONS
            OTHERS = 1.
        IF sy-subrc <> 0. MESSAGE a500. ENDIF.
        CALL METHOD docking_container->set_height
          EXPORTING
            height = 170.
      ENDIF.
    ENDMODULE.                 " STATUS_2000  OUTPUT
    Then the Screen PAI looks dumb, but in this example, I have drastically made the code simpler

    I think you are not releasing proxy object with method FREE of docking container.
    Check the below code. It first displays SFLIGHT table, then after another dialog step is concluded, it shows SPFLI table.
    DATA: r_dock_container TYPE REF TO cl_gui_docking_container,
          r_salv_table     TYPE REF TO cl_salv_table.
    DATA: it_sflight TYPE sflight OCCURS 0,
          it_spfli   TYPE spfli   OCCURS 0.
    DATA: count TYPE i.
    START-OF-SELECTION.
      SELECT * FROM sflight INTO TABLE it_sflight UP TO 10 ROWS.
      SELECT * FROM spfli INTO TABLE it_spfli UP TO 10 ROWS.
      CALL SCREEN 0200.
    MODULE pbo OUTPUT.
      SET PF-STATUS space.
      IF count IS INITIAL.
        CREATE OBJECT r_dock_container
          EXPORTING
            side   = cl_gui_docking_container=>dock_at_bottom
          EXCEPTIONS
            OTHERS = 1.
        CALL METHOD r_dock_container->set_height
          EXPORTING
            height = 170.
        CALL METHOD cl_salv_table=>factory
          EXPORTING
            r_container  = r_dock_container
          IMPORTING
            r_salv_table = r_salv_table
          CHANGING
            t_table      = it_sflight.
    *  ALV Display
        r_salv_table->display( ).
      ELSE.
        r_dock_container->free( ).   "this is crucial to release proxy object of docking container
        CLEAR r_dock_container.   "and clear a reference variable (with these two statements your control will disapear from screen)
        "now you can create a new one and bound a new ALV to it
        CREATE OBJECT r_dock_container
           EXPORTING
             side   = cl_gui_docking_container=>dock_at_bottom
           EXCEPTIONS
             OTHERS = 1.
        CALL METHOD r_dock_container->set_height
          EXPORTING
            height = 170.
        CALL METHOD cl_salv_table=>factory
          EXPORTING
            r_container  = r_dock_container
          IMPORTING
            r_salv_table = r_salv_table
          CHANGING
            t_table      = it_spfli.
    *  ALV Display
        r_salv_table->display( ).
      ENDIF.
      ADD 1 TO count .
    ENDMODULE.                  
    Of course you have to adjust it with your tables and data, but this works fine
    Regards
    Marcin
    Edited by: Marcin Pciak on Jun 16, 2009 12:57 PM

  • Docking container

    Hello,
    Could you please tell me what is wrong either in the code below or in my logic:
      DATA: d_container TYPE REF TO cl_gui_docking_container,
            e_control TYPE REF TO cl_gui_abapedit.
      CALL SCREEN 200.
      CREATE OBJECT d_container
        EXPORTING
    *      repid                       = sy-cprog
    *      dynnr                       = sy-dynnr
          side                        = cl_gui_docking_container=>dock_at_left.
      check sy-subrc = 0.
      CREATE OBJECT e_control
        EXPORTING
          parent = d_container.
    Logic
    - create empty screen 0200
    - create docking container docking it to the left part of screen
    - embedding abap editor control to this docking container
    My question is: why when running program I don't see anything, as the docking container with the control inside wouldn't be there?
    Thank you for help in advance.
    Marcin

    Hi Jonathan,
    The problem was obvious. The code simply should be included in PBO module of the screen.
    There is no need to pass neither sy-repid nor sy-dynnr unless it displayed in other screen/program.
    Gr8 thanks for your help:)
    Regards,
    Marcin

  • How to disable the sizing option in docking container

    Hi experts,
    I have created a grid in a docking container ( cl_gui_docking_container ) which will appear on the selection screen, docking at the bottom. The requirement is to disable the resizing functionality of the grid when I use the sizing arrow with the mouse on dragging. Ideally I am able to expand the grid vertically covering the selection parameters. This option has to be disabled. Please suggest any options for the same.

    CREATE OBJECT r_dock_container
        EXPORTING
       side                        = cl_gui_docking_container=>dock_at_right
          extension                   = 780
          caption                     = 'Materials'
        EXCEPTIONS
          cntl_error                  = 1
          cntl_system_error           = 2
          create_error                = 3
          lifetime_error              = 4
          lifetime_dynpro_dynpro_link = 5
          OTHERS                      = 6.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF
    I think extension my help..  

Maybe you are looking for

  • How can you subset a backup?

    I gave my daughter my iPod (32Gb). She bought an AT&T iPhone (8Gb). She had her entire music library on the iPod (22Gb). She wanted to move the content of the iPod to the iPhone but of course she was 14Gb in excess of it's capacity. She wasn't distre

  • Why am I getting an ArrayOutOfBounds?

    hi, here is my code, and its giving me that error at runtime..      String[] icons = new String[100];      //A bunch of icons are added to the Array      icons[0] = "\\JavaAss2\\icons\\disk_3D_label.gif";      icons[1] = "\\JavaAss2\\icons\\dog.gif";

  • Difference for method stack size in release and debug builds

    Hi, I have a question regarding the method stack size. Running my project in the debug version works fine. Running the same project as release causes a StackOverflowError (60 entries). Is there any difference in the allowed stack size? If I split the

  • How to view creation date using 'ls' command?

    Hi all, Anyone know how to get the 'ls' command to display creation date? When I do 'ls -la' I get the mod date, but cannot figure out how to view the creation date. Thanks!   Mac OS X (10.4.2)  

  • Photoshop CS_6 Mac Stopped Working

    Suddenly Photoshop CS_6 for Mac has stopped working. Not a trial copy but licensed. When I uninstall and reinstall I get a Configuration error 16.