ALV output to be printed in smartform

Dear Experts,
There is a report which uses ALV using webdynpro ABAP. Say the report has 5 columns A, B, C, D, and E.
There is also a custom button on ALV 'Print' which calls the smartform to display the output of the ALV( All columns ).
Now the requirement is, user may hide any of the columns in ALV, say, user chosen to hide B, and D columns. So ALV displays A, C, and E columns respectively.
When the user presses the 'Print' button smartform should display only the columns selected by the end user on the webdynpro screen. In this case it is A, C and E columns.
Now is there any way to cpature the list of columns selected by the user or hidden by the user before we process the smartform.
If there is any please let me know.
Thanks in advance!
Regards,
Shashi

Dear Experts,
Awaiting for any replies on this.. Please help in case of any information on this.
Thanks in advance!
Regards,
Shashi

Similar Messages

  • ALV output to be printed in a specified layout

    Hi All,
    I have a ALV output, and I have a print Icon on the application tool bar, when I click on the print icon, the output should go to the printer in 80 character format.
    plz let me know if there is any function module for this.
    plz do the needful.
    Thanks in advance
    Regards,
    Narendra

    Hi Narendra,
      Are you using REUSE_ALV_LIST_DISPLAY fm?
      If so then try using SET_PRINT_PARAMETERS fm before the above fm call and then leave the printing to standard List->Printe Menu option.
      See if this helps..
    Sri

  • ALV Output need to send to Printer

    Hi Folks,
    I need to send the ALV output to the printer. I built the ALV in OOps. The printer button is enabled in the scrren and when I give print it is goint to dump
    Below I have pasted the dump.
    Help me to solve this.
    Points will be rewarded.
    Regards,
    Raj.
    Short text
        Field symbol has not yet been assigned.
    What happened?
        Error in the ABAP Application Program
        The current ABAP program "SAPLKKBL" had to be terminated because it has
        come across a statement that unfortunately cannot be executed.
    Error analysis
        You attempted to access an unassigned field symbol
        (data segment 81).
        This error may occur if
        - You address a typed field symbol before it has been set with
          ASSIGN
        - You address a field symbol that pointed to the line of an
          internal table that was deleted
        - You address a field symbol that was previously reset using
          UNASSIGN or that pointed to a local field that no
          longer exists
        - You address a global function interface, although the
          respective function module is not active - that is, is
          not in the list of active calls. The list of active calls
          can be taken from this short dump.
    rigger Location of Runtime Error
       Program                                 SAPLKKBL
       Include                                 LKKBLF01
       Row                                     1,315
       Module type                             (FORM)
       Module Name                             CHECKBOX_OUT
    ource Code Extract
    ine  SourceCde
    1285     "<<Unicode/Doublebyte 1
    1286   else.
    1287     write at (rs_fieldcat-outputlen) <hf> as icon no-gap quickinfo
    1288                                                  rs_fieldcat-tooltip.
    1289   endif.
    1290
    1291   g_tabname = l_tabname.
    1292
    1293   format hotspot off.
    1294 *End of Orginalcoding 4.6c
    1295
    1296 endform.                               " HEADER_FIELD_OUT
    1297 &----
    1298 *&      Form  CHECKBOX_OUT
    1299 &----
    1300 *       text                                                           *
    1301 ----
    1302 form checkbox_out using rs_layout type kkblo_layout
    1303                         r_tabname type stack-i_tabname
    1304                         r_sum     type c.
    1305
    1306   data: l_mark(1) type c.
    1307
    1308   if not rs_layout-box_tabname is initial and
    1309          rs_layout-box_tabname ne r_tabname.
    1310     format color off.
    1311     write at (2) space no-gap.
    1312     exit.
    1313   endif.
    1314
    >>>>>   if not r_sum is initial or <box> = '-'.
    1316     format color off.
    1317     write at (2) space no-gap.
    1318   else.
    1319     format color off.
    1320     if <box> = ' ' or <box> = 'X'.
    1321       g_mark = <box>.
    1322       if rs_layout-no_input = 'X'.
    1323         write g_mark as checkbox no-gap input off.
    1324       else.

    check these parts in ur method:
                I_SAVE                = <var. of type CHAR01 >
                I_DEFAULT             = <var. of type CHAR01 >
                IS_LAYOUT             = <structure of type LVC_S_LAYO >
                IS_PRINT              = <structure of type LVC_S_PRNT >

  • Output has to print from the executable program

    Hi All,
    I have 'zaap01' executable program. once provided the materil,plant, batch. the out put directly has to print(Via Printer) as well as when I'm getting alv grid.. can u help me how to proceed.
    Thanks,
    srii.

    Hi Sridhar
    Users can print the ALV output on a printer or they can view the printout on the screen. You are able to change the look of these printouts by making various settings in the list-type ALV outputs using the ALV object model.
    You can make the following settings for the printout of the ALV output:
    · Output additional information
    · Output standard title of the program
    · Determine that the ALV be called in print mode
    · Take actual list size into consideration during printing
    · Optimize Column Width in the Printout
    · Reserve Rows for Event END_OF_PAGE
    Methods
    Function-Output of list information
    Class-CL_SALV_PRINT
    Method-SET_LISTINFO_ON
    Function-Check whether list information are being output
    Class-CL_SALV_PRINT
    Method-IS_LISTINFO_ON
    Function-Output selection information
    Class-CL_SALV_PRINT
    Method-SET_SELECTIONINFO_ON
    Function-Check whether selection information is being output
    Class-CL_SALV_PRINT
    Method- IS_SELECTIONINFO_ON
    Function-Output additional information on a separate page
    Class-CL_SALV_PRINT
    Method- SET_COVERPAGE_ON
    Function-Check whether additional information is being printed on a separate page
    Class-CL_SALV_PRINT
    Method- IS_COVERPAGE_ON
    Output Standard Title of the Program
    The standard title of the program comprises the current date, the title of the ALV output and the page number. You are able to show the standard title.
    Methods
    Function-Output standard title of the program
    Class- CL_SALV_PRINT
    Method
    SET_REPORT_
    STANDARD_HEADER_ON
    Determine that the ALV Be Called in Print Mode
    You are able to print the ALV output directly without having to first display it on the screen.
    Methods
    Function-Print ALV output directly
    Class- CL_SALV_PRINT
    Method- SET_PRINT_ONLY
    Function-Check whether ALV output is being printed directly
    Class- CL_SALV_PRINT
    Method- IS_PRINT_ONLY
    Take Actual List Size into Consideration During Printing
    You can use the application to determine how wide the list should be in the printout. If the width of the ALV output has changed (for example because the user is showing columns), it can be that the page is not big enough to show all the information. You are able to set that ALV determine the current size before printing and then changes the print parameters accordingly.
    Methods
    Function
    -Take actual list size into consideration during printing
    Function
    Class- CL_SALV_PRINT
    Method- SET_PRINT_PARAMETERS_ENABLED
    Function
    -Check whether the list size can be adapted
    Class- CL_SALV_PRINT
    maethod-
    IS_PRINT_PARAMETERS_
    ENABLED
    Regards.
    Eshwar.

  • Output Tray 2 does not work when we print a smartforms document immediately

    Dear printer specialists,
    we've the following issue:
    We are printing the same smartforms document in different plants. One plant decided to get the print output into output tray 2 of the printer (lower tray), so we've copied the standard device type into a z-device type and made the SPAD set-up with a preselection for the tray 2 (lower tray). The new device type has been assigned to the output device. Now we made a test and released the print-output for an immediate printing. The output was printed as before in tray 1 (upper tray). When we restart the output from the spool (SP01), the output will be printed in tray 2. Why does this not work, when we print immediately ? Does anyone know how to solve this problem ? (We don't want to change the smartforms document.)
    Thany you for every information to solve this problem.
    Kind regards, Wolfgang

    HI,
    Check if there is a different tra setting in the smartform itself.
    /nsmartforms -> <Form> -> Pages and Windows -> FIRST, NEXT, TERMCOND -> field Resource Name
    Regards,
    Aidan

  • Creating Format type for printing ALV output.

    Dear Friends,
        I am using a format type for printing ALV output print which displays 65 rows and 255 columns on DINA4 page. I want to create a format type which will print 65 rows and 310 columns on 'LEGAL' page format .
    So plz suggest the ways along with help links if any.
    Regards,
    Madan.

    Hi Mandan,
    As long as I know the maximum column for printing is 255.
    Might be you can split your output into 2 rows...
    Regards,

  • Printing ALV output

    Hi All,
    Thanks in advance.
    I have requirement to have a checkbox on the selection screen to print.
    If the check box is checked the report has to print the ALV output with page number 
    on the printer given on the selection screen .
    Can anyone please suggest me how this can be done.
    Thnanks,
    Gayatri Hemnur
    Moderator message: please research yourself first, look for available information and solutions.
    Edited by: Thomas Zloch on Dec 15, 2010 3:29 PM

    Hi,
    I think you are talking about line-size.
    ... LINE-SIZE col
    Effect
    Creates a report with col columns per line.
    If the LINE-SIZE specification is missing, the line length corresponds to the current screen width. The system field SY-LINSZ contains the current line size for generating lists. The maximum width of a list is 1023 characters. You should keep lists to the minimum possible size to improve useability and performance (recommendation: LINE-SIZE < 132). For very wide lists (LINE-SIZE > 255), you should consult the notes for using LINE-SIZE
    greater than 255.
    Notes
    The specified LINE-SIZE must not appear in quotation marks.
    If the you want the report list (i.e. the output) to be printable, do not define a LINE-SIZE with a value greater than 132 because most printers cannot handle wider lists. You cannot print lists wider than 255 characters at all using the standard print functions. To print the contents of the lists, you need to write a special print routine that arranges the data in shorter lines (for example, using the PRINT ON addition in the NEW-PAGE statement.
    At the beginning of a new list level, you can set a fixed line width for the level using the ... LINE SIZE addition to the NEW-PAGE statement.
    Example
    REPORT ZREPNAME LINE-SIZE 132.
    Kindly reward points by clicking the star on the left of reply,if it is useful.

  • Print ALV - output is wrong

    Hi together,
    after migration of our SAP-system in a Unicode one, I changed the device type to an Unicode-device type.
    But now, when I print a ALV list, the output at the printer is wrong. There's nothing "like a table" - everything is displaced, nothing in columns...
    How can i fix this?
    Thanks in advance
    Michael

    Hi together,
    just wanted to know if anybody got a solution for my problem...
    To make it more specific:
    I printed out 10 rows of the table VBRK. On my unicode-device type it looks like this:
    Faktura____|_FkArt_|_FkTyp_|_VBTyp_| ...
    884064014___|_F2____|_L___|_M____|_EUR____| ....
    884054014___|_G2_____|_A __|_O____|_EUR____| ....
    And one the non-Ucidode one:
    Faktura____|_FkArt_|_FkTyp_|_VBTyp_| ...
    884064014_|_F2____|_L_____|_M_____| EUR    | ....
    884054014_|_G2____|_A_____|_O_____| EUR    | ....
    So, I mean, non unicode looks like a tyble, unicode not! What I have to do?

  • In ALV Report output heading is printing twice.

    Hi Experts,
    Im working on ALV Reports.
    Im printing header text by using listheader and commentary write function module.
    the problem is when i sort any column in ALV ouput the heading is printing twice.
    Again if i sort the column the heading is printed is 4 times.
    so if anybody knows the solution how we can avoid repetition of heading ,
    Please reply me as soon as possible.
    regards
    Imrangs.

    Hi Noorie,
    Thanks a lot.
    Your answer is perfect.
    Bye.
    Regards,
    Imran

  • How to send output of a print  to a single pool in smartforms

    Hi,
    when iam taking a an out put from the invoice all the output has to be send to a single pool .means if we give an invoice number in vf03 and issue the output and if we choose print then it will directly got to spool.but requirement is to store all the spool numbers on application server and finall we have to convert all these into single pdf and then we have to print that.
    can any body tell me where to store these spool numbers and how we can send at a time to print
    help me pleases
    sasi

    Hi Sasi,
    Check the following:
    Exporting the Contents of a Spool Request as a PDF File
    Use
    You want to export the contents of a spool request as a PDF file to a directory of your choice, and print the file as required. The PDF file contains the print data in the format in which it would be output by the printer.
    The following procedure is irrelevant for the PDF-based form printing integrated as of SAP Web Application Server 6.40, since a PDF file is already returned. See also Displaying and Printing PDF-Based Forms.
    Procedure
    The PDF file is generated as follows with report RSTXPDFT4:
    1. Generate a spool request from the document to be printed.
    2. In transaction SE38, start report rstxpdft4.
    3. In the displayed window, enter the spool request number and the directory in which the PDF file is to be stored.
    Leave the Download PDF File option selected.
    Choose Execute.
    4. In the next window, you can confirm or change the path in which the file is be stored.
    Save your entries.
    5. The system displays a log from which you can see whether the report was successfully performed.
    You can then open the file from the directory and print it as required.
    Constraints·        The PDF conversion only supports true bar codes for Smart Forms, which were generated with the new bar code technology. In all other cases, the bar code is only simulated.  
    ·        PDF conversion, especially of ABAP lists, is slower and is therefore not suitable for mass printing. However, you can speed up the conversion to PDF using the FASTLISTCONV option in report RSTXPDF3.
    ·        The font selection for ABAP lists is predefined in the PDF converter and cannot be changed.
    For more information about constraints, see SAP Note 323736 in the SAP Service Marketplace.
    For further reference check the SAP documentation...
    http://help.sap.com/saphelp_erp2005/helpdata/en/94/45c53bcc422d42e10000000a114084/frameset.htm
    Thanks and Regards,
    Bharat Kumare Reddy.V

  • Inverting Smartform output on Zebra Printer

    Hi Gurus,
    I am printing a SmartForm on a Zebra LP 2844-Z Thermal Printer. The label is coming out fine. However, due to the nature of my thermal labels (there is a small insert that you peel off separately) I need to print the label upside down.
    I have included a COMMAND node in my SmartForm with 'S_LZPL_SETUP' in the Attribute Field and '^POI' (Page Orientation Inverse) as the Attribute Value. When I print out the SmartForm, the labels are still the wrong way around!
    I am using the ZLZEB2 (ISO 8859-1 (Latin) 203 dpi ZPL-II) driver.
    Any assistance or thoughts on this will be much appreciated.
    Thanks,
    Pat Yee.

    Hello,
    Please let me know, if you found any solution for you problem. I am using the same printer.
    The Tips and Tricks of Zebra
    (http://www.zebra.com/id/zebra/na/en/documentlibrary/misc/sap_smartforms_technical.File.tmp/13760L_SAP_Smart_Forms.pdf)
    on page 40 didn't work. I just want to print two texts  vertical. The rest of the lablel should be printed normal.
    Bye!
    Now I have a solution for the rotation problem. For rotation single fields of the lable you have to create new print controls of your Z* Printer driver device. In this new control you can add the ^FWR (for rotating °90) and ^FWN (for normal print) print control.
    I have tested it and it works.
    Thank you smartforms - no more BARONE
    Bye!
    Silvio Hey
    Message was edited by: Silvio Hey

  • How to download the blocked ALV output to PDF file.

    How to download the blocked ALV output to PDF file.
    I am able to download the BLocked ALV output in PDF format,
    but the each bolck in ALV is displaying different pages of PDF.
    In my report I have 4 block in 1 page, I am able to see the output in PDF but in different page.
    How to avoid the Page-break in PDF.
    Thanks,
    Ravi Yasoda.

    hi,
    I believe that your have 4 containers on the screen with individual ALV display. in this case, there is no way to get combined PDF output to my knowledge.
    However you can use Smartform/Sapscript as output which would allow you to display ALV in blocks and also print it in one.
    Regards,
    Nirmal

  • In ALV output, select row(s), How can we know which record it has selected?

    Hi Experts,
    In ALV output, there are 10 records (rows) displayed. I want to select specific row (or rows) for mass printing ( I need to assign respective smartform for selected row(s)). How the system (or my self) will recognize that which record it has selected?
    We have one field is called MARK field or etc., which will shows which record selected by indicating 'X' in internal table. I dont know exactly.
    Could you please help me out.
    Thanks in advance.
    Sekhar

    declare a field chk(1) type c in your final itab.
    build fieldcatalaoge for that field.
    when 'CHK'.
    alvfld-checkbox = alvfld-edit = 'X'.
    give a button in alv 'process' with function code 'PRO'.
    then call alv
      call function 'REUSE_ALV_LIST_DISPLAY'
        exporting
          i_callback_program       = sy-repid
          it_fieldcat              = fieldcat[]
          I_CALLBACK_USER_COMMAND = 'USER_COMMAND'.
        tables
          t_outtab                 = it_tvse[].
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    then in form user_command do like this
    form user_command using ucomm like sy-ucomm cursor type slis_selfield.
    case sy-ucomm.
    when 'PRO'.
    Loop at itab where sel = 'X'.
    write your code here.
    endloop.
    endform

  • Printing a smartform to a different printer than my default

    I have a function module that gets passes a delivery number and the short-name of a printer.  The function module is supposed to print a smartform (pick list) for that delivery to the specified printer.  The problem is that no matter what I put in for the printer, it prints to my default printer.  If I change it, it will go there.  I'm sure I'm just missing some kind of setting.  Here is what I got:
    printer is the shortname for the printer i want, type RSPOPTYPE
    *Print Smartfomr picklist for  delivery
      data: ls_ctrl_prnt type ssfctrlop,
            ls_outp_opts type ssfcompop.
      ls_ctrl_prnt-no_dialog = 'X'.        " Suppres dialog
      ls_ctrl_prnt-device    = 'PRINTER'.
      ls_outp_opts-tddest    = printer.
      ls_outp_opts-tdprinter = printer.    " Specify required printer
      call function gv_func
        exporting
          control_parameters = ls_ctrl_prnt
          output_options = ls_outp_opts
          pk_hdr               = sf_info
          pk_orders            = sf_odrs
          pk_items             = sf_item
          pk_pgbk              = sf_pgbk
        exceptions
          formatting_error   = 1
          internal_error     = 2
          send_error         = 3
          user_canceled      = 4.
    Am I missing something here?  Any help would be greatly appreciated.
    Thanks,
    Curtis

    I was able to solve my issue. The field TDIMMED (print immediate) in the parameter OUTPUT_OPTION need to be passed with the value 'X'.
    The code is pasted below.
    DATA: l_ssfctrlop TYPE ssfctrlop,
            l_ssfcompop TYPE ssfcompop,
            l_formname  TYPE tdsfname,
            l_fm_name   TYPE rs38l_fnam.
      CLEAR l_formname.
    Get the smartform name based on the output type
      SELECT SINGLE sform FROM tnapr INTO l_formname
        WHERE kschl = ysdt_dynlayout-auart
          AND nacha = '1'
          AND kappl = 'V2'.
      Get the smartform function module name
        CLEAR l_fm_name.
        CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
          EXPORTING
            formname           = l_formname
          IMPORTING
            fm_name            = l_fm_name
          EXCEPTIONS
            no_form            = 1
            no_function_module = 2
            OTHERS             = 3.
        IF sy-subrc EQ 0.
          l_ssfctrlop-no_dialog = 'X'.                        " print popup dialog box is suppressed
          l_ssfcompop-tddest    = usr01-spld.         " the printer name is passed from screen to this field
          l_ssfcompop-tdimmed   = 'X'.                    " print immediate option is set
          l_ssfcompop-tdcopies  = copies_in.         " number of copies of output required
        Call the smartform
          CALL FUNCTION l_fm_name
            EXPORTING
              control_parameters = l_ssfctrlop
              output_options     = l_ssfcompop
              user_settings      = ' '                            "manual override of user settings            
              i_del_head         = likp
              i_dyn_layout       = ysdt_dynlayout
            TABLES
              t_del_item         = ig_lips
              t_home_address     = ig_home_address
              t_header_text1     = ig_header_text1
              t_footer_text1     = ig_footer_text1
              t_footer_text2     = ig_footer_text2
              t_footer_text3     = ig_footer_text3
              t_text4            = ig_text4
              t_text5            = ig_text5
            EXCEPTIONS
              formatting_error   = 1
              internal_error     = 2
              send_error         = 3
              user_canceled      = 4
              OTHERS             = 5.
        ENDIF.

  • Need to sent alv output as html or as pdf attachment in mail

    +Hello
    I want to send an ALV output as attachement in html or as pdf format. how to do that? line size is greater than 600(nearly 40 fields).
    +please help me in this query.
    Regards
    Guruvayurappan
    Moderator Message: Please search before posting your question. Thread locked.
    Edited by: Suhas Saha on Dec 29, 2011 4:57 PM

    Hi,
    For sending the ALV output as PDF attachment, you can create a spool (proper page size in print parameters) and convert the spool to PDF using the FM CONVERT_ABAPSPOOLJOB_2_PDF and then send the same as attachment in mail.
    For send the data as HTML attachment, try the below FMs
    WWW_ITAB_TO_HTML_HEADERS & WWW_ITAB_TO_HTML_LAYOUT to create the HTML layout
    WWW_ITAB_TO_HTML to create the HTML for the actual data.
    Hope this helps you.
    Regards,
    Sachinkumar Mehta

Maybe you are looking for