Visible / invisible of custom container in screen

hi all,
i have one custom container on my SUB SCREEN (named "CONT")
In MAIN SCREEN i have one push button and the above SUBSCREEN is there.
On pushing button, i want to hide or show the SUBSCREEN,
if SUBSCREEN contains IO Fields or Table control etc. then we can easily do that, but how to do the same in case of custom container??
please guide me...
Thanks in advance

Hi Jignesh,
We have got a method FREE in CL_GUI_CUSTOM_CONTAINER with that we can clear the content of the container
CALL SCREEN 200.
SET PF-STATUS 'ZSUB1'.
  IF L_FLAG NE 'X'.
    CREATE OBJECT MY_CONTAINER
      EXPORTING
        CONTAINER_NAME              = 'CCSUB'
       EXCEPTIONS
        CNTL_ERROR                  = 1
        CNTL_SYSTEM_ERROR           = 2
        CREATE_ERROR                = 3
        LIFETIME_ERROR              = 4
        LIFETIME_DYNPRO_DYNPRO_LINK = 5
        OTHERS                      = 6.
SELECT * FROM EKKO INTO TABLE GT_EKKO
             UP TO 10 ROWS.
    CREATE OBJECT ALV
      EXPORTING
        I_PARENT          = MY_CONTAINER
       EXCEPTIONS
        ERROR_CNTL_CREATE = 1
        ERROR_CNTL_INIT   = 2
        ERROR_CNTL_LINK   = 3
        ERROR_DP_CREATE   = 4
        OTHERS            = 5.
CALL METHOD ALV->SET_TABLE_FOR_FIRST_DISPLAY
      EXPORTING
        I_STRUCTURE_NAME              = 'EKKO'
      CHANGING
        IT_OUTTAB                     = GT_EKKO
      EXCEPTIONS
        INVALID_PARAMETER_COMBINATION = 1
        PROGRAM_ERROR                 = 2
        TOO_MANY_LINES                = 3
        OTHERS                        = 4.
  ENDIF.
MODULE USER_COMMAND_0200 INPUT.
  CASE SY-UCOMM.
    WHEN 'PUSH'.
      IF L_FLAG = 'X'.
        CLEAR L_FLAG.
      ELSE.
        CALL METHOD MY_CONTAINER->FREE.
        L_FLAG = 'X'.
      ENDIF.
    WHEN 'BACK'.
      LEAVE PROGRAM.
  ENDCASE.
ENDMODULE.       
Regards
Kumar M

Similar Messages

  • Customer Control in screen painter in Module pool - work like container?

    Customer Control option in screen painter in Module pool - work like container?
    is it true? How?
    Is like any work area or what?
    what is the excat use of that option?
    regards.

    Hello,
    In screen painter ,custom control is used to define the control area on the screen.Just click on that and make your own container area.When you create an ALV grid or TEXT EDITOR or any other control,it will get attached to the screen in that area through the custom container.
    Name the container area as say '<b>CONTAINER</b>'.(in capitals.)
    When you actually create the custom conatiner programatically,you should give the container area name.ie.
    Data : cont type ref to cl_gui_custom_container.
    Create object cont
    exporting
    parent = '<b>CONTAINER</b>'.
    Now,this container that you created-cont is attached to the screen in the area defined by CONTAINER.
    Regards,
    Beejal
    **Reward if this helps

  • Displaying ALV output in whole screen when using with custom container

    I have created a custom container and displaying output of a table in the ALV format using call method grid->set_table_for_first_display. But the output does not display in the entire screen. I want the output to cover the whole screen depending on user screen resolution. The code is given below for reference.
    create object grid
        exporting
        i_parent = g_custom_container.
        call method grid->set_table_for_first_display
          exporting
            IS_VARIANT = ld_variant
            I_SAVE    = 'A'
            is_layout = layout_alv_grid
          changing
            it_outtab                     = final_display_itab
            it_fieldcatalog               = itab_fieldcatalog

    Hello,
    DATA: go_splitter        TYPE REF TO cl_gui_splitter_container,
              go_container     TYPE REF TO cl_gui_container,
              go_grid             TYPE REF TO cl_gui_alv_grid.
        CREATE OBJECT go_splitter
             EXPORTING
               parent    = cl_gui_container=>default_screen
               rows       = 1
               columns  = 1
               metric     = '0001'.
        go_container = go_splitter->get_container( row = 1 column = 1 ).
        CREATE OBJECT go_grid
             EXPORTING
             i_parent = go_container.
    Regards,
    Ernst

  • Make a Transparent container visible invisible

    helllo all,
    how can I make a Transparent container visible invisible depending to an attribute,
    can anyone lead me to resolve this ?
    thank you all?

    Hi,
    Create a attribute ( LV_VISIBLE ) type of boolean in context, then bind that attribute in the properties of the TC
    TC->properties->visble property, bind the attribute in visible property of the TC.
    Then when u want to visible that inside of on action write below code.
    Declare a node :data:  n_node type ref to if_wd_context_node.
    then node assign to that created ( LV_CISIBLE )attribute nade ( E/G : ln_node = wd_context->get_child_node( name = ' node' ) )
    ln_node->set_attribute( exporting name = `LV_VISIBLE` value = abap_true ). "for visible of the TC.
    ln_node->set_attribute( exporting name = `LV_VISIBLE` value = abap_false ). "for invisible of the TC.
    Regards
    Srini.

  • HTML BANNER in screen custom container..

    Can someone please give me simple example code or steps to add an HTML banner into a custom container??

    check this class CL_DD_DOCUMENT.
    and Prorams DD_STYLE_TABLE.
    check this blog..
    TOP_OF_PAGE in ALV  Using CL_GUI_ALV_GRID

  • Make region/Task-Flow visible/invisible inside the page created in composer mode.

    Environent_
    JDeveloper 11.1.1.6.0
    Webcenter Sites version : 11g R1.
    Problem statement_
    Below example is to demonstrate the usecase to make region visible/invisible inside the page created in composer mode.
    The problem with this case is the 'Show Component' property does not automatically evaluate its expression even after using the contextual event.
    We want the region to be refreshed at run-time just like it works with design time pages using Refresh, RefreshCondition attributes in pageDef.
    My Usecase_
    I have two task flows dragged in Webcenter Customized Page.
    First contains Employee list and Second  contains selected employee's manager name.
    By default when page loads second task-flow/Dragged-Box  should be hidden.
    When I select employee from first box, then immediately second box should be appeared with manager name.
    In the case when If Employee does not have manager, second box should be disappeared. Whole page should not be refreshed only the second box should be refreshed and hide.
    Regards,
    Niraj

    Hi Jiri,
    Thanks for your prompt reply..
    While referencing the taskflow in any page will create a region and makes entry in pageDef for that page.
    In the PageDef of that page I am using Refresh and RefreshCondition attributes of the taskflow tag in order to refresh the taskflow based on certain condition or parameter change.
    I want to achieve the same in run-time environment using composer mode. where I have the control over page but do not have pageDef (visually where I can go and add the attributes Refresh and RefreshCondition manually)
    I would be obliged if someone can help on this.
    Thanks
    Regards,
    Niraj

  • Could Customer container be used in BDC input?

    Could Customer container be used in BDC input?
    Since I am not able to connect sap right now, so put in here.  Every advice will be appreicated.

    Thanks Rav for your quick reply.
    We are working on one customized-infotype in SAP-HR, and container is created in this infotype for maitain text document. Then later, key-user  will use BDC to maitain this infotype in PA30.
    So Could you please adivce further which or which kind BAPI could be used here?
    we use below code to create container in screen.
        CREATE OBJECT container
            EXPORTING
                container_name = 'CUSTOM'
            EXCEPTIONS
                OTHERS = 1.
        CASE sy-subrc.
          WHEN 0.
        ENDCASE.
        CALL METHOD container->set_visible
          EXPORTING
            visible = 'X'.

  • Refresh Editable ALV Grid inside a custom Container

    Hello all,
    I am having a screen with custom container in which i am populating datas and a entry screen which is going to have my
    filtering condition for this custom container screen..
    The problem i am facing is whenever i come out of the custom container screen after displaying and again give the
    necessary filtering data in the previous screen...
    the custom container screen displays wrong values...
    But when i refresh the data with the refresh icon in the container right datas are coming...
    I even used CALL METHOD C_ALVGD->REFRESH_TABLE_DISPLAY
    EXPORTING
    IS_STABLE = STABLE
    EXCEPTIONS
    FINISHED = 1
    OTHERS = 2. after displaying the values using
    CALL METHOD C_ALVGD->SET_TABLE_FOR_FIRST_DISPLAY
    EXPORTING
    IT_TOOLBAR_EXCLUDING = T_FUNC
    IS_LAYOUT = IT_LAYOUT
    I_SAVE = 'A'
    CHANGING
    IT_OUTTAB = IT_ZCAWNT_V
    IT_FIELDCATALOG = IT_FCAT
    EXCEPTIONS
    INVALID_PARAMETER_COMBINATION = 1
    PROGRAM_ERROR = 2
    TOO_MANY_LINES = 3
    OTHERS = 4.
    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 have refreshed my internal table once when i display and again fetched from the DB according to the filtering conditions given
    in the first screen.
    I have tried clearing the Object created once when i display and again recreated it.But could not get the output.
    solution would be really helpful...

    Hey all,
    Thanks a lot for helping me...
    The problem is solved....
    i just used,
            CALL METHOD C_ALVGD->FREE. 'Grid inside the container
            CLEAR C_ALVGD.
            CALL METHOD C_CCONT->FREE. "Container
            CLEAR C_CCONT.
    when i click BACK Button from screen 2 to screen1.

  • In R/3 display smartform as pdf in a custom container

    Hello,
    I want to display smartform as pdf in a custom contianer . I was able to find all the right code from sdn.
    but my problem is that when executed my sap gui is closed without any error.
    I am unable to understand what is going wrong.
      CALL METHOD G_HTML_CONTROL->SHOW_URL( URL = LV_URL
        IN_PLACE = 'X' ).  does not show the pdf.
    Can any one help me to find out if we need to do some setting for MIME type application/pdf. Because I tried to display a bar chart in the custom container of MIME type text/html , and this is working fine.
    Is any setting missing in our R/3 because of which the code is not getting executed.
    below code is the exact copy from a post in sdn:
    report ztest_pdf.
    DATA: LT_PDF TYPE TABLE OF TLINE,
          LS_PDF LIKE LINE OF LT_PDF,
          LV_URL TYPE CHAR255,
          PDF_FSIZE TYPE  I,
          LV_CONTENT  TYPE XSTRING,
          LT_DATA TYPE STANDARD TABLE OF X255.
    DATA : L_JOB_OUTPUT_INFO TYPE SSFCRESCL.
    DATA : LS_CONTROL_PARAM  TYPE SSFCTRLOP.
    DATA : G_HTML_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
           G_HTML_CONTROL   TYPE REF TO CL_GUI_HTML_VIEWER.
    *      pdf_control type ref to cl_gui_pdfviewer.
    DATA : P_VBELN TYPE  VBELN_VL.
    DATA : i_html TYPE w3htmltabtype.
    ",       g_url  TYPE w3url
    FIELD-SYMBOLS <FS_X> TYPE X.
    INITIALIZATION.
    LS_CONTROL_PARAM-GETOTF = 'X'.
    LS_CONTROL_PARAM-NO_DIALOG = 'X'.
    START-OF-SELECTION.
      CALL FUNCTION '/1BCDWB/SF00000298'
    EXPORTING
    *    ARCHIVE_INDEX              =
    *   ARCHIVE_INDEX_TAB          =
    *   ARCHIVE_PARAMETERS         =
         CONTROL_PARAMETERS         = LS_CONTROL_PARAM
    *     P_VBELN                    = P_VBELN
    *   MAIL_APPL_OBJ              =
    *   MAIL_RECIPIENT             =
    *   MAIL_SENDER                =
    *   OUTPUT_OPTIONS             =
    *   USER_SETTINGS              = 'X'
    IMPORTING
    *      DOCUMENT_OUTPUT_INFO  = L_DOCUMENT_OUTPUT_INFO
           JOB_OUTPUT_INFO       = L_JOB_OUTPUT_INFO
    *      JOB_OUTPUT_OPTIONS    = L_JOB_ OUTPUT_OPTIONS
    EXCEPTIONS
        FORMATTING_ERROR           = 1
        INTERNAL_ERROR             = 2
        SEND_ERROR                 = 3
        USER_CANCELED              = 4
        OTHERS                     = 5
      IF SY-SUBRC <>  0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    data pdfxstring type xstring.
      CALL FUNCTION 'CONVERT_OTF'
        EXPORTING
          FORMAT                = 'PDF'
        IMPORTING
          BIN_FILESIZE          = PDF_FSIZE
          bin_file              = pdfxstring
        TABLES
          OTF                   = L_JOB_OUTPUT_INFO-OTFDATA
          LINES                 = LT_PDF
        EXCEPTIONS
          ERR_MAX_LINEWIDTH     = 1
          ERR_FORMAT            = 2
          ERR_CONV_NOT_POSSIBLE = 3
          OTHERS                = 4.
      CALL SCREEN 100.
    module STATUS_0100 output.
    *  SET PF-STATUS 'xxxxxxxx'.
    *  SET TITLEBAR 'xxx'.
      CREATE OBJECT G_HTML_CONTAINER
        EXPORTING
          CONTAINER_NAME = 'PDF'.
    CREATE OBJECT G_HTML_CONTROL
        EXPORTING
          PARENT = G_HTML_CONTAINER.
    * Convert xstring to binary table to pass to the LOAD_DATA method
      CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
        EXPORTING
          BUFFER     = pdfxstring"LV_CONTENT
        TABLES
          BINARY_TAB = LT_DATA.
    * PERFORM bar_chart .
    * Load the HTML
      CALL METHOD G_HTML_CONTROL->LOAD_DATA(
         EXPORTING
           TYPE         = 'application' "'text' " 'application'
           SUBTYPE      = 'pdf' "'html'  "'pdf'
         IMPORTING
           ASSIGNED_URL         = lv_URL
         CHANGING
           DATA_TABLE           =  LT_DATA "i_html "LT_DATA
         EXCEPTIONS
           DP_INVALID_PARAMETER = 1
           DP_ERROR_GENERAL     = 2
           CNTL_ERROR           = 3
           OTHERS               = 4 ).
    * Show it
      CALL METHOD G_HTML_CONTROL->SHOW_URL( URL = LV_URL
        IN_PLACE = 'X' ).
    Thanks,
    Jaya.
    Edited by: kishan P on Jun 9, 2011 1:40 PM

    Hello Sandra,
    Thanks for your reply, but eventhen it fails to load the pdf. Is ADS required to be installed for this?
    Can I just pass the pdf_fsize imported from  CONVERT_OTF which is of type i.
      CALL FUNCTION 'CONVERT_OTF'
        EXPORTING
          FORMAT                = 'PDF'
        IMPORTING
          BIN_FILESIZE          = PDF_FSIZE    
    bin_file              = pdfxstring
        TABLES
          OTF                   = L_JOB_OUTPUT_INFO-OTFDATA
          LINES                 = LT_PDF
        EXCEPTIONS
          ERR_MAX_LINEWIDTH     = 1
          ERR_FORMAT            = 2
          ERR_CONV_NOT_POSSIBLE = 3
          OTHERS                = 4.
      CALL METHOD G_HTML_CONTROL->LOAD_DATA(
         EXPORTING
           TYPE         = 'application' "'text' " 'application'
           SUBTYPE      = 'pdf' "'html'  "'pdf'
           size           = PDF_FSIZE
         IMPORTING
           ASSIGNED_URL         = lv_URL
         CHANGING
           DATA_TABLE           =  LT_DATA "i_html "LT_DATA
         EXCEPTIONS
           DP_INVALID_PARAMETER = 1
           DP_ERROR_GENERAL     = 2
           CNTL_ERROR           = 3
           OTHERS               = 4 ).
    Thanks,
    Jaya.

  • Problem with Custom container - cl_gui_custom_container/cl_gui_alv_grid

    Hi,
    I want to reuse the same custom container screen for a different data.
    First screen there will be button 1 and button 2
    if I click button 1 then calculate and display data  in custom container, if button 2 is clicked then calculate and display data with  in the same custom container.
    For this
    1. Created Custom container - CONTAINER
    2. In program defined and created custom container and custom alv grid
    g_custom_container TYPE REF TO cl_gui_custom_container,
            alv_grid                     TYPE REF TO cl_gui_alv_grid.
           IF g_custom_container IS INITIAL.
                CREATE OBJECT g_custom_container
                    EXPORTING
                  container_name = 'CONTAINER'.
                CREATE OBJECT alv_grid
                   EXPORTING
                    i_parent = g_custom_container.
          ENDIF.
    3. Display data using CALL METHOD alv_grid->set_table_for_first_display
       every thing works great for button 1
    4. when button 2 is clicked then calculate and display different set of data in same custom container which is used earlier.
    5. here I used
    call method alv_grid->free.
        call method g_custom_container->free.
    6. create above objects once again and tried to use
    call method alv_grid->set_table_for_first_display
    , to reuse the same custom container 'CONTAINER' again for a different set of data and getting ABAP dump.
    In debug mode, when I used the above method FREE for both ALV_GRID and G_CUSTOM_CONTAINER objects are not clearing.
    Please let me know how can I reuse the same container for a different set of data when button2 is pressed.
    Thanks in advance,
    Krishna
    Please use code tags to format your code and post in the correct forum
    Edited by: Rob Burbank on Oct 1, 2010 2:37 PM

    Hello Krishna
    I would recommend to use a different approach instead of trying to initialize your container instances:
    DATA:
      go_container_1 TYPE REF TO cl_gui_custom_container,
      go_container_2 TYPE REF TO cl_gui_custom_container,
      go_grid_1          TYPE REF TO cl_gui_alv_grid,
      go_grid_2          TYPE REF TO cl_gui_alv_grid.
    " NOTE: Do this coding BEFORE calling the screen
    * (1) Create 2 containers
    CREATE OBJECT g_container_1
                    EXPORTING
                  container_name = 'CONTAINER'.
    CREATE OBJECT g_container_2
                    EXPORTING
                  container_name = 'CONTAINER'.
    " NOTE: If it is not possible to use the same container name then either create an additional
    "            dummy screen having a second CUSTOM_CONTROL element or replace
    " the customer containers with docking containers -> here you do not need to give a container name
    * (2) Create 2 grid instances using a different container
    * (3) Link the first container to the screen using its LINK method:
      CALL METHOD go_container_1
        EXPORTING
           repid = <...>
          dynnr = <...>.
    * (4) Perhaps you need to define a second dummy screen to which you link the second container
    * (5) Display first grid instance (as default)
    Now when the user pushes button 2 (to display the second grid) link container_1 to the dummy screen
    and link container_2 to your main screen.
    Regards
      Uwe

  • Dont want see default buttons on custom container ?

    Hi Rich,
    Thanks for your solution, but i dont want to see the icons which are showing bydefault on top of the container...
    Is it possible to avoid...
    Can you please let me know.
    regards
    jaya

    Hi Rich,
    Thanks for your solution, but i dont want to see the icons which are showing bydefault on top of the container...
    Is it possible to avoid...
    Can you please let me know.
    regards
    jaya
    Hi, you can do this using a custom container instead of the docking container. If you have a screen, go into screen painter and create a custom control in that screen, then in the PBO, you can reuse that coding and just use the custom container instead of the docking. Make sure to name the custom container in the screen as 'TE_CONTAINER'. This is what I've referenced in the code below.
    data: cc_container type ref to cl_gui_custom_container.
    create object cc_container
             EXPORTING
                   CONTAINER_NAME    = 'TE_CONTAINER'.
    create object text_editor
    exporting
    parent = cc_container.
    xtext = 'http:
    www.sap.com'.
    append xtext to itext.
    call method text_editor->set_text_as_r3table
    exporting
    table = itext
    exceptions
    others = 1.
    Regards,
    Rich Heilman

  • Help Regarding a Picture Display in Customer Container.

    Hi,
    I am generating a ALV report output with an ICON in every  line to show the corresponding picture of the material in a Pop-up window.
    Now for displaying the picture at usercommand from ALV ,
    HTML browser is placed on the custom container screen and the URL is passed to the variable EDURL which helps in processing the material picture on the screen.
    The issues that  in this process is.. Picture pop-up currently shows briefly the previous picture before retrieving requested image .
    Please help me to solve this,
    Thanks
    Priyanka.

    Hi,
    While calling the pop up clear, refresh  all the variables and pass the new values.
    I guess when you are calling the Image for first time you are not getting any delay or previous image.
    So basically see the variables when calling for the first time and implement for the rest of times also.
    BR
    Dep

  • Need for Custom Container

    Hi all,
    I have read that you use Custom container class for oops alv. But i have not found an answer as to  why do we have to use the class.
    Can't we just use ALV class only (Cl_gui_alv_grid) ?.
    Regards
    Varun

    You can only create a grid display in a container...while creating the object for grid contol you have to pass the object reference of the custom container...check out the following for details...
    *& Report  ZTEST_DEMO_ALV
    report  ztest_demo_alv.
    class cl_event_reciever definition deferred.
    data:
    wa_vbak type vbak.
    data:
    i_vbak type standard table of vbak,
    i_vbap type standard table of vbap.
    data:
    v_container1 type scrfname value 'CONT1',
    v_grid1      type ref to cl_gui_alv_grid,
    v_custom_container1 type ref to cl_gui_custom_container,
    v_container2 type scrfname value 'CONT2',
    v_grid2      type ref to cl_gui_alv_grid,
    v_custom_container2 type ref to cl_gui_custom_container,
    ok_code type syucomm,
    v_event_reciever type ref to cl_event_reciever.
    *       CLASS cl_event_reciever DEFINITION
    class cl_event_reciever definition.
      public section.
        methods:
          handle_double_click for event double_click of cl_gui_alv_grid
            importing e_row e_column.
    endclass.                    "cl_event_reciever DEFINITION
    *       CLASS cl_event_reciever IMPLEMENTATION
    class cl_event_reciever implementation.
      method handle_double_click.
        read table i_vbak
        into wa_vbak
        index e_row.
        if sy-subrc = 0.
          select * from vbap
            into table i_vbap
            where vbeln = wa_vbak-vbeln.
          if sy-subrc = 0.
            set screen 00.
            leave to screen 100.
          endif.
        endif.
      endmethod.                    "handle_double_click
    endclass.                    "cl_event_reciever IMPLEMENTATION
    select-options:
    s_vbeln for  wa_vbak-vbeln.
    start-of-selection.
      select * from  vbak
        into table i_vbak
        up to 50 rows
        where vbeln in s_vbeln.
      if sy-subrc <> 0.
        message i000(z_zzz_ca_messages)  with 'No data found!'.
        leave list-processing.
      endif.
    end-of-selection.
      call screen 100.
    *&      Module  STATUS_0100  OUTPUT
    *       text
    module status_0100 output.
      set pf-status '100'.
    *  SET TITLEBAR 'xxx'.
      if v_custom_container1 is not bound.
        create object v_custom_container1
        exporting container_name = v_container1.
        create object v_grid1
          exporting i_parent = v_custom_container1.
        call method v_grid1->set_table_for_first_display
           exporting
    *       i_buffer_active               =
    *       i_bypassing_buffer            =
    *       i_consistency_check           =
             i_structure_name              = 'VBAK'
    *       is_variant                    =
    *       i_save                        =
    *       i_default                     = 'X'
    *       is_layout                     =
    *       is_print                      =
    *       it_special_groups             =
    *       it_toolbar_excluding          =
    *       it_hyperlink                  =
    *       it_alv_graphics               =
    *       it_except_qinfo               =
    *       ir_salv_adapter               =
          changing
            it_outtab                     = i_vbak
    *       it_fieldcatalog               =
    *       it_sort                       =
    *       it_filter                     =
          exceptions
            invalid_parameter_combination = 1
            program_error                 = 2
            too_many_lines                = 3
            others                        = 4
        if sy-subrc <> 0.
          message id sy-msgid type sy-msgty number sy-msgno
                     with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        endif.
        create object v_event_reciever.
        set handler v_event_reciever->handle_double_click for v_grid1.
      endif.
      if v_custom_container2 is not bound
        and i_vbap is not initial.
        create object v_custom_container2
        exporting container_name = v_container2.
        create object v_grid2
          exporting i_parent = v_custom_container2.
        call method v_grid2->set_table_for_first_display
           exporting
    *       i_buffer_active               =
    *       i_bypassing_buffer            =
    *       i_consistency_check           =
             i_structure_name              = 'VBAP'
    *       is_variant                    =
    *       i_save                        =
    *       i_default                     = 'X'
    *       is_layout                     =
    *       is_print                      =
    *       it_special_groups             =
    *       it_toolbar_excluding          =
    *       it_hyperlink                  =
    *       it_alv_graphics               =
    *       it_except_qinfo               =
    *       ir_salv_adapter               =
          changing
            it_outtab                     = i_vbap
    *       it_fieldcatalog               =
    *       it_sort                       =
    *       it_filter                     =
          exceptions
            invalid_parameter_combination = 1
            program_error                 = 2
            too_many_lines                = 3
            others                        = 4
      endif.
      if v_custom_container2 is bound.
        call method v_grid2->refresh_table_display.
      endif.
    endmodule.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    module user_command_0100 input.
      case ok_code.
        when 'BACK'.
          if v_grid1 is bound.
            call method v_grid1->free.
          endif.
          if v_grid2 is bound.
            call method v_grid2->free.
          endif.
          set screen 00.
          leave screen.
      endcase.
    endmodule.                 " USER_COMMAND_0100  INPUT

  • How to have header for CL_SALV_TABLE displayed in custom container?

    Hello ABAP Objects Community,  I am trying to write report using CL_SALV_TABLE and using a screen created in SE51 with a custom container control in which to put ALV grid.  However, when I try to put a header on the table, it does not display.
    In reading the SAP help for "Display List Header and Footer", there is a grid that shows under what conditions the SET_TOP_OF_LIST can be used.  eg- Classic ABAP List, FullScreen, InTheContainer.  And for InTheContainer it is showing "No".
    I found the demo program  SALV_DEMO_TABLE_SELECTIONS.  Look at form d0100_pbo.  This is what I am trying to do, except that I want it to have headers/footers.
    If it is not possible to have headers/footers when using CL_SALV_TABLE in a container, what would be the coding technique for achieving this?
    Best Regards,
    Dean Atteberry.
    Edited by: Dean Atteberry on Jul 27, 2009 11:01 PM
    Edited by: Dean Atteberry on Jul 27, 2009 11:03 PM
    Edited by: Dean Atteberry on Jul 27, 2009 11:03 PM

    Thank you, Marcin, for your reply. 
    I implemented Namish Patel's  code for exercises #1 (basic program) and #5 (header/footer) in abap and ran same.  It created alv grid with headers/footers.  However, upon looking at his factory statement, it is using the (default) "fullscreen" display type.  I am needing to put the alv grid in a container created on a screen in SE51, so am having to use the EXPORTING statement with parameters r_container (points to container object instance) and container_name (literal string name of component).
    I found a description of how to use the ABAP control framework in ERPGenie that shows how to do what I was needing.
    [http://www.erpgenie.com/sap-technical/abap/abap-control-framework]
    Thank you again for responding to my question.
    Dean Atteberry.
    Edited by: Dean Atteberry on Jul 28, 2009 10:09 PM

  • Changing width of a custom container dynamically

    Hi,
    I have an ABAP report that has 2 custom containers on a screen: CC1 on the left, showing a tree and another one (CC2) consuming the rest of the screen. Depending on what node the user selects in the tree (left CC), I would like to dynamically adjust the width of CC1 and CC2.
    Is there a way to do it? I found the method SET_WIDTH of CL_GUI_CUSTOM_CONTAINER (which CC1 and CC2 are instances of), but it does not seem to work.
    Any help is appreciated.
    Guenther

    Here is a coding example that demonstrates dynamically changing the width of the container.
    What you cannot see is the screen definition.  Screen 100 has a single custom container that fills the entire screen and is set to be resizable.  The container name is 'MY_CONTAINER'.  Next screen is set to 0.
    Flow logic of screen:
    PROCESS BEFORE OUTPUT.
      MODULE pbo.
    PROCESS AFTER INPUT.
    Cut and paste this program and define the screen.  Run the program and keep hitting ENTER to see the size change from left to right.  After 9 times, the program will end.
    REPORT  zcdf_docking_example.
    DATA:
      w_sash           TYPE sy-index,
      r_cstm_ctnr      TYPE REF TO cl_gui_custom_container,
      r_easy_splt_ctnr TYPE REF TO cl_gui_easy_splitter_container.
    CLASS cl_gui_easy_splitter_container DEFINITION LOAD.
    DO 9 TIMES.
      w_sash = sy-index * 10.
      CALL SCREEN 100.
    ENDDO.
    MODULE pbo OUTPUT.
      IF r_cstm_ctnr IS INITIAL.
        CREATE OBJECT r_cstm_ctnr
             EXPORTING container_name = 'MY_CONTAINER'.
        CREATE OBJECT r_easy_splt_ctnr
               EXPORTING
                 parent = r_cstm_ctnr
                 orientation =
                   cl_gui_easy_splitter_container=>orientation_horizontal.
    *   Set starting sash position.  Position is a percentage.
        CALL METHOD r_easy_splt_ctnr->set_sash_position
               EXPORTING
                 sash_position = w_sash.
    *   Put ALV in left container.
    *    CREATE OBJECT r_alv_grid1
    *           EXPORTING
    *             i_parent = r_easy_splt_ctnr->top_left_container.
    *   Put ALV in right container.
    *    CREATE OBJECT r_alv_grid2
    *           EXPORTING
    *             i_parent = r_easy_splt_ctnr->bottom_right_container.
      ELSE.
        CALL METHOD r_easy_splt_ctnr->set_sash_position
               EXPORTING
                 sash_position = w_sash.
      ENDIF.
    ENDMODULE.                 " pbo  OUTPUT
    Let us know how it goes.

Maybe you are looking for

  • URLStream - does not fire IOError on network cable unplugged while downloading!!!

    Hi. I a using the example from the URLStream Class documentation to download files from a web-server to my computer. The problem is that I have unstable connection and sometimes the computer goes offline. Then the download progress stops and none of

  • Not happy with lack of attention to detail...

    Extremely disappointed in Verizon. I upgraded my phone and plan on Friday 2 May, at the end of the transaction I was told I would receive my phone 5 May around 8 pm I inquired on FB where my phone was, after 2.5 hours and several IM back and forth, I

  • CS4 Problems My code doesnt work for ME only

    I have started trying to work with Actionscript 3 to get some knowledge in it before I make the leap to CS5/Flex etcand after wrting some code (a few buttons, a simple web page) when I test the movie.. it appears broke to me (just srcolls through eve

  • Powerbook won't power on---please help!

    Left Powerbook on overnight. This morning couldn't wake it up. Blue light at latch pulsing but nothing would wake it. Also noticed no color at battery charge input where it is usually green or orange, there was no color. Finally took off the battery,

  • WCS & AP: AP name keeps resetting to mac

    Hi,   I just installed an AP in WCS. When I goto the properties of that AP, i am able to change the name just fine but 2-3 minutes later the name resets back to the mac address of the AP. I tried changing the name thru WCS and the Controller. Any ide