Dynamic Headers in ALV Based on Different layouts

Hi Experts,
I Have a requirement in an ALV Report wherein After the report run as the user chooses different layouts from saved ones the ALV header should change accordingly.
I'm using Function modules to write the ALV.
First of all , is it possible? and if yes how?
Thanks,
Sachin Soni

hi rohit ,
thanks for replying but i think ppl have not understood it clearly.
I'm not asking about the variants which the user saves before calling the report but rather the layout which after the report run user creates based on what columns he wishes to see at that moment.
thanks
sachin soni

Similar Messages

  • REUSE ALV - different layouts

    Hi Gurus,
    iam having an ALV report with an ALV display. Form this ALV on click of a button i will navigate to another ALV display.(both ALV's are called within the same program).
    Now my problem is with Layout functionalities:
    If a layout is saved in the first ALV, then if i go to second ALV and go for the Layout selection, all the layouts saved in the first ALV are coming in the second ALV.
    If the user selects a layout of the first alv, obvoiusly, no data will be displayed in the second ALV.
    So is there anywy i can go for fresh set of layout's for the two ALV's separately..
    (as per my knowledge, the layouts are stored based on the Program name in the database, so if i go to layout option in both the ALV,s... so the common alv's are coming in both displays's.)
    the above  issue is causing problems to the user...
    iam passing the below data for the ALV..
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = sy-repid
          i_callback_pf_status_set = pfstatus
          i_callback_user_command  = c_usercomm1
          i_callback_top_of_page   = l_v_top
          i_grid_title             = text-064
          is_layout                = fp_wa_layout
          it_fieldcat              = fp_i_fieldcat1
          i_default                = c_x
          i_save                   = 'A'
        TABLES
          t_outtab                 = fp_i_item1
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 1.
    so can anyone of you give me a suggestion for different layouts for different ALV's.
    one more point: in the selection screen... iam using
    SELECTION-SCREEN ULINE.  
    which is displaying a black line between the select options.
    Now can this color of the black line be changes to grey or white.
    Also can a Line can be drawn between two selection fields without wasting the space between the fields(as there are many fields in the selection). the above command is consuming one row. i dont want to waste that space.. so can anyone give code for the same...
    Thanks & regards..
    Chaitanya..

    Hello,
    U can populate the below fields of the two layouts  variant structures;
    U can find GROUP and HANDLE fields , Just give different names so that u can have different layouts based on u r variants as the above field values distinguish between the alyuts.
    Check this link
    Re: Change layout button in ALV Grids
    Regards
    Edited by: shishupalreddy ramreddy on Jun 26, 2009 3:55 AM

  • Display amount in ALV Grid with different Decimal Places based on Currency

    HI Experts,
    Working with ALV Report i have one Amount field NETWR which is having Length 15 and Decimal Places 2.
    we have two different types of currency's AED and KWD and AED having 2 decimal Places and KWD having 3 decimal places.
    im using FM: REUSE_ALV_GRID_DISPLAY for Display. value storing in Table was like this
    AED---22.56
    KWD---225.65
    i need to display values like AED : 22.56

    HI Experts,
    Working with ALV Report i have one Amount field NETWR which is having Length 15 and Decimal Places 2. we have two different types of currency's AED and KWD and AED having 2 decimal Places and KWD having 3 decimal places.
    im using FM: REUSE_ALV_GRID_DISPLAY for Display. value storing in Table was like this
    AED---22.56
    KWD---225.65 (converting this value to 22.565 using BAPI_CURRENCY_GETDECIMALS according to currency in my Report)
    i need to display values like AED : 22.56
                                             KWD---22.565 but here field is NETWR with 2 decimal.
    Need to Display amount in ALV Grid with different Decimal Places based on Currency
    Regards,
    Dileep Kumar Reddy

  • ALV with different layouts

    Hi,
    I would like to write an ALV GRID reflecting 5 different layouts. I prefer to use function modules. Is it possible and does anyone have sample code.
    EG:
    field1 field2 field3
    field1 field2 field3
    field001 field000
    field001 field000
    field11 field12
    field 13
    field14 field15 field16
    Thanks,
    Leanne

    Hi,
    Sorry I think I have not expressed the issue properly. I need all five lines display everytime.
    Thanks,
    Leanne

  • Multiple headers in alv

    Hi All,
    I have the following requirement, need to display multiple headers in ALV display(not multiple lines in alv header).
    Header1.
    Row1
    Row2
    Row3
    Footer 1.
    Header2.
    Row1
    Row2
    Row3
    Footer 2.
    Header3.
    Row1
    Row2
    Row3
    Footer 3.
    To display this in hierarchal ALV the above given tables does not have header item relationship. To use Blocked ALV the number of blocks are not constant, Sometimes there can be only 2 blocks sometimes there can be 10 blocks and some times even more, there is no cap on Maximum number of blocks.
    I have searched in SDN N google but couldnt found suitable answer. If anyone has solved this type of issue before, can please through some light.
    Thanks in Advance.

    Hi All,
    I'm able to solve the above issue somewhat by using split technique. I want to know how to trigger top of page event in split. I want to trigger top of page event in same container where data is being displayed.
    I have created container on screen and splitted that container into 3 parts, as I need to display data in each container. Now I want to display top of page for each container.
    I have searched over internet and SDN but I'm able to find examples like split the containers into 2 parts and use 1 part for top of page and second part for data display.
    My case is little different. I need to display data in each container with separate header for each container. If the header is only single line I could have used Layout-Title, but the header for each container is multiple lines. So I must use top of page.
    If any body handled such kind of scenario, please provided some inputs.
    Thanks in advance.

  • BrowserLab is showing a different layout than my computer

    I have Firefox 3.6 on my computer, testing the page in BrowserLab is showing a different layout than it shows on my computer.
    I'm wondering now, what is the real look of the web page.
    If you send me an email, I will send you a link.

    12Jutta34,
    BrowserLab produces screenshots based for a resolution of 1024x768.  If your test machine is operating at a different resolution there are likely to be differences.
    Another cause may be content that is dynamically manipulated by javascript, plugins, etc.  In these cases, you might try increasing the delay parameter in BrowserLab and see if that helps.
    If your problem is not related to these, you can send me the info in an email at [email protected] and I can look into why we aren't producing what you expect.
    We appreciate your interest in BrowserLab and value your feedback,
    Matt

  • Dynamical Call of ALV - No data update

    Hi,
    I tried to use use the ALV dynamically. With dynamically I mean that I that I have diffrent data structures, depending what was selected by the user. The first call of the program is always correct. The data is displayed correctly. But when the data structure is changing, the ALV display is not updated.  For a better understanding I post a extract of my coding:
    <b>1. Creation of Container</b>
    CREATE OBJECT g_custom_container
        EXPORTING              
          container_name              = 'PARENT_CONT'
        EXCEPTIONS
          cntl_error                  = 1
          cntl_system_error           = 2
          create_error                = 3
          lifetime_error              = 4
          lifetime_dynpro_dynpro_link = 5.
      IF sy-subrc <> 0.
        ASSERT 1 = 2.
      ENDIF.
    <b>2.Creation of splitter container</b>
      CREATE OBJECT splitter
         EXPORTING
           parent            = g_custom_container
           rows              = 2
           columns           = 2
        EXCEPTIONS
          cntl_error        = 1
          cntl_system_error = 2
          OTHERS            = 3.
      IF sy-subrc <> 0.
        ASSERT 1 = 2.
      ENDIF.
    container_2 = splitter->get_container(
                                row       = 1
                                column    = 2 ).
    <b>3.Dynamic Creation of alv object</b>
      CREATE OBJECT go_grid
        EXPORTING
          i_parent = container_2.
    <b>4. Get Fieldcatalogue</b>
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name       = lv_structure_name
        CHANGING
          ct_fieldcat            = lt_fieldcat
        EXCEPTIONS
          inconsistent_interface = 1
          program_error          = 2
          OTHERS                 = 3.
      IF sy-subrc <> 0.
        ASSERT 1 = 2.
      ENDIF.
    <b>5. Set table for first display</b>
      CALL METHOD go_grid->set_table_for_first_display
    *    EXPORTING
    *      i_structure_name = lv_structure_name
        CHANGING
          it_fieldcatalog  = lt_fieldcat
          it_outtab        = <lt_out_data>.
      CALL METHOD ls_alv_ref-alv_ref->refresh_table_display.
      CALL METHOD cl_gui_cfw=>flush.
    Perhaps someone could help.....
    Best Regards, Edgar

    Hello Edgar
    The following sample report <b>ZUS_SDN_TWO_ALV_GRIDS_8</b> shows how to solve your problem. Please note that for the sake of simplicity I replaced the tree containing the structure names with an ALV list. However, the switch between the different structures is triggered by the <b>DOUBLE_CLICK</b> event.
    I like to add that the integration of the first displayed ALV list (DD02L) into GT_OUTTAB is not really elegant. In addition, with <b>$TMP</b> I marked a problematic part of the coding with respect to your requirement to have the right layout for each displayed ALV list:
    If you have a <b>fixed </b>assignment of <i>tabname -> 4-digit handle</i> then it is ok. I my sample report the layouts only work if you select the tabnames in the very same order.
    Before showing the entire coding I describe crucial parts of the coding:
    [code]TYPES: BEGIN OF ty_s_outtab.
    TYPES: tabname    TYPE tabname.
    TYPES: layout     TYPE lvc_s_layo.
    TYPES: variant    TYPE disvariant.
    TYPES: fcat       TYPE lvc_t_fcat.
    TYPES: data       TYPE REF TO data.
    TYPES: END OF ty_s_outtab.[/code]
    Every time a new structure is selected the corresponding ALV data are stored as new record in GT_OUTTAB which is of line type TY_S_OUTTAB.
    [code]  READ TABLE gt_outtab INTO gs_outtab INDEX 2.
      ASSIGN gs_outtab-fcat    TO <gt_fcat>.
      ASSIGN gs_outtab-data->* TO <gt_outtab>.[/code]
    Since the ALV list data and the fieldcatalog are fully dynamic I use global field-symbols for these data.
    [code]&----
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'STATUS_0100'.  " contains push button "DETAIL"
    SET TITLEBAR 'xxx'.
      CALL METHOD go_grid2->set_table_for_first_display
        EXPORTING
          i_structure_name = gs_outtab-tabname
          is_layout        = gs_outtab-layout
          is_variant       = gs_outtab-variant
          i_save           = 'A'
        CHANGING
          it_outtab        = <gt_outtab>
          it_fieldcatalog  = <gt_fcat>
        EXCEPTIONS
          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.
    ENDMODULE.                 " STATUS_0100  OUTPUT[/code]
    The second ALV list which displays the table records is always newly displayed in the PBO module.
    In the event handler method <b>HANDLE_DOUBLE_CLICK</b> we need to do two things:
    - store the current fieldcatalog back to GT_OUTTAB
    - store the name of the new selected table/structure -> trigger PAI
    In routine <b>HANDLE_DB_CLICK</b> we create a new entry for GT_OUTTAB if it does not yet exist. Next we select this entry and display it again as second ALV list.
    [code]
    *& Report  ZUS_SDN_TWO_ALV_GRIDS_8
    *& Description: Display two ALV lists in splitter container (left/right)
    *&              Left ALV list contains DB table names,
    *& right ALV list displays entries of selected DB table
    *& SDN thread: Dynamical Call of ALV - No data update
    *&       Link: https:||Dynamical Call of ALV - No data update
    *& Screen '0100' contains no elements.
    *& ok_code -> assigned to GD_OKCODE
    *& Flow logic:
    PROCESS BEFORE OUTPUT.
       MODULE STATUS_0100.
    PROCESS AFTER INPUT.
       MODULE USER_COMMAND_0100.
    REPORT  zus_sdn_two_alv_grids_8.
    TYPE-POOLS: abap.
    DATA:
      gd_repid         TYPE syst-repid,
      gd_okcode        TYPE ui_func,
      go_docking       TYPE REF TO cl_gui_docking_container,
      go_splitter      TYPE REF TO cl_gui_splitter_container,
      go_cell_left     TYPE REF TO cl_gui_container,
      go_cell_right    TYPE REF TO cl_gui_container,
      go_grid1         TYPE REF TO cl_gui_alv_grid,
      go_grid2         TYPE REF TO cl_gui_alv_grid,
      gs_layout        TYPE lvc_s_layo.
    TYPES: BEGIN OF ty_s_outtab.
    TYPES: tabname    TYPE tabname.
    TYPES: layout     TYPE lvc_s_layo.
    TYPES: variant    TYPE disvariant.
    TYPES: fcat       TYPE lvc_t_fcat.
    TYPES: data       TYPE REF TO data.
    TYPES: END OF ty_s_outtab.
    TYPES: ty_t_outtab  TYPE STANDARD TABLE OF ty_s_outtab
                        WITH DEFAULT KEY.
    DATA:
      gt_dd02l         TYPE STANDARD TABLE OF dd02l,
      gs_outtab        TYPE ty_s_outtab,
      gt_outtab        TYPE ty_t_outtab.
    FIELD-SYMBOLS:
      <gt_fcat>        TYPE lvc_t_fcat,
      <gt_outtab>      TYPE table.
          CLASS lcl_eventhandler DEFINITION
    CLASS lcl_eventhandler DEFINITION.
      PUBLIC SECTION.
        CLASS-DATA:
          md_tabname_selected  TYPE tabname  READ-ONLY.
        CLASS-METHODS:
          handle_double_click FOR EVENT double_click OF cl_gui_alv_grid
            IMPORTING
              e_row
              e_column
              es_row_no
              sender.
    ENDCLASS.                    "lcl_eventhandler DEFINITION
          CLASS lcl_eventhandler IMPLEMENTATION
    CLASS lcl_eventhandler IMPLEMENTATION.
      METHOD handle_double_click.
      define local data
        DATA:
          ls_dd02l       TYPE dd02l,
          ls_outtab      TYPE ty_s_outtab.
        CHECK ( sender = go_grid1 ).
        READ TABLE gt_dd02l INTO ls_dd02l INDEX e_row-index.
        "   Store data of currently displayed ALV list (except for DD02L)
        IF ( md_tabname_selected = space ).
        ELSE.
          READ TABLE gt_outtab INTO ls_outtab
               WITH KEY tabname = md_tabname_selected.  " old
          CALL METHOD go_grid2->get_frontend_fieldcatalog
            IMPORTING
              et_fieldcatalog = ls_outtab-fcat.
          MODIFY gt_outtab FROM ls_outtab INDEX syst-tabix.
        ENDIF.
        md_tabname_selected = ls_dd02l-tabname.  " new selected DB table
      Triggers PAI of the dynpro with the specified ok-code
       cl_gui_cfw=>set_new_ok_code( 'HANDLE_DB_CLICK' ).  " not 4.6c
        CALL METHOD cl_gui_cfw=>set_new_ok_code
          EXPORTING
            new_code = 'HANDLE_DB_CLICK'
         IMPORTING
           RC       =
      ENDMETHOD.                    "handle_double_click
    ENDCLASS.                    "lcl_eventhandler IMPLEMENTATION
    START-OF-SELECTION.
      gd_repid = syst-repid.
      SELECT        * FROM  dd02l INTO TABLE gt_dd02l
             WHERE  tabname LIKE 'KN%1'   OR
                    tabname LIKE 'LF%1'   OR
                    tabname LIKE 'VB%'   OR
                    tabname LIKE 'MAR%'   OR
                    tabname LIKE 'E07%'
             AND    tabclass = 'TRANSP'.  " transparent table
      SORT gt_dd02l BY tabname.
      PERFORM init_controls.
      PERFORM add_first_table.
    Set event handler
      SET HANDLER:
        lcl_eventhandler=>handle_double_click FOR go_grid1.
      READ TABLE gt_outtab INTO gs_outtab INDEX 1.
    Display data
      CALL METHOD go_grid1->set_table_for_first_display
        EXPORTING
          i_structure_name = gs_outtab-tabname
          is_layout        = gs_outtab-layout
        CHANGING
          it_outtab        = gt_dd02l
        EXCEPTIONS
          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.
      READ TABLE gt_outtab INTO gs_outtab INDEX 2.
      ASSIGN gs_outtab-fcat    TO <gt_fcat>.
      ASSIGN gs_outtab-data->* TO <gt_outtab>.
    NOTE: method called in PBO module
    CALL METHOD go_grid2->set_table_for_first_display
       EXPORTING
         i_structure_name = gs_outtab-tabname
         is_layout        = gs_outtab-layout
         is_variant       = gs_outtab-variant
         i_save           = 'A'
       CHANGING
         it_outtab        = <gt_outtab>
         it_fieldcatalog  = <gt_fcat>
       EXCEPTIONS
         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.
    Link the docking container to the target dynpro
      CALL METHOD go_docking->link
        EXPORTING
          repid                       = gd_repid
          dynnr                       = '0100'
         CONTAINER                   =
        EXCEPTIONS
          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.
    NOTE: dynpro does not contain any elements
      CALL SCREEN '0100'.
    Flow logic of dynpro (does not contain any dynpro elements):
    *PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    *PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0100.
    END-OF-SELECTION.
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'STATUS_0100'.  " contains push button "DETAIL"
    SET TITLEBAR 'xxx'.
      CALL METHOD go_grid2->set_table_for_first_display
        EXPORTING
          i_structure_name = gs_outtab-tabname
          is_layout        = gs_outtab-layout
          is_variant       = gs_outtab-variant
          i_save           = 'A'
        CHANGING
          it_outtab        = <gt_outtab>
          it_fieldcatalog  = <gt_fcat>
        EXCEPTIONS
          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.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE user_command_0100 INPUT.
      CASE gd_okcode.
        WHEN 'BACK' OR
             'END'  OR
             'CANC'.
          SET SCREEN 0. LEAVE SCREEN.
      User has pushed button "Display Details"
        WHEN 'HANDLE_DB_CLICK'.
          PERFORM handle_db_click.
        WHEN OTHERS.
      ENDCASE.
      CLEAR: gd_okcode.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Form  HANDLE_DB_CLICK
          text
    -->  p1        text
    <--  p2        text
    FORM handle_db_click.
    define local data
      DATA:
        ld_handle(4) TYPE n,
        ls_outtab    TYPE ty_s_outtab.
      READ TABLE gt_outtab INTO ls_outtab
           WITH KEY tabname = lcl_eventhandler=>md_tabname_selected.
      IF ( syst-subrc NE 0 ).
        CLEAR: ls_outtab.
        ls_outtab-tabname = lcl_eventhandler=>md_tabname_selected.
        CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
        I_BUFFER_ACTIVE              =
          i_structure_name             = ls_outtab-tabname
        I_CLIENT_NEVER_DISPLAY       = 'X'
        I_BYPASSING_BUFFER           =
        I_INTERNAL_TABNAME           =
        CHANGING
          ct_fieldcat                  = ls_outtab-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.
        CREATE DATA ls_outtab-data TYPE TABLE OF (ls_outtab-tabname).
        ASSIGN ls_outtab-data->* TO <gt_outtab>.
        SELECT * FROM (ls_outtab-tabname) UP TO 50 ROWS
          INTO TABLE <gt_outtab>.
        ls_outtab-layout-no_toolbar = abap_false.
        ls_outtab-layout-zebra      = abap_true.
        ls_outtab-layout-smalltitle = abap_true.
        CONCATENATE ls_outtab-tabname ':'
          INTO ls_outtab-layout-grid_title.
        CONCATENATE ls_outtab-layout-grid_title 'Table Records'
          INTO ls_outtab-layout-grid_title
          SEPARATED BY space.
        ls_outtab-variant-report    = gd_repid.
        DESCRIBE TABLE gt_outtab.
        ld_handle = syst-tfill + 1.
        WRITE ld_handle TO ls_outtab-variant-handle.  " $TMP: Problem!!!
        APPEND ls_outtab TO gt_outtab.
      ENDIF.
      " NOTE: read into GLOBAL variable gs_outtab !!!!
      READ TABLE gt_outtab INTO gs_outtab
            WITH KEY tabname = lcl_eventhandler=>md_tabname_selected.
      ASSIGN gs_outtab-fcat    TO <gt_fcat>.
      ASSIGN gs_outtab-data->* TO <gt_outtab>.
    ENDFORM.                    " HANDLE_DB_CLICK
    *&      Form  INIT_CONTROLS
          text
    -->  p1        text
    <--  p2        text
    FORM init_controls .
    Create docking container
      CREATE OBJECT go_docking
        EXPORTING
          parent                      = cl_gui_container=>screen0
          ratio                       = 90
        EXCEPTIONS
          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.
      CALL METHOD go_docking->set_extension
        EXPORTING
          extension  = 99999 " full-size screen
        EXCEPTIONS
          cntl_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.
    Create splitter container
      CREATE OBJECT go_splitter
        EXPORTING
          parent            = go_docking
          rows              = 1
          columns           = 2
         NO_AUTODEF_PROGID_DYNNR =
         NAME              =
        EXCEPTIONS
          cntl_error        = 1
          cntl_system_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.
    Get cell container
      CALL METHOD go_splitter->get_container
        EXPORTING
          row       = 1
          column    = 1
        RECEIVING
          container = go_cell_left.
      CALL METHOD go_splitter->get_container
        EXPORTING
          row       = 1
          column    = 2
        RECEIVING
          container = go_cell_right.
      CALL METHOD go_splitter->set_column_mode
        EXPORTING
          mode              = cl_gui_splitter_container=>mode_relative
       IMPORTING
         RESULT            =
        EXCEPTIONS
          cntl_error        = 1
          cntl_system_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.
      CALL METHOD go_splitter->set_column_width
        EXPORTING
          id                = 1
          width             = 25
       IMPORTING
         RESULT            =
        EXCEPTIONS
          cntl_error        = 1
          cntl_system_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.
      CALL METHOD go_splitter->set_column_sash
        EXPORTING
          id                = 1
          type              = cl_gui_splitter_container=>type_movable
          value             = cl_gui_splitter_container=>false
       IMPORTING
         RESULT            =
        EXCEPTIONS
          cntl_error        = 1
          cntl_system_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.
    Create ALV grids
      CREATE OBJECT go_grid1
        EXPORTING
          i_parent          = go_cell_left
        EXCEPTIONS
          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.
      CREATE OBJECT go_grid2
        EXPORTING
          i_parent          = go_cell_right
        EXCEPTIONS
          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.
    ENDFORM.                    " INIT_CONTROLS
    *&      Form  ADD_FIRST_TABLE
          text
    -->  p1        text
    <--  p2        text
    FORM add_first_table .
    define local data
      DATA:
        ls_outtab    TYPE ty_s_outtab.
      ls_outtab-tabname = 'DD02L'.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
      EXPORTING
      I_BUFFER_ACTIVE              =
        i_structure_name             = ls_outtab-tabname
      I_CLIENT_NEVER_DISPLAY       = 'X'
      I_BYPASSING_BUFFER           =
      I_INTERNAL_TABNAME           =
      CHANGING
        ct_fieldcat                  = ls_outtab-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.
      GET REFERENCE OF gt_dd02l INTO ls_outtab-data.
      ls_outtab-layout-no_toolbar = abap_false.
      ls_outtab-layout-zebra      = abap_true.
      ls_outtab-layout-smalltitle = abap_true.
      CONCATENATE ls_outtab-tabname ':'
        INTO ls_outtab-layout-grid_title.
      CONCATENATE ls_outtab-layout-grid_title 'Table Records'
        INTO ls_outtab-layout-grid_title
        SEPARATED BY space.
      ls_outtab-variant-report    = gd_repid.
      ls_outtab-variant-handle    = '0002'.
      INSERT ls_outtab INTO gt_outtab INDEX 1.
      ls_outtab-layout-no_toolbar = abap_true.
    ls_outtab-layout-zebra      = abap_true.
    ls_outtab-layout-smalltitle = abap_true.
      ls_outtab-layout-grid_title = 'DB Tables'.
    ls_outtab-variant-report    = gd_repid.
      ls_outtab-variant-handle    = '0001'.
      DELETE ls_outtab-fcat WHERE ( fieldname NE 'TABNAME' ).
      INSERT ls_outtab INTO gt_outtab INDEX 1.
    ENDFORM.                    " ADD_FIRST_TABLE[/code]
    Regards,
      Uwe

  • How to show the columns dynamically in OBIEE report based on the selection?

    Hi,
    I have a requirement where the columns should be dynamically shown in report based on what we select in propmt page.
    I'm creating a report in OBIEE where i want to give an option to the end user to select the columns whichever he wants to see in the report.
    For example I have the following columns in the report already:
    Customer Name,
    Customer Number,
    Bank Account,
    Address
    I want to give an option to the user to select 'Customer Mail ID' dynamically and see the column to be displyed in the report along with the existing columns.
    Through 'Column Selector' user can select a single column at a time, but if he want to select more than one column, how can we do this ?
    Please help me out in resolving this issue.
    Thanks,
    Chaithanya.

    Hi Chaithanya,
    there's not a straight solution for this. You can create different analysis containing different number of columns and then directing the user to this analysis using Action Links or you can also use View Selector to switch from one view (analysis) to the other. But it's not going to be very flexible nor dynamic.
    J.

  • How to create dynamic ed flash charts based on user selected fields in Orac

    Hi all,
    Can any of the experts please tellme "how to create dynamic ed flash charts based on user selected fields in Oracle apex".
    Thanks
    Manish

    Hello,
    Lots of different ways to do this, I blogged about one way (using a Pipelined function) here -
    http://jes.blogs.shellprompt.net/2006/05/25/generic-charting-in-application-express/
    Other options include using a PL/SQL function returning the string to use as the dynamic query etc.
    Hope this helps,
    John.
    Blog: http://jes.blogs.shellprompt.net
    Work: http://www.apex-evangelists.com
    Author of Pro Application Express: http://tinyurl.com/3gu7cd
    REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone!

  • Manage different layout according to Sales stage

    Hi everybody,
    I need to manage different opportunity layouts according to my sales stage.
    How this need can be realizable?

    Dynamic layouts are only possible on Opportunity for the field Opportunity Type. You could repurpose that field to allow for your different layouts, but I would consider that option very carefully before doing so. You need to be sure that repurposing that field won't negatively impact existing functionality.
    I don't know what your requirements are, so I'm not certain about what you are trying to achieve. Be aware that you have some capability associated with Sales Processes that may be of use to you. You need to review the Sales Process functionality to see if it will help with your requirements at all.
    Good Luck,
    Thom

  • Use different Layouts for Summary and Details in Drill down report

    Hi All,
    I have a 2 level drill down report in ALV.
    The summary report has certain fields and the Detail report has different fields. Now my problem is that when i use a default layout (with all fields of summary report) for the summary report, and drill down to the detail report i'm missing the fields on detail that are not in Summary. And if i save the default layout as default (with all fields of Detail) and go back to sumary, I'm missing the some other fields on summary (which are not on detail report).
    Is there a way to make different default layouts for each of those summary and detail reports:
    Also as the layouts are choosen by the user, i cannot hardcode any particular layout;
    So if the user chooses a layout for detail; it has to stay the same layout for the detail report if he goes to summary and then back to detail; unless the user changes the layout again.
    I'm using two different Layout types for each report. but i still cannot get the desired effect.
    Data:
          gt_layout_s             type slis_layout_alv,
          gt_layout_d             type slis_layout_alv,
      call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          i_callback_program       = g_repid
          is_layout                = <b>gt_layout_s</b>
          i_callback_top_of_page   = g_top_of_page
          i_callback_user_command  = g_user_command
          i_callback_pf_status_set = g_status
          i_save                   = g_save
          is_variant               = gs_variant
          it_fieldcat              = gt_fieldcat[]
          it_events                = gt_events[]
        importing
          es_exit_caused_by_user   = gs_exit_caused_by_user
        tables
          t_outtab                 = it_summary.
      call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          i_callback_program       = g_repid
          is_layout                = <b>gt_layout_d</b>
          i_callback_top_of_page   = g_top_of_page
          i_callback_user_command  = g_user_command
          i_callback_pf_status_set = g_status
          i_save                   = g_save
          is_variant               = gs_variant
          it_fieldcat              = gt_fieldcat[]
          it_events                = gt_events[]
        importing
          es_exit_caused_by_user   = gs_exit_caused_by_user
        tables
          t_outtab                 = it_detail_disp.

    Here is how you differentiate between the layout of two different grids. There is the parameter, IS_VARIANT in the function. You usually leave it empty or pass only the report name and username. <b>What you need to do is to pass unique string for each grids to the HANDLE field of the parameter IS_VARIANT.</b> You can probably hard code it as HEADER and DETAILS in your case. Once that is done, system identified that these two different layout for different grids.
    Regards,
    Ravi
    Note : Please mark all the helpful answers<u></u>

  • How to design a single adobe form having 5 different layouts

    Hi,
    I have a requirement wherein i have 5 different layouts to be designed in a single adobe form, since i am new to adobe forms please can anybody tell me how to desgin this.
    Thanks.
    Moderator Message: Please post the questions in the right forum. Also, I suggest you take a proper class room training in Adobe forms.
    Edited by: kishan P on Nov 2, 2010 12:02 PM

    Hi Roopesh,
    We cannot change the Page Layout and Orientation dynamically in Adobe forms.
    To achieve this Create two forms with different layouts each.

  • [U8.1][Xaml] Different Layout for RSS Feed items.

    Hi everyone,
    I created a simple RSS Feed reader using App Studio, and now I`m modifying it to my needs on Visual Studio. Its awesome!
    Now I would like the items of my RSS Feed source to have a different layout from each other based on the Author or Date the feed item was fetched. I think that it could be done using some conditionals but I don't exactly know how.
    If anyone could help me with that, that would be awesome.
    Keep in mind that I have just started playing around with app development on Windows and try to be as clear as you can on your instructions.
    Kind Regards.

    What code do you have for the source items? I assume it is some type of ItemsControl (ListView, GridView, etc.) and you can set the
    ItemsTemplateSelector to choose between different layouts based on the bound object's Author and Date. See the
    DataTemplateSelector class documentation and the
    How to group items in a list or grid page: the ItemsTemplateSelector works essentially the same as the GroupTemplateSelector demonstrated in that article.
    If you want to know if and how this can be done within App Studio please check in the App Studio forum.

  • Dynamic columns for ALV/classical

    Hi friends,
    I came across an issue where I need to create an output list based on the selection screen.
    Example: In selection screen if user enters plant 1000 2000 3000 4000 .
    I want the output table having columns 1000 2000 3000 4000 .
    Please help me out how to accomplish this task.  Is  this functionality is possible with ALV..?
    A sample code for this will really help me a lot .. or send me your valuable suggestions..
    Thanks
    Prasead K

    Search sdn for [cl_alv_table_create=>create_dynamic_table|https://www.sdn.sap.com/irj/scn/advancedsearch?query=cl_alv_table_create%3d%3ecreate_dynamic_table&cat=sdn_all], there are already many threads and samples. Basically, you dynamically fill an ALV fieldcatalog, then use the method to create a dynamic internal table from this catalog, fill the internal table and display it.
    Regards

  • Neurowm - dynamic tiling window manager based on Xmonad

    Hi,
    I started to write my own window manager last year so that it fits exactly my needs. The project was paused due to a lack of time but last month I could start coding again and make it stable. It was my very first step into the X protocol so I decided to use C language and Xlib rather than XCB because of the documentation. I might plan to port it to XCB in the near future though.
    neurowm is a dynamic tiling window manager based on Xmonad, where you must write your own configuration using C language instead of Haskell language. If you are familiar with Xmonad, you should be able to understand the configuration easily.
    Some features:
    - Compile and reload the comfiguration file on the fly withour restarting X
    - Support of float layout
    - Support of toggled layouts
    - Border width, color and gaps can be configured at window level
    - Mirror, Reflect X and Reflect Y support on every layout
    - Support of fixed windows on every layout
    - Support if free window on every layout
    - Dzen support
    - Xinerama support (TODO)
    - Java support (TODO)
    Screenshots:
    Website: https://github.com/nnoell/neurowm
    There is no PKGBUILD at the moment and please, bear in mind that the window manager is under heavy development, so the configuration file might change a lot. Feel free to try it and leave some feedbacks.

    i enjoy all the neuromancer references (wintermute). and your avatar from the cover of the c64 game. gibson would be proud ;D
    I am not really good at names, that is why I take all of them from things I love. Next one won't be from neuromancer, I promisse
    the wm looks very nice in your scrots. can i make some feature suggestions based on my wm experiences?
    i've recently switched from awesomewm to herbsluftwm, and really like it.
    - the binary tree division makes so much sense. you split a frame, then split that frame, and so on into infinity. and all those frames are movable via key-binding as well. as opposed to pre-defined layouts in awesome (and as far as i can tell, neurowm too).
    - having a command line tool that you use to dynamically set properties is amazing. border colors, gaps, displays, etc. e.g. you configure you monitor settings via a command v.s. you config file, this makes it more flexible for on the fly changes.
    Yes, you are right, command line tools are very useful, I might think of adding that. Regarding the binary tree division, I think it would be good to create another "special" layout (as the floated one) with its own bindings. I think I will try herbsluftwm and compare it to Xmonad so I can get to the point.
    I decided to create an Xmonad-like window manager using C language because many people don't know Haskell and GHC is quite heavy. The configuration file might be difficult to understand at first (specially if you are not familiar with C language) but if you guys have any problem, don't hesitate to contact me
    PD: Ninja gaiden is also an amazing franchise, specially the 3 games from the NES, played a lot when I was a kid.

Maybe you are looking for

  • Pooled capacity in SAP PS

    Hi, I would like to know, is it possible to use pooled capacity in SAP PS and how it really works. Pls advise. Regards Raju

  • Can't Open An Existing Project in iDVD

    I've prepared an iDvd project saved it and when ever I run iDvd and select "open an existing project" it just freezes and only gives me the option to "Force Quit". It allows me to create a new project but I can't open my existing one. Can anyone help

  • The adobe flash plugin has failed and none of the solutions have helped

    the adobe flash plugin has failed and none of the solutions listed in the help section works! I've tried all the solutions listed but none seems to work. == This happened == Every time Firefox opened == it started a week ago

  • Why does Photoshop crash Word?

    Hi I'm running Photoshop CS5 (version 12.0.4 x64) on Windows 64 bit, and I'm having a strange problem to which I've not been able to find the solution. When I start up PS, if MS Word is open, nine times out of ten Word will crash. Word doesn't tell m

  • AP  invoice is not offsetting in the AP system when we perform a check run

    Hi Everyone, The invoice is not offsetting in the AP system when we perform a check run. They are remaining as outstanding in AP. Can you please tell us why? There are several of these in the system and I need them cleared out. Plz help me as early a