Print internal table

Hi ,
I have created a view with a table inside. This table is bound to a node that contains data from a service
call.
The view is embeded in the window and the data in the table can be displayed on the screen. I would like
to print this table. How do I code this? Please give me suggestions.
ps. I don't want to display in ALV format.
Thanks,
AS.

Hi Thomas,
I have created a view and a popup window. In this view context, I created a node that is bound to SFPPRIP structure.
I have user to enter output device (DEST) .
I don't know how to declear it_message and print_options to make the method PRINT to work.
Could you look at the code below and give me some suggestions on the input for the print method?
method GET_PRINT_PARAM .
* get print input
  data: context_node type ref to if_wd_context_node,
          elem_print type ref to if_wd_context_element,
          stru_print type if_componentcontroller=>element_printing,
          item_dest like stru_print-dest.
  context_node = wd_context->get_child_node( name = 'PRINTINT' ).
  elem_print = context_node->get_element( ).
  elem_print->get_attribute(
    exporting
      name = 'DEST'
    importing
      value = item_dest ).
*   fill the internal table
data: elem_sflightinfo type ref to if_wd_context_element,
         stru_sflightinfo type table of if_componentcontroller=>element_sflightinfo initial size 0,
         w_itab           like line of stru_sflightinfo.
     context_node = wd_context->get_child_node( name = 'SFLIGHTINFO').
     select * from sflight
      into corresponding fields of table stru_sflightinfo.
* BIND table to context node flighttab
  call method context_node->bind_table
    exporting
      new_items = stru_sflightinfo.
* for print method
data: it_out type ref to data,
        it_message type ref to CL_BSP_MESSAGES. "I know it is wrong, but what should I use?
get reference of stru_sflightinfo into it_out.
  wd_this->print(
*   col_def =                              " tableviewcontroltab
    itab     =  it_out                      " ref to data
*   iterator =                               " ref to if_htmlb_tableview_iterator
    messages =   it_message      " ref to cl_bsp_messages(wrong. but what to pass?)
    print_options = item_dest     " sfpprip  (I know it is wrong, but don't know what to pass?)
endmethod.
PRINT method
method PRINT .
  FIELD-SYMBOLS: <tab> TYPE table.
  ASSIGN itab->* TO <tab>.
****This sample uses the new ALV Object Model - Only available in WebAS 640+
****It will have to be changed (perhaps to use field catalogs and REUSE_ALV)
****in WebAS 620
  DATA: table   TYPE REF TO cl_salv_table.
  DATA: print_parameters TYPE pri_params,
        valid_flag(1) TYPE c.
****Convert the Input Print Parameters (Designed for Adobe Forms)
****Into the ABAP List format
  CALL FUNCTION 'GET_PRINT_PARAMETERS'
    EXPORTING
      authority              = print_options-authority
      copies                 = print_options-copies
      cover_page             = print_options-cover
      data_set               = print_options-dataset
      department             = print_options-division
      destination            = print_options-dest
      expiration             = print_options-lifetime
      immediately            = print_options-reqimm
      layout                 = 'X_65_255'
      list_name              = print_options-suffix2
      list_text              = print_options-covtitle
      new_list_id            = print_options-reqnew
      no_dialog              = abap_true
      receiver               = print_options-receiver
      release                = print_options-reqdel
    IMPORTING
      out_parameters         = print_parameters
      valid                  = valid_flag
    EXCEPTIONS
      archive_info_not_found = 1
      invalid_print_params   = 2
      invalid_archive_params = 3
      OTHERS                 = 4.
  IF sy-subrc = 0  OR valid_flag NE abap_true.
    messages->add_message2( condition = 'print'
                            message = 'Invalid Print Parameters'(e01) ).
    RETURN.
  ENDIF.
****Start List Processing with our Print Parameters
  NEW-PAGE PRINT ON PARAMETERS print_parameters
                    NO DIALOG.
****Create the ALV Object Model
  DATA: salv_msg TYPE REF TO cx_salv_msg.
  DATA: error_string TYPE string.
  TRY.
      cl_salv_table=>factory(
        EXPORTING
          list_display = abap_true
        IMPORTING
          r_salv_table = table
        CHANGING
          t_table      = <tab> ).
    CATCH cx_salv_msg INTO salv_msg.
      messages->add_message_from_exception( condition = 'print'
                                            exception = salv_msg ).
      EXIT.
  ENDTRY.
****Process the Column Definitions
  DATA: columns TYPE REF TO cl_salv_columns_table.
****Get a reference to the columns object and set the optimize width.
  columns = table->get_columns( ).
  columns->set_optimize( abap_false ).
  DATA: l_col_def TYPE tableviewcontroltab.
  DATA: iterator_error TYPE REF TO cx_sy_dyn_call_illegal_method.
****We have an iterator Class - Process it and get a columun defintion table
  IF col_def  IS INITIAL AND
     iterator IS NOT INITIAL.
    DATA: p_overwrites TYPE tableviewoverwritetab.
    TRY.
        iterator->get_column_definitions(
             EXPORTING
               p_tableview_id = 'itab'
             CHANGING
               p_column_definitions = l_col_def
               p_overwrites         = p_overwrites ).
      CATCH cx_sy_dyn_call_illegal_method INTO iterator_error.
        messages->add_message_from_exception( condition = 'print'
                                              exception = iterator_error ).
        EXIT.
    ENDTRY.
*****User supplied a column definition table directly - us it
  ELSEIF col_def  IS NOT INITIAL.
    l_col_def = col_def.
  ENDIF.
****Adjust our column definition (otherwise know as Field Catalog) by the
****Iterator or Column Dfinition table.
  IF l_col_def IS NOT INITIAL.
    DATA: scrtext_l TYPE scrtext_l,
          scrtext_m TYPE scrtext_m,
          scrtext_s TYPE scrtext_s,
          tooltip   TYPE lvc_tip.
    DATA: col TYPE salv_t_column_ref.
    FIELD-SYMBOLS: <wa_col> LIKE LINE OF col,
                   <wa_col_def> LIKE LINE OF l_col_def.
****Get a listing of all columns
    col = columns->get( ).
****Loop through all the columsn
    LOOP AT col ASSIGNING <wa_col>.
****Read to see if the current columns is in our Iterator
      READ TABLE l_col_def ASSIGNING <wa_col_def>
            WITH KEY columnname = <wa_col>-columnname.
      IF sy-subrc = 0.
****Field is in the iterator - set it visible.
        <wa_col>-r_column->set_visible( abap_true ).
****Is there an override title in the Iterator - if yes
****use it for all the column headers of the output
        IF <wa_col_def>-title IS NOT INITIAL.
          scrtext_l = <wa_col_def>-title.
          scrtext_m = <wa_col_def>-title.
          scrtext_s = <wa_col_def>-title.
          <wa_col>-r_column->set_long_text( scrtext_l ).
          <wa_col>-r_column->set_medium_text( scrtext_m ).
          <wa_col>-r_column->set_short_text( scrtext_s ).
        ENDIF.
****Is there an override tooltip in the Interator - if yes
****ues it for the tooltip of the output (actually meaningless
****for only printing - but hey you never know what you might
****use this for in the future :)
        IF <wa_col_def>-tooltipheader IS NOT INITIAL.
          tooltip = <wa_col_def>-tooltipheader.
          <wa_col>-r_column->set_tooltip( tooltip ).
        ENDIF.
      ELSE.
****Field is not in the Iterator - Hide it in the output
        <wa_col>-r_column->set_visible( abap_false ).
      ENDIF.
    ENDLOOP.
  ENDIF.
****Set the ALV to display (forces printing in the Dark = background or BSP)
  table->display( ).
  NEW-PAGE PRINT OFF.
  messages->add_message2( condition   = 'print'
                          message     = 'Print Output is complete'(i01)
                          messagetype = 'I' ).
endmethod.
Your help is greatly appreciated.
AS.
Edited by: Anna  Smith on Dec 18, 2008 4:25 PM

Similar Messages

  • Problem in printing internal table data in Sapscript!

    Hi All,
    Am trying to print internal table data into main window of sapscript.
    This is what I have written.
    loop at it_final INTO wa_final.
                  CALL FUNCTION 'WRITE_FORM'
                   EXPORTING
                     window   = 'MAIN'
                     ELEMENT  = '670'
                     TYPE     = 'BODY'
                     FUNCTION = 'APPEND'
                   EXCEPTIONS
                     window  = 1
                     element = 2.
                 IF sy-subrc <> 0.
                 ENDIF.
    ENDLOOP.
    IN Sapscript :
    /E   670
    IT     &wa_final-vbeln&,,&wa_final-vbelv&,,&wa_final-payment&
    =      &wa_final-rundate&,,&wa_final-waers&,,&wa_final-creditcard&
    =      &wa_final-augru&,,&wa_final-dmbtr&
    Pls let me know if am missing anything.
    Thanks & Regards
    Himayat

    Check if your Programm is called at the Sapscript level.
    Are you calling the programm from the Sapscript using the PERFORM command? or are these Programm and Sapscript set in customizing?
    Using SE16 check the Message Type and see if Sapscript and the programm are connected at all.

  • How to use Different Main Windows in Multiple pages to print internal table

    Hi experts,
    I have a problem regarding how to have multiple different main windows in  smartforms..the problem is that i want to print an internal table in the third page of the smartform and that table can have dynamic values ..sometime it may have more than 400 values also which can not be printed in one or two pages ...
    so to accomplish the same what i did was..
    i tried creating a new main window in the third page but it is throwing an error saying two main windows not allowed and i also tried by copying the first page's main window but it is just repeating the same content what was there in second page..
      i also tried by creating a secondary window in the third page and in that  window i tried giving my internal table and tried by giving the next page to itself but  that also is not allowed and it throws an error saying a page without a main window cannot point to itself as a next page....
    i also tried using a secondary window and in that window i was trying to display the internal table but it is only showing third page content and fourth page itself  was not created....although in my next page field value of the third page , i have given  the third page itself as a next page ....but this also is not working ,.....
    please suggest how to have different main windows(not copy of first main window) in smartforms in order to display the dynamic contents of an internal table

    HI ,
    Just check with your smart styles with assigned  paragraph  allignment   .
    Try to create character style  with your required  font ,size and  Allignment  .
    Hope u this will solve your issue  .
    Let me know if any concerns......
    Regards,
    Lokesh

  • SAP Script: How do you print internal table values in a VAR window?

    Hi
      I want to have a window like MAIN window where I can print data like line items and the no of lines are only 3..I have added one window type VAR. I have schedule line data in one internal table in which I am calling WRITE_FORM func.mod for the newly created window..But the last schedule line only getting printed...when I debug the script looping in internal table is happening correctly and going to window also happening but in the output its showing last schedule line...What could be the problem and how to over come this?
        Thanks in advance.
    Regards
    Vali.

    Hi Md,
    1. type MAIN window CAN GROW (vertically)
       But VAR window Cannot.
    2. If our window is type VAR or FIXED
       no matter how much we loop
       it will show only the last record.
       because it cannot grow.
      (every loop pass overwrites the contents in the layout)
    3. So if we use loop to print anything,
       THE WINDOW MUST BE OF TYPE "MAIN" ONLY.
    Hope the above helps.
    Regards,
    Amit M.

  • Printing internal table data

    Hi all,
    I want to print an internal table data without displaying it via ALV. That is when clicked on a button, printing should be started.
    How can I do that?
    Thanks a lot.
    Deniz.

    Hi,
       Check the following code this is exactly what you need I guess....
    FM to generate spool number for the internal table wt_final_prnt.
    CALL FUNCTION 'RSPO_SX_OUTPUT_TEXTDATA'
            EXPORTING
              name        = gv_name
              dest        = gv_dest
              rows        = gv_rows
              startrow    = gv_startrow
              pages       = gv_pages
              rqtitle     = 'Z9CS - STD Search Results'
              rqcopies    = gv_rqcopies
              rqowner     = gv_rqowner
              immediately = gv_immediate
            IMPORTING
              rqid        = gv_rqid
            TABLES
              text_data   = wt_final_prnt
            EXCEPTIONS
              OTHERS      = 1.
          CLEAR : wa_final_prnt, wt_final_prnt[].
    FM to set the print attributes.
          CALL FUNCTION 'GET_PRINT_PARAMETERS'
            IMPORTING
              out_parameters         = wv_pripar
              out_archive_parameters = wv_arcpar
              valid                  = wv_val
            EXCEPTIONS
              archive_info_not_found = 1
              invalid_print_params   = 2
              invalid_archive_params = 3
              OTHERS                 = 4.
    FM to submit to the printer
          CALL FUNCTION 'RSPO_OUTPUT_SPOOL_REQUEST'
            EXPORTING
              spool_request_id = gv_rqid.
    Regards,
    Ram.

  • Printing internal table

    hi friends,
    i have a internal table itab with 3 fileds called f1,f2,f3 and the contents are.........
    f1 f2 f3
    A1 A2 A3
    B1 B2 B3
    C1 C2 C3
    D1 D2 D3
    E1 E2 E3
    F1 F2 F3
    G1 G2 G3
    if i want to print the output like this
    A1 B1 C1 D1 E1 F1 G1
    A2 B2 C2 D2 E2 F2 G2
    A3 B3 C3 D3 E3 F3 G3
    WHAT IS THE PROCEDURE?

    try this code: 
    REPORT  Z901_SDN1.
    data : lin type i.
    data : begin of wa_tab,
           f1(20),
           f2(20),
           f3(20),
           end of wa_tab.
    data : itab1 like standard table of wa_tab.
           perform append using 'abc' 'def' 'xyz'.
           perform append using 'abc' 'def' 'xyz'.
           perform append using 'abc' 'def' 'xyz'.
           perform append using 'abc' 'def' 'xyz'.
           perform append using 'abc' 'def' 'xyz'.
           perform append using 'abc' 'def' 'xyz'.
           describe table itab1 lines lin.
             do lin times.
               read table itab1 index sy-index into wa_tab.
               write : wa_tab-f1.
             enddo.
             do lin times.
               read table itab1 index sy-index into wa_tab.
               write : wa_tab-f2.
             enddo.
             do lin times.
               read table itab1 index sy-index into wa_tab.
               write : wa_tab-f3.
             enddo.
           form append using a b c.
             wa_tab-f1 = a.
             wa_tab-f2 = b.
             wa_tab-f3 = c.
             append wa_tab to itab1.
           endform.

  • Print long internal table in smartform, error SSFCOMPOSER250

    Hi experts,
    In VL03N i'm getting this error SSFCOMPOSER250 (Table row is larger than 176 cm) when printing a long internal table containing item's serial numbers. The item has 1000 serial numbers, and they are passed to the smartform in an internal table. I tried to separate in different rows, each one with 200 serial numbers but when printing the 3rd block the message appears again.
    Is it possible to print this table in the smartofrm ??
    thanks in advance,
    María

    I used SERIAL_LS_PRINT to get the serial numbers and then PROCESS_SERIALS_FOR_PRINT and got this:
    ( 768790876 - 768791875 )
    But I need to print all the serial numbers, not an interval..

  • All values in internal table are not displaing in the script print program

    Hi,
    I am calling the script program.In main window all values in the internal table are not displaying. I wrote
    write-form statement in loop. But not all the values are getting displayed. Only thel ast values getting dispalyed. 
    *& Report  ZSCRIPT_116719
    REPORT  ZSCRIPT_116719.
    ************Table decleration***************
    TABLES: mara, mbew, makt.
    loop at i_makt into wa_makt.
      endloop.
    loop at i_MARA into wa_mara.
      endloop.
    LOOP AT I_MBEW INTO WA_MBEW.
      ENDLOOP.
    lv_price = 0.
    ********************Total Price******************
      LOOP AT i_mbew INTO wa_mbew.
        lv_price = lv_price + wa_mbew-stprs.
      ENDLOOP.
    end-of-selection.
    CALL FUNCTION 'OPEN_FORM'
    EXPORTING
      APPLICATION                       = 'TX'
      ARCHIVE_INDEX                     =
      ARCHIVE_PARAMS                    =
      DEVICE                            = 'PRINTER'
      DIALOG                            = 'X'
       FORM                              = 'ZSCRIPT_719'
       LANGUAGE                          = SY-LANGU
      OPTIONS                           =
      MAIL_SENDER                       =
      MAIL_RECIPIENT                    =
      MAIL_APPL_OBJECT                  =
      RAW_DATA_INTERFACE                = '*'
      SPONUMIV                          =
    IMPORTING
      LANGUAGE                          =
      NEW_ARCHIVE_PARAMS                =
      RESULT                            =
    EXCEPTIONS
       CANCELED                          = 1
       DEVICE                            = 2
       FORM                              = 3
       OPTIONS                           = 4
       UNCLOSED                          = 5
       MAIL_OPTIONS                      = 6
       ARCHIVE_ERROR                     = 7
       INVALID_FAX_NUMBER                = 8
       MORE_PARAMS_NEEDED_IN_BATCH       = 9
       SPOOL_ERROR                       = 10
       CODEPAGE                          = 11
       OTHERS                            = 12
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'START_FORM'
    EXPORTING
      ARCHIVE_INDEX          =
       FORM                   = 'ZSCRIPT_719'
       LANGUAGE               = SY-LANGU
      STARTPAGE              = ' '
       PROGRAM                = 'ZSCRIPT_116719'
      MAIL_APPL_OBJECT       =
    IMPORTING
      LANGUAGE               =
    EXCEPTIONS
      FORM                   = 1
      FORMAT                 = 2
      UNENDED                = 3
      UNOPENED               = 4
      UNUSED                 = 5
      SPOOL_ERROR            = 6
      CODEPAGE               = 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.
    *LOOP AT I_MBEW INTO WA_MBEW.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'DATA'
       FUNCTION                       = 'SET'
       TYPE                           = 'BODY'
       WINDOW                         = 'MAIN'
    IMPORTING
      PENDING_LINES                  =
    EXCEPTIONS
       ELEMENT                        = 1
       FUNCTION                       = 2
       TYPE                           = 3
       UNOPENED                       = 4
       UNSTARTED                      = 5
       WINDOW                         = 6
       BAD_PAGEFORMAT_FOR_PRINT       = 7
       SPOOL_ERROR                    = 8
       CODEPAGE                       = 9
       OTHERS                         = 10
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    *ENDLOOP.
    If I give only one value it is showing the output. When I am fetching the data for range of values it i sshowing start_form is not there.
    Plz let me know how to get the aa  internal table values  to be displayed

    hi
    I shortened your program a bit. So we can go to essentials of your question.
    You said you put in it in a loop.
    What i see in your prog is:
    REPORT zscript_116719.
    ************table decleration***************
    TABLES: mara, mbew, makt.
    LOOP AT i_makt INTO wa_makt.
    ENDLOOP.
    LOOP AT i_mara INTO wa_mara.
    ENDLOOP.
    LOOP AT i_mbew INTO wa_mbew.
    ENDLOOP.
    lv_price = 0.
    ********************total price******************
    LOOP AT i_mbew INTO wa_mbew.
      lv_price = lv_price + wa_mbew-stprs.
    ENDLOOP.
    END-OF-SELECTION.
      CALL FUNCTION 'OPEN_FORM'
        EXPORTING
          form     = 'ZSCRIPT_719'
          language = sy-langu.
      CALL FUNCTION 'START_FORM'
        EXPORTING
          form     = 'ZSCRIPT_719'
          language = sy-langu
          program  = 'ZSCRIPT_116719'.
    *LOOP AT I_MBEW INTO WA_MBEW.
      CALL FUNCTION 'WRITE_FORM'
        EXPORTING
          element  = 'DATA'
          function = 'SET'
          type     = 'BODY'
          window   = 'MAIN'.
    *endloop.
    1. Your loop is not a loop with this '*' in front of it.
    2. Are you printing &wa_mbew-???& variables in your sap-script
    3. is itab I_MBEW properly filled
    Let me know.
    Gr. Frank

  • Printing intermediate object (images) stored in an internal table

    Hi All,
    I'm fetching certain imgaes / documents from a 3rd party repository system (IXOS) and storing the objects in an internal table in a program, later to download them onto the Presentation Server through an ABAP Program.
    But instead of downloading these images onto the Presentation Server, i want to directly print them through the ABAP Program on the local printer.
    These images are stored in some raw format in the internal table.
    Is there any way in which these N images or N raw data sets can be converted into N separate spools so that spools can be converted into N PDFs and then printed?
    Or is there any other way in which i can print these N images directly from the ABAP report.
    Request your help.
    Many thanks in advance,
    SG

    Not so easy. You can't just take an image in any format directly into a spool, SAP is only able to print TIFFs and BMPs (and not all "sub-formats") into spools.
    You first need to know what image formats you have to print, to make sure you're able to process all of these formats.
    You may try to use OLE technology to embed the image into a Word document for example, and print this document.

  • SMARTFORM:  How to print on document per row in an internal table

    Hi.
    I have created a SmatForm that is a one-page document to be printed once for every row in an itab I'm sending it via the Table Interface.
    I hope I didn't waste my time designing this form but I created several Windows for each section (header, recipient address, summary of coverage, detail coverage information, disclaimer, etc.).  I arbitrarily chose the header window as the "main" window (mainly because I couldn't find out what the difference between  the different choices was).  I've got the form laid out exactly how I want it.
    If I test the SmartForm and pass in 2+ records via the test screen only the first one prints. 
    I thought about trying a LOOP but since you have to place the text within the loop that means all the Windows I have defined won't "get" any of the data.
    I thought about looping in the driver ABAP program and just calling the SmartForm once per row but that seems horribly inefficient.
    PLEASE HELP!  Can I salvage what I've done already?

    Valter:
    OK.  I'm trying this and running into a snag.
    In the Form Interface section I have a table interface parameter defined as this: 
    P_CERTIFICATES_IN TYPE ZBNTT_LIFECERTIFICATE
    next I declared a variable named "IT_CERTIFICATES LIKE LINE OF P_CERTIFICATES_IN" in the "Global Definitions" section and on my LOOP element (under my new MAIN window) I have "[X] Internal Table" checked and
    "P_CERTIFICATES_IN" "INTO" "IT_CERTIFICATES"
    but the compiler says "Global Definitions     Field "P_CERTIFICATES_IN" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement . . . . . .".
    Why can't the Smartform "see" P_CERTIFICATES_IN?

  • How to print the internal tables in grid format

    i have an internal table with 3 fields
    ITAB1
    1   a
    2   b
    3   c
    I want to print this in the gird like
    1   2   3
    a   b   c
    Can any one help me how to do it
    Thank you

    DATA: BEGIN OF S_STRUC,
    KEY1,
    KEY2,
    KEY3,
    KEY4,
    FIRST TYPE CHAR10 VALUE 'FIRST',
    SECOND TYPE CHAR10 VALUE 'SECOND',
    THRIRD TYPE CHAR10 VALUE 'THIRD',
    END OF S_STRUC.
    DATA: ITAB LIKE S_STRUC OCCURS 0 WITH HEADER LINE.
    DATA: V_INT TYPE INT4.
    FIELD-SYMBOLS: <FS>, <FS1>.
    DO 3 TIMES.
    V_INT = SY-INDEX + 4.
    ITAB-KEY1 = 'A'.
    ITAB-KEY2 = 'B'.
    ITAB-KEY3 = 'C'.
    ITAB-KEY4 = 'D'.
    ASSIGN COMPONENT V_INT OF STRUCTURE S_STRUC TO <FS>.
    ASSIGN COMPONENT V_INT OF STRUCTURE ITAB TO <FS1>.
    <FS1> = <FS>.
    APPEND ITAB.
    ENDDO.
    LOOP AT ITAB.
    WRITE: / ITAB.
    ENDLOOP.
    Regards
    vasu

  • How to print a graph in which internal table has more than 32 entries?

    hiii experts
    i am trying to make a line graph using 'gfw_pres_show' function module.
    but in report internal table has more than 32 entries
    so how can i print a graph having more than 32 entries?

    Hi ricky_lv,
    According to your description, there is main report and subreport in it, when the subreport spans across multiple pages, you want to show column headers on each page. If that is the case, we can set column headers visible while scrolling in main report.
    For detail information, please refer to the following steps:
    In design mode, click the small drop down arrow next to Column Groups and select Advanced Mode.
    Go to your Row Groups pane, click on the first static member.
    In properties grid, set FixData to True.
    Set RepeatOnNextPage to True.
    Here is a relevant thread you can reference:
    https://social.technet.microsoft.com/Forums/en-US/e1f67cec-8fa3-4c5d-86ba-28b57fc4a211/keep-header-rows-visible-while-scrolling?forum=sqlreportingservi
    The following screenshots are for your reference:
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    If you have any feedback on our support, please click
    here.
    Wendy Fu
    TechNet Community Support

  • TOP OF PAGE printing according to SORT - ALV main internal table

    Hi guys
    I manage to solve my previous issues but 1 minor problem here
    Lets say I have an itab which has 3 records
    Sales Order | Purchase No, | Distributor
    1                  |   123               | abc
    1                  |   123               | abc
    2                  |   456               | TGIF
    I'm using FM REUSE_ALV_BLOCK_LIST_APPEND to display the ALV
    its working for the main INTERNAL TABLE but  when it comes to top of page, it doesn't follow the sort
    I want it to print
    Sales Order: 1
    Purchase No: 123
    Distributor: abc
    TABLE 1
    Sales Order: 2
    Purchase No: 456
    Distributor: TGIF
    TABLE 2
    But now its printing
    Sales Order: 1
    Purchase No: 123
    Distributor: abc
    TABLE 1
    Sales Order: 1
    Purchase No: 123
    Distributor: abc
    TABLE 2
    Sales Order: 2
    Purchase No: 456
    Distributor: TGIF
    TABLE <empty table>
    My codes was working previously but its not longer the same.
      READ TABLE it_report INTO l_report INDEX SY-tabix
      WRITE: text-003,          "Sales Order Number
            AT 22 l_report-ebeln.
      WRITE: / text-004,        "Purchase Order Number
             AT 25 l_report-purch_no.
      WRITE: / text-005,        "Distributor Number
             AT 22 l_report-kunnr.
      WRITE: / text-006,        "Ship to Name
             AT 16 l_report-wename1.
      WRITE: / text-007,        "Order Date
             AT 14 l_report-vdate.
      WRITE: / text-008,        "Delivery Date
             AT 17 i_vdatu.
    Can anyone help me out here?  How do I make it print just like the SORT for ALV?

    Refresh the work areas then it work fine

  • How to Import customized internal table to smartform from Print Program

    Hi Gurus,
    I want to Import customized internal table to smartform from print program, Can anybody tell me how it is possible.
    With regards,
    S.Saravanan

    There is no problem passing an internal table to a smarforms, smartforms have the same interface as a function module ([Defining the Form Interface|http://help.sap.com/saphelp_nw70/helpdata/en/1c/f40c5bddf311d3b574006094192fe3/frameset.htm] in [Smart Forms|http://help.sap.com/saphelp_nw70/helpdata/en/a5/de6838abce021ae10000009b38f842/frameset.htm]) so could you elaborate a little more on your requirement (is it a standard a custom forms, etc.)
    Regards,
    Raymond

  • Print data of an internal table to a printer.

    Hi,
    Requirement: The data from an excel file is the input for the program. This data is taken into an internal table using GUI_UPLOAD adn manipulated based on certain validations. The data which is validated is finally collected into an internal table.
    This data is being downloaded to the presentation server using GUI_DOWNLOAD.
    The client is asking to print the data in the internal table to the printer {SAP Scripts are generally printed}.
    Solution required for: How to print the data of an the internal table.
    Thanks in advance.
    Best Regards,
    Goutham.
    Edited by: Raghavendra Goutham on Oct 29, 2008 7:34 PM

    Try some like this way
    report zaRs.
    data: v_params type pri_params,
    start-of-selection.
      perform display_report.
    end-of-selection.
    form display_report .
      call function 'GET_PRINT_PARAMETERS'
        exporting
          immediately            = 'X'
          line_size              = 220
          release                = 'X'
          mode                   = 'CURRENT'
          no_dialog              = ' '
        importing
          out_parameters         = v_params
          valid                  = v_valid
        exceptions
          archive_info_not_found = 1
          invalid_print_params   = 2
          invalid_archive_params = 3
          others                 = 4.
      new-page print on parameters v_params no dialog.
      loop at itab.
        write :/ itab.
      endloop.
      new-page print off.
    endform. 

Maybe you are looking for