Icon in print preview of ALV tree

Hi friends,
   I am not getting the icons in item level in the print preview of ALV tree output.
For example:
  Execute BCALV_TREE_06 and see the print preview of the output. You can not see the icons in the print preview.
But i need it to be printed.
Guide me
venkatesh

Hi Venkatesh,
you can see similar kind of folder icon in the view.
but you can't download or print them.
regards
vijay

Similar Messages

  • 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.

  • 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.

  • Missing columns in print preview of ALV Grid

    In a report using ALV grid the output is ok in ALV grid when press print preview the 1st column is always missing and the 1st row shift by 1 character. Why is it happening. The same is happening in print out or when list saved in excel also.
    the coding is like
      call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          i_interface_check        = ' '
          i_buffer_active          = ' '
          i_callback_program       = i_repname
          i_callback_html_top_of_page = 'HTML_TOP_OF_PAGE'
          i_callback_pf_status_set = ' '
          i_callback_user_command = 'FRM_ALV_USER_COMMAND'
          i_structure_name         = 'IT_REPORT'
          i_background_id          = ' '
          is_layout                = i_layout
          it_fieldcat              = i_fieldtab[]
          it_sort                  = i_sort[]
          i_default                = 'X'
          i_save                   = 'A'
          is_variant               = i_variant
          it_events                = i_events[]
          is_print                 = i_print
        tables
          t_outtab                 = it_report.
    Kindly resolve.
    thanks
    anya

    Sample code:
    REPORT ZALV_DISPLAY_CHANGE.
    TABLES :T247.
    TYPE-POOLS SLIS. "Type definitions for alv report
    DATA: IT_FIELDCAT TYPE LVC_T_FCAT,
    WA_FIELDCAT TYPE LVC_S_FCAT.
    DATA: WA_LAYOUT TYPE LVC_S_LAYO.
    DATA : BEGIN OF IT_FINAL OCCURS 0,
    CHECK(1),
    CELLTAB TYPE LVC_T_STYL, " Switch between display/change
    MNR LIKE T247-MNR,
    LTX LIKE T247-LTX,
    END OF IT_FINAL.
    DATA : WA_FINAL LIKE IT_FINAL.
    DATA : W_REPID LIKE SY-REPID.
    W_REPID = SY-REPID.
    REFRESH IT_FINAL.
    SELECT MNR LTX
    FROM T247
    INTO CORRESPONDING FIELDS OF TABLE IT_FINAL
    WHERE SPRAS EQ 'E'.
    WA_FIELDCAT-FIELDNAME = 'CHECK'.
    WA_FIELDCAT-TABNAME = 'IT_FINAL'.
    WA_FIELDCAT-CHECKBOX = 'X'.
    WA_FIELDCAT-EDIT = 'X'..
    WA_FIELDCAT-OUTPUTLEN = '3'.
    WA_FIELDCAT-COL_POS = '1'.
    APPEND WA_FIELDCAT TO IT_FIELDCAT.
    CLEAR WA_FIELDCAT.
    WA_FIELDCAT-FIELDNAME = 'MNR'.
    WA_FIELDCAT-TABNAME = 'IT_FINAL'.
    WA_FIELDCAT-OUTPUTLEN = '8'.
    WA_FIELDCAT-COL_POS = '2'.
    WA_FIELDCAT-REPTEXT = 'Month'.
    APPEND WA_FIELDCAT TO IT_FIELDCAT.
    CLEAR WA_FIELDCAT.
    WA_FIELDCAT-FIELDNAME = 'LTX'.
    WA_FIELDCAT-TABNAME = 'IT_FINAL'.
    WA_FIELDCAT-OUTPUTLEN = '20'.
    WA_FIELDCAT-COL_POS = '3'.
    WA_FIELDCAT-REPTEXT = 'Month Desc'.
    APPEND WA_FIELDCAT TO IT_FIELDCAT.
    CLEAR WA_FIELDCAT.
    DATA: WA_CELLTAB TYPE LVC_S_STYL,
    IT_CELLTAB TYPE LVC_T_STYL,
    L_INDEX TYPE I.
    CLEAR : WA_CELLTAB,WA_FINAL,IT_CELLTAB.
    REFRESH IT_CELLTAB.
    *Initialize the celltab table
    LOOP AT IT_FINAL INTO WA_FINAL.
    L_INDEX = SY-TABIX.
    WA_CELLTAB-FIELDNAME = 'CHECK'.
    WA_CELLTAB-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_ENABLED.
    INSERT WA_CELLTAB INTO TABLE IT_CELLTAB.
    INSERT LINES OF IT_CELLTAB INTO TABLE WA_FINAL-CELLTAB.
    MODIFY IT_FINAL FROM WA_FINAL INDEX L_INDEX.
    ENDLOOP.
    *Make the first five 5 rows as disabled
    CLEAR L_INDEX.
    LOOP AT IT_FINAL INTO WA_FINAL.
    L_INDEX = SY-TABIX.
    IF SY-TABIX LE 5.
    LOOP AT WA_FINAL-CELLTAB INTO WA_CELLTAB.
    IF WA_CELLTAB-FIELDNAME EQ 'CHECK' .
    WA_CELLTAB-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_DISABLED.
    MODIFY WA_FINAL-CELLTAB FROM WA_CELLTAB.
    MODIFY IT_FINAL INDEX L_INDEX FROM WA_FINAL TRANSPORTING CELLTAB.
    ENDIF.
    ENDLOOP.
    ENDIF.
    ENDLOOP.
    WA_LAYOUT-BOX_FNAME = 'CHECK'.
    WA_LAYOUT-NO_ROWMARK = 'X'.
    WA_LAYOUT-STYLEFNAME = 'CELLTAB'.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
    EXPORTING
    I_CALLBACK_PROGRAM = W_REPID
    I_GRID_TITLE = 'GRID DISPLAY'
    IS_LAYOUT_LVC = WA_LAYOUT
    IT_FIELDCAT_LVC = IT_FIELDCAT
    TABLES
    T_OUTTAB = IT_FINAL
    EXCEPTIONS
    PROGRAM_ERROR = 1
    OTHERS = 2.
    Please give me reward point If it is useful
    Thanks
    Murali Poli

  • Problem with print preview in alv grid

    Hello all,
    I have to display base unit of measure(meins) in alv grid output. i am using a conversion routine to convert it from ST TO PC before display.After executing the report i am getting the correct data. the problem is when i select the print preview
    alv list is displayed. in that the unit of measure pc is not displayed, it is comming as '*******. what i came to know is the same conversion routine is triggered in the standard program for the display. so it canot convert that.
    so please help me out in solving this.
    Thanks in advance,
    Sarat

    hi sarath,
        this is an example code try using the statement before displaying, i think it works.
    *example cdoe.
    LOOP AT i_grp1 INTO wa_grp1.
    AT NEW tknum.
    READ TABLE i_grp1 intto wa_grp1 index sy-tabix.
    SUM.
    MOVE-CORRESPONDING wa_grp1 TO wa_grp2.
    APPEND wa_grp2 TO i_grp2.
    ENDAT.
    ENDLOOP.

  • Getting Error While Going For Print Preview in ALV Report

    Hi,
    We doveloped a new report based on client requirment while going for print preview all the fields are shufling.Can you please guide me I am unable to solve this problem.
    Regards
    Suresh

    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.

  • Modification of print preview of alv report

    Dear all,
            I got a new requirement, after running CADO transaction with sel.parameters PERNR and DATERANGE  it displays alvgrid . If an enduser want to print this ALVGRID that must display sel.parameters at the top of first page.Is it possible while triggering the print to change alvreport layout.
           Please help regarding this.
    Thanks in advance

    I have the same problem, too.
    Can anyone give the solution please..?
    Thanks

  • Skipping ALV Grid and moving into Print Preview

    Hi Friends,
    I am using ALV Grid Display, and created an ALV Layout which gives multiple lines output in Print Preview.
    Now I do not want ALV Grid Output. I need to directly see the print preview, by skipping the grid output.
    Any ideas?
    Thanks
    Krishna

    Print preview of ALV grid display data in ALV list format. So if u r using REUSE_ALV_GRID_DISPLAY Fm instead of it use REUSE_ALV_LIST_DISPLAY fm. It will display data like print preview of ALV grid.

  • Print Preview and Export not working FROM ALV Report

    Hi
    I have this ALV report which is working fine. But when I try to do a print preview it doesn't show the columns which r sorted. The columns r there but the data starts from the one which is not sorted so the layout is all messed up. In the ALV report the columns that r sorted groups them into one, I mean they just show only one time rest of the row for the same thing is blank it doesn't repeat the same data in those column. I am not sure whether that's causing it or not.
    Please help.

    Hi Anwarul,
    do not sort passing parameters for sorting. Create a layout (called ALV variant) or do the sorting online clicking columns(s) and sort icons. It will not change when displayed in print preview.
    What function/object do you use?
    Regards,
    Clemens

  • Issue with ALV grid print preview/spool

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

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

  • Printing format control in ALV TREE

    Hello there,
    I searched all over SDN but I couldn't find a solution for my problem ! It would be nice of you if you can help me sort it out.
    I'm using an ALV TREE :
    DATA: gv_tree             TYPE REF TO cl_gui_alv_tree
      CALL METHOD gv_tree->set_table_for_first_display
        EXPORTING
          is_hierarchy_header = gv_hierarchy_header
          it_list_commentary  = gv_report_title
          i_save              = 'A'
          is_variant          = gv_variant
        CHANGING
          it_outtab           = gt_output_empty      "Must be empty
          it_fieldcatalog     = gt_fieldcat.
    I need to change printing format from X_65_255 to X_44_120.
    In this method, there is no IS_PRINT to insert the new format (it exists only for GRID).
    Do you have any idea?

    I could not find a way to do it in CL_GUI_ALV_TREE but you can use CL_GUI_ALV_GRID and the same method SET_TABLE_FOR_FIRST_DISPLAY in this class you can pass the print parameters to IS_PRINT (the component is PRINT_CTRL).
    Revert back if it works.
    Regards,
    Felipe Simionatto
    Edited by: fsimionatto on Sep 9, 2010 4:13 PM

  • Hide check box in the print preview and print of OO ALV

    Hi Experts,
                      I am working on an OO ALV Report. I am facing an issue as,
    1) I have a check box in the output of the report. If the user clicks on print or print preview the check box should not be printed.
    2) When I am printign top of page in the event PRINT_TOP_OF_PAGE, when I tried to insert new line its not printing a new line.
        please suggest me how to print empty lines in the print top of page event of OO ALV.
    Please help me to complete these issues.
    Thanks in advance.
    Regards.
    Ranganadh.

    hi,
    you can use the write statement in the print_top_of_page event of oo alv.
    regards.

  • Header not visible in alv output print preview using html_top_of_page

    hi to all experts,
    im using html_top_of_page for alv header and using fm reuse_alv_grid_display. when i see the print preview im getting the report output but not the alv header . what could be the problem

    Hi tarun,
    im unable to see the header print preview . I can see it in the report output .
    here is my code
    FORM html_top_of_page USING document
            TYPE REF TO cl_dd_document .
      CREATE OBJECT:  document.
      DATA:text TYPE sdydo_text_element.
      DATA: l_repid TYPE sy-repid,
            l_mandt TYPE sy-mandt,
            l_date(10),
            l_yr(4),
            l_mm(2),
            l_dd(2),
            l_hr(2),
            l_sec(2),
            l_min(2),
            l_time(10).
      CALL METHOD document->add_gap
        EXPORTING
          width = 70.
      text = text-005.
      CALL METHOD document->add_text
        EXPORTING
          text      = text-005
          sap_style = 'HEADING'.
      CALL METHOD document->new_line.
      CONCATENATE 'Report:' sy-repid INTO text.
      CALL METHOD document->add_text
        EXPORTING
          text         = text
          sap_emphasis = 'Strong'.
      CALL METHOD document->add_gap
        EXPORTING
          width = 206.
      l_date = sy-datum.
      MOVE: l_date+0(4) TO l_yr,
            l_date+4(2) TO l_mm,
            l_date+6(2) TO l_dd.
      CONCATENATE 'Run Date:' l_dd '.' l_mm '.' l_yr
                  INTO text.
      CALL METHOD document->add_text
        EXPORTING
          text          =  text
          sap_style     =  space
          sap_color     =  space
          sap_fontsize  =  cl_dd_document=>medium
          sap_emphasis  =  cl_dd_document=>strong
          style_class   =  space
    *  CHANGING
    *    document      =
      CALL METHOD document->new_line.
      CONCATENATE 'Client:' sy-mandt INTO text.
      CALL METHOD document->add_text
        EXPORTING
          text          = text
          sap_fontstyle = cl_dd_document=>medium
          sap_emphasis  = cl_dd_document=>strong.
      CALL METHOD document->add_gap
        EXPORTING
          width = 220.
      l_time = sy-uzeit.
      l_hr = l_time+0(2).
      l_mm = l_time+2(4) .
      l_sec = l_time+4(6).
      CONCATENATE l_hr ':' l_mm ':' l_sec
           INTO l_time.
      CONCATENATE 'Time:' l_time INTO text.
      CALL METHOD document->add_text
        EXPORTING
          text           = text
          sap_fontstyle =  cl_dd_document=>medium
          sap_emphasis  =  cl_dd_document=>strong
          style_class   =  space
    *  CHANGING
    *    document      =
      CALL METHOD document->new_line.
      CONCATENATE 'User Id:' sy-uname INTO text.
      CALL METHOD document->add_text
        EXPORTING
           text          =  text
          sap_style     = space
          sap_color     = space
          sap_fontstyle = cl_dd_document=>medium
          sap_emphasis  = cl_dd_document=>strong
          style_class   = space
    *  CHANGING
    *    document      =
      CALL METHOD document->new_line.
      CALL METHOD document->new_line.
      text = 'Note: The maximum value for the column Qty to Print is 10,000.'.
      CALL METHOD document->add_text
        EXPORTING
           text          = text
    *    text_table    =
    *    fix_lines     =
    *     sap_style     =  cl_dd_document=>strong
           sap_color     = cl_dd_document=>list_negative
    *    sap_fontsize  =
          sap_fontstyle = cl_dd_document=>strong
    *    sap_emphasis  =
    *    style_class   =
    *  CHANGING
    *    document      =
      CALL METHOD document->new_line.
      CALL METHOD document->new_line.
      text = 'Selection Criteria:'.
      CALL METHOD document->add_text
        EXPORTING
           text          = text
    *      text_table    =
    *      fix_lines     =
           sap_style      = 'KEY'
    *      sap_color     =
           sap_fontsize  = cl_dd_document=>medium
           sap_fontstyle = cl_dd_document=>strong.
    *  CALL METHOD document->new_line.
    *  CALL METHOD document->new_line.
      IF so_mblnr[] IS NOT INITIAL.
        CALL METHOD document->new_line.
        IF so_mblnr-high IS NOT INITIAL.
          CONCATENATE 'Material Doc:' so_mblnr-low '  TO   '  so_mblnr-high INTO text SEPARATED BY space.
        ELSE.
          CONCATENATE 'Material Doc:' so_mblnr-low INTO text SEPARATED BY space.
        ENDIF.
        CALL METHOD document->add_text
          EXPORTING
            text          = text
            sap_fontsize  = cl_dd_document=>medium
            sap_fontstyle = cl_dd_document=>strong.
      ENDIF.
      IF so_bwart[] IS NOT INITIAL.
        CALL METHOD document->new_line.
        IF so_bwart-high IS NOT INITIAL.
          CONCATENATE 'Movement Type:' so_bwart-low ' TO  ' so_bwart-high INTO text SEPARATED BY space.
        ELSE.
          CONCATENATE 'Movement Type:' so_bwart-low INTO text SEPARATED BY space.
        ENDIF.
        CALL METHOD document->add_text
          EXPORTING
            text          = text
            sap_fontsize  = cl_dd_document=>medium
            sap_fontstyle = cl_dd_document=>strong.
      ENDIF.
      IF so_bldat[] IS NOT INITIAL.
        CALL METHOD document->new_line.
        IF so_bldat-high IS NOT INITIAL.
          CONCATENATE 'Document Date:' so_bldat-low ' TO  ' so_bldat-high INTO text SEPARATED BY space.
        ELSE.
          CONCATENATE 'Document Date:' so_bldat-low  INTO text SEPARATED BY space.
        ENDIF.
        CALL METHOD document->add_text
          EXPORTING
            text          = text
            sap_fontsize  = cl_dd_document=>medium
            sap_fontstyle = cl_dd_document=>strong.
      ENDIF.
      IF so_budat[] IS NOT INITIAL.
        CALL METHOD document->new_line.
        IF  so_budat-high IS NOT INITIAL.
          CONCATENATE 'Posting Date:' so_budat-low ' TO  ' so_budat-high INTO text SEPARATED BY space.
        ELSE.
          CONCATENATE 'Posting Date:' so_budat-low INTO text SEPARATED BY space.
        ENDIF.
        CALL METHOD document->add_text
          EXPORTING
            text          = text
            sap_fontsize  = cl_dd_document=>medium
            sap_fontstyle = cl_dd_document=>strong.
      ENDIF.
      IF so_matnr[] IS NOT INITIAL.
        CALL METHOD document->new_line.
        IF so_matnr-high IS NOT INITIAL.
          CONCATENATE 'Material ID:' so_matnr-low ' TO  ' so_matnr-high INTO text SEPARATED BY space.
        ELSE.
          CONCATENATE 'Material ID:' so_matnr-low INTO text SEPARATED BY space.
        ENDIF.
        CALL METHOD document->add_text
          EXPORTING
            text          = text
            sap_fontsize  = cl_dd_document=>medium
            sap_fontstyle = cl_dd_document=>strong.
      ENDIF.
      IF so_werks[] IS NOT INITIAL.
        CALL METHOD document->new_line.
        IF so_werks-high IS NOT INITIAL.
          CONCATENATE 'Plant:' so_werks-low ' TO  ' so_werks-high INTO text SEPARATED BY space.
        ELSE.
          CONCATENATE 'Plant:' so_werks-low INTO text SEPARATED BY space.
        ENDIF.
        CALL METHOD document->add_text
          EXPORTING
            text          = text
            sap_fontsize  = cl_dd_document=>medium
            sap_fontstyle = cl_dd_document=>strong.
      ENDIF.
      IF so_lgort[] IS NOT INITIAL.
        CALL METHOD document->new_line.
        IF so_lgort-high IS NOT INITIAL.
          CONCATENATE 'Storage Location:' so_lgort-low ' TO  ' so_lgort-high INTO text SEPARATED BY space.
        ELSE.
          CONCATENATE 'Storage Location:' so_lgort-low INTO text SEPARATED BY space.
        ENDIF.
        CALL METHOD document->add_text
          EXPORTING
            text          = text
            sap_fontsize  = cl_dd_document=>medium
            sap_fontstyle = cl_dd_document=>strong.
      ENDIF.
      IF so_lifnr[] IS NOT INITIAL.
        CALL METHOD document->new_line.
        IF so_lifnr-high IS NOT INITIAL.
          CONCATENATE 'Vendor:' so_lifnr-low ' TO  ' so_lifnr-high INTO text SEPARATED BY space.
        ELSE.
          CONCATENATE 'Vendor:' so_lifnr-low INTO text SEPARATED BY space.
        ENDIF.
        CALL METHOD document->add_text
          EXPORTING
            text          = text
            sap_fontsize  = cl_dd_document=>medium
            sap_fontstyle = cl_dd_document=>strong.
      ENDIF.
      IF so_xblnr[] IS NOT INITIAL.
        CALL METHOD document->new_line.
        IF so_xblnr-high IS NOT INITIAL.
          CONCATENATE 'Delivery Note:' so_xblnr-low 'TO' so_xblnr-high INTO text SEPARATED BY space.
        ELSE.
          CONCATENATE 'Delivery Note:' so_xblnr-low INTO text SEPARATED BY space.
        ENDIF.
        CALL METHOD document->add_text
          EXPORTING
            text          = text
            sap_fontsize  = cl_dd_document=>medium
            sap_fontstyle = cl_dd_document=>strong.
      ENDIF.
      IF so_ebeln[] IS NOT INITIAL.
        CALL METHOD document->new_line.
        IF so_ebeln-high IS NOT INITIAL.
          CONCATENATE 'PO NO:' so_ebeln-low ' TO  ' so_ebeln-high INTO text SEPARATED BY space.
        ELSE.
          CONCATENATE 'PO NO:' so_ebeln-low INTO text SEPARATED BY space.
        ENDIF.
        CALL METHOD document->add_text
          EXPORTING
            text          = text
            sap_fontsize  = cl_dd_document=>medium
            sap_fontstyle = cl_dd_document=>strong.
      ENDIF.
      IF so_usnam[] IS NOT INITIAL.
        CALL METHOD document->new_line.
        IF so_usnam-high IS NOT INITIAL.
          CONCATENATE 'User Name:' so_usnam-low ' TO  ' so_usnam-high INTO text SEPARATED BY space.
        ELSE.
          CONCATENATE 'User Name:' so_usnam-low INTO text SEPARATED BY space.
        ENDIF.
        CALL METHOD document->add_text
          EXPORTING
            text          = text
            sap_fontsize  = cl_dd_document=>medium
            sap_fontstyle = cl_dd_document=>strong.
      ENDIF.
      CALL METHOD document->new_line.
      IF 1x3 = 'X'.
        text = 'Barcode label 1x3 maintained'.
        CALL METHOD document->add_text
          EXPORTING
            text          = text
            sap_fontsize  = cl_dd_document=>medium
            sap_fontstyle = cl_dd_document=>strong.
      ELSE.
        text = 'Bar Code label 2x4 maintained'.
        CALL METHOD document->add_text
          EXPORTING
            text          = text
            sap_fontsize  = cl_dd_document=>medium
            sap_fontstyle = cl_dd_document=>strong.
      ENDIF.
      CALL METHOD document->new_line.

  • In ALV- Coulmns are jumbling in print preview and word doc.(irregular)

    Hi Gurus,
    In ALV, i am getting  the output with proper column allignment. But when i click on print preview in the output, columns are jumbling (irregular pattern- not in proper allignment) and also i am pulling the output data in spool throgh PDF format, there also columns are coming irregular( jumbling).
    I want to get the output data into word forma with proper column allignment.
    Please suggest me to solve this issue.
    Thanks,
    Chiru.

    Check whether in the field catalog COL_POS is filled properly,

Maybe you are looking for