Block list display when report is executed in background?

Hello all,
when i execute the report program in foreground ,output is displayed as block list with two blocks say success table and failure table.
when i execute the same report program in background, i could see only a single block which is success table. Why is this?
Thanks,
Sindhu.

Did you check all the pages in spool? If the report has a output which runs multiple pages, then spool might not display everything unless you change the setting to display more than certain pages. Kindly check the same.

Similar Messages

  • How to display pop up in foreground when report is executing in background

    Hi All,
    The requirement is:
    My report is executing in background and I have to display a pop-up to end user in foreground.
    Is there any method to do this.
    it is urgent,
    Reward points will be awarded to correct answers.
    Thanks,
    Vishal.

    Thanks frnds,
    ok can we go in this way......I need to display the pop up when the "program -> execute in background" button is clicked or F9 is pressed....just at that time....later the report can be executed in back ground.
    Is there a way to do so......just displaying a pop up when one entry in menu bar ic clicked?
    Vishal.

  • Hierarchial and blocked list displays

    Hi friends,
    when do we opt for hierachial list display and when do we opt for blocked list display?

    Hi Suresh,
    Blocked ALV displays the data in blocks together in output. e.g. suppose you want to dsplay the data of header & item level. Then you candisplay the data of header records in first block & Item level data in another block on same output screen.
    For hierarchical ALV check the below link
    http://help.sap.com/saphelp_nw2004s/helpdata/en/6e/4e2941fa918739e10000000a1550b0/frameset.htm
    & check this link also:
    A new approach to ALV Programming
    Hope this will help.
    Regards,
    Nitin.

  • Displaying Average of Columns in ALV Blocked List Display

    Hi,
    I am using ALV Blocked List Display. For the 1st block, I need to display the average of certain columns.
    I am using the following code in the field catalog of the RATE column to display the average , but it is not displayed.
    wa_disptab_field-col_pos = 8.
      wa_disptab_field-fieldname = 'RATE''.
      wa_disptab_field-ref_tabname = 'IT_DISPTAB'.
      wa_disptab_field-seltext_m = 'RS PER KL'.
      wa_disptab_field-do_sum  =  'C'.
      wa_disptab_field-datatype  = 'QUAN'.
      append wa_disptab_field to it_disptab_field.
      clear wa_disptab_field.
    For the same column, the sum is displayed with the same code if I change this part:
    wa_disptab_field-do_sum  =  'C'.   To   wa_disptab_field-do_sum  =  'X'.
    Please Help..

    Hi Debarati,
    go For function/pattern [reuse_alv_grid_display_lvc]
    do the following as mentioned in the previous reply's.
    And  To find the Average of your requirement, pass the field names as per the requirement. 
    gs_sort-fieldname = 'RATE'.
    gs_sort-tabname = 'T_DISPTAB' "Final Internal table
    gs_sort-subtot = 'X'.
    APPEND gs_sort TO gt_sort.
    gs_sort-fieldname = 'RATE1'.
    gs_sort-tabname = 'T_DISPTAB' "Final Internal table
    gs_sort-subtot = 'X'.
    APPEND gs_sort TO gt_sort.
    gs_sort-fieldname = 'RATE2'.
    gs_sort-tabname = 'T_DISPTAB' "Final Internal table
    gs_sort-subtot = 'X'.
    APPEND gs_sort TO gt_sort.
    gs_sort-fieldname = 'RATE3'.
    gs_sort-tabname = 'T_DISPTAB' "Final Internal table
    gs_sort-subtot = 'X'.
    APPEND gs_sort TO gt_sort.
    CALL FUNCTION ' REUSE_ALV_GRID_DISPLAY_lvc'
       EXPORTING
          i_callback_program      = sy-cprog
          i_callback_user_command = 'USER_COMMAND'
          is_layout               = gs_layout
          it_fieldcat              = wa_disptab
          it_events               = gt_events
          it_sort                   = gt_sort
          i_default               = 'X'
          i_save                  = 'U'
        TABLES
          t_outtab                = gt_final
       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.
    i think this will  workout.
    Thanks & Regards,
    Abhisek
    Edited by: Abhisek Pradhan on Sep 29, 2011 7:55 PM

  • Report is executing in background and need data(output) in excel format

    Report is executing in background and need data(output) to get downloaded in excel format in my PC from an internal table;;in any drive i.e. C: or D: .When executing in backround it prompt to user with which location excel file to be saved and the name of file.How to download in background in excel format?
    Edited by: PRASHANT BHATNAGAR on Aug 26, 2008 6:24 AM

    Hi
    Download a report to excel with format (border, color cell, etc)
    Try this program...it may help you to change the font ..etc.
    Code:
    REPORT ZSIRI NO STANDARD PAGE HEADING.
    this report demonstrates how to send some ABAP data to an
    EXCEL sheet using OLE automation.
    INCLUDE OLE2INCL.
    handles for OLE objects
    DATA: H_EXCEL TYPE OLE2_OBJECT,        " Excel object
          H_MAPL TYPE OLE2_OBJECT,         " list of workbooks
          H_MAP TYPE OLE2_OBJECT,          " workbook
          H_ZL TYPE OLE2_OBJECT,           " cell
          H_F TYPE OLE2_OBJECT.            " font
    TABLES: SPFLI.
    DATA  H TYPE I.
    table of flights
    DATA: IT_SPFLI LIKE SPFLI OCCURS 10 WITH HEADER LINE.
    *&   Event START-OF-SELECTION
    START-OF-SELECTION.
    read flights
      SELECT * FROM SPFLI INTO TABLE IT_SPFLI UP TO 10 ROWS.
    display header
      ULINE (61).
      WRITE: /     SY-VLINE NO-GAP,
              (3)  'Flg'(001) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
              (4)  'Nr'(002) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
              (20) 'Von'(003) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
              (20) 'Nach'(004) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
              (8)  'Zeit'(005) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP.
      ULINE /(61).
    display flights
      LOOP AT IT_SPFLI.
      WRITE: / SY-VLINE NO-GAP,
               IT_SPFLI-CARRID COLOR COL_KEY NO-GAP, SY-VLINE NO-GAP,
               IT_SPFLI-CONNID COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
               IT_SPFLI-CITYFROM COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
               IT_SPFLI-CITYTO COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
               IT_SPFLI-DEPTIME COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP.
      ENDLOOP.
      ULINE /(61).
    tell user what is going on
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
              PERCENTAGE = 0
               TEXT       = TEXT-007
           EXCEPTIONS
                OTHERS     = 1.
    start Excel
      CREATE OBJECT H_EXCEL 'EXCEL.APPLICATION'.
    PERFORM ERR_HDL.
      SET PROPERTY OF H_EXCEL  'Visible' = 1.
    CALL METHOD OF H_EXCEL 'FILESAVEAS' EXPORTING #1 = 'c:\kis_excel.xls'
    PERFORM ERR_HDL.
    tell user what is going on
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
              PERCENTAGE = 0
               TEXT       = TEXT-008
           EXCEPTIONS
                OTHERS     = 1.
    get list of workbooks, initially empty
      CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
      PERFORM ERR_HDL.
    add a new workbook
      CALL METHOD OF H_MAPL 'Add' = H_MAP.
      PERFORM ERR_HDL.
    tell user what is going on
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
              PERCENTAGE = 0
               TEXT       = TEXT-009
           EXCEPTIONS
                OTHERS     = 1.
    output column headings to active Excel sheet
      PERFORM FILL_CELL USING 1 1 1 'Flug'(001).
      PERFORM FILL_CELL USING 1 2 0 'Nr'(002).
      PERFORM FILL_CELL USING 1 3 1 'Von'(003).
      PERFORM FILL_CELL USING 1 4 1 'Nach'(004).
      PERFORM FILL_CELL USING 1 5 1 'Zeit'(005).
      LOOP AT IT_SPFLI.
    copy flights to active EXCEL sheet
        H = SY-TABIX + 1.
        PERFORM FILL_CELL USING H 1 0 IT_SPFLI-CARRID.
        PERFORM FILL_CELL USING H 2 0 IT_SPFLI-CONNID.
        PERFORM FILL_CELL USING H 3 0 IT_SPFLI-CITYFROM.
        PERFORM FILL_CELL USING H 4 0 IT_SPFLI-CITYTO.
        PERFORM FILL_CELL USING H 5 0 IT_SPFLI-DEPTIME.
      ENDLOOP.
    changes by Kishore  - start
    CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
      CALL METHOD OF H_EXCEL 'Worksheets' = H_MAPL." EXPORTING #1 = 2.
      PERFORM ERR_HDL.
    add a new workbook
      CALL METHOD OF H_MAPL 'Add' = H_MAP  EXPORTING #1 = 2.
      PERFORM ERR_HDL.
    tell user what is going on
      SET PROPERTY OF H_MAP 'NAME' = 'COPY'.
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
              PERCENTAGE = 0
               TEXT       = TEXT-009
           EXCEPTIONS
                OTHERS     = 1.
    output column headings to active Excel sheet
      PERFORM FILL_CELL USING 1 1 1 'Flug'(001).
      PERFORM FILL_CELL USING 1 2 0 'Nr'(002).
      PERFORM FILL_CELL USING 1 3 1 'Von'(003).
      PERFORM FILL_CELL USING 1 4 1 'Nach'(004).
      PERFORM FILL_CELL USING 1 5 1 'Zeit'(005).
      LOOP AT IT_SPFLI.
    copy flights to active EXCEL sheet
        H = SY-TABIX + 1.
        PERFORM FILL_CELL USING H 1 0 IT_SPFLI-CARRID.
        PERFORM FILL_CELL USING H 2 0 IT_SPFLI-CONNID.
        PERFORM FILL_CELL USING H 3 0 IT_SPFLI-CITYFROM.
        PERFORM FILL_CELL USING H 4 0 IT_SPFLI-CITYTO.
        PERFORM FILL_CELL USING H 5 0 IT_SPFLI-DEPTIME.
      ENDLOOP.
    changes by Kishore  - end
    disconnect from Excel
         CALL METHOD OF H_EXCEL 'FILESAVEAS' EXPORTING  #1 = 'C:\SKV.XLS'.
      FREE OBJECT H_EXCEL.
      PERFORM ERR_HDL.
          FORM FILL_CELL                                                *
          sets cell at coordinates i,j to value val boldtype bold       *
    FORM FILL_CELL USING I J BOLD VAL.
      CALL METHOD OF H_EXCEL 'Cells' = H_ZL EXPORTING #1 = I #2 = J.
      PERFORM ERR_HDL.
      SET PROPERTY OF H_ZL 'Value' = VAL .
      PERFORM ERR_HDL.
      GET PROPERTY OF H_ZL 'Font' = H_F.
      PERFORM ERR_HDL.
      SET PROPERTY OF H_F 'Bold' = BOLD .
      PERFORM ERR_HDL.
    ENDFORM.
    *&      Form  ERR_HDL
          outputs OLE error if any                                       *
    -->  p1        text
    <--  p2        text
    FORM ERR_HDL.
    IF SY-SUBRC <> 0.
      WRITE: / 'Fehler bei OLE-Automation:'(010), SY-SUBRC.
      STOP.
    ENDIF.
    ENDFORM.                    " ERR_HDL
    Regards
    Murali Papana

  • Less coloumns displayed when report run in background

    Hi,
    There is a problem, when i run a report in background last few columns are not displayed. But when i run it in foreground all the columns are displayed properly.. Bt since the report hs to be run background, I need to fix this issue..
    Cn anyone explain why this is happenin and wht i cn do to rectify it?
    Thanks
    Keshi

    Hi,
    Use REUSE_ALV_GRID_DISPLAY and you will be able to run the report in foreground or background.
    If you must use OO ALV controls, you won't be able to run the program in background. In this scenario, I would check SY-BATCH and if it is set, I run REUSE* FM and if not I do CALL SCREEN..
    If you are using the ABAP Grid Control (OO object), you can still create the ALV list as a spool listing for the background job.
    The easiest way to do this is to put all the create object statements and method calls for the custom container and ALV grid object inside a subroutine (for example, present_grid).
    All that is required is a simple check of the sy-batch variable to determine if the program is being executed in the foreground or background.
    e.g. if sy-batch is initial.
    call screen 0100.
    else.
    perform present_grid.
    endif.
    In a PBO module of screen 0100, the subroutine present_grid is also performed.
    The set_table_for_first_display method will be invoked in the routine present_grid, however, due to the job being executed in the background, the ALV list output will be written as spool output for the background job.
    Regards,
    Srini

  • How to download a Block List based ALV report to PDF file?

    Hi Everyone,
    I need to display a report in block list alv format using REUSE_ALV_BLOCK_LIST_DISPLAY... I have done this. But my problem comes next.
    1. I need to download this report to a pdf file in the user given directory - in presentation server. How can I download this in PDF format.
    2. My report has TOP_OF_LIST and END_OF_LIST events. The body of the report contains a table with some material data. There should be 1 table for each material no. There are around 50 records for each material no. So I am looping at the material no. and calling REUSE_ALV_BLOCK_LIST_APPEND.
    Now my problem is that I should have only 20 records in each page. How can I determine this? How do I put a page-break?
    Please anyone help me.

    Hi Anwesha
    You can send the report output to spool using the IS_PRINT parameter of REUSE_ALV_BLOCK_LIST_DISPLAY FM. Then read the spool number generated and pass it to CONVERT_ABAPSPOOLJOB_2_PDF to get the pdf content which could be downloaded to presentation server.
    The splitting of records on count could be done by calling above method with different internal table filtered as per your requirement.
    Regards
    Ranganath

  • BLOCK LIST DISPLAY IN ALV

    Moderator message: Please do not use ALL CAPITALS in your message subjects
    I am facing a peculiar situation with respect to a report with 2 block lists.
    STEP 1:
    I first use REUSE_ALV_BLOCK_LIST_INIT with EXPORTING parameter as
    i_callback_program = SY-REPID.
    This works fine with return code of sy-subrc = 0.
    STEP 2:
    I build the field catalog and internal table - in debug I also check the sequence of fields of both the internal tables and field calatogs - perfect - no issues.
    Then I call REUSE_ALV_BLOCK_LIST_APPEND with exporting parameters as layout, field catalog, table name & event and tables parameter as internal table and exception handling, I repeat this call for the two internal tables.
    This works fine with return code of sy-subrc = 0
    STEP 3:
    I use REUSE_ALV_BLOCK_LIST_DISPLAY to display the two lists one after the other, and I have coded for error message if sy-subrc is non zero.
    This works fine with return code of sy-subrc = 0
    ISSUE :
    Internal table 1 and internal table 2 both have say 4 records, then I see the two lists with heading(s) perfec and col width also optimized and zebra (alternate steipes also in place), and 4 rows for each internal table on output, however the rows are BLANK - NO DATA, whereas I have checked both internal tables before the call and they seem to have the data perfectly and in the same sequence as the field catalog - however the rows are BLANK.
    I checked in debugging but was just not able to find out why if the internal tables and field catalog is perfect, no data is passed to output.
    Please help !!
    Edited by: M N on Nov 14, 2008 5:22 AM
    Edited by: Matt on Nov 14, 2008 10:23 AM

    *& Report  Y_ALV_BLOCKLIST_
    REPORT  Y_ALV_BLOCKLIST_16131.
    TYPE-POOLS : SLIS.
    DATA: X_LAYOUT TYPE SLIS_LAYOUT_ALV.
    Events
    DATA: GT_XEVENTS TYPE SLIS_T_EVENT.
    DATA: GT_YEVENTS TYPE SLIS_T_EVENT.
    data : XS_EVENT  TYPE SLIS_ALV_EVENT.
    DATA: XFIELD TYPE SLIS_T_FIELDCAT_ALV.
    DATA: YFIELD TYPE SLIS_T_FIELDCAT_ALV.
    DATA: AFIELD TYPE SLIS_FIELDCAT_ALV.
    DATA: GT_PRINT TYPE SLIS_PRINT_ALV.
    TYPES : BEGIN OF TY_MARA ,
              MATNR TYPE MATNR,
              MTART TYPE MTART,
             END OF TY_MARA.
    TYPES: BEGIN OF TY_MAKT ,
           MATNR TYPE MATNR,
           MAKTX TYPE MAKTX,
          END OF TY_MAKT.
    DATA : ITAB TYPE TABLE OF TY_MARA,
           PTAB TYPE TABLE OF TY_MAKT.
    START-OF-SELECTION.
    SELECT DATA
      SELECT MATNR MAKTX FROM MAKT INTO TABLE PTAB UP TO 10 ROWS.
      SELECT  MATNR MTART FROM MARA INTO TABLE ITAB UP TO 10 ROWS.
    *eVENT FOR Heading
      PERFORM F_EVENTS.
    FIELD CATALOG
      PERFORM F_FIELDCAT.
    INIT BLOCK ALV
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
        EXPORTING
          I_CALLBACK_PROGRAM = SY-REPID.
    ADD INTERNAL TABLE ITAB
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
        EXPORTING
          IS_LAYOUT                  = X_LAYOUT
          IT_FIELDCAT                = XFIELD "ALVFC
          I_TABNAME                  = 'ITAB'
          IT_EVENTS                  = GT_XEVENTS
        TABLES
          T_OUTTAB                   = ITAB
        EXCEPTIONS
          PROGRAM_ERROR              = 1
          MAXIMUM_OF_APPENDS_REACHED = 2
          OTHERS                     = 3.
    ADD INTERNAL TABLE PTAB
    REFRESH ALVFC[].
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
        EXPORTING
          IS_LAYOUT                  = X_LAYOUT
          IT_FIELDCAT                = YFIELD "ALVFC
          I_TABNAME                  = 'PTAB'
          IT_EVENTS                  = GT_YEVENTS
        TABLES
          T_OUTTAB                   = PTAB
        EXCEPTIONS
          PROGRAM_ERROR              = 1
          MAXIMUM_OF_APPENDS_REACHED = 2
          OTHERS                     = 3.
    DISPLAY
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
        EXCEPTIONS
          PROGRAM_ERROR = 1
          OTHERS        = 2.
    *GT_PRINT-RESERVE_LINES = 2.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
          EXPORTING
               IS_PRINT = GT_PRINT.
    *&      Form  F_FIELDCAT
          text
    -->  p1        text
    <--  p2        text
    FORM F_FIELDCAT .
      DATA: L_COUNT TYPE I.
      CLEAR AFIELD.
      L_COUNT = L_COUNT + 1.
      AFIELD-COL_POS = L_COUNT.
      AFIELD-FIELDNAME = 'MATNR'.
      AFIELD-REF_TABNAME = 'MARA'.
      AFIELD-KEY = 'X'.                    "define field as key
    AFIELD-DO_SUM = 'X'.
      APPEND AFIELD TO XFIELD.
      CLEAR AFIELD.
      L_COUNT = L_COUNT + 1.
      AFIELD-COL_POS = L_COUNT.
      AFIELD-FIELDNAME = 'MTART'.
      AFIELD-REF_TABNAME = 'MARA'.
      AFIELD-KEY = 'X'.                    "define field as key
      APPEND AFIELD TO XFIELD.
      L_COUNT = 0.
      CLEAR AFIELD.
      L_COUNT = L_COUNT + 1.
      AFIELD-COL_POS = L_COUNT.
      AFIELD-FIELDNAME = 'MATNR'.
      AFIELD-REF_TABNAME = 'MAKT'.
      AFIELD-KEY = 'X'.                    "define field as key
      APPEND AFIELD TO YFIELD.
      CLEAR AFIELD.
      L_COUNT = L_COUNT + 1.
      AFIELD-COL_POS = L_COUNT.
      AFIELD-FIELDNAME = 'MAKTX'.
      AFIELD-REF_TABNAME = 'MAKT'.
      AFIELD-KEY = 'X'.                    "define field as key
      APPEND AFIELD TO YFIELD.
    ENDFORM.                    " F_FIELDCAT
    *&      Form  F_EVENTS
          text
    -->  p1        text
    <--  p2        text
    FORM F_EVENTS .
    CLEAR XS_EVENT.
      XS_EVENT-NAME = SLIS_EV_TOP_OF_PAGE.
      XS_EVENT-FORM = 'TOP1'.
      APPEND XS_EVENT TO GT_XEVENTS.
    CLEAR XS_EVENT.
      XS_EVENT-NAME = SLIS_EV_TOP_OF_PAGE.
      XS_EVENT-FORM = 'TOP2'.
      APPEND XS_EVENT TO GT_YEVENTS.
    ENDFORM.                    " F_EVENTS
    FORM TOP1.
    WRITE : 'MARA TABLE'.
    ENDFORM.
    FORM TOP2.
    WRITE : 'MAKT TABLE'.
    ENDFORM.

  • Regarding block list display

    Hi all,
        can i know in which type of scenarios BLOCK LISTS IN ALV are used.

    raju,
      2.     BLOCK REPORT
      This is used to have multiple lists continuously.
    The important functions used in this report are:
    A.     REUSE_ALV_BLOCK_LIST_INIT
    B.     REUSE_ALV_BLOCK_LIST_APPEND
    C.     REUSE_ALV_BLOCK_LIST_HS_APPEND
    D.     REUSE_ALV_BLOCK_LIST_DISPLAY
    A.     REUSE_ALV_BLOCK_LIST_INIT
    Parameters:
    I.     I_CALLBACK_PROGRAM
    II.     I_CALLBACK_PF_STATUS_SET
    III.     I_CALLBACK_USER_COMMAND 
    This function module is used to set the default gui status etc.
    B.     REUSE_ALV_BLOCK_LIST_APPEND
    Parameters :
          Export :
    I.     is_layout       :      layout settings for block       
    II.     it_fieldcat      :      field catalog 
    III.     i_tabname    :       internal table name with output data            
    IV.     it_events      :       internal table with all possible events
                  Tables :
                              i.          t_outtab        :  internal table with output data.
    This function module adds the data to the block.
    Repeat this function for all the different blocks to be displayed one after the other.
    C.     REUSE_ALV_BLOCK_LIST_HS_APPEND
           This function module is used for hierarchical sequential blocks. 
    D.     REUSE_ALV_BLOCK_LIST_DISPLAY
    Parameters :  All the parameters are optional. 
    This function module display the list with data appended by the above function.
    Here the functions REUSE_ALV_FIELDCATALOG_MERGE, REUSE_ALV_EVENTS_GET, REUSE_ALV_COMMENTARY_WRITE  can be used.
    Pls. Mark if useful

  • Doubt in block list display

    hi all,
    in my object i have displayed the output using alv block list ... when i print that one i am geting each block in seperate page ... but i need to print all in a single page ... please help me out in solving this
    thanks in advance
    lokesh

    Hi Lokesh,
    Refer the sample code:
    CLEAR w_event.
      w_event-name = slis_ev_top_of_page.
      w_event-form = 'TOP_OF_PAGE'.
      APPEND w_event TO i_events1.
      CLEAR w_event.
      w_event-name = slis_ev_top_of_page.
      w_event-form = 'XTOP_OF_PAGE'.
      APPEND w_event TO i_events2.
    DATA: lv_repid LIKE sy-repid.
      lv_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
           EXPORTING
                i_callback_program       = lv_repid
                i_callback_user_command  = 'USER_COMMAND'
                i_callback_pf_status_set = 'PF_STATUS'.
    *-- Vendor Schedule List
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
           EXPORTING
                it_fieldcat = i_field_cat1
                is_layout   = w_lay_out1
                i_tabname   = '<I_TABLE>'
                it_events   = i_events1
           TABLES
                t_outtab    = <i_table>.
    *-- Error Lsit display
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
           EXPORTING
                it_fieldcat = i_field_cat2
                is_layout   = w_lay_out2
                i_tabname   = 'I_ERROR'
                it_events   = i_events2
           TABLES
                t_outtab    = i_error[].
      w_print-reserve_lines = 2.
      w_print-no_print_listinfos = c_x.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
           EXPORTING
                is_print = w_print.
    ENDFORM.                    " f0504_create_list
    Reward points if this Helps.
    Manish

  • Block List Display

    Hi Friends,
    How can I add blocks dynamically depending on different vendor. please can you tell any1 how to add blocks dynamically to the list in block list.and I dont know how many blocks can be there....as it depends on vendors they give in selection screen.......................
    Depending on the vendor I have to create different block.
    Please revert back......
    requirement is to display the debitnote report. if more vendors are given in selection screen then i have to display the blocks different for different vendors..................
    Thanks in Advance...................please revert its urgent............

    You should do this way
    DATA: SORT TYPE SLIS_SORTINFO_ALV,
          IT_SORT TYPE SLIS_T_SORTINFO_ALV.
    SORT-FIELDNAME = 'VBELN'.
    SORT-SPOS = '1'.
    SORT-GROUP = '*'.
    SORT-UP = 'X'.
    APPEND SORT TO IT_SORT.
    if you do this way it will dynamically do block display based on the field you sepecify.
    Still if you face problem you check this sample code
    REPORT  ZALV_LIST_SUBTOTAL                      .
    type-pools: slis.
    data: f_fldcat type slis_fieldcat_alv,
          t_fldcat type slis_t_fieldcat_alv,
          l_layout type slis_layout_alv,
          f_event type slis_alv_event,
          t_event type slis_t_event.
    data: begin of itab occurs 0,
          vbeln like vbap-vbeln,
          posnr like vbap-posnr,
          zmeng like vbap-zmeng,
          text(35),
          end of itab.
    select vbeln posnr zmeng from vbap
           into table itab up to 20 rows.
    loop at itab.
      itab-zmeng = sy-tabix.
      modify itab index sy-TABIX.
    endloop.
    f_fldcat-fieldname = 'text'.
    f_fldcat-col_pos = 1.
    f_fldcat-outputlen = 15.
    *f_fldcat-checkbox = 'X'.
    *f_fldcat-edit = ''.
    append f_fldcat to t_fldcat.
    clear f_fldcat.
    f_fldcat-fieldname = 'VBELN'.
    f_fldcat-taBname = 'itab'.
    f_fldcat-seltext_l = 'VBELN'.
    f_fldcat-col_pos = 2.
    f_fldcat-outputlen = 30.
    f_fldcat-just = 'C'.
    f_fldcat-edit = 'X'.
    append f_fldcat to t_fldcat.
    clear f_fldcat.
    f_fldcat-fieldname = 'POSNR'.
    f_fldcat-tabname = 'itab'.
    f_fldcat-seltext_l = 'POSNR'.
    f_fldcat-col_pos = 3.
    f_fldcat-edit = 'X'.
    append f_fldcat to t_fldcat.
    clear f_fldcat.
    f_fldcat-fieldname = 'ZMENG'.
    f_fldcat-tabname = 'itab'.
    f_fldcat-seltext_l = 'ZMENG'.
    f_fldcat-col_pos = 4.
    f_fldcat-edit = 'X'.
    f_fldcat-do_sum = 'X'.
    append f_fldcat to t_fldcat.
    clear f_fldcat.
    DATA: SORT TYPE SLIS_SORTINFO_ALV,
          IT_SORT TYPE SLIS_T_SORTINFO_ALV.
    SORT-FIELDNAME = 'VBELN'.
    SORT-SPOS = '1'.
    SORT-GROUP = '*'.
    SORT-UP = 'X'.
    SORT-SUBTOT = 'X'.
    *SORT-OBLIGATORY = 'UL'.
    APPEND SORT TO IT_SORT.
    l_layout-TOTALS_TEXT = 'total text'.
    l_layout-SUBTOTALS_TEXT = 'subtotal text'.
    *l_layout-totals_only = 'X'.
    data: prg type sy-repid.
    prg = sy-repid.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    *   I_INTERFACE_CHECK              = ' '
    *   I_BYPASSING_BUFFER             =
    *   I_BUFFER_ACTIVE                = ' '
       I_CALLBACK_PROGRAM             = SY-REPID
    *   I_CALLBACK_PF_STATUS_SET       = ' '
    *   I_CALLBACK_USER_COMMAND        = ' '
    *   I_STRUCTURE_NAME               =
       IS_LAYOUT                      = L_LAYOUT
       IT_FIELDCAT                    = T_FLDCAT
    *   IT_EXCLUDING                   =
    *   IT_SPECIAL_GROUPS              =
       IT_SORT                        = IT_SORT[]
    *   IT_FILTER                      =
    *   IS_SEL_HIDE                    =
    *   I_DEFAULT                      = 'X'
    *   I_SAVE                         = ' '
    *   IS_VARIANT                     =
       IT_EVENTS                      = T_EVENT
    *   IT_EVENT_EXIT                  =
    *   IS_PRINT                       =
    *   IS_REPREP_ID                   =
    *   I_SCREEN_START_COLUMN          = 0
    *   I_SCREEN_START_LINE            = 0
    *   I_SCREEN_END_COLUMN            = 0
    *   I_SCREEN_END_LINE              = 0
    * IMPORTING
    *   E_EXIT_CAUSED_BY_CALLER        =
    *   ES_EXIT_CAUSED_BY_USER         =
      TABLES
        T_OUTTAB                       = ITAB
    * 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.

  • Back to parameter form when report is executed

    Hi
    Is it possible to be back to the parameter form when the report is executed?
    E.g. 1 - Enter information in the parameter form,
    2 - Execute the report
    3 - Back to parameter form
    4 - ....
    5 - When all the reports processed, exit the report.
    Thank you all

    Don't know if you can do this in reports, but we have a similar requirement on our system, and we developed a form based parameter form, rather than using the reports own. We could then run as many reports as we need from the one parameter form.

  • Shifting ALV list display of report into center

    Hi All,
    I have got a requirement in which the ALV list needs to be shifted in to right. By default the alv list displays from 0 Postion of the column.
    IN a classical list its easy to shift the output to any column postion using write statement but in alv list how can we achieve this?
    Kindly provide your inputs.
    Thanks and regards
    Mudit Batra

    Hi.,
    I dont think it is possible., By default it will start from position 1 even in field catalog if u give col_pos 4, 5 or., .. . If u want  to display alv in center u have to create a screen and create a custom container at the center and display ALV in it..
    hope this helps u.,
    Thanks & Regards
    Kiran

  • Maximum Line Width when Report is running in background

    Hello Experts,
    I have written a ABAP program and user is running in background. My output is of width of 599 characters. But wehn the user is running in the background, it is showing a warning that last 345 columns won't be displayed.
    What is the maximum width, that is allowed for report being displayed in background.
    Kindly help and points will be rewarded. its really urgent.
    Thanks in advance.
    Thanks and Regards,
    Saurabh

    Hey Saurabh,
    I am facing the same problem. I have a report which has 406 characters. It is displayed correctly when executed in foreground but only 255 characters when executed in background.
    You have resolved this issue. Can you please provide me the solution to execute it in background and get the complete output.
    Regards,
    Anosh

  • Problem with REUSE_ALV_LIST_DISPLAY when report is run in background

    Hi All,
    I had a problem with my report I am using the REUSE_ALV_LIST_DISPLAY when I run the report in foreground the report shows the output correctly but when I run it in background the report output is broken I mean some text are cut and place under each other. Please advise solution.
    Regards,
    Ekit

    Hello Ekit
    Please, check notes below to correct it:
    - 1174095 ALV print: Collective correction PRI_PARAMS_SET4
    - 1039655 ALV total: Subtotals disappear from printout II
    Only apply if they are relevant for your release. And always test thoroughly.
    regards
    Ray

Maybe you are looking for

  • Variable screen is taking too much time for some reports

    Hi all, We are using a sales billing cube for our billing reports . For one query , variable screen takes lot of time to come , i have in RSRT , i have generated the reoprt there and also executed the report there , it s fine there.Morever iam not us

  • I have 3 account on the same email how can i delet...

    Hello When i was try to update my msn messanger to the SKype I found 3 account on the same Email Address how can i delete them and use only one , i do not like when i loggin he told me wich account u would like to join !!

  • Publishing an Android app - How can I find my Integrator ID?

    Hi, I want to publish an Android version of my app, and I've read all the links that tell you how but there really isn't any step by step instructions if you run into any trouble. I'm using the online app builder and it's asking my for my Integrator

  • Premiere Pro CC skipping/dropping frames

    So on Premiere Pro CC 2014 all my clips are skipping frames (only between 1 and 2) The clips play fine on any media player, but once in Premiere they skips frames, this also happens after exporting. Any ideas? The sequence is correctly set up with th

  • Extremely disappointed with edge refinement in widows 7 64 bit

    I have read numerous "how tos" and watched countless instructional  videos on edge refinement and have yet to get results anywhere near what are promised. I've tried all the sliders and I have yet to see hair easily selected or even a clean mask prod