Reg : Print Issue in ALV Report

Hi Experts,
                 I have created an ALV Report for USER Requirement and it is working fine. While taking printout the SORTED Field is not working, it gets repeated in the Print... How to rectify..?

hi,
did u use SORT-UP equal to 'X'?
wa_sort-up = c_x.
ags.

Similar Messages

  • Issue in ALV Report

    Hi,
    I have a issue in ALV Report for displaying one field's data into output.
    I am getting data into all other fields in ALV Report except for this field.
    This field & related fields are declared as below: in final internal table.
    sta_no     TYPE z3status,
    status(10) TYPE c,
    Here z3status is of type Char(1).
    In Report
    I have put a condition :
    IF i_tab-sta_no EQ 1.
       i_tab-status = 'Created'.
    ELSE.
       i_tab-status = 'Closed'.
    ENDIF.
    and to field catalog also i am passing right information as for every other field in ALV Report.
    Till the point use of REUSE_ALV_LIST_DISPLAY F.M also final internal table is having status field filled.
    But in output nothing gets displayed for Status field.
    Can anybody tell me what can be the issue!
    Thanks in advance.
    Thanks,
    Deep.

    Hi,
    I have no problem in data fetching into final internal table.
    Everything is coming well to REUSE_ALV_DISPLAY F.M.
    But still Status field data is not getting displayed.
    I have posted some code for reference:
            LOOP AT t_z3manboxid INTO wa_z3manboxid.
              wa_result-manifest_no     = wa_z3manboxid-zmanno.
              wa_result-item_no         = wa_z3manboxid-item_no.
              IF l_item_no NE wa_z3manboxid-item_no.
                wa_result-piece_quantity  = wa_z3manboxid-vemng.
                wa_result-unit            = wa_z3manboxid-vemeh.
                wa_result-manifester      = wa_z3manboxid-usnam.
                wa_result-manifest_sta_no = wa_z3manboxid-z3status.
                IF wa_result-manifest_sta_no EQ 1.
                  wa_result-manifest_status = c_created.
                ELSEIF wa_result-manifest_sta_no EQ 2.
                  wa_result-manifest_status = c_in_transit.
                ELSEIF wa_result-manifest_sta_no EQ 3.
                  wa_result-manifest_status = c_arrived.
                ELSEIF wa_result-manifest_sta_no EQ 4.
                  wa_result-manifest_status = c_closed.
                ENDIF.
              ENDIF.
              l_item_no  = wa_z3manboxid-item_no.
              APPEND wa_result TO t_result.
              CLEAR: wa_result, wa_z3manboxid.
            ENDLOOP.
    Building field catalog following code is added:
    For status call is as below:
      PERFORM f_build_fieldcat  USING c_tab
                                      c_manifest_status
                                      c_space
                                      c_space
                                      c_mannf_status
                                      c_space1
                                      15.
    FORM f_build_fieldcat USING p_tabname p_fldname
                                p_rtabname p_rfldname
                                p_fldhdg p_check
                                p_length.
      CLEAR t_fieldcat_ln1.
      ADD 1 TO g_col_pos.
      t_fieldcat_ln1-tabname       = p_tabname.
      t_fieldcat_ln1-fieldname     = p_fldname.
      t_fieldcat_ln1-ref_tabname   = p_rtabname.
      t_fieldcat_ln1-ref_fieldname = p_rfldname.
      t_fieldcat_ln1-ddictxt       = c_l.
      t_fieldcat_ln1-seltext_l     = p_fldhdg.
      t_fieldcat_ln1-no_zero       = space.
      t_fieldcat_ln1-do_sum        = space.
      t_fieldcat_ln1-col_pos       = g_col_pos.
      t_fieldcat_ln1-no_out        = space.
      t_fieldcat_ln1-just          = c_c.
      t_fieldcat_ln1-qfieldname    = space.
      t_fieldcat_ln1-checkbox      = p_check.
      t_fieldcat_ln1-input         = p_check.
      t_fieldcat_ln1-reptext_ddic  = p_fldhdg.
      IF p_fldname EQ c_manno.
        t_fieldcat_ln1-key     = c_x.
        t_fieldcat_ln1-hotspot = c_x.
      ELSE.
        t_fieldcat_ln1-key     = space.
        t_fieldcat_ln1-hotspot = p_check.
      ENDIF.
      t_fieldcat_ln1-outputlen      = p_length.
      t_fieldcat_ln1-intlen         = p_length.
      t_fieldcat_ln1-ddic_outputlen = p_length.
      APPEND t_fieldcat_ln1 TO t_fieldcat1.
    ENDFORM.                    " f_build_fieldcat
    FORM f_build_sortcat USING p_fldname.
      CLEAR t_sortcat_ln1.
      ADD 1 TO g_col_pos.
      t_sortcat_ln1-spos      = g_col_pos.
      t_sortcat_ln1-fieldname = p_fldname.
      t_sortcat_ln1-up        = c_x.
      t_sortcat_ln1-down      = space.
      t_sortcat_ln1-subtot    = c_x.
      APPEND t_sortcat_ln1 TO t_sortcat1.
    ENDFORM.                    " f_build_sortcat
    FORM f_build_layout.
      t_layout1-zebra           = c_x.
      t_layout1-no_vline        = c_space1.
      t_layout1-reprep          = c_x.
      t_layout1-detail_popup    = c_x.
      t_layout1-window_titlebar = text-005.
      t_layout1-no_scrolling    = c_space1.
      t_layout1-detail_titlebar = text-005.
      t_layout1-numc_sum        = c_x.
      t_layout1-get_selinfos    = c_x.
      t_layout1-min_linesize    = 132.
    ENDFORM.                    " f_build_layout
      DATA: l_pgm TYPE syrepid,
            l_exit(1) TYPE c.
      CLEAR: l_pgm,
             l_exit.
      l_pgm = sy-repid.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
           EXPORTING
                i_callback_program      = l_pgm
                i_callback_user_command = c_user_command
                is_layout               = t_layout1
                it_fieldcat             = t_fieldcat1
                i_save                  = c_a
                it_events               = t_eventcat1
           IMPORTING
                e_exit_caused_by_caller = l_exit
           TABLES
                t_outtab                = t_result
           EXCEPTIONS
                program_error           = 1
                OTHERS                  = 2.
      IF sy-subrc NE 0.
        l_exit = l_exit.
      ENDIF.
    To ALV F.M t_result table is updated with correct data.
    But it is not getting displayed.
    What can be the reason!
    Can anybody give the solution!
    Thanks for your replies.
    Thanks,
    Deep.

  • How many lines we can print using Non-alv report list ?

    Hi Experts,
    How many lines we can print using Non-alv report list ?
    regards
    vishnu

    Hi,
    It depends on the page size according to the page size we can set the no. of lines as follows,
    REPORT  program_name   NO STANDARD PAGE HEADING
    LINE-SIZE 290
    LINE-COUNT 65.
    Hope it helps you,
    Regards,
    Abhijit G. Borkar

  • Issue in ALV reporting

    Dear All,
    I have an issue in ALV reporting. Pls look at the follow table.
    <u>Duty Post</u>      <u>Date</u>          <u>Time</u>
    jurong                   12/06                3.45
    jurong                   13/06                3.50
    jurong                   14/06                4.50
    In the above table jurong is repeated. I do not want jurong to be repeated but other fields should be present.
    Kindly help me solve it.
    Regards,
    Karthikeyan
    <u></u><u></u>

    Hi Karthik,
    Another way of handling this without doing if else comparision is using the SORT functionality.
    I am giving an example here:
    Sort data in the output based on Duty_Post
      CLEAR itab_sort.
      itab_sort-fieldname = 'DUTY_POST' . (Replace DUTY_POST with the actual field name used in ur report)
      itab_sort-up = c_x.
      APPEND itab_sort.
      CLEAR itab_sort.
    Then while calling the ALV FM: include the ITAB_SORT table also.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
             EXPORTING
                  i_callback_program      = w_call_back_pgm
                  i_grid_title            = w_text
                  it_fieldcat             = itab_fldcat
                  it_sort                 = itab_sort[]
                  is_layout               = w_layout
                  it_events               = itab_events[]
                  i_default               = 'X'
                  i_save                  = 'A'
             IMPORTING
                  e_exit_caused_by_caller = w_exit_by_caller
                  es_exit_caused_by_user  = w_exit_by_user
             TABLES
                  t_outtab                = itab_output_gr
             EXCEPTIONS
                  program_error           = 1
                  OTHERS                  = 2.
    This way data would not repeat.
    Hope this helps.
    Rgds,
    HR

  • Data Displaying issue in ALV report

    Hi,
      I have made a ALV report,  the presetn display layout is as below
    it is displaying the material shortage reprot against issued production order
    ORDER NO.     Order Qty.     MATERIAL     TOTAL QTY     SHORTAGE QTY
    3000000     100     610     100     5
    3000000     100     101     200     43
    3000000     100     8795     400     400
    3000000     100     456     100     67
    3000001     50     548     50     33
    3000004     62     710     62     3
    3000005     15     7895     15     15
    3000020     11     456     22     10
    now the user requirement is the report should come as per below formate
    AT EACH NEW ORDER NUMBER :
    ****************first display main order no. and order qty.
    ORDER NO.     Order Qty
    3000000     100
    ************************then below this display the indiviual material and qty.
    MATERIAL     TOTAL QTY          SHORTAGE QTY
         610            100                     5
       101              200     43
    8795     400     400
    456     100     67
    *******again at new order******
    ORDER NO.       Order Qty
      3000001         50
    **********then below display the items
    MATERIAL     TOTAL QTY          SHORTAGE QTY
      548           50                 33
    how to do this is there any output layout with this i can get this formate in LAV report
    regards,
      zafar

    Hi Zafar,
    You can populate your internal table as per the requirement.
    at new order only.
    itab-Order = 3000000 .
    itab-Order quantity = 100.
    append itab
    for all materials for that order
    itab-MATERIAL       =   610 .
    itab-TOTAL QTY  = 100 .
    itab-SHORTAGE QTY = 5.
    append itab.
    Cheers,
    Suhail

  • SUM icon issue in ALV Report

    HI all,
    I have developed an ALV Report. In the ALV display, i would like to sum see the Sum (Total) of few fields like Qty, Net value etc when i select that particular column and click the 'SUM" icon.
    In my Report when i do so, the Program is displaying Runtime Error.
    How to resolve this issue?
    Any idea?
    Regards
    Pavan

    You must make sure that these columns are defined correctly in the field catalog and in the internal table.  For example, make sure that the quantity field is typed as such in the internal table.
    data: begin of itab occurs 0,
            qty type p decimals 2,
            end of itab.
    And then in your field catalog, make sure that the DATATYPE is set correctly.
    ls_fcat-datatype = 'QUAN'.
    Do this may help your situation.  Also make sure that the data in these columns is all numeric.
    Regards,
    Rich Heilman

  • Printing logo in ALV report

    Hi,
    I've created an ALV report with a logo in the header.
    But, when i'm taking the printout ,the logo is not printed.
    How to solve this problem,..please help me .
    Thanks and regards.
    Rajesh

    It is not possible to Print the logo, which you are showing in ALV Grid.
    But you have to work with Cl_DD_DOCUMENT class
    Check this program DD_ADD_PICTURE, Here you can print the logo.the same you can try to implement if you want.

  • Printing problem in ALV report.

    Hi,
    I have made an ALV report using 'REUSE_ALV_LIST_DISPLAY' FM. There are 18 coloumns in this report which i want to print in A4 paper. Thses all coloumns are printing but the font size is too small and also printing start from left most i.e. no margin for FILING. How to increase font size and left margin for filing. Kindly suggest.
    Regards,
    Rajesh Vasudeva

    Hi
    The font size depends on the format you've choosen for the print.
    The abap list arranges the page as grid: colunmXrow.
    Every colunm of a page means a character.
    If you use the standard format X_65_200, it means you're page is arranged for 65 row and 200 colunm:
    that means the size of a character is optimized to can print 200 chararcter in a A4 page.
    If you use the standard format X_65_132 it means you're page is arranged for 65 row and132 colunm:
    that means the size of a character is optimized to can print 132 chararcter in a A4 page.
    So that mean the size of format X_65_132 will be bigger than X_65_200, because in the same space (page A4) it needs to write 132 char instead of 200.
    If your report print NN char, u should use the format wiith number colunm is closer to NN.
    If there isn't a format or u use the first available format or u create a new one by trx SPAD.
    Max

  • Problem in Print Out of ALV report

    Dear All..
    I am trying to take print out of an ALV report. there are 36 columns in my report. when i try to take print out, warning appears which says system cannot print the last 277 columns of report.
    i have tried using different formats for printer like :
    Format                  Description
    X_PAPER                 ABAP/4 list: Default list formatting
    X_SPOOLERR          ABAP list: Spooler problem report
    ZX_65_284               65 Rows and 285 Columns
    X_65_255                ABAP/4 list: At least 65 rows with a maximum number of c
    X_65_200                ABAP list: at least 65 lines with 200 columns (not for a
    X_58_170                ABAP/4 list: At least 58 rows by 170 columns
    X_65_132                ABAP list: At least 65 rows by 132 columns
    X_90_120                ABAP list: At least 90 rows by 120 columns
    X_44_120                ABAP/4 list: At least 44 rows by 120 columns
    X_65_80                 ABAP/4 list: At least 65 rows by 80 columns
    but every time the same message appears even on A3 size paper..
    i am using REUSE_ALV_GRID_DISPLAY to display ALV.
    Please help to to take out prints(can be in condensed mode) so that all columns appear on the print out..

    HI sujeet,
    Thanks for ur response. i had already checked the printer settings.. i think there is no problem with this. Can u Please suggest something else. thanks
    Hiii jyojit..
    Thanks for reply. I had already checked the said check box in spool admin. but the problem still exists. Please suggest something to get rid of the problem.

  • Print issue in SSRS report

    Hi ,
    I have a report in production server. The client took a print out of the report which is accessible from report server URL. The issue pertaining for this report is, some of the letters in the report such as 'ti' and 'le' are missing when the client is taking
    a copy of that report. I went through my report design and had downloaded in pdf and other format, i havent seen or observed any kind of issue from my side. I could observe the data is fine, but, I wonder and i couldn't able to trace what went wrong and how
    the letters are missing when the print out of the report is being taken. I am thankful for your answers and valuable suggestions.
    Thanks & Best Regards,
    Ram.

    Hi Ram17,
    According to your description, your report missed some letters when printing. Right?
    In this scenario, you find no issue if your download the pdf format report. It supposed be to no issue on Reporting Services side because the pdf rendering is the same rendering behavior as the print view. So please check the printer and the system
    environment. It has reported some similar issues in Windows XP. Please refer to a KB article below:
    Print jobs initiated in a Windows Server 2008 and Windows XP point and print environment may have missing characters
    Reference:
    Letters missing when printing
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou 

  • Overlapping of Columns in the Print Preview of ALV Report

    Hi ,
          I have created a ALV report  which has 62 columns, when i see the print preview, the rows overlaps one another. I want a printout where no line items or rows should overlap each other. Never mind if the extra overlapped columns get truncated. Kindly help me to solve this problem.
    Regards,
    shivu

    U need to increase u201Cno. of columns fieldu201D in the Format typesu201D. For details pl. see this link.
    http://www.****************/Tutorials/ALV/Spool/width.htm
    Regards,
    Joy.

  • Data missing when Exporting or print preview from ALV report

    Hi
    I have a alv report which is showing fine but when i try to export it to say excel sheet or do print preview some of the data is missing. Can anyone tell me how to fix this. or at least point to some document that discuss this problem.
    Here is my ALV CODE
    *  CALL_ALV
    form call_alv.
    *  v_repid = sy-repid.
      perform build_field_catalog using field_tab[].
      perform build_eventtab      using events[].
      perform comment_build       using header_alv[].
      perform build_sorttab       using gt_sort[].
    *  perform build_layout.
    *  v_variant-variant = '/TEST3'.
    * Call ABAP List Viewer
      call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          i_callback_program      = v_repid
          i_callback_user_command = ''
          i_structure_name        = 'REC'
          it_fieldcat             = field_tab[]
          it_special_groups       = gt_sp_group[]
          it_sort                 = gt_sort[]
          i_save                  = v_save
          is_variant              = v_variant
          it_events               = events[]
    *      is_layout               = gd_layout
        tables
          t_outtab                 = REC
        exceptions
          program_error            = 1
          others                   = 2.
    endform.
    From my Catalog this data is missing
    * BUILD_FIELD_CATALOG
    form build_field_catalog USING pt_fieldcat type
                                   slis_t_fieldcat_alv.
      data:  ls_fieldcat type slis_fieldcat_alv.
      clear: fieldcat, pt_fieldcat[].
      ls_fieldcat-tabname        =                'REC'.
      ls_fieldcat-edit           =                ' '.
        ls_fieldcat-fieldname      =                'PERNR'.
        ls_fieldcat-seltext_s      =                'Employee #     '.
        ls_fieldcat-seltext_m      =                'Employee #           '.
        ls_fieldcat-seltext_l      =                'Employee #           '.
        ls_fieldcat-datatype       =                'C'.
        append ls_fieldcat to pt_fieldcat.
    There r coupole that's missing
    But there couple that show's up like this one
        ls_fieldcat-fieldname      =                'STIME'.
        ls_fieldcat-seltext_s      =                'ST   '.
        ls_fieldcat-seltext_m      =                'St Tm     '.
        ls_fieldcat-seltext_l      =                'Start Time          '.
        ls_fieldcat-datatype       =                'C'.
        append ls_fieldcat to pt_fieldcat.
        ls_fieldcat-fieldname      =                'ETIME'.
        ls_fieldcat-seltext_s      =                'ET      '.
        ls_fieldcat-seltext_m      =                'Et Tm           '.
        ls_fieldcat-seltext_l      =                'End Time             '.
        append ls_fieldcat to pt_fieldcat.
    I always reward points.
    Thanks

    hi Anwarul,
    Try the following code:
    *  CALL_ALV
    form call_alv.
    *  v_repid = sy-repid.
      perform build_field_catalog using field_tab[].
      perform build_eventtab      using events[].
      perform comment_build       using header_alv[].
      perform build_sorttab       using gt_sort[].
    *  perform build_layout.
    *  v_variant-variant = '/TEST3'.
    * Call ABAP List Viewer
      call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          i_callback_program      = v_repid
          i_callback_user_command = ''
          i_structure_name        = 'REC'
          it_fieldcat             = field_tab[]
          it_special_groups       = gt_sp_group[]
          it_sort                 = gt_sort[]
          i_save                  = v_save
          is_variant              = v_variant
          it_events               = events[]
    *      is_layout               = gd_layout
        tables
          t_outtab                 = REC
        exceptions
          program_error            = 1
          others                   = 2.
    endform.
    form build_field_catalog USING pt_fieldcat type
                                   slis_t_fieldcat_alv.
    call function 'REUSE_ALV_FIELDCATALOG_MERGE'
    exporting
    I_PROGRAM_NAME  = sy-repid
    I_STRUCTURE_NAME = 'REC'
    changing
    CT_FIELDCAT          = pt_fieldcat.
    When you export to excel, the character fields and numeric columns gets re-arranged, but all the fields will be displayed in this case.
    hope this helps.

  • Print or download ALV report with sort options

    Dear friends,
    How i can download into excel or print ALV report with sort options, like customer name column with similar values should not repeat in the print out or download file.
    Regards,
    Praveen Lobo

    Hi Praveen,
    Use this code, its working:-
    *FOR SORTING DATA
    DATA : it_sort TYPE slis_t_sortinfo_alv,
           wa_sort TYPE slis_sortinfo_alv.
    *          SORT W.R.T. CUSTOMER NAME
      wa_sort-spos = 1.
      wa_sort-fieldname = 'NAME1'. "field customer name
      wa_sort-tabname = 'IT_KNA1'. "internal table with records
      wa_sort-up = 'X'.
      APPEND wa_sort TO it_sort.
      CLEAR wa_sort.
    "this will sort the ALV o/p for customer with same name
    "now the name will not be repeated
    "records with same name will be grouped
    *          DISPLAY RECORDS IN ALV GRID
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        i_callback_program                = sy-repid "report id
        it_fieldcat                       = it_field "field catalog
        it_sort                           = it_sort "sort info
      TABLES
        t_outtab                          = it_kna1 "internal table
      EXCEPTIONS
        program_error                     = 1
        OTHERS                            = 2.
      IF sy-subrc <> 0.
      ENDIF.
    Hope this solves your problem.
    Thanks & Regards,
    Tarun Gambhir
    Edited by: Tarun Gambhir on Dec 31, 2008 1:13 PM

  • Print settings for ALV report

    I have a ALV report output with LINE-SIZE 1023.  But when I try to execute the report in background the output row is not coming in one line but in 2 lines. When we run the report in background I gave the printer as 'LOCL' (local) and displayed in spool.  In the PRINT SETTINGS I don't see FORMAT for 65 X 1023. Do I need to create one? If yes, how to create it? Or if there is any other way go get all the cloumns in one row of a ALV output.
    Thank you.

    Hi,
    <b>Change the font on the X_65_255 paper size :-</b>
    This tip was taken from the SAP-R3 mailing list, <b>and is by Sheila Tichener</b>.
    If you need to use a large line-size to get all your data in I know the sap version of X_65_255 for hp laser jet 4 gives an unnecessarily small font . You can change it in SPAD (or copy to Y_65_255) as follows.
    <b>Example:</b>
    Choose Device formats, Change
    hplj4
    x_65_255
    Execute
    Double click on printer initialisation
    Change from:-
    # select Courier 16.67 CPI normal font
    e(s0p16.67h0s0b4099T
    to:-
    # select arial 24 cpi 15 point normal
    e(s0p24h15v0s0b16602T
    Also bold as follows:-
    # select arial 24 cpi 15 point bold
    e(s0p24h15v0s3b16602T
    Also the error you get when changing a format in the output screen is only a warning and can be overidden by pressing the green tick.
    If the sap standard formats don't fit your requirements you can create your own eg Y_65_170 . It seems to be the numbers in the name that somehow triggers which one the abap chooses
    Regards
    Sudheer

  • Error in print preview in ALV report

    Hi....All,
    Good Day.
    I have developed a ALV report. It is displaying all data properly. The problem is...
    When I am pressing the print preview button... it is getting dump.
    The dump short message is....... "Field symbol has not yet been assigned".
    Hope that I will get a solution from you as previous.
    With Thanks
    Sohel

    Do you use a field for coloring a column or cell?
    If the coding is not too large it could be helpfull to post the coding as well.
    Regards,
    John.

Maybe you are looking for