ALV grid in Spool screen limit

Hi,
I am displaying a report for bulk of order.
So we will schedule it in background .
Through the program, i am creating the output as file in appln server also i m dispklaying the report in ALV grid.
now the report is working fine and its creating a file in appln server.
Now my problem is if I see the spool in SM37,its showing the ALV grid. but some columns are missing in the right side.
I hope this is because of the screen limitation.How should I solve this.
I have to allow the user to see all the columns.

Hi
I too have the same issue....Where u able to find the solution...
I have checked through this Thread, when I create a new Format 65_1000, I still get some pages missing
Re: Spool  ALV LIST
Your responses will be helpful.
Thanks,
Chaithanya k

Similar Messages

  • ALV grids to spool

    Hi All,
    I am working on ALV's .I have 3 ALV grids in one screen . I want to send these 3 alv grids to spool.
    I am running this in back ground.I am using classes to display the LAV grids.
    Is it possiable to display the 3 ALV grids to spool.
    Thanks,
    Swapna.

    Hi,
    In the structure to be passed to the parameter u201Cis_printu201D of the method u201Cset_table_for_first_displayu201D.
    The print output of the field u201CPRNTLSTINF-->  ALV control: Do not print list informationu201D is not visible in the print preview of the ALV Grid. If you create a spool request first, you can check the final list layout in transaction SP01.

  • Return from ALV  Grid to Selection screen

    hi,
    I want to go back from ALV grid to selection screen.
    I am using the following code:
    WHEN 'BACK'.
    CALL METHOD grid1->refresh_table_display.
    CALL METHOD grid1->free.
    CALL METHOD custom_container1->free.
    CALL SELECTION-SCREEN 1000.
    it is working,but when i press BACK button from selection screen to program it is showing ERROR IN FLUSH 4 Error.
    Also I tried with method FLUSH
    WHEN 'BACK'.
    CALL METHOD grid1->refresh_table_display.
    CALL METHOD grid1->free.
    CALL METHOD custom_container1->free.
    CALL METHOD cl_gui_cfw=>flush.
    it's still showing same Error.
    Please help on this.
    Regards,
    Sankar

    Hi,
    My grid name is grid1.
    I tried with :
    DATA grid1 TYPE REF TO cl_gui_alv_grid.
    CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
    IMPORTING
    e_grid = grid1.
    CALL METHOD grid1->check_changed_data.
    CALL METHOD grid1->refresh_table_display.
    LEAVE TO SCREEN 0.
    Even, I tried with declaring another grid : grid2
    DATA grid1 TYPE REF TO cl_gui_alv_grid.
    CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
    IMPORTING
    e_grid = grid1.
    CALL METHOD grid1->check_changed_data.
    CALL METHOD grid1->refresh_table_display.
    LEAVE TO SCREEN 0.
    In both cases, I am getting the following Error : OBJECTS_OBJREF_NOT_ASSIGNED

  • 2 alv grids in 1 screen with 2 different header

    Hi All,
    I have a requirement where in I need to display 2 alv grids in 1 screen and each has its own set of header information. If anybody has come across such a requirement then pls send the code. I can do this using BLOCKED list alv but I want to do in grids.
    Thanks in advance.
    Sutapa Sengupta

    thr u go with code..
    Code listing for: Z_011_ALV_GRID_EVENT
    Description: EXAMPLE OF ALV GRID CONTROL
    SCREEN 101 : FLOW LOGIC
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0101.
    MODULE GET_DATA.
    MODULE CREATE_OBJECTS.
    MODULE SHOW_ALV.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0101.
    MODULE POOL Z_011_ALV_GRID_EVENT
    PROGRAM Z_011_ALV_GRID_EVENT.
    CLASS CL_EVENT_HANDLER DEFINITION
    CLASS CL_EVENT_HANDLER DEFINITION.
    PUBLIC SECTION.
    METHODS: ON_DOUBLE_CLICK FOR EVENT
    DOUBLE_CLICK OF CL_GUI_ALV_GRID
    IMPORTING ES_ROW_NO E_COLUMN,
    ON_RIGHT_CLICK FOR EVENT
    RIGHT_CLICK OF CL_GUI_ALV_GRID.
    ENDCLASS. "CL_EVENT_HANDLER DEFINITION
    CLASS CL_EVENT_HANDLER IMPLEMENTATION
    CLASS CL_EVENT_HANDLER IMPLEMENTATION.
    METHOD ON_DOUBLE_CLICK.
    DATA: TEXT TYPE STRING,
    ES_ROW_STRING TYPE STRING.
    ES_ROW_STRING = ES_ROW_NO-ROW_ID.
    CONCATENATE 'ROW : ' ES_ROW_STRING 'COLUMN : '
    E_COLUMN-FIELDNAME INTO TEXT SEPARATED BY SPACE.
    MESSAGE TEXT TYPE 'I'.
    ENDMETHOD. "ON_DOUBLE_CLICK
    METHOD ON_RIGHT_CLICK.
    MESSAGE 'RIGHT MOUSE BUTTON HAS CLICKED !!!' TYPE 'I'.
    ENDMETHOD. "ON_RIGHT_CLICK
    ENDCLASS. "CL_EVENT_HANDLER IMPLEMENTATION
    INCLUDE PROGRAMS
    INCLUDE Z_011_ALV_GRID_EVENT_TOP. " Global Data
    INCLUDE Z_011_ALV_GRID_EVENT_O01. " PBO-Modules
    INCLUDE Z_011_ALV_GRID_EVENT_I01. " PAI-Modules
    INCLUDE Z_011_ALV_GRID_EVENT_F01. " FORM-Routines
    TOP INCLUDE Z_011_ALV_GRID_EVENT_TOP
    TYPES AND DATA DECLARATION
    TABLES: SFLIGHT.
    DATA: OK_CODE TYPE SY-UCOMM,
    IT_SFLIGHT TYPE STANDARD TABLE OF SFLIGHT,
    R_HANDLER TYPE REF TO CL_EVENT_HANDLER,
    R_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
    R_GRID TYPE REF TO CL_GUI_ALV_GRID.
    PBO INCLUDE Z_011_ALV_GRID_EVENT_O01
    Module SHOW_ALV OUTPUT
    MODULE SHOW_ALV OUTPUT.
    CHECK OK_CODE IS INITIAL.
    CALL METHOD R_GRID->SET_TABLE_FOR_FIRST_DISPLAY
    EXPORTING
    I_STRUCTURE_NAME = 'SFLIGHT'
    CHANGING
    IT_OUTTAB = IT_SFLIGHT.
    ENDMODULE. " SHOW_ALV OUTPUT
    Module GET_DATA OUTPUT
    MODULE GET_DATA OUTPUT.
    CHECK OK_CODE IS INITIAL.
    PERFORM GET_DATA
    USING
    SFLIGHT-CARRID.
    ENDMODULE. " GET_DATA OUTPUT
    Module CREATE_OBJECTS OUTPUT
    MODULE CREATE_OBJECTS OUTPUT.
    IF R_HANDLER IS NOT BOUND. "CHECKS WHETHER A REFERENCE
    "VARIABLE CONTAINS VALID REFERENCE
    CREATE OBJECT R_HANDLER.
    ENDIF.
    IF R_CONTAINER IS NOT BOUND. "CHECKS WHETHER A REFERENCE
    "VARIABLE CONTAINS VALID REFERENCE
    CREATE OBJECT R_CONTAINER
    EXPORTING
    CONTAINER_NAME = 'CC_ALV'.
    ENDIF.
    IF R_GRID IS NOT BOUND.
    CREATE OBJECT R_GRID
    EXPORTING
    I_PARENT = R_CONTAINER.
    SET HANDLER R_HANDLER->ON_DOUBLE_CLICK
    R_HANDLER->ON_RIGHT_CLICK FOR ALL INSTANCES
    ENDIF.
    ENDMODULE. " CREATE_OBJECTS OUTPUT
    Module STATUS_0101 OUTPUT
    MODULE STATUS_0101 OUTPUT.
    SET PF-STATUS 'Z_010_STATUS'.
    "SET TITLEBAR 'xxx'.
    ENDMODULE. " STATUS_0101 OUTPUT
    PAI INCLUDE Z_011_ALV_GRID_EVENT_I01
    Module USER_COMMAND_0101 INPUT
    MODULE USER_COMMAND_0101 INPUT.
    CASE OK_CODE .
    WHEN 'SEARCH'.
    PERFORM GET_DATA
    USING
    SFLIGHT-CARRID.
    CALL METHOD R_GRID->REFRESH_TABLE_DISPLAY.
    WHEN 'EXIT'.
    LEAVE PROGRAM.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_0101 INPUT
    FORM INCLUDE Z_011_ALV_GRID_EVENT_F01
    FORM : GET_DATA
    Created : 26.03.2008 12:34:09
    FORM GET_DATA USING VALUE(P_CARRID) TYPE SFLIGHT-CARRID.
    IF P_CARRID IS INITIAL.
    SELECT * FROM SFLIGHT INTO CORRESPONDING
    FIELDS OF TABLE IT_SFLIGHT.
    ELSE.
    SELECT * FROM SFLIGHT INTO CORRESPONDING
    FIELDS OF TABLE IT_SFLIGHT WHERE CARRID = P_CARRID.
    ENDIF.
    ENDFORM. "GET_DATA

  • Report with 5 ALV grids on 1 screen

    I am trying to build a screen/report with 5 ALV grids which are interactive. One grid will display all sales order. When I click on a Sales order Hotspot, the items of the sales order would appear in the ALV grid box below.
    When i click on an sales order item hotspot, i want the delivery information in another alv grid in the same screen.
    There should be 2 more grids - one displaying the customer information -name,address, in one grid and one grid for open items if any. Any advice is welcome . Should I be creating a split container/docking container or multiple containers ? Sample code is welcome.
    Edited by: Shareen Hegde on Apr 2, 2008 9:25 PM

    Hello Shareen
    Below I have added my sample report ZUS_SDN_THREE_ALV_GRIDS showing three interactive ALV grids. Perhaps it might be useful to you. I would prefer one or multiple splitter containers over multiple "stand-alone" containers.
    *& Report  ZUS_SDN_THREE_ALV_GRIDS
    *& Display Customer data in three ALV lists:
    *& 1st ALV: Customers
    *& 2nd ALV: Sales order of selected customer (double-click)
    *& 3rd ALV: Positions   of selected sales order (double-click)
    *&          Double-click on material -> display material (MM02)
    *& NOTE: dynpro does not contain any elements (ok_code -> GD_OKCODE)
    *& Flow logic of dynpro '0100':
    *&PROCESS BEFORE OUTPUT.
    *&  MODULE STATUS_0100.
    *&PROCESS AFTER INPUT.
    *&  MODULE USER_COMMAND_0100.
    REPORT  zus_sdn_three_alv_grids.
    DATA:
      gd_okcode        TYPE ui_func,
      go_docking       TYPE REF TO cl_gui_docking_container,
      go_splitter      TYPE REF TO cl_gui_splitter_container,
      go_splitter_2    TYPE REF TO cl_gui_splitter_container,
      go_cell_top      TYPE REF TO cl_gui_container,
      go_cell_bottom   TYPE REF TO cl_gui_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,
      go_grid3         TYPE REF TO cl_gui_alv_grid.
    DATA:
      gt_knb1          TYPE STANDARD TABLE OF knb1,
      gt_vbak          TYPE STANDARD TABLE OF vbak,
      gt_vbap          TYPE STANDARD TABLE OF vbap.
    PARAMETERS:
      p_bukrs          TYPE bukrs  DEFAULT '1000'.
    *       CLASS lcl_eventhandler DEFINITION
    CLASS lcl_eventhandler DEFINITION.
      PUBLIC SECTION.
        CLASS-METHODS:
          handle_double_click FOR EVENT double_click OF cl_gui_alv_grid
            IMPORTING
              e_row
              e_column
              es_row_no
              sender.  " sending control, i.e. ALV grid that raised event
    ENDCLASS.                    "lcl_eventhandler DEFINITION
    *       CLASS lcl_eventhandler IMPLEMENTATION
    CLASS lcl_eventhandler IMPLEMENTATION.
      METHOD handle_double_click.
    *   define local data
        DATA:
          ls_knb1      TYPE knb1,
          ls_vbak      TYPE vbak,
          ls_vbap      TYPE vbap.
    *   Distinguish according to sending grid instance
        CASE sender.
          WHEN go_grid1.
            READ TABLE gt_knb1 INTO ls_knb1 INDEX e_row-index.
            CHECK ( ls_knb1-kunnr IS NOT INITIAL ).
            CALL METHOD go_grid1->set_current_cell_via_id
              EXPORTING
    *              IS_ROW_ID    =
    *              IS_COLUMN_ID =
                is_row_no    = es_row_no.
    *         Triggers PAI of the dynpro with the specified ok-code
            CALL METHOD cl_gui_cfw=>set_new_ok_code( 'ORDERS' ).
          WHEN go_grid2.
            READ TABLE gt_vbak INTO ls_vbak INDEX e_row-index.
            CHECK ( ls_vbak-vbeln IS NOT INITIAL ).
            CALL METHOD go_grid1->set_current_cell_via_id
              EXPORTING
    *              IS_ROW_ID    =
    *              IS_COLUMN_ID =
                is_row_no    = es_row_no.
    *         Triggers PAI of the dynpro with the specified ok-code
            CALL METHOD cl_gui_cfw=>set_new_ok_code( 'ORDER_DETAILS' ).
          WHEN go_grid3.
            READ TABLE gt_vbap INTO ls_vbap INDEX e_row-index.
            CHECK ( ls_vbap-matnr IS NOT INITIAL ).
            SET PARAMETER ID 'MAT' FIELD ls_vbap-matnr.
            CALL TRANSACTION 'MM02' AND SKIP FIRST SCREEN.
          WHEN OTHERS.
            RETURN.
        ENDCASE.
      ENDMETHOD.                    "handle_double_click
    ENDCLASS.                    "lcl_eventhandler IMPLEMENTATION
    START-OF-SELECTION.
      SELECT        * FROM  knb1 INTO TABLE gt_knb1
             WHERE  bukrs  = p_bukrs.
    * 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.
    * 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.
    * Create 2nd splitter container
      CREATE OBJECT go_splitter_2
        EXPORTING
          parent            = go_cell_left
          rows              = 2
          columns           = 1
    *      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_2->get_container
        EXPORTING
          row       = 1
          column    = 1
        RECEIVING
          container = go_cell_top.
      CALL METHOD go_splitter_2->get_container
        EXPORTING
          row       = 2
          column    = 1
        RECEIVING
          container = go_cell_bottom.
    * Create ALV grids
      CREATE OBJECT go_grid1
        EXPORTING
          i_parent          = go_cell_top
        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_bottom
        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_grid3
        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.
    * Set event handler
      SET HANDLER: lcl_eventhandler=>handle_double_click FOR go_grid1.
      SET HANDLER: lcl_eventhandler=>handle_double_click FOR go_grid2.
      SET HANDLER: lcl_eventhandler=>handle_double_click FOR go_grid3.
    * Display data
      CALL METHOD go_grid1->set_table_for_first_display
        EXPORTING
          i_structure_name = 'KNB1'
        CHANGING
          it_outtab        = gt_knb1
        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.
      REFRESH: gt_vbak.
      CALL METHOD go_grid2->set_table_for_first_display
        EXPORTING
          i_structure_name = 'VBAK'
        CHANGING
          it_outtab        = gt_vbak    " empty !!!
        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.
      REFRESH: gt_vbap.
      CALL METHOD go_grid3->set_table_for_first_display
        EXPORTING
          i_structure_name = 'VBAP'
        CHANGING
          it_outtab        = gt_vbap    " empty !!!
        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                       = syst-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 (ok_code -> GD_OKCODE)
      CALL SCREEN '0100'.
    * Flow logic of dynpro:
    *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 "ORDERS"
    *  SET TITLEBAR 'xxx'.
    * Refresh display of detail ALV list
      CALL METHOD go_grid2->refresh_table_display
    *    EXPORTING
    *      IS_STABLE      =
    *      I_SOFT_REFRESH =
        EXCEPTIONS
          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.
    * Refresh display of detail ALV list
      CALL METHOD go_grid3->refresh_table_display
    *    EXPORTING
    *      IS_STABLE      =
    *      I_SOFT_REFRESH =
        EXCEPTIONS
          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.
    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 Orders"
        WHEN 'ORDERS'.
          PERFORM customer_show_orders.
        WHEN 'ORDER_DETAILS'.
          PERFORM order_show_details.
        WHEN OTHERS.
      ENDCASE.
      CLEAR: gd_okcode.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Form  CUSTOMER_SHOW_ORDERS
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM customer_show_orders .
    * define local data
      DATA:
        ld_row      TYPE i,
        ls_knb1     TYPE knb1.
      CALL METHOD go_grid1->get_current_cell
        IMPORTING
          e_row = ld_row.
      READ TABLE gt_knb1 INTO ls_knb1 INDEX ld_row.
      CHECK ( syst-subrc = 0 ).
      SELECT        * FROM  vbak INTO TABLE gt_vbak
             WHERE  kunnr  = ls_knb1-kunnr.
      REFRESH: gt_vbap.
    ENDFORM.                    " CUSTOMER_SHOW_ORDERS
    *&      Form  ORDER_SHOW_DETAILS
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM order_show_details .
    * define local data
      DATA:
        ld_row      TYPE i,
        ls_vbak     TYPE vbak.
      CALL METHOD go_grid1->get_current_cell
        IMPORTING
          e_row = ld_row.
      READ TABLE gt_vbak INTO ls_vbak INDEX ld_row.
      CHECK ( syst-subrc = 0 ).
      SELECT        * FROM  vbap INTO TABLE gt_vbap
             WHERE  vbeln  = ls_vbak-vbeln.
    ENDFORM.                    " ORDER_SHOW_DETAILS
    Regards
      Uwe

  • Displayig ALV GRID, then a screen with write satetment

    Hi,
    I developed a program to post GL accounts. First I am displaying a report through ALV GRID(OOPS). I am providing a button on the same screen. If the user clicks it, it will post the GL documents, then I want to display the results from this GL posting. Please help me to display the results in other screen. I am not able to do this.
    Thanks,
    Ravi

    Hi Ravi,
    Try this way.
    <li>When you click on POST button on ALV, It posts the documents using some BAPI, Here get the all messages into one internal table. I do not know whether you loop and call BAPI or at a time post all GL a/cs. But You need to gather all the messages into one internal table. After postings, Write LEAVE TO LIST PROCESSING AND RETURN TO SCREEN 0. Then loop your message internal table and display using WRITE statement. LEAVE TO LIST PROCESSING will take you to LIST processing displays in classical way.
    CASE sy-ucomm.
      WHEN 'POST'.
        "Post the documents
        "Gather all the msges into one internal table.
        "Finally call the below statement
        LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.
        LOOP AT it_msgs INTO wa_msgs.
          WRITE:/ wa_msgs-message.
        ENDLOOP.
    ENDCASE.
    Thanks
    Venkat.O

  • Resizing ALV Grid When Changing Screen Resolution

    I have an ALV Grid imbedded in a custom container.  I would like for the Grid to resize if the user switches from 1024x768 to 800x600 resolution.  I obviously could size it for the lower res screen (and it would be ok on the higher res screen), but I ultimately would like it to resize.  Does anyone know how to make this happen?

    Is your Grid running within a custom container that was placed in the screen painter?  If so this is very easy.  Just make you screen very large (much larger then even 1024x768).  When you lay down the custom container, make it large enough to fill the entire empty area.  Your custom container should have a Resizing section in the attributes window.  Just check on Vertical and Horizontal resizing and choose you minimum size.

  • Display alv grids in selection screen based on the user event

    Hi All,
    I am workign on displaying ALV in same selection screen.I am able to display the ALV in selection screen.
    But i have 2 buttons in my selection screen 'Create' and 'change'.
    When i click on create i need  with some type of data and when i click on 'change' my alv grid another type of data.Ex: if i click on crate mara data should be dispalyed when i click on change makt table data should be dispalyed and also i have user defined buttons are in my grids.
    So i have used 2 containers to dispaly to different data.I am able to display the perfectly but the problem is first time when i click on create the grid is displaying when i click on change button  the create alv grid is displaying down and change data is dispalying up.
    I need only one alv grid at a time.Can anybody please let me know how can i do this.
    Thanks,
    Taragini

    Hello,
    Also I would suggest if it is relevant data maintain in one interntal table and show/hide based on condition
    through fieldcatalog (NO_OUT) parameter.
    Thanks

  • ALV Grid Report spool problem with column with no data

    Hello All,
    I have created a simple alv grid report the report has a description field of 40 ch for which I have made the display length as 20 ch . This works fine in the foreground but when I run the report in background when there is no data in this column this being overwritten with the next column. Which is causing a mismatch between the header and the data below it.
    Also when I try to download the report in foreground into excel the columns are not matching with the headers this again happens for columns when there is no data.
    Kindly please suggest what is going wrong.
    Thanks,
    ranjan

    Hi,
    For checking the output from background job, check the job and enter JDBG in the command bar and execute.
    Check the field catalog and the table contents in debugging just before display.
    Edited by: Jayanthi Jayaraman on Dec 2, 2010 4:09 AM

  • ALV GRID WITH SPOOL REQUEST

    Hi All,
    My requirement is iam displaying one alv_grid format but at the same time i would like to sent it to spool(sp01).Whenever i need print i able to take it.Can anybody give brief details.

    Hi,
    go through the below code...
    Re: REUSE_ALV_GRID_DISPLAY
    Regards,
    Nagaraj

  • Screen GUI Status Query ( ALV Grid)

    Hi All,
    I am having an ALV grid on a screen .
    I want to check the contents of the grid at the press of enter button, at present i have to press the check button available on the ALV grid to check the contents of the grid.
    Pls suggest

    Make sure that you set "ENTER" as the key which is to trigger the edit event.
            call method alv_grid->set_table_for_first_display
                exporting
                     is_layout              = lt_layout
                     it_toolbar_excluding   = lt_exclude
                changing
                     it_outtab       = ialv[]
                     it_fieldcatalog = fieldcat[].
    <b>
    * If cancelling points, register "ENTER" as event
    * and create the event receiver
             call method alv_grid->register_edit_event
                            exporting
                               i_event_id = cl_gui_alv_grid=>mc_evt_enter.
    </b>
    *   create Event Receiver
              create object event_receiver.
    *   handler for ALV grid
              set handler event_receiver->handle_data_changed for alv_grid.
    Regards,
    Rich Heilman

  • ALV grid screen dynamic resizing.

    Hello Experts,
    I have written a functionality to display a report program using the CL_GUI_ALV_GRID class.
    I need to add a functionality so that the scrollbars and the custom container area resize themselves dynamically if I am changing the window size of the window in which my ALV grid is displayed.
    Any pointers in this direction will be very helpful.
    Thank you.
    Gaurav.

    You could try this thread...if it helps...
    Resizing ALV Grid When Changing Screen Resolution
    Thanks,
    Ketan

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

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

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

  • How to print an alv grid

    Hello All,
    I want to print data on an alv grid to spool according the current layout using code.
    Can anyone give me suggestion, maybe some sample code?
    Thanks in advance,
    Alex

    Hi,
    I have 2 ALV grid in the screen and pront to spool of both ALV's using OOp.
    Please find sample code. Whenever report runs in the background i simply call this print subroutine after creating fieldcatalog, layout, sorting table etc.
    FORM list_append TABLES ut_table
                     USING  u_no      TYPE char1
                            u_tabname TYPE slis_tabname.
      IF u_no CA '13'.
        MOVE        'TOP_OF_PAGE'        TO ls_event-name.
        CONCATENATE 'TOP_OF_PAGE' u_no INTO ls_event-form.
        APPEND ls_event TO lt_events.
      ELSE.
        MOVE        'TOP_OF_LIST'        TO ls_event-name.
        CONCATENATE 'TOP_OF_LIST' u_no INTO ls_event-form.
        APPEND ls_event TO lt_events.
      ENDIF.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
           EXPORTING
                it_fieldcat                = lt_fieldcat
                is_layout                  = ls_layout
                i_tabname                  = u_tabname
                it_events                  = lt_events
                it_sort                    = lt_sort
    *           i_text                     =
           TABLES
                t_outtab                   = ut_table
           EXCEPTIONS
                program_error              = 1
                maximum_of_appends_reached = 2
                OTHERS                     = 3.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
               WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                               " LIST_APPEND
    *       Form  f_list_display
    FORM f_list_display.
      DATA ls_print TYPE slis_print_alv.
      ls_print-no_print_selinfos  = 'X'.   " Display no selection infos
      ls_print-no_print_listinfos = 'X'.   " Display no listinfos
      ls_print-reserve_lines      = 2.     " Lines reserved for end of page
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
           EXPORTING
                i_interface_check = ' '
                is_print          = ls_print
           EXCEPTIONS
                program_error     = 1
                OTHERS            = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
               WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                               " F_LIST_DISPLAY
    May this will help you.
    aRs
    Message was edited by:
            aRs

  • ALV Grid Download to Excel - Columns in wrong order

    I'm using the object cl_gui_alv_grid to output an ALV grid to the screen.  I've populated the field catalogue as follows:
    wa_alvfieldcat-col_pos = 1.
    wa_alvfieldcat-just = 'L'.
    wa_alvfieldcat-reptext = 'Customer Name'.
    wa_alvfieldcat-scrtext_s = 'Customer'.
    wa_alvfieldcat-scrtext_m = 'Customer'.
    wa_alvfieldcat-scrtext_l = 'Customer Name'.
    wa_alvfieldcat-outputlen = 35.
    wa_alvfieldcat-tabname = 'GTBL_REPORT'.
    wa_alvfieldcat-fieldname = 'CUST_NO'.
    The screen shows the table correctly in the order I've specified using COL_POS.  But when I select the download function from the ALV grid it moves all the date fields to the end instead of using the order I wanted.
    Any ideas?

      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name = 'ZCONTRACT_REPORT'
        CHANGING
          ct_fieldcat      = tbl_alvfieldcat.
    then
      LOOP AT tbl_alvfieldcat INTO wa_alvfieldcat.
        MOVE 'GTBL_REPORT' TO wa_alvfieldcat-tabname.
        CASE wa_alvfieldcat-fieldname.
          WHEN 'DATE_ORDER'.
            wa_alvfieldcat-col_pos = 4.
            wa_alvfieldcat-just = 'L'.
            wa_alvfieldcat-reptext = 'Date Order'.
            wa_alvfieldcat-scrtext_s = 'Date Order'.
            wa_alvfieldcat-scrtext_m = 'Date Order'.
            wa_alvfieldcat-scrtext_l = 'Date Order'.
            wa_alvfieldcat-outputlen = 10.

Maybe you are looking for

  • Links not displaying in podcasts

    For some reason, whenever I export a podcast, none of the clickable links show up in the chapter markers after it's mixed down into my iTunes. I've tried changing all sorts of settings, started from scratch, and done just about everything I can think

  • IChat "unexpectedly quits"

    I was working in another program with iChat running in the background. iChat was logged into my GTalk and .Mac accounts. Suddenly I get a popup that iChat Agent has unexpectedly quit and I was logged out of both accounts. I was able to log back into

  • HT201210 iOS 6 has downloaded but will not install says error occured

    Please help iOS 6 has downloaded but it will not install error has occurred during download what do I do?

  • Calculation fields needed

    Need to automatically calculate specific form fields similar to what is allowable in Adobe Acrobat Pro.  This capablity would allow for a more useful Pay Now option.  Currently our users are having to calculate their own payment amount. Would be an e

  • Why can't Mail create POP account type?

    Version 8.2 seems to allow only IMAP. But I want POP for my new email address. What am I missing?