Reg:ALV list Background Problem

Dear All,
I created a ALV LIST report. While i am running in that program in foreground i am getting timeout error. While running in background i am getting the output in improper way. While i am seeing that report in spool request and pressing the spool  output display in maximum width i am getting the output list fields  in improper position. What should i have to do for this issue?
Thanks,
Sankar M

When you execute the report in background, u require to provide the width of the output it will be some thing like X_65_255.Try increasing the width.
One more alternative is go to SPAD -> In settings Menu option -> Select Spool System -> go to others tab -> select the check box number of columns for list display format.
Hope this inputs will help you.
Regards,
Shafivullah Mohammad

Similar Messages

  • Alv list report-problems while printing

    hai,
    i get following dump error when tryign to print a alv list report.
    'Illegal interruption of the event LOAD-OF-PROGRAM.
    What happened?
        Error in the ABAP Application Program
        The current ABAP program "SAPLSZA12" had to be terminated because it has
        come across a statement that unfortunately cannot be executed.
    Error analysis
        During the flow of the event LOAD-OF-PROGRAM (event for the
        initialization of an ABAP program), a condition occurred under which
        the event was to be left early. This is not permitted as it would
        result in an inconsistent status in the ABAP program.'
    the problem resolves for a particular output(when i restrict the list to lesser rows) by changing FORMAT from
    X_65_255 to X_90_120 in the print dialog properties option..
    however this restricts the coloumn width..
    anycase i will have to print the output for all conditions.
    the problem seems to be centred around number of rows in the list output..

    is somethign wrong with the values in this internal table gt_comtypes_tab...
    this is where the dump is pointing..at LAOD OF PROGRAM EVENT
    1     FUNCTION addr_get_conversion_table.
    2     *"----
    3     ""Lokale Schnittstelle:
    4     *"  EXPORTING
    5     *"     VALUE(COMTYPES_TAB) TYPE  ADCOMTYPES_TAB
    6     *"  EXCEPTIONS
    7     *"      INTERNAL_ERROR
    8     *"----
    9
    10       comtypes_tab = gt_comtypes_tab.
    11
    12     ENDFUNCTION.
    values of gt_comtypes_tab.
    2     TEL     ADTEL
    3     FAX     ADFAX
    4     TTX     ADTTX
    5     TLX     ADTLX
    6     INT     ADSMTP
    7     RML     ADRML
    8     X40     ADX400
    9     RFC     ADRFC
    10     PRT     ADPRT
    11     SSF     ADSSF
    12     URI     ADURI
    13     PAG     ADPAG

  • Reg: ALV list Display

    Hi Experts,
                    My requirement is i need a button along with the tool bar of ALV list display . when i check the button it should display the Selection criteria values which user entered as a pop up .
    Is there any default tool which displays user selection values  for ALV list display  ?
    Regards,
    Vikram.S

    > Is there any default tool which displays user selection values  for ALV list display  ?
    No such program.
    But you have to write a code for it. Activate Button using the pf-status. then Handle that button in User command , and show a popup with the selection values.
    Function used to get the selection details is
    RS_REFRESH_FROM_SELECTOPTIONS
    get the data and show it using a Popup. May be a ALV popup select function will help you.

  • Alv list header problem

    Hai Friends,
    In my ALV List header..i am writing date , time and my program name.
    but all are coming on left side.
    can i get date on left side, program name on centered and time on write side.
    my code is like this.
    FORM list_headers.
          lists-typ = 'H'.
          lists-info = text-010.
          APPEND lists.
          CLEAR lists.
          lists-typ = 'S'.
          lists-key = text-011.
          CONCATENATE sy-datum+6(2) '/'
                      sy-datum+4(2) '/'
                      sy-datum+0(4) INTO lists-info.
          APPEND lists.
          CLEAR lists.
          lists-typ = 'S'.
          lists-key = text-012.
          CONCATENATE sy-uzeit+0(2) ':'
                      sy-uzeit+2(2) ':'
                      sy-uzeit+4(2) INTO lists-info.
          APPEND lists.
          CLEAR lists.
    ENDFORM.

    Hi again,
    1. first of all how are u writing / displaying
       the alv header ?
    2. using documentary write ?
       then also, u can use one variable of
      length 100 and use this concept.
    3. If u are using top_of_page
      event,
      in this event, WE CAN use WRITE.
      (i have used it, and it
      works fantastic)
                  (not in case of alv grid)
    4. My point is, what ever u are using,
       use on variable of length 100.
      WRITE value INTO variable.
      using offset
      and then proceed further.
    regards,
    amit m.

  • Reg ALV List output save

    Hi All,
    I have developed a report using ALV Grid but I want save the layout with some variant name but by default the option setting->Layout->save is disabled how to enable this?.
    Thanks&Regards
    Mahesh

    Hi Mahesh,
    set I_SAVE with 'A'.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
           EXPORTING
                I_CALLBACK_PROGRAM      = PROGNAME
                I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
                IS_LAYOUT               = LAYOUT
                IT_FIELDCAT             = FIELDCAT
    <b>            I_SAVE                  = 'A'</b>
                IT_EVENTS               = GT_EVENTS
                IT_EVENT_EXIT           = EVENT
                IS_PRINT                = PRINT
           TABLES
                T_OUTTAB                = IT_MARA
           EXCEPTIONS
                PROGRAM_ERROR           = 1
                OTHERS                  = 2.
    regards, Dieter

  • ALV list heade problem

    Hi all,
    I have created list heade r using FM commentary_wirite.
    the parameter slis_listheader-info has length of only 60 characters.
    So my header is getting truncated .
    Plase suggest me on how to increase the length.
    Regards,
    Naveen

    hey u need to consider slis_t_listheader
    typ(1) type c,   " H = Header, S = Selection, A = Action
    key(20) type c,
    seggregate u r text and give some text in header and some other in selection ..and some other in action
    i hope this may help u......
    reward points if helpful

  • ALV List only 80 Columns when runinning as background job

    Hello Guys,
    I have a Problem with an ALV List.
    We use the FM REUSE_ALV_HIERSEQ_LIST_DISPLAY for a Document Journal.
    When I run it in foreground it works fine. But when I view the spool in background the list makes a break at excactly 80 signs, but the line size should be about 120.
    In the report the Line-Size is set correctly, even the print parameters seem to be ok. We are running it with X_65_255.
    I saw that there are some SAP Notes to this topic, but on our release (SAP_BASIS 700) the notes are already implemented.
    Has anyone a solution to this topic?
    Thanks and regards
    Roland

    Try this.
    [ALV List only 80 Columns when running in background job|https://forums.sdn.sap.com/click.jspa?searchID=25735042&messageID=5686003]

  • Extract ALV list to a file in the background

    I am currently working on an ALV report which the user requires that a file be generated automatically based on the ALV list output. Any ideas? Thanks in advance.

    Hello Emmanuel,
    I have had the same problem, and i found no solution on the forums... So i have implemented my own solution: I implemented a child class, in order to add a new method write_file. This coding creates a file on the application server, considering the field catalog from the choosen variant. It can be enhanced in order to get the sort and the filter criteria (but if the file is exported to excel, the sort and filter can be managed within excel). Such a program can be run in background, and it works perfectly!
    Sample coding:
    REPORT z_alv_download_file.
          CLASS LCL_GUI_ALV_GRID  INHERITING FRO
          Local child-class in order to implement a new method for      *
          download in a file in background                              *
    CLASS lcl_gui_alv_grid DEFINITION INHERITING FROM cl_gui_alv_grid.
      PUBLIC SECTION.
        METHODS: write_file IMPORTING i_structure_name TYPE dd02l-tabname
                                      is_variant       TYPE disvariant
                                      i_default        TYPE char01
                                      i_save           TYPE char01
                                      i_file           TYPE fileextern
                            CHANGING  it_outtab        TYPE STANDARD TABLE.
    ENDCLASS.
          CLASS lcl_gui_alv_grid IMPLEMENTATION
          Implementation of the new method write_file                   *
    CLASS lcl_gui_alv_grid IMPLEMENTATION.
      METHOD write_file.
      Local types
        TYPES: BEGIN OF ty_fieldnames,
                 field(60),
                 field2 TYPE help_info-tabname,
                 field3 TYPE help_info-fieldname,
                 key(1),
               END OF ty_fieldnames.
      Local data
        DATA: lt_catalog      TYPE lvc_t_fcat,
              ls_catalog      TYPE lvc_s_fcat,
              lt_datatab      TYPE TABLE OF hrdatatab,
              ls_datatab      TYPE hrdatatab,
              lt_fieldnames   TYPE TABLE OF ty_fieldnames,
              ls_fieldnames   TYPE ty_fieldnames,
              ls_record       TYPE string,
              l_field(60)     TYPE c,
              l_nbcol         TYPE i,
              l_colpos        TYPE i,
              l_colpos_c(2)   TYPE c,
              l_fieldname(21) TYPE c VALUE 'ls_datatab-langtext  '.
        FIELD-SYMBOLS <f> TYPE ANY.
      Call the grid display
        CALL METHOD me->set_table_for_first_display
             EXPORTING i_structure_name = i_structure_name
                       is_variant = is_variant
                       i_default = i_default
                       i_save = i_save
             CHANGING  it_outtab        = it_outtab.
      Get the field catalog according to the display variant which is used
        CALL METHOD me->get_frontend_fieldcatalog
             IMPORTING et_fieldcatalog = lt_catalog.
      Get an internal table with only the fields from the field catalog
        CALL FUNCTION 'ALV_CONVERT_DATA'
             EXPORTING
                  alv_fieldcat    = lt_catalog
             TABLES
                  alv_datatab     = it_outtab
                  hr_datatab      = lt_datatab
                  hr_fieldnametab = lt_fieldnames.
      Keep only the displayed fields from the field catalog
        DELETE lt_catalog WHERE no_out = 'X'.
        SORT lt_catalog BY col_pos DESCENDING.
        READ TABLE lt_catalog INTO ls_catalog INDEX 1.
        IF sy-subrc = 0.
          CLEAR ls_record.
          l_nbcol = ls_catalog-col_pos.
        Open the file
          OPEN DATASET i_file FOR OUTPUT IN TEXT MODE.
        Write the column names
          LOOP AT lt_fieldnames INTO ls_fieldnames.
            CONDENSE ls_fieldnames-field.
            CONCATENATE ls_record ls_fieldnames-field
                        INTO ls_record SEPARATED BY ';'.
          ENDLOOP.
          SHIFT ls_record.
          TRANSFER ls_record TO i_file.
        Write the lines
          LOOP AT lt_datatab INTO ls_datatab.
            CLEAR: l_colpos,
                   ls_record.
          Condense the fields in a single string, separated by ';' (csv)
            DO l_nbcol TIMES.
              ADD 1 TO l_colpos.
              CLEAR l_colpos_c.
              l_colpos_c = l_colpos.
              CONDENSE l_colpos_c.
              l_fieldname+19(2) = l_colpos_c.
              ASSIGN (l_fieldname) TO <f>.
              WRITE <f> TO l_field.
              CONDENSE l_field.
              CONCATENATE ls_record l_field INTO ls_record SEPARATED BY ';'.
            ENDDO.
            SHIFT ls_record.
            TRANSFER ls_record TO i_file.
          ENDLOOP.
        Close the file
          CLOSE DATASET i_file.
        ENDIF.
      ENDMETHOD.
    ENDCLASS.
          MAIN PROGRAM
    DATA: wo_alv      TYPE REF TO lcl_gui_alv_grid,
          wt_sflight TYPE TABLE OF sflight,
          ws_variant    TYPE disvariant.
    PARAMETERS: p_file TYPE fileextern OBLIGATORY
                       DEFAULT '/usr/sap/.../file.csv',
                p_vari TYPE slis_vari
                       DEFAULT 'DEFAULT'.
    START-OF-SELECTION.
      ws_variant-report = sy-repid.
      ws_variant-username = sy-uname.
      ws_variant-variant = p_vari.
      SELECT * FROM sflight INTO TABLE wt_sflight.
      CREATE OBJECT wo_alv EXPORTING i_parent = cl_gui_container=>screen0.
      CALL METHOD wo_alv->write_file
           EXPORTING i_structure_name = 'SFLIGHT'
                     is_variant       = ws_variant
                     i_default        = 'X'
                     i_save           = 'A'
                     i_file           = p_file
           CHANGING  it_outtab        = wt_sflight.

  • How to save ALV list  and send listoutput as email in background process

    Can anyone tell me if an ALV list report could be saved as LIST using 'LIST_TO_MEMORY' and then by using 'LIST_FROM_MEMORY' we need to read the list. If so How?
    I don't want to use 'Submit....exporting list to memory and return' as then I have to trigger my program twice.
    Finally with one program itself i want to get the listoutput and send the list output as an email to the customer in background.
    I have gone through the forums and could see many of them facing the same problem, but could not find the solution in the forums.
    Waiting for a reply
    Santhoshi

    if you want to send mail with the same data as you display in ALV, you can use the same internal table,which you sent to ALV_LIST_DISPLAY function module.
    take the email ids from the user on the selection-screen & use the below code to send mail to them.
    call this FORM F_SEND_MAIL before you called the ALV function module.
    FORM F_SEND_MAIL .
      CLEAR WA_RECLIST.
      REFRESH IT_RECLIST.
    *-popualate email ids
    *--Receipient 1
    this receipient can be select-option from the selection screen. or can be hardcoded as below.
      WA_RECLIST-RECEIVER = '[email protected]'.
      WA_RECLIST-REC_TYPE = C_U.
      WA_RECLIST-EXPRESS  = C_X.
    *--append receiver table
      APPEND WA_RECLIST TO IT_RECLIST.
      CLEAR : WA_RECLIST.
    *--Receipient 2
      WA_RECLIST-RECEIVER = '[email protected]'.
      WA_RECLIST-REC_TYPE = C_U.
      WA_RECLIST-EXPRESS  = C_X.
    *-append receiver table
      APPEND WA_RECLIST TO IT_RECLIST.
      CLEAR : WA_RECLIST.
    *--populate document attributes
      CLEAR: X_DOC_CHNG.
      X_DOC_CHNG-OBJ_NAME = 'HEADING'.
      CONCATENATE 'Japan BOL details for the delivery#'(003)
                  V_VBELN
                  INTO X_DOC_CHNG-OBJ_DESCR SEPARATED BY SPACE.
    *-populate body text
    CONCATENATE 'Japan BOL details for the Delivery#'(003)
      CONCATENATE TEXT-003
                   V_VBELN
                   ',is attached'
                   INTO WA_OBJTXT SEPARATED BY SPACE.
      APPEND WA_OBJTXT TO IT_OBJTXT.
    *---- Append Date and Time into Body of email.
      MOVE 'File is generated on'(004) TO V_INFO.
      V_TIME = SY-UZEIT.
    WRITE : SY-UZEIT TO V_TIME USING EDIT MASK '__:__:__'.
      CONCATENATE V_TIME+0(2)
                  V_TIME+2(2)
                  V_TIME+4(2)
                  INTO
                  V_TIME2 SEPARATED BY ':'.
       WRITE : sy-datum MM/DD/YYYY TO lv_date .
      CONCATENATE SY-DATUM+4(2)
                  SY-DATUM+6(2)
                  SY-DATUM+0(4)
                  INTO V_DATE.
      CONCATENATE V_INFO
                  V_DATE
                  'At'
                  V_TIME2
                  INTO V_INFO
                  SEPARATED BY SPACE.
      WA_OBJTXT = V_INFO.
      APPEND WA_OBJTXT TO IT_OBJTXT.
    *-document size
      CLEAR : V_TABLE_LINES.
      DESCRIBE TABLE IT_OBJTXT LINES V_TABLE_LINES.
      READ TABLE IT_OBJTXT INTO WA_OBJTXT INDEX V_TABLE_LINES.
      X_DOC_CHNG-DOC_SIZE =
                     ( V_TABLE_LINES - 1 ) * 255 + STRLEN( WA_OBJTXT ).
    *-populate packing list for body text
    CLEAR IT_OBJPACK-TRANSF_BIN.
      WA_OBJPACK-HEAD_START = 1.
      WA_OBJPACK-HEAD_NUM = 0.
      WA_OBJPACK-BODY_START = 1.
      WA_OBJPACK-BODY_NUM = V_TABLE_LINES.
      WA_OBJPACK-DOC_TYPE = 'RAW'.
      APPEND WA_OBJPACK TO IT_OBJPACK.
      CLEAR WA_OBJPACK.
    *--for attachment
    *--add Internal table lines here, as attachment.
    *--IT_FINAL IS THE internal table which you used to display the result as ALV output
      loop at IT_FINAL.
        CONCATENATE IT_FINAL-FIELD1
                    IT_FINAL-FIELD2
    *--AND SO ON
             INTO WA_OBJBIN.
      APPEND WA_OBJBIN TO IT_OBJBIN.
      CLEAR  WA_OBJBIN.
    ENDLOOP.
    *-get total no.of lines of Object table(attachment)
      CLEAR : V_TABLE_LINES.
      DESCRIBE TABLE IT_OBJBIN LINES V_TABLE_LINES.
    *-populate object header
      CONCATENATE  'Delivery#'(005)
                     V_VBELN
                     SY-DATUM
                     V_TIME
                     INTO
                     WA_OBJHEAD SEPARATED BY SPACE.
      APPEND WA_OBJHEAD TO IT_OBJHEAD.
      CLEAR  WA_OBJHEAD.
    *-packing list for attachment
      WA_OBJPACK-TRANSF_BIN = C_X.
      WA_OBJPACK-HEAD_START = 1.
      WA_OBJPACK-HEAD_NUM = 1.
      WA_OBJPACK-BODY_START = 1.
      WA_OBJPACK-BODY_NUM = V_TABLE_LINES .
    WA_OBJPACK-DOC_TYPE = 'CSV' .
      WA_OBJPACK-DOC_TYPE = 'RAW' .
      WA_OBJPACK-OBJ_NAME = 'POTR'.
    CONCATENATE 'Delivery details for '(005)
      CONCATENATE TEXT-005
                V_VBELN
                SY-DATUM
                V_TIME
                '.CSV'
                INTO
                WA_OBJPACK-OBJ_DESCR SEPARATED BY SPACE.
      BREAK-POINT.
      WA_OBJPACK-DOC_SIZE = V_TABLE_LINES * 255.
      APPEND WA_OBJPACK TO IT_OBJPACK.
      CLEAR  WA_OBJPACK.
    *-Sending the document
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          DOCUMENT_DATA              = X_DOC_CHNG
          PUT_IN_OUTBOX              = C_X
          COMMIT_WORK                = C_X
        TABLES
          PACKING_LIST               = IT_OBJPACK
          OBJECT_HEADER              = IT_OBJHEAD
          CONTENTS_BIN               = IT_OBJBIN
          CONTENTS_TXT               = IT_OBJTXT
          RECEIVERS                  = IT_RECLIST
        EXCEPTIONS
          TOO_MANY_RECEIVERS         = 1
          DOCUMENT_NOT_SENT          = 2
          DOCUMENT_TYPE_NOT_EXIST    = 3
          OPERATION_NO_AUTHORIZATION = 4
          PARAMETER_ERROR            = 5
          X_ERROR                    = 6
          ENQUEUE_ERROR              = 7
          OTHERS                     = 8.
      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_SEND_MAIL
    Regards
    srikanth
    added comments
    Message was edited by: Srikanth Kidambi

  • ALV list display in a Background job - Spool output

    Hi,
    We are currently working on a report scheduled to be run in the background job, and the ALV list is displayed in the spool output.
    ALV list in the spool does not look the same as front run job, the column headers are all crowded together, and there is no grid in-between different columns or rows. It's hard to read.
    Is there a way to add grid for this kind of output?
    Thanks!

    Hi Deepak:
    I expanded your report into two rows display, and the grid in the spool display simply gone!
    report zzscratch line-size 120 no standard page heading.
    type-pools slis.
    tables pa0001.
    data : li_field type standard table of slis_fieldcat_alv,
    gi_events type standard table of slis_alv_event,
    gr_layout_bck type slis_layout_alv,
    gr_save like disvariant,
    gr_events type slis_alv_event.
    types : begin of gtt_emp,
    pernr type persno,
    ename  like pa0001-ename,
    uname  like pa0001-UNAME,
    end of gtt_emp.
    data : lr_field type slis_fieldcat_alv.
    data : lc_rep like syst-repid.
    data : li_emp type standard table of gtt_emp,
    lr_emp type gtt_emp.
    data : gv_ref_table type lvc_rtname.
    gv_ref_table = 'CATSDB'.
    lr_field-fieldname = 'PERNR'.
    lr_field-ref_tabname = gv_ref_table.
    lr_field-inttype = 'N'.
    lr_field-outputlen = 8.
    lr_field-seltext_l = 'EMPLOYEE Number'.
    append lr_field to li_field.
    lr_field-fieldname = 'ENAME'.
    lr_field-ref_tabname = 'PA0001'.
    lr_field-inttype = 'C'.
    lr_field-outputlen = 40.
    lr_field-seltext_l = 'EMPLOYEE Name'.
    append lr_field to li_field.
    lr_field-fieldname = 'UNAME'.
    lr_field-ref_tabname = 'PA0001'.
    lr_field-inttype = 'C'.
    lr_field-outputlen = 12.
    lr_field-seltext_l = 'User Name'.
    lr_field-row_pos = 2.
    lr_field-col_pos = 1.
    append lr_field to li_field.
    lc_rep = sy-repid.
    gr_layout_bck-edit_mode = 'D'.
    gr_save-report = sy-repid.
    lr_emp-pernr = '00000001'.
    lr_emp-ename = 'abc'.
    lr_emp-uname = 'testus'.
    append lr_emp to li_emp.
    lr_emp-pernr = '00000002'.
    lr_emp-ename = 'def'.
    append lr_emp to li_emp.
    lr_emp-pernr = '00000003'.
    append lr_emp to li_emp.
    lr_emp-pernr = '00000004'.
    append lr_emp to li_emp.
    lr_emp-pernr = '00000005'.
    append lr_emp to li_emp.
    lr_emp-pernr = '00000006'.
    append lr_emp to li_emp.
    lr_emp-pernr = '00000007'.
    append lr_emp to li_emp.
    lr_emp-pernr = '00000008'.
    append lr_emp to li_emp.
    end-of-selection.
    Function module for ALV grid display
      call function 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_buffer_active    = 'X'
                i_callback_program = lc_rep
                is_layout          = gr_layout_bck
                it_fieldcat        = li_field
                i_save             = 'A'
                is_variant         = gr_save
                it_events          = gi_events
           TABLES
                t_outtab           = li_emp[]
           EXCEPTIONS
                program_error      = 1
                others             = 2.
      if sy-subrc <> 0.
    clear gr_messages.
    message e023 into gr_messages.
    append gr_messages to gi_messages.
      endif.

  • Scrolling-problem in an editable ALV-list

    Hi,
    I have built an <b>ALV-list</b> with one of the fields <b>open for input</b>. The user wants to use the arrow to scroll <u>down</u> through the table and update that particular field in every row. I have <b>2</b> questions about this:
    - First of all, the cursor moves in a strange way. The first number of rows it stays in the right column, but then, out of the blue, it jumps back and forth to other columns after scrolling.
    - Secondly, the field I want to edit is always in Insert-mode. Is there any way I can get it into Overwrite-mode? I cannot use the Tab-key, because of the lead-selection.
    Thanks in advance for your help.
    Kind regards,
    Andre Moniharapon

    Hi Vijay,
    please don't get me wrong, I really appreciate your attempts to help me, but my problem is that when I press the Down-arrow it <u>doesn't</u> always go to the next cell in the <i>same</i> column. It sometimes goes to the next cell in <i>another</i> column. And if I can't force it to stay in the same column in some way, than my problem cannot be solved and I must think of another solution. So, I don't want the cursor to stay in the same field, I want it to go to the next cell in the same column. You got that right. Again, I really appreciate your help, but it looks more and more that there's no solution to my problem.
    Kind regards,
    Andre

  • Background processing of interactive alv lists

    Hi,
    I have an interactive alv list which works fine with online processing. When run in background it only create spool for the first list. What can be a solution other than merging all the secondary alv list to the primary list level. Can we create alv list (for background proesiing mode) for more than one internal table. (I think normally we can have only one internal table displayed in a list using reuse_alv). Please inform me if further details has to be published.
    Thanks and regards,
    Rajeeve Patric

    online after first display user can interact with the report and so the secondary report can be displayed....now in background mode if u run it spools out first report...Now, someone has to interact with this report so that second report can be shown...But user can't interact with the first report in background process.....so, it might be that if report is running in background then the 2 reports needs to be merged and shown in one report...

  • Problem with printing ALV lists

    Hey Guys,
    I have a problem with printing ALV lists ,
    I created a report with several ALV lists (not grids) on the same screen but when i attempt to print the report
    it prints each alv list on a different page..so if i have 3 alv lists in the same report it will print the report on 3 pages
    How can i print  them all in one page?
    Thanks in advance
    Noha Salah.

    Hey Max,
    I tried setting the Layout-list_append  before my block_list_append function call
    And setting the is_print-NO_NEW_PAGE , it printed the 3 lists on one page the only problem i have
    is that the lists are truncated and the list formats has totally been messed up..how can i restore them back
    to their original format?

  • Problem  in Printing the ALV list

    Hi,
       I have one problem with printing the ALV list. While printing the ALV list(thro Print Icon on application Tool bar) ,Fist page of my print out contains some other inforamtion.
      inforamtions included two tables
      first table  contains Sort Criteria, Ascdg, Descnd, Subtotal  columns.
      And second table contains Data statistics , number of
    columns.
    But from Second page onwards , my alv list printed correctly .
      How can i avoid the First page inforamtion and
          what is the Reason of coming like this?
    Thanks,
    Neptune.M

    I assume you are using function module Reuse_alv_grid_display or reuse_alv_list_display for ALV.
    If this is the case, there is a parameter called IS_PRINT that you need to supply while calling the function module.
    you can for exapmle declare
    data:
    printstruc type SLIS_PRINT_ALV.
    printstruc-NO_PRINT_LISTINFOS = 'X'.
    call function 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
    IS_PRINT = printstruc
    There are many other flags in is_print structures that you can use to manipulate the printing.
    Cheers!

  • Problem in Expand when using Blocked ALV list

    Hi All,
    I am using the Blocked list ALV to display two lists in a program. One among them is a hierarchial ALV. When i click on the Expand button of this ALV it terminates with the runtime error "GETWA_NOT_ASSIGNED".
    I was able to use this functionality using similar code in a stand alone hierarchial ALV list in another program without any problem.
    I have assigned the Expand Field name as follows in both programs:
    wa_layout-expand_fieldname  = 'EXPAND'
    Any suggestions or help in this would be highly appreciated.
    Thanks & Reagrds,
    Praveen

    Hai Praveen
    Check the following Code
    *& Report  ZALV_BLOCKLIST                                                *
    REPORT  ZALV_BLOCKLIST NO STANDARD PAGE HEADING
                                  LINE-SIZE 150
                                  LINE-COUNT 60(4)
                                  MESSAGE-ID Z00.
    *..Type Definitions for ALV Report
    TYPE-POOLS SLIS.
    *..Includes
    *for ICONs
    *INCLUDE <ICON>.
    Table/Structure declarations.                                        *
    TABLES:  MARA,
             MARC,
             T134.
    Internal Tables declaration                                          *
    *..To store Basic Report fields
    DATA:BEGIN OF IT_MARA OCCURS 0,
           MATNR LIKE MARA-MATNR,
           MTART LIKE MARA-MTART,
           MATKL LIKE MARA-MATKL,
           MEINS LIKE MARA-MEINS,
           NTGEW LIKE MARA-NTGEW,
         END OF IT_MARA.
    *DATA:BEGIN OF IT_MATKL OCCURS 0,
          MATKL LIKE T023-MATKL,
          WGBEZ LIKE T023-WGBEZ,
        END OF IT_MATKL.
    DATA:BEGIN OF IT_MARC OCCURS 0,
           WERKS LIKE MARC-WERKS,
           LADGR LIKE MARC-LADGR,
           MTVFP LIKE MARC-MTVFP,
           DISPR LIKE MARC-DISPR,
           DISMM LIKE MARC-DISMM,
           DISPO LIKE MARC-DISPO,
         END OF IT_MARC.
    ALV Type declaration                                                 *
    DATA:V_NO_DATA            TYPE C.
    ALV Type declaration                                                 *
    DATA:V_REPID              TYPE SYREPID.
    DATA: IT_FIELDCATALOG_MARA   TYPE SLIS_T_FIELDCAT_ALV,
          WA_FIELDCATALOG_MARA   TYPE SLIS_FIELDCAT_ALV,
          IT_FIELDCATALOG_MARC   TYPE SLIS_T_FIELDCAT_ALV,
          WA_FIELDCATALOG_MARC   TYPE SLIS_FIELDCAT_ALV,
          IT_FIELDCATALOG_MATKL  TYPE SLIS_T_FIELDCAT_ALV,
          WA_FIELDCATALOG_MATKL  TYPE SLIS_FIELDCAT_ALV,
          WA_LAYOUT              TYPE SLIS_LAYOUT_ALV,
          IT_EVENTS              TYPE SLIS_T_EVENT,
          WA_EVENTS              TYPE SLIS_ALV_EVENT,
          WA_KEYINFO             TYPE SLIS_KEYINFO_ALV.
    Selection Screen.                                                    *
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-H01.
    SELECT-OPTIONS: S_MATNR FOR MARA-MATNR ,
                    S_MTART FOR MARA-MTART .
    SELECTION-SCREEN END OF BLOCK B1.
    Event:Initialization                                                 *
    INITIALIZATION.
    *Report Name
      V_REPID = SY-REPID.
    AT Selection Screen.                                                 *
    AT SELECTION-SCREEN.
    Event: Start-of-Selection                                            *
    START-OF-SELECTION.
      PERFORM FETCH_DATA.
    Event: End-of-Selection                                            *
    END-OF-SELECTION.
      IF V_NO_DATA = ''.
        MESSAGE I010 WITH 'NO DATA TO DISPLAY ! '.
        EXIT.
      ELSE.
        PERFORM FILL_FIELDCAT_MARA.
      PERFORM FILL_FIELDCAT_MAKT.
        PERFORM FILL_FIELDCAT_MARC.
        PERFORM FILL_LAYOUT.
        PERFORM CALL_ALV_INIT.
        PERFORM ADD_LISTS.
        PERFORM DISPLAY_BLOCK_LIST.
      ENDIF.
                             FORM DEFINITIONS                            *
    *&      Form  FETCH_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM FETCH_DATA.
      SELECT MATNR
             MTART
             MATKL
             MEINS
             NTGEW
             INTO CORRESPONDING FIELDS OF TABLE IT_MARA
             FROM MARA
             WHERE MATNR IN S_MATNR
               AND MTART IN S_MTART.
      IF SY-SUBRC <> 0.
        V_NO_DATA = ''.
      ELSE.
        V_NO_DATA = 'X'.
        SELECT WERKS
               LADGR
               MTVFP
               DISPR
               DISMM
               DISPO
               INTO CORRESPONDING FIELDS OF TABLE IT_MARC
               FROM MARC
               WHERE MATNR IN S_MATNR.
      ENDIF.
    ENDFORM.                    " FETCH_DATA
    *&      Form  FILL_FIELDCAT_MARA
          text
    -->  p1        text
    <--  p2        text
    FORM FILL_FIELDCAT_MARA.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          I_PROGRAM_NAME               = V_REPID
        I_INTERNAL_TABNAME           =
          I_STRUCTURE_NAME             = 'IT_MARA'
        I_CLIENT_NEVER_DISPLAY       = 'X'
          I_INCLNAME                   =  V_REPID
        I_BYPASSING_BUFFER           =
        I_BUFFER_ACTIVE              =
        CHANGING
          CT_FIELDCAT                  = IT_FIELDCATALOG_MARA
        EXCEPTIONS
          INCONSISTENT_INTERFACE       = 1
          PROGRAM_ERROR                = 2
          OTHERS                       = 3
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      LOOP AT IT_FIELDCATALOG_MARA INTO WA_FIELDCATALOG_MARA.
        CASE WA_FIELDCATALOG_MARA-FIELDNAME.
          WHEN 'MATNR'.
            WA_FIELDCATALOG_MARA-COL_POS     = '1'.
            WA_FIELDCATALOG_MARA-OUTPUTLEN   = '15'.
            WA_FIELDCATALOG_MARA-SELTEXT_L   = 'Material NO'.
          WHEN 'MTART'.
            WA_FIELDCATALOG_MARA-COL_POS     = '2'.
            WA_FIELDCATALOG_MARA-OUTPUTLEN   = '15'.
            WA_FIELDCATALOG_MARA-SELTEXT_L   = 'Mat Type'.
          WHEN 'MATKL'.
            WA_FIELDCATALOG_MARA-COL_POS     = '3'.
            WA_FIELDCATALOG_MARA-OUTPUTLEN   = '15'.
            WA_FIELDCATALOG_MARA-SELTEXT_L   = 'Mat Group'.
          WHEN 'MEINS'.
            WA_FIELDCATALOG_MARA-COL_POS     = '4'.
            WA_FIELDCATALOG_MARA-OUTPUTLEN   = '15'.
            WA_FIELDCATALOG_MARA-SELTEXT_L   = 'Measure Unit'.
          WHEN 'NTGEW'.
            WA_FIELDCATALOG_MARA-COL_POS     = '5'.
            WA_FIELDCATALOG_MARA-OUTPUTLEN   = '15'.
            WA_FIELDCATALOG_MARA-SELTEXT_L   = 'Net Wt'.
            WA_FIELDCATALOG_MARA-DO_SUM      = 'X'.
        ENDCASE.
       MODIFY IT_FIELDCATALOG_MARA FROM WA_FIELDCATALOG_MARA INDEX SY-TABIX.
      ENDLOOP.
    ENDFORM.                    " FILL_FIELDCAT_MARA
    *&      Form  FILL_FIELDCAT_MARC
          text
    -->  p1        text
    <--  p2        text
    FORM FILL_FIELDCAT_MARC.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
       EXPORTING
         I_PROGRAM_NAME               = V_REPID
         I_INTERNAL_TABNAME           = 'IT_MARC'
      I_STRUCTURE_NAME             =
      I_CLIENT_NEVER_DISPLAY       = 'X'
         I_INCLNAME                   = V_REPID
      I_BYPASSING_BUFFER           =
      I_BUFFER_ACTIVE              =
        CHANGING
          CT_FIELDCAT                  = IT_FIELDCATALOG_MARC
       EXCEPTIONS
         INCONSISTENT_INTERFACE       = 1
         PROGRAM_ERROR                = 2
         OTHERS                       = 3
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      LOOP AT IT_FIELDCATALOG_MARC INTO WA_FIELDCATALOG_MARC.
        CASE WA_FIELDCATALOG_MARC-FIELDNAME.
          WHEN 'WERKS'.
            WA_FIELDCATALOG_MARC-COL_POS     = '1'.
            WA_FIELDCATALOG_MARC-OUTPUTLEN   = '15'.
            WA_FIELDCATALOG_MARC-SELTEXT_L   = 'PLANT NAME'.
          WHEN 'LADGR'.
            WA_FIELDCATALOG_MARC-COL_POS     = '2'.
            WA_FIELDCATALOG_MARC-OUTPUTLEN   = '15'.
            WA_FIELDCATALOG_MARC-SELTEXT_L   = 'Loading Group'.
          WHEN 'MTVFP'.
            WA_FIELDCATALOG_MARC-COL_POS     = '3'.
            WA_FIELDCATALOG_MARC-OUTPUTLEN   = '20'.
            WA_FIELDCATALOG_MARC-SELTEXT_L   = 'Checking group'.
          WHEN 'DISPR'.
            WA_FIELDCATALOG_MARC-COL_POS     = '4'.
            WA_FIELDCATALOG_MARC-OUTPUTLEN   = '15'.
            WA_FIELDCATALOG_MARC-SELTEXT_L   = 'MRP PROFILE'.
          WHEN 'DISMM'.
            WA_FIELDCATALOG_MARC-COL_POS     = '5'.
            WA_FIELDCATALOG_MARC-OUTPUTLEN   = '15'.
            WA_FIELDCATALOG_MARC-SELTEXT_L   = 'MRP TYPE'.
          WHEN 'DISPO'.
            WA_FIELDCATALOG_MARC-COL_POS     = '6'.
            WA_FIELDCATALOG_MARC-OUTPUTLEN   = '15'.
            WA_FIELDCATALOG_MARC-SELTEXT_L   = 'MRP CONTROLLER'.
        ENDCASE.
       MODIFY IT_FIELDCATALOG_MARC FROM WA_FIELDCATALOG_MARC INDEX SY-TABIX.
      ENDLOOP.
    ENDFORM.                    " FILL_FIELDCAT_MARC
    *&      Form  FILL_FIELDCAT_MAKT
          text
    -->  p1        text
    <--  p2        text
    FORM FILL_FIELDCAT_MAKT.
    ENDFORM.                    " FILL_FIELDCAT_MAKT
    *&      Form  CALL_ALV_INIT
          text
    -->  p1        text
    <--  p2        text
    FORM CALL_ALV_INIT.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
        EXPORTING
          I_CALLBACK_PROGRAM             = V_REPID
      I_CALLBACK_PF_STATUS_SET       = ' '
      I_CALLBACK_USER_COMMAND        = ' '
      IT_EXCLUDING                   =
    ENDFORM.                    " CALL_ALV_INIT
    *&      Form  ADD_LISTS
          text
    -->  p1        text
    <--  p2        text
    FORM ADD_LISTS.
    *ADD IT_MARA TABLE TO THE OUTPUT
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
        EXPORTING
          IS_LAYOUT                        = WA_LAYOUT
          IT_FIELDCAT                      = IT_FIELDCATALOG_MARA
          I_TABNAME                        = 'IT_MARA'
          IT_EVENTS                        = IT_EVENTS
      IT_SORT                          =
      I_TEXT                           = ' '
        TABLES
          T_OUTTAB                         = IT_MARA
       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.
    **ADD IT_MARC TABLE TO THE OUTPUT
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
      EXPORTING
        IS_LAYOUT                        = WA_LAYOUT
        IT_FIELDCAT                      = IT_FIELDCATALOG_MARC
        I_TABNAME                        = 'IT_MARC'
        IT_EVENTS                        = IT_EVENTS
      IT_SORT                          =
      I_TEXT                           = ' '
      TABLES
        T_OUTTAB                         = IT_MARC
    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.                    " ADD_LISTS
    *&      Form  FILL_LAYOUT
          text
    -->  p1        text
    <--  p2        text
    FORM FILL_LAYOUT.
      WA_LAYOUT-ZEBRA = 'X'.
      WA_LAYOUT-TOTALS_TEXT = 'TOTAL'.
    ENDFORM.                    " FILL_LAYOUT
    *&      Form  DISPLAY_BLOCK_LIST
          text
    -->  p1        text
    <--  p2        text
    FORM DISPLAY_BLOCK_LIST.
    WA_KEYINFO-HEADER01 = 'MATNR'.
    WA_KEYINFO-ITEM01 = 'MATNR'.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK             = ' '
      IS_PRINT                      =
      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        =
       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_BLOCK_LIST                   .
    Thanks & regards
    Sreenivasulu P

Maybe you are looking for

  • Clustering in dev environment

    Hi,           Is there anyway in development environment to test clustering without           getting the network people involved to do multicasting?           Thanks.           Tinou Bao           www.tinou.com           

  • Spry Vert Menu: Weird top item display in DW design view

    Whenever I insert a vertical menu, the top Item always dispalys in Design View right justified (see attached image).  Really distracting. Displays fine once published.  Just bugging me?

  • 10.7 has slowed my MBP 13" 2010 down to a crawl

    in all programmes, boot times and everything, its the buggiest release since 8.0 and as an ex genius i am appalled, when are you going to fix this release instead of spending time on 10.8 fix 10.7. It takes 2 mins for it to completely boot, the adobe

  • Duplicate database issue

    Dear all, When the target database is in use(many users are connect to the database), is it can do the duplicate database action?

  • Issues with Userforms in Excel 2013

    Hi I have some issues with Userforms and Comboboxes created in earlier versions of Excel (2010). The VBA Code get stuck when I try to use the userforms in Excel 2013. It is either the addItem function or the Userfrom.Show function which fails. I have