Splitter container with alv grid has to be replaced with a dynpro

I have a container which I have splitt in 4 areas, on the right half I have two splitter container with alv grids.
On the left side I have my navigation tree in 2 splitter container.
I don't know if this really works, but is it possible that I call a dynpro in the splitter container (after using my navigation tree) where still my alv grids exist?

so it is not able that I can show a dynpro with several text fields?
or can I introduce the textfields in another version to the container?
In se80 I think you have the same, there they call another transactions, is it possible that I call a transaction to the right side of a splitter container?

Similar Messages

  • How can we find out data in an editable ALV grid has been changed or not?

    Hi Experts,
    How can we find out whether a data in an editable ALV grid has been changed or not.
    I am using the
    FM -> REUSE_ALV_GRID_DISPLAY_LVC
    for ALV display.
    I have to chekc whther data has been changed or not befor saving. if changed then only i want to
    SAVE
    . I cannot use the internal table comparison method for this purpose also i am not using OOP ALV.
    So kindly sugest me an alternative.
    Thanks and Regards,
    Shahana

    Hi,
    Thanks for your answer. I already saw this post.
    See this method.
    CALL METHOD reuse_alv_grid->check_changed_data
    IMPORTING
    e_valid = lv_check.
    This will update the internal table with the edited values. Then we can go for internal table comparison.
    But my scenario will not allow me for itab comparisons.I just want to know the ALV data has been changed or not.
    Regards,
    Shahana

  • Issue with ALV grid print preview/spool

    Hello everyone,
    I am working on a report and I am having some issues with ALV grid. Currently in our DEV and QA environments the user can run the report, view the ALV grid, and print the grid without any issues.
    However this isn't the case in the Prod environment. The user is able to run the report and view the grid without any issues. But when they click print preview or click print, the spool is incorrect. It shows the proper values from the grid, but the first field is reduced in length. Rather than showing a numeric field of length 10 it shows 99999999# or 99999999...
    The programs are identical through every environment, including user parameters, formats, and spool settings. I have been told printing grids may have some issues, does anyone have any advice or dealt with this issue before?
    I appreciate the help.
    Thanks,
    C

    I was waiting to hear from the functional team on the matter and no one has mentioned any more issues.  I am assuming the problem is solved.  I just noticed the thread was still un-answered and wanted to give an update. 
    Thank you for you help Vijay.
    Regards
    C

  • I have a problem with ALV Grid User Command?

    Hi Experts,
    I have a problem with ALV GRID User Command.
    I am calling TCODE IW33 (Order Display) from the ALV output at first time by selecting an order. But, User command is calling IW33 Initial screen with blank value of order. Even I checked in debugging the value what I selected is passing properly, but once that screen (IW33 Initial) displays, value doesn't appear. Then, Manually, I  created another session and gone to TCODE IW33 and displayed an order. After that I came out from that order. Then again run my ALV program and selected another order, now order is displaying, but not what I selected current order instead of displaying previous order what I just displayed manually. If I selected any other order, system will display the same order what I dislayed manually.
    Here is my code.
    FORM user_command_alv  USING u_ucomm TYPE sy-ucomm
                           us_self_field TYPE slis_selfield.
    CASE u_ucomm.
    WHEN '&IC1'.
    READ TABLE it_final INDEX us_self_field-tabindex INTO wa_final.
            WHEN 'ORDER'.
              IF NOT wa_final-order IS INITIAL.
                SET PARAMETER ID 'COK' FIELD wa_final-order.
                CALL TRANSACTION 'IW33' AND SKIP FIRST SCREEN.
              ENDIF.
    endform.
    PARAMETER ID 'COK'  also the standard one.
    Could you please help me out, Where I did wrong?
    If I select any order, that order only should display.
    Thanks in advance.
    Regards,
    Sarayu.
    Code Formatted by: Alvaro Tejada Galindo on Jan 8, 2009 2:33 PM

    hi,
    Please check it once the Paramater ID is 'ANR' for IW33 order number.
    Hope this may help.
    Regards,
    Sravanthi

  • Problem with ALV grid in edit mode

    Hello, gurus!
    I have a problem with ALV-grid. Sometimes when I call F4 help for a cell, data is inserted in a different cell.  And when I call check_changed_data method, my internal table (passed to ALV-control in set_table_for_first_display) does not updates properly. In what can be a problem?
    Thanks,
    Mikhail

    Hi Prabhu,
    MODULE pbo_100 OUTPUT.
      SET PF-STATUS 'MAIN100'.
      title_of_report = text-010.
      SET TITLEBAR '0100' WITH title_of_report.
      DATA: g_event_receiver TYPE REF TO lcl_event_handler.
      IF z_custom_container IS INITIAL .
        CREATE OBJECT z_custom_container
          EXPORTING
            container_name = 'ALV_ZAC'.
        CREATE OBJECT alv_grid
          EXPORTING
            i_parent = z_custom_container.
        g_repid = sy-repid.
        gs_variant-report = g_repid.
        x_save = 'A'.
        PERFORM check_alv_grid_fields.
        ps_layout-cwidth_opt = 'X'.
        ps_layout-edit = 'X'.
        CALL METHOD alv_grid->set_ready_for_input
          EXPORTING
            i_ready_for_input = '1'.
    *    CALL METHOD alv_grid->register_edit_event
    *      EXPORTING
    *        i_event_id = cl_gui_alv_grid=>mc_evt_enter.
        APPEND   s_list_rec   to it_list_rec.
        CALL METHOD alv_grid->set_table_for_first_display
          EXPORTING
            is_layout       = ps_layout
            is_variant      = gs_variant
            i_save          = x_save
          CHANGING
            it_fieldcatalog = pt_fieldcat
            it_outtab       = it_list_rec[].
        CALL METHOD alv_grid->register_edit_event
          EXPORTING
            i_event_id = cl_gui_alv_grid=>mc_evt_enter.
        CALL METHOD alv_grid->register_edit_event
          EXPORTING
            i_event_id = cl_gui_alv_grid=>mc_evt_modified.
    ENDIF.
    FORM check_alv_grid_fields .
      DATA: ls_fcat LIKE LINE OF pt_fieldcat.
    REFRESH pt_fieldcat .
    CLEAR: ps_layout, ls_fcat.
      ls_fcat-fieldname = 'VBELN'.
      ls_fcat-ref_field = 'VBELN'. ls_fcat-ref_table =  'LIPS'. " .
      ls_fcat-outputlen = 9.
    *  ls_fcat-datatype   = 'CHAR'.
    *  ls_fcat-inttype    = 'C'.
      APPEND  ls_fcat TO pt_fieldcat.
      CLEAR: ls_fcat.
      ls_fcat-fieldname = 'ERDAT'.
      ls_fcat-ref_field = 'ERDAT'. ls_fcat-ref_table = 'LIPS'.
      ls_fcat-outputlen = 9.
    *  ls_fcat-f4availabl = 'X' .
    *  ls_fcat-datatype   = 'DATS'.
    *  ls_fcat-inttype    = 'D'.
      APPEND ls_fcat TO pt_fieldcat.
      CLEAR: ls_fcat.
    ENDFORM.                    " check_alv_grid_fields
    FORM save_p .
      CLEAR l_valid.
      CALL METHOD alv_grid->check_changed_data
        IMPORTING
          e_valid = l_valid.
      IF l_valid IS INITIAL.
        CALL FUNCTION 'POPUP_TO_INFORM'
          EXPORTING
            titel = text-i01
            txt1  = text-i02
            txt2  = text-i03
            txt3  = text-i04.
      ELSE.
        i_dat_reg = zrumm_prr-cdprr.
        CLEAR is_temp_otc.
        freshit i_prrpus_fax.
        freshit i_list2_ot.
        LOOP AT it_list_rec INTO s_list_rec.
          MOVE-CORRESPONDING s_list_rec TO i_list2_ot.
          i_list2_ot-fgrup = 'RECE'.
          i_list2_ot-prrnu = i_num_prr.
          APPEND i_list2_ot.
          MOVE-CORRESPONDING s_list_rec TO i_prrpus_fax.
          APPEND i_prrpus_fax.
        ENDLOOP.
      ENDIF.
    Edited by: Mikhail Sarychev on Mar 16, 2011 6:41 AM
    Edited by: Mikhail Sarychev on Mar 16, 2011 6:49 AM
    Edited by: Mikhail Sarychev on Mar 16, 2011 6:49 AM

  • New Problem with ALV grid

    Hi,
    I am working an ALV grid in my report. after executing my report ALV grid is displaying all columns with all records. But if i am trying to see print priview or if i am trying to do export to spreadsheet, many columns are missing & records also jumbling from their exact places.
    Why it is coming like this? can u help me. .
    Thanks
    vishnu

    Hi,
    if i am trying to do export to spreadsheet, many columns are missing & records also jumbling from their exact places.
    Regarding on your query, You will write a query as select query
    I.e.., select a query corresponding coloumns and reterive the data
    Then check through an select corresponding coloums
    Then solved your problem.
    Regards,
    Sekhar

  • Handling Double click on a Pop-up screen with ALV Grid

    Hello Experts,
    I have an issue handling double click on ALV Pop-up screen. I tried to achive this using following steps.
    1. I defined a local class in Top-include to handle double click and implemented it in the following way.
    CLASS lcl_alv_event_handler DEFINITION.
    PUBLIC SECTION.
    CLASS-METHODS:
    on_double_click FOR EVENT double_click
    OF cl_gui_alv_grid
    IMPORTING e_row
    e_column
    es_row_no.
    ENDCLASS. "lcl_alv_event_handler DEFINITION
    *~~~ Implementation code
    CLASS lcl_alv_event_handler IMPLEMENTATION.
    To handle Selection of Issue data on Screen 100
    METHOD on_double_click.
    DATA: lt_row_no TYPE lvc_t_roid,
    ls_req TYPE zcst_zirt_seltab.
    READ TABLE gt_req
    INTO ls_req
    INDEX e_row-index.
    g_req_id = ls_req-zzrequest_id.
    gv_selected = true.
    CALL METHOD go_alv->dispatch
    EXPORTING
    cargo = 'OK'
    eventid = 3
    is_shellevent = ' '
    is_systemdispatch = 'X'
    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.
    ENDMETHOD. "on_double_click
    ENDCLASS. "lcl_alv_event_handler IMPLEMENTATION
    2. Registered the event in the PBO module of the screen
    ls_events-eventid = 3.
    ls_events-appl_event = gc_true.
    APPEND ls_events TO lt_events.
    CALL METHOD co_alv->set_registered_events
    EXPORTING
    events = lt_events
    EXCEPTIONS
    cntl_error = 1
    cntl_system_error = 2
    illegal_event_combination = 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 co_alv_event_handler.
    SET HANDLER: co_alv_event_handler->on_double_click FOR co_alv.
    CALL METHOD co_alv->set_toolbar_interactive.
    3. In the PAI module of Screen, tried to handle the event 'OK' that waqs registred in PBO.
    CASE save_ok.
    WHEN 'OK'.
    Get selected line
    CALL METHOD io_alv->get_selected_rows
    IMPORTING
    et_index_rows = lt_rows
    et_row_no = lt_rows_no.
    IF NOT lt_rows IS INITIAL.
    READ TABLE lt_rows INTO ls_rows INDEX 1.
    IF sy-subrc EQ 0.
    gv_selected = 'X'.
    READ TABLE it_req
    INTO ls_req
    INDEX ls_rows-index.
    e_req_id = ls_req-zzrequest_id.
    SET SCREEN 0.
    ENDIF.
    ELSE.
    SET SCREEN 0.
    ENDIF.
    With this code what is happening is, when user double clicks a line on Pop-up screen with ALV grid data, the program is able to successfully get into the class implementation but the control is not going to PAI module to execute the OK_code handling part.
    Am I doing this in the right way? Appreciate quick suggestions. Proper posts will be thoroughly awarded with points.
    Thx.
    Minni

    Put your code into the Event handler Implementation of Double Click which is there in the PAI Module.
    Regards,
    Naimesh Patel

  • Display 2 rows per entry with ALV Grid

    Hi Experts,
    I need to display the results of a report with ALV Grid. The Problem is: I need to display the resultdata (some numbers etc..) in one row and then add a second row with the longtext.
    The ALV should look somthing like this:
    resultdata1 resultdata2 resultdata3
    longtext1
    resultdata1 resultdata2 resultdata3
    longtext1
    resultdata1 resultdata2 resultdata3
    longtext1
    Can anyone of you give me hint on how to do that?
    (The row_pos and col_pos ind the fieldcat do not do the trick )
    Thanx
    Felix

    hi ,
    You can do this
    resultdata1 resultdata2 resultdata3
    longtext1
    resultdata1 resultdata2 resultdata3
    longtext1
    resultdata1 resultdata2 resultdata3
    longtext1
    Create two internal table  .
    one for : resultdata1 resultdata2 resultdata3
    second for   longtext1
    see that both tables have matching primary key   .
    then can  match the data and  append in another third table   .
    regards
    Deepak.

  • GL Account analysis report with ALV Grid control

    Hi Everyone,
    I am looking for a GL Account analysis report with ALV Grid Control.
    Can I get sample code for this report.
    Thank you
    Prasad

    Hi Rob,
    Actually, I am searching for a Report which gives GL account analysis.
    If anybody can throw more light on this ...it would be great.
    Which Tables and fields i should refer for this report.
    Thanks

  • How to display rsa3 with ALV grid

    Hello,
    In some of tyhe systems i'm working with, RSA3 have a button to display the data in ALV grid. I checked and it's not because of the support package. Cab someone please advice how to add the ALV functionality.
    Thanks,
    Amir
    Edited by: Amir Dror on Jan 13, 2009 12:41 PM

    Hello,
    we had the same question and problem.
    SAP told us via OSS the following:
    "... The ALV grid in RSA3 will be supported with the PI_BASIS 2006_1_700.
    But you have PI_BASIS 2005_1_700
    Furthermore this software component PI_BASIS is independent from the
    BW releases so that you can upgrade the latest support packages of the
    PI_BASIS 2006_1_700 in source system"
    So if you have PI_BASIS 2005 you won't have the functionality of ALV grid in TC RSA3.
    (remark: At the moment I can not confirm that ALV grid in RSA3 is available with PI_BASIS 2006_x_xxx. We plan to upgrade in a few month.)
    Best regards

  • Has anyone with a whinning MacBook got it replaced with a silent one?

    Has anyone with a whinning MacBook got it replaced with a silent one?
    or
    Has anyone got the CPU whine fixed at Apple?

    I had a whining week 12 MacBook Pro. I exchanged it at the Apple Store for another week 12 MacBook Pro (they didn't have any week 13 models).
    The second week 12 MacBook whined far louder than the first. Also, unlike the first MacBook which whined only on battery power, the second MacBook whined on both A/C and battery. Moreover, it was unstable (something I did not experience with the first MacBook) and prone to kernel panics.
    I returned the second MacBook. I was offered a week 13, but I asked for my money back instead.
    I'm currently waiting to see what Apple says about this issue before ordering again.

  • Splitter container with alv grid

    I have following coding:
        CREATE OBJECT container
                      EXPORTING container_name = 'CONTAINER2'.
        CREATE OBJECT splitter
                      EXPORTING parent = container
                                rows    = 2
                                columns = 1.
        CALL METHOD splitter->get_container
                          EXPORTING row      = 1
                                    column   = 1
                          RECEIVING container = container_1.
        CALL METHOD splitter->get_container
                      EXPORTING row      = 2
                                column   = 2
                      RECEIVING container = container_2.
    now i want to include my alv_grid in container_2.
    the coding for my alv grid is as follows:
      CALL METHOD grid2->set_table_for_first_display
        EXPORTING
          i_structure_name              = 'structure'
          is_layout                     = gs_layout
        CHANGING
          it_outtab                     = lt_alv
          it_fieldcatalog               = lt_fct1
        EXCEPTIONS
          invalid_parameter_combination = 1
          program_error                 = 2
          too_many_lines                = 3
          OTHERS                        = 4.
    is that possible????????????????

    I have solved it you have to do this:
    DATA splitter TYPE REF TO cl_gui_splitter_container.
    DATA container TYPE REF TO cl_gui_custom_container.
    DATA container_1 TYPE REF TO cl_gui_container.
    DATA container_2 TYPE REF TO cl_gui_container.
        CREATE OBJECT container
                      EXPORTING container_name = 'CONTAINER2'.
        CREATE OBJECT splitter
                      EXPORTING parent = container
                                rows    = 2
                                columns = 1.
        CALL METHOD splitter->get_container
                          EXPORTING row      = 1
                                    column   = 1
                          RECEIVING container = container_1.
        CALL METHOD splitter->get_container
                      EXPORTING row      = 2
                                column   = 2
                      RECEIVING container = container_2.
    and then:
        CREATE OBJECT grid2
          EXPORTING
            i_parent = container_1.
      CALL METHOD grid2->set_table_for_first_display
        EXPORTING
          i_structure_name              = 'structure'
          is_layout                     = gs_layout
        CHANGING
          it_outtab                     = lt_alv
          it_fieldcatalog               = lt_fct1
        EXCEPTIONS
          invalid_parameter_combination = 1
          program_error                 = 2
          too_many_lines                = 3
          OTHERS                        = 4.

  • Problems with ALV-GRID - OO

    Hi,
    I'm using OO for ALV-GRID. I have problems by using TOP_OF_PAGE.
    I try it like this:
    CLASS LCL_EVENT_HANDLER DEFINITION .
      PUBLIC SECTION .
        METHODS:
       HANDLE_TOP_OF_PAGE
             FOR EVENT TOP_OF_PAGE OF CL_GUI_ALV_GRID,
       HANDLE_PRINT_TOP_OF_PAGE
             FOR EVENT PRINT_TOP_OF_PAGE OF CL_GUI_ALV_GRID.
    ENDCLASS.                    "LCL_EVENT_HANDLER DEFINITION
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION .
    *--Handle Print Top of page
      METHOD HANDLE_PRINT_TOP_OF_PAGE.
        IF SY-PAGNO = 1.
          PERFORM PRINT_TOP_OF_PAGE.
        ENDIF.
      ENDMETHOD.                    "handle_print_top_of_page
    *--Handle Top of page
      METHOD HANDLE_TOP_OF_PAGE.
        PERFORM TOP_OF_PAGE.
      ENDMETHOD.                    "handle_top_of_page
    ENDCLASS.                    "LCL_EVENT_HANDLER IMPLEMENTATION
      CALL METHOD GR_ALVGRID->SET_TABLE_FOR_FIRST_DISPLAY
         EXPORTING
                   IT_TOOLBAR_EXCLUDING = GT_EXCLUDE
                   IS_LAYOUT            = GS_LAYOUT
         CHANGING
                   IT_FIELDCATALOG      = GT_FIELDCAT
                   IT_OUTTAB            = ITAB.
      CREATE OBJECT GR_EVENT_HANDLER.
      SET HANDLER   GR_EVENT_HANDLER->HANDLE_PRINT_TOP_OF_PAGE  FOR GR_ALVGRID.
      SET HANDLER   GR_EVENT_HANDLER->HANDLE_TOP_OF_PAGE        FOR GR_ALVGRID.
    FORM PRINT_TOP_OF_PAGE.
      WRITE: / 'Print-Header'.
    ENDFORM.                    "print_top_of_page
    FORM TOP_OF_PAGE.
      WRITE: / 'Screnn-Header'.
    ENDFORM.                    "top_of_page
    Has anyone an idea what i shell do??
    Thanks
    regards, Dieter

    Hi Vijay,
    i have tried this code (same as you but with MARA).
    I created PF-Staus STATUS und screen 100 with container CONTROL
    but i don't get any result (IT_MARA has 20 entries).
    Which mistake have i done?
    REPORT  ZGRO_TEST1  MESSAGE-ID ZZ  .
    DATA: IT_MARA TYPE TABLE OF MARA.
    DATA: OK_CODE LIKE SY-UCOMM,
    SAVE_OK LIKE SY-UCOMM.
    DATA:  G_CONTAINER TYPE SCRFNAME VALUE 'CONTROL',
    O_DYNDOC_ID  TYPE REF TO CL_DD_DOCUMENT,
    O_SPLITTER   TYPE REF TO CL_GUI_SPLITTER_CONTAINER,
    O_PARENT_GRID TYPE REF TO CL_GUI_CONTAINER,
    O_PARENT_TOP TYPE REF TO CL_GUI_CONTAINER,
    O_HTML_CNTRL TYPE REF TO CL_GUI_HTML_VIEWER.
    CLASS LCL_EVENT_HANDLER DEFINITION .
    PUBLIC SECTION .
    METHODS:
    *Event Handler for Top of page
    TOP_OF_PAGE FOR EVENT TOP_OF_PAGE
           OF CL_GUI_ALV_GRID
           IMPORTING E_DYNDOC_ID.
    ENDCLASS.             "lcl_event_handler DEFINITION
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION.
    METHOD TOP_OF_PAGE.
    Top-of-page event
    PERFORM EVENT_TOP_OF_PAGE USING O_DYNDOC_ID.
    ENDMETHOD.                            "top_of_page
    ENDCLASS.       "LCL_EVENT_HANDLER IMPLEMENTATION
    DATA: G_CUSTOM_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
          G_HANDLER TYPE REF TO LCL_EVENT_HANDLER. "handler
    START-OF-SELECTION.
    SELECT *
    FROM MARA
    UP TO 20 ROWS
    INTO TABLE IT_MARA.
    END-OF-SELECTION.
    IF NOT IT_MARA[] IS INITIAL.
      CALL SCREEN 100.
    ELSE.
      MESSAGE I002 WITH 'NO DATA FOR THE SELECTION'(004).
    ENDIF.
    MODULE STATUS_0100 OUTPUT.
    SET PF-STATUS 'STATUS'.
    SET TITLEBAR 'TITLE'.
    IF G_CUSTOM_CONTAINER IS INITIAL.
    PERFORM CREATE_AND_INIT_ALV.
    ENDIF.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    MODULE USER_COMMAND_0100 INPUT.
    CASE SY-UCOMM.
    WHEN 'BACK'.
    LEAVE TO SCREEN 0.
    ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    FORM CREATE_AND_INIT_ALV .
    DATA: G_GRID TYPE REF TO CL_GUI_ALV_GRID.
    CREATE OBJECT G_CUSTOM_CONTAINER
    EXPORTING CONTAINER_NAME = G_CONTAINER.
    Create TOP-Document
    CREATE OBJECT O_DYNDOC_ID
    EXPORTING STYLE = 'ALV_GRID'.
    Create Splitter for custom_container
    CREATE OBJECT O_SPLITTER
    EXPORTING PARENT  = G_CUSTOM_CONTAINER
    ROWS    = 2
    COLUMNS = 1.
      CALL METHOD O_SPLITTER->GET_CONTAINER
        EXPORTING
        ROW = 1
        COLUMN = 1
        RECEIVING
        CONTAINER = O_PARENT_TOP.
      CALL METHOD O_SPLITTER->GET_CONTAINER
        EXPORTING
        ROW = 2
        COLUMN = 1
        RECEIVING
        CONTAINER = O_PARENT_GRID.
    Set height for g_parent_html
      CALL METHOD O_SPLITTER->SET_ROW_HEIGHT
        EXPORTING
        ID = 1
        HEIGHT = 5.
    CREATE OBJECT G_GRID
    EXPORTING I_PARENT = O_PARENT_GRID.
    CREATE OBJECT G_HANDLER.
    SET HANDLER G_HANDLER->TOP_OF_PAGE FOR G_GRID.
    *Calling the Method for ALV output
      CALL METHOD G_GRID->SET_TABLE_FOR_FIRST_DISPLAY
        EXPORTING
        I_STRUCTURE_NAME = 'MARA'
        CHANGING
        IT_OUTTAB = IT_MARA[].
      CALL METHOD O_DYNDOC_ID->INITIALIZE_DOCUMENT
        EXPORTING
        BACKGROUND_COLOR = CL_DD_AREA=>COL_TEXTAREA.
    Processing events
      CALL METHOD G_GRID->LIST_PROCESSING_EVENTS
        EXPORTING
        I_EVENT_NAME = 'TOP_OF_PAGE'
        I_DYNDOC_ID = O_DYNDOC_ID.
    ENDFORM.                     "CREATE_AND_INIT_ALV
    FORM EVENT_TOP_OF_PAGE USING   DG_DYNDOC_ID TYPE REF TO CL_DD_DOCUMENT.
    DATA : DL_TEXT(255) TYPE C.  "Text
      CALL METHOD DG_DYNDOC_ID->ADD_TEXT
        EXPORTING
        TEXT = 'Flight Details'
        SAP_STYLE = CL_DD_AREA=>HEADING
        SAP_FONTSIZE = CL_DD_AREA=>LARGE
        SAP_COLOR = CL_DD_AREA=>LIST_HEADING_INT.
      CALL METHOD DG_DYNDOC_ID->ADD_GAP
        EXPORTING
        WIDTH = 200.
      CALL METHOD O_DYNDOC_ID->ADD_PICTURE
        EXPORTING
        PICTURE_ID = 'ENJOYSAP_LOGO'.
    Add new-line
      CALL METHOD DG_DYNDOC_ID->NEW_LINE.
      CALL METHOD DG_DYNDOC_ID->NEW_LINE.
    CLEAR : DL_TEXT.
    program ID
    DL_TEXT = 'Program Name :'.
      CALL METHOD DG_DYNDOC_ID->ADD_GAP.
      CALL METHOD O_DYNDOC_ID->ADD_TEXT
        EXPORTING
        TEXT = DL_TEXT
        SAP_EMPHASIS = CL_DD_AREA=>HEADING
        SAP_COLOR = CL_DD_AREA=>LIST_HEADING_INT.
    CLEAR DL_TEXT.
    DL_TEXT = SY-REPID.
      CALL METHOD O_DYNDOC_ID->ADD_TEXT
        EXPORTING
        TEXT = DL_TEXT
        SAP_EMPHASIS = CL_DD_AREA=>HEADING
        SAP_COLOR = CL_DD_AREA=>LIST_NEGATIVE_INV.
    Add new-line
      CALL METHOD DG_DYNDOC_ID->NEW_LINE.
    CLEAR : DL_TEXT.
    CLEAR : DL_TEXT.
    program ID
    DL_TEXT = 'User Name :'.
      CALL METHOD DG_DYNDOC_ID->ADD_GAP.
      CALL METHOD O_DYNDOC_ID->ADD_TEXT
        EXPORTING
        TEXT = DL_TEXT
        SAP_EMPHASIS = CL_DD_AREA=>HEADING
        SAP_COLOR = CL_DD_AREA=>LIST_HEADING_INT.
    CLEAR DL_TEXT.
    DL_TEXT = SY-UNAME.
      CALL METHOD O_DYNDOC_ID->ADD_TEXT
        EXPORTING
        TEXT = DL_TEXT
        SAP_EMPHASIS = CL_DD_AREA=>HEADING
        SAP_COLOR = CL_DD_AREA=>LIST_NEGATIVE_INV.
    Add new-line
      CALL METHOD DG_DYNDOC_ID->NEW_LINE.
    CLEAR : DL_TEXT.
    Run Date
    DL_TEXT = 'Run Date :'.
      CALL METHOD DG_DYNDOC_ID->ADD_GAP.
      CALL METHOD O_DYNDOC_ID->ADD_TEXT
        EXPORTING
        TEXT = DL_TEXT
        SAP_EMPHASIS = CL_DD_AREA=>HEADING
        SAP_COLOR = CL_DD_AREA=>LIST_HEADING_INT.
    CLEAR DL_TEXT.
    Move date
    WRITE SY-DATUM TO DL_TEXT.
      CALL METHOD O_DYNDOC_ID->ADD_TEXT
        EXPORTING
        TEXT = DL_TEXT
        SAP_EMPHASIS = CL_DD_AREA=>HEADING
        SAP_COLOR = CL_DD_AREA=>LIST_NEGATIVE_INV.
    Add new-line
      CALL METHOD DG_DYNDOC_ID->NEW_LINE.
    CLEAR : DL_TEXT.
    *Time
    DL_TEXT = 'Time :'.
      CALL METHOD DG_DYNDOC_ID->ADD_GAP.
      CALL METHOD O_DYNDOC_ID->ADD_TEXT
        EXPORTING
        TEXT = DL_TEXT
        SAP_EMPHASIS = CL_DD_AREA=>HEADING
        SAP_COLOR = CL_DD_AREA=>LIST_HEADING_INT.
    CLEAR DL_TEXT.
    Move time
    WRITE SY-UZEIT TO DL_TEXT.
      CALL METHOD O_DYNDOC_ID->ADD_TEXT
        EXPORTING
        TEXT = DL_TEXT
        SAP_EMPHASIS = CL_DD_AREA=>HEADING
        SAP_COLOR = CL_DD_AREA=>LIST_NEGATIVE_INV.
    Add new-line
      CALL METHOD DG_DYNDOC_ID->NEW_LINE.
    PERFORM DISPLAY.
    ENDFORM.                    " EVENT_TOP_OF_PAGE
    FORM DISPLAY.
    Creating html control
      IF O_HTML_CNTRL IS INITIAL.
        CREATE OBJECT O_HTML_CNTRL
             EXPORTING
                  PARENT    = O_PARENT_TOP.
      ENDIF.
      CALL METHOD O_DYNDOC_ID->MERGE_DOCUMENT.
      O_DYNDOC_ID->HTML_CONTROL = O_HTML_CNTRL.
    Display document
      CALL METHOD O_DYNDOC_ID->DISPLAY_DOCUMENT
        EXPORTING
          REUSE_CONTROL      = 'X'
          PARENT             = O_PARENT_TOP
        EXCEPTIONS
          HTML_DISPLAY_ERROR = 1.
      IF SY-SUBRC NE 0.
      MESSAGE I999 WITH 'Error in displaying top-of-page'(036).
      ENDIF.
    ENDFORM.                    " display
    Regards, Dieter

  • Refreshing the container in ALV grid

    hi,
    I am working on ALV GRID display (reports with ALV OOPS).
    I hav created it, but now i need to refresh the container...........i.e when the user presses back and he is giving the new selection criteria , it shd pick the values based on the new selection criteria....
    So, how do it refresh the container???????

    Hi,
    In ALV, to refresh the table you have to call the method "refresh_table_display". 
    It has the syntax very similar to creating the table. 
    It has two parameters. In the first one, you can mention if you want to refresh only the data (the icons are not refreshed) 
    or 
    if you want to refresh only the icons around the grid (the data is not refreshed - this option is mostly not used in day to day applications).
    the synatx is :-
    call method grid (name of grid )->refresh_table_display
    exporting
    IS_STABLE = <STRUCT OF TYPE LVC_S_STBL> (THIS IS FOR DATA REFRESHING)
    I_SOFT_REFRESH = <VARIABLE OF CHAR 01>  (THIS IS FOR ICON REFRESHING).
    Regards,
    Bhaskar

  • Multiple ALV Grid Controls per report - problem with default displ.variant

    Hi,
    I have a report with few screens called sequentialy. Each one of the screens has implemented own instance of ALV Grid Control within custom container, means:
    - screen 100 has container Cont100 and grid control "grid100",
    - screen 110 has container Cont110 and grid control "grid110"
    - screen 120 has container Cont120 and grid control "grid120"
    and so on...
    Each one of the grid controls is initialized with own field catalog table, with own layout and variant structure definitions. My problem occurs when the user changes the display variant for some of the grid controls and save the layout variant using "default setting" checkbox. In this case next time the program is started all other grid controls behaves like they don't have their own variant definitions, but uses the default setting of the mentioned screen. This leads (usualy) to unsuable grid controls by default, because usualy different controls have no equal field-definition tables. I have the same behaviour even when there are more than 1 ALV grids on a single screen (for example - 2).
    For now I don't provide variant variables at selection screen, but it seems there is no way to provide such variables for each one of the grid-controls.
    Is anyone aware how to control this? Means no matter if there is default setting in use for some of the grid-controls, how to manipulate other grid-controls not to use this default setting?
    Many thanks in advance.
    Regards,
    Ivaylo Mutafchiev

    check this sample code which displays 4 grids in 4 different tabs and with 4 different handles
    PROGRAM  sapmzsdpp MESSAGE-ID z1.
    Table Declarations                                                   *
    TABLES:
      vbpa,                                " Sales Document: Partner
      kna1,                                " Customer Master
      vbap.                                " Sales Document: Item Data
    Tab Strip Declarations                                              *
    CONTROLS:
      tabstrip_sdpp TYPE TABSTRIP.         " Tabstrip
    Constants declarations                                               *
    CONSTANTS:
      c_rep_zm(2)   TYPE c VALUE 'ZM',     " Outside Sales Representative
      c_rep_ve(2)   TYPE c VALUE 'VE',     " Inside Sales Representative
      c_rep_zi(2)   TYPE c VALUE 'ZI',     " Sales Manager
      c_abgru_08(2) TYPE c VALUE '08',     " Reason for Rej: SO Not Closed
      c_stock_ind_e TYPE c VALUE 'E',      " Stock Idctr : Orders on hand
      c_gauge(5)    TYPE c VALUE 'GAUGE',  " Characteristic Name - GAUGE
      c_width(5)    TYPE c VALUE 'WIDTH',  " Characteristic Name - WIDTH
      c_gauge_metric(12)                   " Character Name - GAUGE_METRIC
                    TYPE c VALUE 'GAUGE_METRIC',
      c_width_metric(12)                   " Character Name - WIDTH_METRIC
                    TYPE c VALUE 'WIDTH_METRIC',
      c_eng_metric(14)                     " Charac Value - ENGLISH_METRIC
                    TYPE c VALUE 'ENGLISH_METRIC',
      c_coil(4)     TYPE c VALUE 'COIL',   " For Value COIL
      c_spec_bf(7)  TYPE c VALUE 'SPEC_BF'," Charac value SPEC_BF
      c_wadat_ist(8)                       " Actual Goods Movement Date
                    TYPE c VALUE '00000000',
      c_mcha(4)     TYPE c VALUE 'MCHA',   " Database Table 'MCHA'
      c_classtype_022(3)
                    TYPE c VALUE '022',    " Class Type : BATCH
      c_pipe(2)     TYPE c VALUE '06',     " Material Pricing Group: Pipes
      c_item_ctgry_ztam(4)
                    TYPE c VALUE 'ZTAM',   " Item Cat:Certificate Mnfctr
      c_lab_result(10)                     " Charac Value LAB_RESULT
                    TYPE n VALUE '0000001392',
      c_none_reqd(10)                      " For Value NONE REQD
                    TYPE c VALUE 'NONE REQD.',
      c_passed(6)   TYPE c VALUE 'PASSED', " For Value PASSED
      c_pending(12) TYPE c                 " For Value TEST PENDING
                    VALUE 'TEST PENDING',
      c_bundling(13)                       " For Value TEST BUNDLING
                    TYPE c VALUE 'TEST BUNDLING',
      c_normal(2)   TYPE c VALUE '01'.     " Priority: Normal
    Internal Table Declarations                                          *
    DATA :
    Internal table to hold common data for all reports
    BEGIN OF t_common_data OCCURS 0,
       kunnr        LIKE vbak-kunnr,       " Customer Number
       vbeln        LIKE vbap-vbeln,       " Sales Document Number
       posnr        LIKE vbap-posnr,       " Sales Document Item Number
       ihrez_e      LIKE vbkd-ihrez_e,     " Mill Order Number
       matnr        LIKE vbap-matnr,       " Material Number
       pstyv        LIKE vbap-pstyv,       " Sales Document Item Category
       kwmeng       LIKE vbap-kwmeng,      " Cumulative Order Quantity
       lprio        LIKE vbap-lprio,       " Delivery Priority
       werks        LIKE vbap-werks,       " Plant
       kondm        LIKE vbap-kondm,       " Material Pricing Group
       aedat        LIKE vbap-aedat,       " Date of Last Change
       cuobj        LIKE vbap-cuobj,       " Configuration
       saldata      LIKE vbap-zzcust_req_avail,
                                           " Required Availability Date
    END OF t_common_data,
    Internal table to hold Customer Number
      BEGIN OF t_cust_temp OCCURS 0,
        kunnr       LIKE vbak-kunnr,       " Customer Number
      END OF t_cust_temp,
    Internal table to hold stock details
      BEGIN OF t_stock OCCURS 0,
       vbeln        LIKE mska-vbeln,       " Sales Document Number
       posnr        LIKE mska-posnr,       " Sales Document Item Number
       matnr        LIKE mska-matnr,       " Material Number
       werks        LIKE mska-werks,       " Plant
       charg        LIKE mska-charg,       " Batch Number
       kalab        LIKE mska-kalab,       " Valuated Stock
       ersda        LIKE mska-ersda,
    END OF t_stock,
    Internal table to hold deliveries
    BEGIN OF t_delivery_data OCCURS 0,
      vbeln         LIKE lips-vbeln,       " Delivery Document Number
      vgbel         LIKE lips-vgbel,       " Document No of Ref Document
      vgpos         LIKE lips-vgpos,       " Item No of Ref Item
    END OF t_delivery_data,
    Internal table to hold released tons & released days
    BEGIN OF t_released_tons_days OCCURS 0,
      vbeln         LIKE likp-vbeln,       " Delivery Document Number
      btgew         LIKE likp-btgew,       " Total Weight
      bldat         LIKE likp-bldat,       " Document Date in Document
    END OF t_released_tons_days,
    Internal table to hold Pre-Production-Pending Orders (Report-1)
    BEGIN OF t_pre_prod_ord OCCURS 0,
       sortl1       LIKE zcustcode-sortl,  " Customer Search Term
       ihrez_e1     LIKE vbkd-ihrez_e,     " Mill Order Number
       salord1(17)  TYPE c,                " Sales Order Document & Item
       descri       TYPE char70,           " Specification of the Item
       speci        TYPE char30,           " Description of the Item
       days_entry   LIKE zlgcyinfo-days_since_entry,
                                           " Days Since Entry
       dept         LIKE zlgcyinfo-bklog,  " Department
       notes1       LIKE zcsimemo-text,    " CSI File Memo Text
    */ Request No. DV2K904687
       chng_date    LIKE vbap-aedat,       " Date of Last Change
    END OF t_pre_prod_ord,
    Internal table to hold Delinquent Orders (Report-2)
    BEGIN OF t_delinquent_ord OCCURS 0,
       sortl2       LIKE zcustcode-sortl,  " Customer Search Term
       ihrez_e2     LIKE vbkd-ihrez_e,     " Mill Order Number
       salord2(17)  TYPE c,                " Sales Order Document & Item
       descri       TYPE char70,           " Specification of the Item
       speci        TYPE char30,           " Description of the Item
       saldata      LIKE vbap-zzcust_req_avail,
       schdate      LIKE vbep-edatu,       " Schedule Line Date
       days_late    LIKE zlgcyinfo-dayslate,
                                           " Days Late
       unit         LIKE zlgcyinfo-unit,   " Status of Consolidation Units
       days_at_unit LIKE zlgcyinfo-daysatunit,
       notes2       LIKE zcsimemo-text,    " CSI File Memo Text
    END OF t_delinquent_ord,
    Internal table to hold Processed Material Orders (Report-3)
    BEGIN OF t_processed_ord OCCURS 0,
       sortl3       LIKE zcustcode-sortl,  " Customer Search Term
       ihrez_e3     LIKE vbkd-ihrez_e,     " Mill Order Number
       salord3(17)  TYPE c,                " Sales Order Document & Item
       descri       TYPE char70,           " Specification of the Item
       speci        TYPE char30,           " Description of the Item
       order_tons   LIKE vbap-kwmeng,      " Cumulative Order Quantity
       fin_tons     LIKE mska-kalab,       " Val.Stock With Unres Usage
       fin_days     TYPE i,                " Finished Days
       rel_tons     LIKE likp-btgew,       " Total Weight
       rel_days     TYPE i,                " No.of.Days Order is Released
       status(15)   TYPE c,                " Status Of Stock
       tb_tons      LIKE zlgcyinfo-tons,   " Tons
       notes3       LIKE zcsimemo-text,    " CSI File Memo Text
    END OF t_processed_ord,
    Internal table to hold Flagged Orders (Report-4)
    BEGIN OF t_flagged_ord OCCURS 0,
       sortl4       LIKE zcustcode-sortl,  " Customer Search Term
       ihrez_e4     LIKE vbkd-ihrez_e,     " Mill Order Number
       salord4(17)  TYPE c,                " Sales Order Document & Item
       descri       TYPE char70,           " Specification of the Item
       speci        TYPE char30,           " Description of the Item
       saldata      LIKE vbap-zzcust_req_avail,
       unit         LIKE zlgcyinfo-unit,   " Status of Consolidation Units
       tons         LIKE zlgcyinfo-tons,   " Tons
       priority     LIKE vbap-lprio,       " Delivery Priority
       notes4       LIKE zcsimemo-text,    " CSI File Memo Text
    END OF t_flagged_ord,
    Internal table to hold CSI memo file data
    BEGIN OF t_csi_memo_data OCCURS 0,
       vbeln        LIKE zcsimemo-vbeln,   " Sales Document Number
       posnr        LIKE zcsimemo-posnr,   " Sales Order line item
       text         LIKE zcsimemo-text,    " CSI File Memo Text
    END OF t_csi_memo_data,
    Internal table to hold Customer Codes
    BEGIN OF t_customer_code OCCURS 0,
       sortl        LIKE zcustcode-sortl,  " Sort Field
       kunnr        LIKE zcustcode-kunnr,  " Customer Number
    END OF t_customer_code,
    Internal table to hold schedule line dates
    BEGIN OF t_schedule_line_date OCCURS 0,
       vbeln        LIKE vbep-vbeln,       " Sales Document Number
       posnr        LIKE vbep-posnr,       " Sales Document Item Number
       edatu        LIKE vbep-edatu,       " Schedule line date
    END OF t_schedule_line_date,
    Internal table to hold Characteristic values
      t_configuration
                    TYPE TABLE OF conf_out
                    WITH HEADER LINE,
    Internal tables to hold legacy data
      t_lgcyinfo    TYPE TABLE OF zlgcyinfo
                    WITH HEADER LINE.
    Work variables declarations                                          *
    DATA:
      gv_parvw      LIKE kupav-parvw,      " Partner function
      gv_abgru      LIKE vbap-abgru,       " Reason to eject sales order
      gv_gauge      LIKE conf_out-atwtb,   " Charac Value Description
      gv_width      LIKE conf_out-atwtb,   " Charac Value Description
      gv_ok_code    LIKE sy-ucomm,         " Usercommand
      gv_okcode     LIKE sy-ucomm,         " User Command
      gv_number     LIKE sy-dynnr
                    VALUE '0101',          " Initial Sub Screen Number
      gv_vbeln      LIKE vbak-vbeln,       " Sales Order
      gv_posnr      LIKE vbup-posnr,       " Sales Item
    */ Request No. DV2K904687
      gv_del_prio   LIKE vbap-lprio,       " Delivery Priority
      gv_obj_key    LIKE inob-objek,       " Object Key
      gv_config     LIKE inob-cuobj,       " Configuration
      gv_lab_result LIKE ausp-atwrt,       " Lab Result Value
      gv_pass_stock LIKE mska-kalab,       " Finished Stock
      gv_fail_stock LIKE mska-kalab,       " Failed Stock
      gv_tp_tons    LIKE mska-kalab,       " Test Pending Tons
      gv_csi_stock  LIKE mbew-lbkum,       " CSI Stock On Hand
      gv_val_stock  LIKE mska-kalab,       " Valuated Stock
      gv_fin_tons   LIKE mska-kalab,       " Finished Tons
      gv_fin_days   TYPE i,                " Finished Days
      gv_rel_tons   LIKE likp-btgew,       " Released Tons
      gv_rel_days   TYPE i,                " Released Days
      gv_no_delivery                       " Number of Delivery Documents
                    TYPE i,
      gv_bund_tons  LIKE zlgcyinfo-tons,   " Bundling Tons
      gv_net_weight LIKE mara-ntgew,       " Net Weight
      gv_tb_tons    LIKE zlgcyinfo-tons,   " Test/Bundling Tons
      gv_date       LIKE mska-ersda,       " Date
      gv_tabix      LIKE sy-tabix,         " Table Index
      gv_flg        TYPE c,                " Flag Variable
      gv_exit       TYPE c.                " For Parameter Exit
    Constant declarations for ALV Grid                                   *
    CONSTANTS:
      c_cont_pre_prod_ord
                     TYPE scrfname VALUE 'CUST_PPP',
                                           " Custom Container for Report-1
      c_cont_delinquent_ord
                     TYPE scrfname VALUE 'CUST_DIP',
                                           " Custom Container for Report-2
      c_cont_processed_ord
                     TYPE scrfname VALUE 'CUST_PMS',
                                           " Custom Container for Report-3
      c_cont_flagged_ord
                     TYPE scrfname VALUE 'CUST_FLGORD',
                                           " Custom Container for Report-4
      c_handle1(3)   TYPE c VALUE 'G_1',   " Handle for PPP rpt Grid
      c_handle2(3)   TYPE c VALUE 'G_2',   " Handle for DIP rpt Grid
      c_handle3(3)   TYPE c VALUE 'G_3',   " Handle for PMS rpt Grid
      c_handle4(3)   TYPE c VALUE 'G_4',   " Handle for FLGORD rpt Grid
      c_true         TYPE c VALUE 'X',     " For value 'X'
      c_save         TYPE c VALUE 'A'.     " User-Defd & Global Variants
    Selection Screen                                                     *
    SELECTION-SCREEN BEGIN OF SCREEN 500 AS WINDOW.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-014.
    PARAMETERS :
      p_osr       RADIOBUTTON GROUP g1
                  DEFAULT 'X',             " Outside Sales Representative
      p_isr       RADIOBUTTON GROUP g1,    " Inside Sales Representative
      p_s_mgr     RADIOBUTTON GROUP g1.    " Sales Manager
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-005.
    SELECT-OPTIONS:
      s_pernr     FOR vbpa-pernr
                  OBLIGATORY,              " Employee Number
      s_kunnr     FOR kna1-kunnr,          " Customer Number
      s_sortl     FOR kna1-sortl,          " Customer Search Term
      s_kondm     FOR vbap-kondm.          " Material Pricing Group
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-006.
    PARAMETERS:
      p_open      RADIOBUTTON GROUP g2
                  DEFAULT 'X',             " Open Orders
      p_closed    RADIOBUTTON GROUP g2.    " Closed Orders
    SELECTION-SCREEN END OF BLOCK b3.
    SELECTION-SCREEN BEGIN OF BLOCK b4 WITH FRAME TITLE text-007.
    PARAMETERS:
      p_var1      LIKE disvariant-variant, " Variant For Report-1
      p_var2      LIKE disvariant-variant, " Variant For Report-2
      p_var3      LIKE disvariant-variant, " Variant For Report-3
      p_var4      LIKE disvariant-variant. " Varinat For Report-3
    SELECTION-SCREEN END OF BLOCK b4.
    SELECTION-SCREEN END OF SCREEN 500.
    */ Begin of Modification - Request No. DV2K904687
    Selection Screen for Changing Sales Order Priority
    SELECTION-SCREEN BEGIN OF SCREEN 1100 AS WINDOW.
    SELECTION-SCREEN BEGIN OF BLOCK b5 WITH FRAME TITLE text-044.
    PARAMETERS    p_sonum  LIKE vbap-vbeln." Sales Order Number
    SELECT-OPTIONS s_item  FOR  vbap-posnr." Sales Order Item
    PARAMETERS     p_delpr LIKE vbap-lprio." Delivery Priority
    SELECTION-SCREEN END OF BLOCK b5.
    SELECTION-SCREEN END OF SCREEN 1100.
    */ End of Modification - Request No. DV2K904687
    CLASS lcl_gv_event_receiveriver DEFINITION                           *
    CLASS lcl_event_receiver DEFINITION DEFERRED.
    ALV Grid - Work Variables Declarations                               *
    DATA:
      gv_cont_pre_prod_ord   TYPE REF
                               TO cl_gui_custom_container,
                                           " Custom Cont For Report-1
      gv_cont_delinquent_ord TYPE REF
                               TO cl_gui_custom_container,
                                          " Custom Cont For Report-2
      gv_cont_processed_ord  TYPE REF
                               TO cl_gui_custom_container,
                                           " Custom Cont For Report-3
      gv_cont_flagged_ord    TYPE REF
                               TO cl_gui_custom_container,
                                           " Custom Cont For Report-4
      gv_grid_pre_prod_ord   TYPE REF
                               TO cl_gui_alv_grid,
                                           " Grid For Report-1
      gv_grid_delinquent_ord TYPE REF
                               TO cl_gui_alv_grid,
                                           " Grid For Report-2
      gv_grid_processed_ord  TYPE REF
                               TO cl_gui_alv_grid,
                                           " Grid For Report-3
      gv_grid_flagged_ord    TYPE REF
                               TO cl_gui_alv_grid,
                                           " Grid For Report-4
      gv_event_receiver      TYPE REF
                               TO lcl_event_receiver,
                                           " Object For Local Class
      gs_lay_pre_prod_ord    TYPE lvc_s_layo,
                                           " Work Area for Grid layout
      gs_lay_delinquent_ord  TYPE lvc_s_layo,
                                           " Work Area for Grid layout
      gs_lay_processed_ord   TYPE lvc_s_layo,
                                           " Work Area for Grid layout
      gs_lay_flagged_ord     TYPE lvc_s_layo,
                                           " Work Area for Grid Layout
      gs_var_pre_prod_ord    TYPE disvariant,
                                           " Layout Structure
      gs_var_delinquent_ord  TYPE disvariant,
                                           " Layout Structure
      gs_var_processed_ord   TYPE disvariant,
                                           " Layout Structure
      gs_var_flagged_ord     TYPE disvariant,
                                           " Layout Structure
      t_fcat_pre_prod_ord    TYPE lvc_t_fcat
                             WITH HEADER LINE,
                                           " Field Catalog For Report-1
      t_fcat_delinquent_ord  TYPE lvc_t_fcat
                             WITH HEADER LINE,
                                           " Field Catalog For Report-2
      t_fcat_processed_ord   TYPE lvc_t_fcat
                             WITH HEADER LINE,
                                           " Field Catalog For Report-3
      t_fcat_flagged_ord     TYPE lvc_t_fcat
                             WITH HEADER LINE,
                                           " Field Catalog For Report-4
      t_exclude              TYPE ui_functions,
                                           " Function Code Table
      gs_exclude             TYPE ui_func. " Function Code Structure
    CLASS lcl_gv_event_receiver DEFINITION                               *
    CLASS lcl_event_receiver DEFINITION.
      PUBLIC SECTION.
        METHODS:
          handle_hotspot
            FOR EVENT hotspot_click OF cl_gui_alv_grid
              IMPORTING e_row_id e_column_id es_row_no,
          handle_top_of_page
                          FOR EVENT print_top_of_page OF cl_gui_alv_grid,
    */ Begin of Modification - Request No. DV2K904687
        handle_toolbar
            FOR EVENT toolbar OF cl_gui_alv_grid
                IMPORTING e_object e_interactive,
        handle_user_command
            FOR EVENT user_command OF cl_gui_alv_grid
                IMPORTING e_ucomm.
    */ End of Modification - Request No. DV2K904687
    ENDCLASS.                              " LCL_EVENT_RECEIVER DEFINITION
    CLASS IMPLEMENTATION                                                 *
    CLASS lcl_event_receiver IMPLEMENTATION.
      METHOD handle_hotspot.
        CASE e_column_id-fieldname.
          WHEN 'SALORD1'.
            CLEAR t_pre_prod_ord.
            READ TABLE t_pre_prod_ord
                  INTO t_pre_prod_ord
                 INDEX e_row_id-index.
          Call VA03 To View Sales Order Line Item Details
            PERFORM call_va03 USING t_pre_prod_ord-salord1.
          WHEN 'SALORD2'.
            CLEAR t_delinquent_ord.
            READ TABLE t_delinquent_ord
                  INTO t_delinquent_ord
                 INDEX e_row_id-index.
          Call VA03 To View Sales Order Line Item Details
            PERFORM call_va03 USING t_delinquent_ord-salord2.
          WHEN 'SALORD3'.
            CLEAR t_processed_ord.
            READ TABLE t_processed_ord
                  INTO t_processed_ord
                 INDEX e_row_id-index.
          Call VA03 To View Sales Order Line Item Details
            PERFORM call_va03 USING t_processed_ord-salord3.
          WHEN 'SALORD4'.
            CLEAR t_flagged_ord.
            READ TABLE t_flagged_ord
                  INTO t_flagged_ord
                 INDEX e_row_id-index.
          Call VA03 To View Sales Order Line Item Details
            PERFORM call_va03 USING t_flagged_ord-salord4.
          WHEN 'SORTL1'.
            CLEAR t_pre_prod_ord.
            READ TABLE t_pre_prod_ord
                  INTO t_pre_prod_ord
                 INDEX e_row_id-index.
        Call ZSD11 for Customer Search Term
            PERFORM call_zsd11_cust_code USING t_pre_prod_ord-sortl1.
          WHEN 'SORTL2'.
            CLEAR t_delinquent_ord.
            READ TABLE t_delinquent_ord
                  INTO t_delinquent_ord
                 INDEX e_row_id-index.
          Call ZSD11 for Customer Search Term
            PERFORM call_zsd11_cust_code USING t_delinquent_ord-sortl2.
          WHEN 'SORTL3'.
            CLEAR t_processed_ord.
            READ TABLE t_processed_ord
                  INTO t_processed_ord
                 INDEX e_row_id-index.
          Call ZSD11 for Customer Search Term
            PERFORM call_zsd11_cust_code USING t_processed_ord-sortl3.
          WHEN 'SORTL4'.
            CLEAR t_flagged_ord.
            READ TABLE t_flagged_ord
                  INTO t_flagged_ord
                 INDEX e_row_id-index.
          Call ZSD11 for Customer Search Term
            PERFORM call_zsd11_cust_code USING t_flagged_ord-sortl4.
          WHEN 'IHREZ_E1'.
            CLEAR t_pre_prod_ord.
            READ TABLE t_pre_prod_ord
                  INTO t_pre_prod_ord
                 INDEX e_row_id-index.
          Call ZSD11 for Mill Order
            PERFORM call_zsd11_millorder USING t_pre_prod_ord-ihrez_e1.
          WHEN 'IHREZ_E2'.
            CLEAR t_delinquent_ord.
            READ TABLE t_delinquent_ord
                  INTO t_delinquent_ord
                 INDEX e_row_id-index.
          Call ZSD11 for Mill Order
            PERFORM call_zsd11_millorder USING t_delinquent_ord-ihrez_e2.
          WHEN 'IHREZ_E3'.
            CLEAR t_processed_ord.
            READ TABLE t_processed_ord
                  INTO t_processed_ord
                 INDEX e_row_id-index.
          Call ZSD11 for Mill Order
            PERFORM call_zsd11_millorder USING t_processed_ord-ihrez_e3.
          WHEN 'IHREZ_E4'.
            CLEAR t_flagged_ord.
            READ TABLE t_flagged_ord
                   INTO t_flagged_ord
                  INDEX e_row_id-index.
          Call ZSD11 for Mill Order
            PERFORM call_zsd11_millorder USING t_flagged_ord-ihrez_e4.
          WHEN 'NOTES1'.
            CLEAR t_pre_prod_ord.
            READ TABLE t_pre_prod_ord
                  INTO t_pre_prod_ord
                 INDEX e_row_id-index.
          Call zsd00087 program to edit CSI Memo Text
            PERFORM edit_notes USING t_pre_prod_ord-salord1.
          WHEN 'NOTES2'.
            CLEAR t_delinquent_ord.
            READ TABLE t_delinquent_ord
                  INTO t_delinquent_ord
                 INDEX e_row_id-index.
          Call zsd00087 program to edit CSI Memo Text
            PERFORM edit_notes USING t_delinquent_ord-salord2.
          WHEN 'NOTES3'.
            CLEAR t_processed_ord.
            READ TABLE t_processed_ord
                  INTO t_processed_ord
                 INDEX e_row_id-index.
          Call zsd00087 program to CSI Memo Text
            PERFORM edit_notes USING t_processed_ord-salord3.
          WHEN 'NOTES4'.
            CLEAR t_flagged_ord.
            READ TABLE t_flagged_ord
                  INTO t_flagged_ord
                 INDEX e_row_id-index.
          Call zsd00087 program to CSI Memo Text
            PERFORM edit_notes USING t_flagged_ord-salord4.
        ENDCASE.                           " CASE E_COLUMN_ID ...
      ENDMETHOD.                           " HANDLE_HOTSPOT
      METHOD handle_top_of_page.
        PERFORM write_report_header.
      ENDMETHOD.                           " METHOD HANDLE_TOP_OF_PAGE
    */ Begin of Modification - Request No. DV2K904687
      METHOD handle_toolbar.
        DATA: ls_toolbar  TYPE stb_button.
      append a separator to normal toolbar
        CLEAR ls_toolbar.
        MOVE 3 TO ls_toolbar-butn_type.
        APPEND ls_toolbar TO e_object->mt_toolbar.
        CLEAR ls_toolbar.
      append a button for Change Delivery Priority
        MOVE 'CHNG_PRIO' TO ls_toolbar-function.
        MOVE 'Change SO Delivery Priority'(048)
             TO ls_toolbar-quickinfo.
        MOVE 'Change SO Priority'(049) TO ls_toolbar-text.
        MOVE 0 TO ls_toolbar-butn_type.
        APPEND ls_toolbar TO e_object->mt_toolbar.
      ENDMETHOD.                           " handle_toolbar
      METHOD handle_user_command.
        DATA: t_sel_row  TYPE lvc_t_roid,
              gs_sel_row TYPE lvc_s_roid,
              gs_flagged_ord LIKE t_flagged_ord,
              lv_lines   TYPE i.
        CASE e_ucomm.
          WHEN 'CHNG_PRIO'.
            REFRESH t_sel_row.
            CLEAR e_ucomm.
            CALL METHOD gv_grid_flagged_ord->get_selected_rows
              IMPORTING
                et_row_no = t_sel_row.
            CLEAR: t_flagged_ord,
                   gv_vbeln,
                   gv_posnr,
                   gv_del_prio.
            DESCRIBE TABLE t_sel_row LINES lv_lines.
            IF lv_lines GT 1.
              MESSAGE i001 WITH 'Select only one row'(043).
            ELSEIF lv_lines EQ 1.
              READ TABLE t_sel_row INTO gs_sel_row INDEX 1.
              READ TABLE t_flagged_ord INTO gs_flagged_ord
                   INDEX gs_sel_row-row_id.
              IF sy-subrc EQ 0.
                SPLIT gs_flagged_ord-salord4 AT '-' INTO gv_vbeln gv_posnr.
                gv_del_prio = gs_flagged_ord-priority.
                CLEAR: s_item, s_item[].
                p_sonum    = gv_vbeln.
                p_delpr    = gv_del_prio.
                s_item-low = gv_posnr.
                APPEND s_item TO s_item.
                CLEAR  s_item.
              ENDIF.                       " IF sy-subrc EQ 0
            ENDIF.                         " IF lv_lines GT 1
            IF lv_lines LE 1.
              CALL SELECTION-SCREEN '1100' STARTING AT 30 2
                                           ENDING   AT 110 7.
              LEAVE TO SCREEN 100.
            ENDIF.
        ENDCASE.                           " CASE e_ucomm
      ENDMETHOD.                           " handle_user_command
    */ End of Modification - Request No. DV2K904687
    ENDCLASS.                              " LCL_EVENT_RECEIVER
    " IMPLEMENTATION
    Form  WRITE_REPORT_HEADER                                            *
    This subroutine displays Report Header which includes                *
    Report Name, Executed by, Execution date, Execution Time             *
    There are no parameters to be passed to this subroutine              *
    FORM write_report_header.
      DATA lv_rep_tit(72) TYPE c.
      FORMAT COLOR COL_KEY.
      MOVE sy-title TO lv_rep_tit.
      CONDENSE lv_rep_tit.
      SKIP 1.
      WRITE: /3  sy-repid,
              25 'California Steel Industries, Inc.'(040),
              75 'Page'(041),
              80(4) sy-pagno.
      WRITE: /3  sy-uzeit,
              25 lv_rep_tit,
              75 sy-datum.
      FORMAT RESET.
    ENDFORM.                               " WRITE_REPORT_HEADER
    At selection-output                                                  *
    AT SELECTION-SCREEN OUTPUT.
      CLEAR sy-ucomm.
      IF sy-dynnr EQ '0500'.
      Initialize layout variant for report-1
        CLEAR gs_var_pre_prod_ord.
        gs_var_pre_prod_ord-report = sy-cprog.
        gs_var_pre_prod_ord-handle = c_handle1.
        PERFORM initialize_layoutvariant CHANGING gs_var_pre_prod_ord.
        p_var1 = gs_var_pre_prod_ord-variant.
      Initialize layout variant for report-2
        CLEAR gs_var_delinquent_ord.
        gs_var_delinquent_ord-report = sy-cprog.
        gs_var_delinquent_ord-handle = c_handle2.
        PERFORM initialize_layoutvariant CHANGING gs_var_delinquent_ord.
        p_var2 = gs_var_delinquent_ord-variant.
      Initialize layout variant for report-3
        CLEAR gs_var_processed_ord.
        gs_var_processed_ord-report = sy-cprog.
        gs_var_processed_ord-handle = c_handle3.
        PERFORM initialize_layoutvariant CHANGING gs_var_processed_ord.
        p_var3 = gs_var_processed_ord-variant.
      Initialize layout variant for report-4
        CLEAR gs_var_flagged_ord.
        gs_var_flagged_ord-report = sy-cprog.
        gs_var_flagged_ord-handle = c_handle4.
        PERFORM initialize_layoutvariant CHANGING gs_var_flagged_ord.
        p_var4 = gs_var_flagged_ord-variant.
    */ Begin of Modification - Request No. DV2K904687
      ELSEIF sy-dynnr EQ '1100'.
        DATA t_exclude  TYPE TABLE OF sy-ucomm.
        SET PF-STATUS 'MENU_1100'.
      To use your own GUI status for a selection screen
        CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
          EXPORTING
            p_status  = 'MENU_1100'
          TABLES
            p_exclude = t_exclude.
      ENDIF.                               " IF sy-dynnr EQ '0500'
    */ End of Modification - Request No. DV2K904687
    At Selection Screen                                                  *
    AT SELECTION-SCREEN.
    */ Begin of Modification - Request No. DV2K904687
      CASE sy-dynnr.
        WHEN '1100'.
          IF sy-ucomm IS INITIAL.
            CLEAR sy-ucomm.
            LEAVE TO SCREEN 1100.
          ENDIF.                           " IF sy-ucomm IS INITIAL
          CASE sy-ucomm.
            WHEN 'SAVE'.
              CLEAR sy-ucomm.
            Change Delivery Priority using BAPI method
              PERFORM change_del_priority.
              CLEAR: sy-ucomm,
                     gv_vbeln,
                     gv_posnr,
                     gv_del_prio,
                     p_sonum,
                     s_item,
                     s_item[],
                     p_delpr.
              LEAVE TO SCREEN 0.
            WHEN 'CANCEL'.
              CLEAR: sy-ucomm,
                     gv_vbeln,
                     gv_posnr,
                     gv_del_prio,
                     p_sonum,
                     s_item,
                     s_item[],
                     p_delpr.
              LEAVE TO SCREEN 0.
          ENDCASE.                         " CASE sy-ucomm
        WHEN '0500'.
          IF sy-ucomm EQ 'CRET'.
            LEAVE TO SCREEN 100.
          ELSEIF sy-ucomm IS INITIAL.
            LEAVE TO SCREEN 500.
          ENDIF.                           " IF SY-UCOMM EQ 'CRET'
      ENDCASE.                             " CASE sy-dynnr
    */ End of Modification - Request No. DV2K904687
    Selection Screen: Validations                                        *
    AT SELECTION-SCREEN ON s_pernr.
    Validate Employee Number
      PERFORM validate_employee_number.
    AT SELECTION-SCREEN ON s_kunnr.
    Validate Customer Number
      IF NOT s_kunnr IS INITIAL.
        PERFORM validate_customer_number.
      ENDIF.                               " IF NOT S_KUNNR IS INITIAL
    AT SELECTION-SCREEN ON s_sortl.
    Validate Search Term
      IF NOT s_sortl IS INITIAL.
        PERFORM validate_search_term.
      ENDIF.                               " IF NOT S_SORTL IS INITIAL
    AT SELECTION-SCREEN ON s_kondm.
    Validate Product
      IF NOT s_kondm IS INITIAL.
        PERFORM validate_product.
      ENDIF.                               " IF NOT S_KONDM IS INITIAL
    Validate p_var1
    AT SELECTION-SCREEN ON p_var1.
      CLEAR gs_var_pre_prod_ord.
      gs_var_pre_prod_ord-report  = sy-cprog.
      gs_var_pre_prod_ord-handle  = c_handle1.
      gs_var_pre_prod_ord-variant = p_var1.
      IF p_var1 IS NOT INITIAL.
        PERFORM validate_variant CHANGING gs_var_pre_prod_ord.
      ENDIF.                               " IF P_VAR1 IS NOT INITIAL
    Validate p_var2
    AT SELECTION-SCREEN ON p_var2.
      CLEAR gs_var_delinquent_ord.
      gs_var_delinquent_ord-report  = sy-cprog.
      gs_var_delinquent_ord-handle  = c_handle2.
      gs_var_delinquent_ord-variant = p_var2.
      IF p_var2 IS NOT INITIAL.
        PERFORM validate_variant CHANGING gs_var_delinquent_ord.
      ENDIF.                               " IF P_VAR2 IS NOT INITIAL
    Validate p_var3
    AT SELECTION-SCREEN ON p_var3.
      CLEAR gs_var_processed_ord.
      gs_var_processed_ord-report  = sy-cprog.
      gs_var_processed_ord-handle  = c_handle3.
      gs_var_processed_ord-variant = p_var3.
      IF p_var3 IS NOT INITIAL.
        PERFORM validate_variant CHANGING gs_var_processed_ord.
      ENDIF.                               " IF P_VAR3 IS NOT INITIAL
    Validate p_var4
    AT SELECTION-SCREEN ON p_var4.
      CLEAR gs_var_flagged_ord.
      gs_var_flagged_ord-report  = sy-cprog.
      gs_var_flagged_ord-handle  = c_handle4.
      gs_var_flagged_ord-variant = p_var4.
      IF p_var4 IS NOT INITIAL.
        PERFORM validate_variant CHANGING gs_var_flagged_ord.
      ENDIF.                               " IF P_VAR4 IS NOT INITIAL
    Selection Screen: Value Request for ALV GRID Variants                *
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_var1.
      CLEAR gs_var_pre_prod_ord.
      gs_var_pre_prod_ord-report = sy-cprog.
      gs_var_pre_prod_ord-handle = c_handle1.
      PERFORM f4_variant CHANGING gs_var_pre_prod_ord
                                  gv_exit.
      IF gv_exit NE c_true.
        p_var1 = gs_var_pre_prod_ord-variant.
      ENDIF.                               " IF GV_EXIT NE c_true
    F4 help for variant p_var2
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_var2.
      CLEAR:
        gs_var_delinquent_ord,
        gv_exit.
      gs_var_delinquent_ord-report = sy-cprog.
      gs_var_delinquent_ord-handle = c_handle2.
      PERFORM f4_variant CHANGING gs_var_delinquent_ord
                                  gv_exit.
      IF gv_exit NE c_true.
        p_var2 = gs_var_delinquent_ord-variant.
      ENDIF.                               " IF GV_EXIT NE c_true
    F4 help for variant p_var3
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_var3.
      CLEAR:
        gs_var_processed_ord,
        gv_exit.
      gs_var_processed_ord-report = sy-cprog.
      gs_var_processed_ord-handle = c_handle3.
      PERFORM f4_variant CHANGING gs_var_processed_ord
                                  gv_exit.
      IF gv_exit NE c_true.
        p_var3 = gs_var_processed_ord-variant.
      ENDIF.                               " IF GV_EXIT NE c_true
    F4 help for variant p_var4
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_var4.
      CLEAR:
        gs_var_flagged_ord,
        gv_exit.
      gs_var_flagged_ord-report = sy-cprog.
      gs_var_flagged_ord-handle = c_handle4.
      PERFORM f4_variant CHANGING gs_var_flagged_ord
                                  gv_exit.
      IF gv_exit NE c_true.
        p_var4 = gs_var_flagged_ord-variant.
      ENDIF.                               " IF GV_EXIT NE c_true
    Form  validate_employee_number                                       *
    This subroutine validates Employee Number                            *
    There are no parameters to need be passed to this subroutine         *
    FORM validate_employee_number.
      DATA lv_pernr LIKE vbpa-pernr.
      SELECT SINGLE pernr
        INTO lv_pernr
        FROM vbpa
       WHERE pernr IN s_pernr.
      IF sy-subrc NE 0.
        MESSAGE e001 WITH text-010.
      ENDIF.                               " IF SY-SUBRC NE 0
      CLEAR lv_pernr.
    ENDFORM.                               " VALIDATE_EMPLOYEE_NUMBER
    Form  validate_customer_number                                       *
    This subroutine validates Customer Number                            *
    There are no parameters need to be passed to this subroutine         *
    FORM validate_customer_number.
      SELECT SINGLE kunnr
        INTO t_common_data-kunnr
        FROM kna1
       WHERE kunnr IN s_kunnr.
      IF sy-subrc NE 0.
        MESSAGE e001 WITH text-011.
      ENDIF.                               " IF SY-SUBRC NE 0
      CLEAR t_common_data-kunnr.
    ENDFORM.                               " VALIDATE_CUSTOMER_NUMBER
    Form  validate_search_term                                           *
    This subroutine validates Search Term                                *
    There are no parameters need to be passed to this subroutine         *
    FORM validate_search_term.
      SELECT SINGLE sortl
        INTO t_customer_code-sortl
        FROM kna1
       WHERE sortl IN s_sortl.
      IF sy-subrc NE 0.
        MESSAGE e001 WITH text-012.
      ENDIF.                               " IF SY-SUBRC NE 0
      CLEAR t_customer_code-sortl.
    ENDFORM.                               " VALIDATE_SEARCH_TERM
    Form  validate_product                                               *
    This subroutine validates Product                                    *
    There are no parameters need to be passed to this subroutine         *
    FORM validate_product.
      SELECT SINGLE kondm
        INTO t_

Maybe you are looking for

  • How can I share a printer among a wired Mac and a wireless laptop?

    I find this extremely frustrating, but I can't figure out how to share my printer for the life of me. My Mac Pro is connected to my router and when my girlfriend is here she connects her computer to the internet via my router wirelessly/WiFi. She has

  • Dreamweaver CS5.5 won't open

    Hello alltogether. I've installed Design Premium CS5.5 Student for Mac fresh from Disc. And directly after the Setup, all apps would run perfectly fine. But Dreamweaver is the exception. Everytime I want to start Dreamweaver, an error occurs. This Er

  • L&F change 'features'

    I am finalizing a Swing application and one feature is that the user can set the L&F from a menu. I have found two 'features' which seem weird. 1) A JTree which has a home grown D&D TransferHandler added. When I change the L&F the TransferHandler is

  • Joining 2 Bex queries in Webi (BI 4.0)

    Hi, I have the following requirement. I want to join the results of 2 BEx queries in Webi (BI 4.0). I'm using the BICS connection, no universe. E.g. query 1: Country    Region          Amount Germany           EMEA           5 China                 A

  • 5800, Nokia Maps download error

    Hi all, I've just performed a factory reset on my nokia 5800 Xpressmusic. Now I cannot get the maps to download, I keep getting a server error after a few minutes. I can run on the phone, but with no maps installed can't see a lot, though it does obt