Suppress printing of smartform

Hi all..
I have a requirement to suppress the printing of the credit memo smartform whenever the net amount is 0 $ for particular type of oder types.
In this case i think we should be changing a routine to put the needed logic.
Appreciate your thoughts on this...
Will reward helpful answers..
Thanks,
RK

Hi,
If you want to suprress the print dialog,here is the coding.Kindly reward points by clikcing the star on the left of reply,if it helps.
*& Report  ZZZ_JAYTEST1                                                *
REPORT  zzz_jaytest1 NO STANDARD PAGE HEADING MESSAGE-ID zhrt.
Variable Declaration
DATA : v_form_name TYPE rs38l_fnam,
       itab TYPE STANDARD TABLE OF pa0001,
       w_ctrlop TYPE ssfctrlop,
      w_compop TYPE ssfcompop,
      w_return TYPE ssfcrescl.
SELECT * FROM pa0001 INTO TABLE itab UP TO 5 ROWS.
SORT itab BY pernr.
DELETE ADJACENT DUPLICATES FROM itab COMPARING pernr.
DATA: control TYPE ssfctrlop,
control_parameters TYPE ssfctrlop,
output_options type SSFCOMPOP.
control-preview = 'X'.
control-no_open = 'X'.
control-no_close = 'X'.
control-no_dialog = 'X'.
control-device = 'PRINTER'.
output_options-tddest = 'LOCL'.
OUTPUT_OPTIONS-TDNOPRINT = 'X'.
OUTPUT_OPTIONS-BCS_LANGU = SY-LANGU.
CALL FUNCTION 'SSF_OPEN'
EXPORTING
   USER_SETTINGS            = ' '
   OUTPUT_OPTIONS           = output_options
   CONTROL_PARAMETERS       = control
EXCEPTIONS
   FORMATTING_ERROR         = 1
   INTERNAL_ERROR           = 2
   SEND_ERROR               = 3
   USER_CANCELED            = 4
   OTHERS                   = 5
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
output_options-tddest = 'LOCL'.
OUTPUT_OPTIONS-TDNOPRINT = 'X'.
OUTPUT_OPTIONS-BCS_LANGU = SY-LANGU.
CALL FUNCTION '/1BCDWB/SF00000066'
EXPORTING
  ARCHIVE_INDEX              =
  ARCHIVE_INDEX_TAB          =
  ARCHIVE_PARAMETERS         =
   CONTROL_PARAMETERS         = control
  MAIL_APPL_OBJ              =
  MAIL_RECIPIENT             =
  MAIL_SENDER                =
   OUTPUT_OPTIONS             = output_options
   USER_SETTINGS              = ' '
IMPORTING
  DOCUMENT_OUTPUT_INFO       =
  JOB_OUTPUT_INFO            = w_return
  JOB_OUTPUT_OPTIONS         =
  TABLES
    itab                       = itab
EXCEPTIONS
  FORMATTING_ERROR           = 1
  INTERNAL_ERROR             = 2
  SEND_ERROR                 = 3
  USER_CANCELED              = 4
  OTHERS                     = 5
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 'SSF_CLOSE'.

Similar Messages

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

  • How to print multiple form for tag printing in smartforms

    Dear Experts,
    I am working on tag printing in smartforms .in tag printing i am showing
    1.material no.
    2.material descrption.
    3.material doc no.
    4.Quantity
    5.supplier.
    my requirement is that for example , if the mat. document no.  has a material of 10,000.00 quantity , in tag printing it should come 1,000.00 of each tag  and total no of tag should be 10. and it should come one after another .
    and the page format size 8 x 6 cm. is it possible .if possible how ! how the system will know how many tag is to be printed . please reply its urgent.

    Hi Kumar,
    Let me know. is the quantity 1000.00 is fixed? if so thn you can achieve the requirement.
    For example:
    There are  A-material with 20000.00 quantity thn  u can first divide the quantity with 1000.00
                 v_ex = 20000.00/1000.00=20.
    thn  you can repeat the  print of the smartform for 20 times by passing  the parameter to  form fm.
    Please reward if  useful.

  • Blank Page prints even though "Suppress Printing If No Records" option is t

    Blank Page prints even though "Suppress Printing If No Records" option is thicked.
    My environment:
    Crystal Report Developer Full version 11.5.11.1470
    Windows Server 2003 SP2 32-bit.
    We have a third party vendor application written in Java -let's call it "print deamon", but my company doesn't have access to the source code.
    The print deamon essentially listens to the core application which is located remotely, receive some print instructions such as label name, printer name, crystal reports version (8.5 or 11) and a few parameters that are passed to the crystal report template.
    When the version is Crystal Reports 11 and the template is open and query is executed (using Oracle JDBC) and if the template's query does not retrieve any rows, a blank page still prints even though the option to suppress printing is thicked.
    With Crystal Reports 8.5 version, we have no issues.
    recycling the blank page is not an option in our high volume print environment, these paper and labels are wasted big time, third party vendor says this is an issue with crystal reports XI api.
    These are some of the libraries the Print Deamon uses:
    09/25/2009  10:29 AM         2,055,844 cecore.jar
    09/25/2009  10:29 AM           211,919 celib.jar
    09/25/2009  10:29 AM           830,301 corbaidl.jar
    09/25/2009  10:29 AM           371,142 CRDBJavaServerCommon.jar
    09/25/2009  10:29 AM           121,413 CRDBXMLServer.jar
    09/25/2009  10:29 AM           670,312 CrystalCharting.jar
    09/25/2009  10:29 AM             2,162 CrystalCommon.jar
    09/25/2009  10:29 AM            94,290 CrystalContentModels.jar
    09/25/2009  10:28 AM           110,657 CrystalDatabaseConnectors.jar
    09/25/2009  10:29 AM           686,963 CrystalExporters.jar
    09/25/2009  10:29 AM            67,807 CrystalExportingBase.jar
    09/25/2009  10:29 AM           581,270 CrystalFormulas.jar
    09/25/2009  10:29 AM           330,909 CrystalQueryEngine.jar
    09/25/2009  10:29 AM         2,271,217 CrystalReportEngine.jar
    09/25/2009  10:29 AM           453,829 CrystalReportingCommon.jar
    09/25/2009  10:29 AM         1,985,441 ebus405.jar
    09/25/2009  10:29 AM    <DIR>          external
    09/25/2009  10:29 AM           227,996 jrcadapter.jar
    09/25/2009  10:29 AM             9,988 jrcerom.jar
    09/25/2009  10:29 AM            94,180 keycodeDecoder.jar
    09/25/2009  10:29 AM           448,627 MetafileRenderer.jar
    09/25/2009  10:29 AM           380,520 rasapp.jar
    09/25/2009  10:29 AM           843,544 rascore.jar
    09/25/2009  10:29 AM           283,131 ReportPrinter.jar
    09/25/2009  10:29 AM           793,445 ReportViewer.jar
    09/25/2009  10:29 AM            95,382 rpoifs.jar
    09/25/2009  10:29 AM            40,545 Serialization.jar
    09/25/2009  10:29 AM             3,777 URIUtil.jar
    Let me know if there's anything we can do before engaging our third party vendor to produce their source code.
    Thank you - Kleber

    It's not relavent now is it? Do what ever works in CR XI.
    Also you may want to upgrade to CR XI R2. Go to this link: http://www.sdn.sap.com/irj/boc and download the trial version of CR XI R2 and use your XI keycode, then apply the patches which you can get to by clicking on the BusinessObjects tab above, then Downloads.
    Direct link to the Trial version: http://www.sap.com/solutions/sapbusinessobjects/sme/freetrials/index.epx
    Once updated you can then go to the Keycode site and get a XI R2 keycode to enable oll of the features.
    Thank you
    Don

  • Issue with character formats using duplex printing in smartform

    Hi all,
    I am getting a problem with character formats using duplex printing in smartform. I am using a text module with a bold character to display text in a window. The problem is that on the first back page,the text is being printed normally (without bold), but on the next pages, the back pages are being printed with the bold character format.
    Can anyone know where is the problem..please.
    Points to be rewarded..
    Thanks.
    Regards,
    Zaheed.

    Hi Zaheed,
    Normally this should not happen.. and also there is no internal formatting done by SAP.. it will show based on what fomatting option we have specified..
    If you are saying it is happening in ur case then
         1. Recheck whether whether you have same text module getting printed on the
             two page. If they are different then then individual check formatting option for
             each..
          2. If above point does'nt work for you ..then instead of bold char use normal
              format for text element and see if it is printing same on both page..
    Try this out and let us know your findings...
    Enjoy SAP.
    Pankaj Singh

  • How i can print the smartform directly

    hi,
    my requirement is i have to print the smartform directly by skiping the dialog window.
    i am using the following code but in that i have press the Print push button again .
    DATA: output_options TYPE ssfcompop.
      output_options-tdimmed = 'X'.
      output_options-tddest = 'LOCL'.

    Trty something like
    *   Print parameters
        ssfcompop-tddest = tddest.
        ssfcompop-tdimmed = 'X'.
        ssfcompop-tdnewid = 'X'.
        ssfcompop-tddelete = 'X'.
    *   Control parameters
        ssfctrlop-device = 'PRINTER'.
        ssfctrlop-no_dialog = 'X'.
    * Call driver
        CALL FUNCTION fm_name
             EXPORTING
                  control_parameters = ssfctrlop
                  output_options     = ssfcompop
    Regards

  • Suppress printing of blank records

    This should be simple, but I have tried everything I can think of, and trolled through the archives, without finding an answer.  Please don't chastise me for asking a question which has already been answered, too simple, in the wrong section, or any of the other sins you regularly accuse us of...
    I am printing a series of form letters which are selected on the basis of a couple of criteria.  I want to exclude records with blank fields.  (My database supports null values, but these field entries are blanks, not nulls.  The fields are string (alphanumeric) values. My selection criteria (for the 1 month letter) are below.  The first two criteria work fine; it is in the third line that I am trying to exclude the blank records.  I have tried: {LetterEnt.Gr_LastName}<>"",  {LetterEnt.Gr_LastName}<>" ", and then I got clever and tried the entry below.  None of these work.
    {LetterEnt.Letter1} = "X" and
    {LetterEnt.Site} = "Q" and
    Length({LetterEnt.Gr_LastName})>0

    +Message: AFAIK, if there are no records, there are no detail sections, so
    your report must show text from other sections.+
    (Is AFAIK some sort of "geek code" (in which case you have gone completely over my head), or are you addressing somebody by that name?  (My name is David).)
    If there are no records, there are indeed detail sections - with blank address fields.  See my previous more detailed exposition of the exact nature of the problem.
    +It is also not clear what "forces" a printout.  Are you using Crystal
    Designer (my assumption since you are posing in the Crystal Report Design
    forum) or something else (Crystal Enterprise)?  Crystal Designer doesn't
    force printouts - a user must initiate the printout.+
    Am I using Crystal Designer?  I don't know.  The program is called Crystal Reports XI in my computer.  Are you suggesting that I am in fact asking my question in the wrong forum? (I would have presumed that something called "Crystal Reports Design" deals with design issues in Crystal Reports, but if I am in error, I do apologise.  Perhaps you could direct me to the more appropriate resource.)
    What "forces" a printout? You are correct insofar as the operator has to push the Print button (at least as presently functioning.  At one stage I had the letters printing out behind the scenes using an Active-X control.  This ran for 2 weeks, then fell apart and I eventually gave up trying to make it work; but that is another story.)  How does this happen?  Crystal is adding completely blank pages as the first page on some of the reports, so it is not always immediately apparent to the operator that there is a letter sitting there with a blank address.  (And this, too, is a separate issue.  I have gone through all the instructions in the knowledge base as to how to get rid of the leading blank sheet.  None of the instructions have worked, and I eventually gave up trying.  Thinking about it, I have had an awful lot of frustration with this program.  Perhaps I am unreasonable, but if I can't get something to work after 3 or 4 hours' trying, I give it up as a bad job and live with the fault.)
    +You can always suppress those other sections with a condition such as
    IsNull({some field that is never Null).+
    It is not clear to me what this means.  All the sections other than the detail section are blank - always.
    +There are 3rd-party Crystal Reports tools that allow you to skip
    processing (printing/exporting/emailing) if the report comes up with zero
    records.+
    Aha!  Am I interpreting this correctly, as saying that I cannot do what I want to do (suppress printing of letters with blank addresses) in Crystal Reports, and that to do this I need to get a third party add-on?

  • How not to suppress printing grouping items

    In group by reports, the printing of group items is suppressed until the values change. How can I get the report to not suppress printing the duplicates values?

    In the select query , specify the group columns once more with alias names and make its frequncy below the grouped items..
    Now your report will work as though you have not grouped it and also will return the group values..
    For eg :
    Select emp_code,emp_Dept ,emp_name, emp_dept dept_wise_emp
    From employee_master
    First group is emp_dept
    Below level has rest of the columns..
    Select the sum /count of the desired columns from the report wizard...

  • Duplex printing for smartform

    Hi,
    Has anyone worked on Duplex printing for smartform? If yes, please tell me the procedure/steps that need to be taken for the same.
    Thanks
    Regards

    Hi,
    You can select Duplex printing in th epage properties of a page (D = Duplex)
    The printer STARTS duplex printing from that page. This means that the printer triggers a pagefeed on that exact moment and starts printing on a new page. So when you have 1 page that stretches over more that one sheet of paper this means trouble. after every page the flow of the program starts a new Duplex print (thus feeding the current sheet and starts at a new page) this results in a new sheet of paper every page. this is not what you want.
    You can solve this by creating 2 pages and set their respective NEXT PAGE to each other. Page 1 you set to DUplex, pagae 2 you leave blank..
    But notice that when you select duplex printing most (if not all) printers start printing on the backside of the paper. When you use pre-printed (logo) paper, you will find that it prints the front on the back etc.
    This can sometimes be corrected (if needed) by sending prescribe commands to the printer directly.
    Good luck!
    Joris

  • Print the smartform to the spool

    Hi all,
    How to Print the smartform to the spool  ?
    Thanks in advance
    Krupa

    DATA: p_out LIKE ssfcompop,
    p_ctrl LIKE ssfctrlop.
    CLEAR: p_out,
    p_ctrl.
    p_out-tdnoprev = 'X'.
    p_out-tdnoprint = 'X'.
    p_out-tdnoarch = 'X'.
    p_out-tddelete = 'X'.
    p_out-tddest = p_dest.
    p_out-tdnewid = ''.
    p_out-tdimmed = ' '.
    p_out-tdcopies = 1.
    p_out-tddataset = sy-repid.
    p_out-tddelete = ' '.
    CALL FUNCTION fm_name
    EXPORTING
    inv_header = tmp_header
    output_options = p_out
    control_parameters = p_ctrl
    user_settings = ' '
    TABLES
    t_item = tmp_item
    The lines in bold are the main key statements for spool.
    tdnewid is the name of the spool.
    awrd points if useful
    Bhupal

  • Bar-code printing in smartforms

    Hi All,
    how to done or step by step procedure of bar-code printing in smartforms.....guide me please.
    Thanks,
    Regards,
    Vishal Bhagwat.

    Have a look at below PDFs. It will give all the details abt scripts.
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCRPROG/BCSRVSCRPROG.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCRRDI/BCSRVSCRRDI.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCREDIT/BCSRVSCREDIT.pdf
    Also have a look at below links:
    http://help.sap.com/saphelp_crm40/helpdata/en/16/c832857cc111d686e0000086568e5f/content.htm
    http://esnips.com/doc/64d4eccb-e09b-48e1-9be9-e2818d73f074/faqss.pdf
    http://esnips.com/doc/1e487f0c-8009-4ae1-9f9c-c07bd953dbfa/script-command.pdf
    http://esnips.com/doc/1ff9f8e8-0a4c-42a7-8819-6e3ff9e7ab44/sapscripts.pdf.
    http://esnips.com/doc/cb7e39b4-3161-437f-bfc6-21e6a50e1b39/sscript.pdf
    http://esnips.com/doc/fced4d36-ba52-4df9-ab35-b3d194830bbf/symbols-in-scripts.pdf
    http://esnips.com/doc/b57e8989-ccf0-40d0-8992-8183be831030/sapscript-how-to-calculate-totals-and-subtotals.htm

  • Ukrainian text on preview is fine but gives junk char on print in smartform

    HI All,
    I am trying to print hardcoded ukrainian text in smartform. In preview it is coming correctly but while printing it gives some junk charecters.
    During my analysis i found out that previously existing hardcoded text is coming fine on printing but it is showing different charecters(than the one on the printing) in smartform node and in print preview.
    Regards,

    Hi,
    Do you use a device type that supports Cyrillic characters to create the spool and print? e.g. Device type SAPWIN, SAPWIN5 or Unicode device type SWINCF?
    If you use a non-Unicode device type like SAPWIN or SAPWIN5, then the font used for these characters in the smartform should be a Cyrillioc font like COURCYR, HELVCYR or TIMECYR.
    Regards,
    Aidan

  • To print the Smartforms in Hindi

    Dear All,
    My latest requirement is to print the Smartforms in Hindi. Can anyone please guide me through this?
    Thanks in advance.
    Regards,
    Sourav

    Hi Sourav,
    This question had been discussed earlier though no concrete solution was posted.
    Still you might find a few helpful posts.
    Follow this link :
    Re: SAPScript in different language
    Regards.

  • Suppress printing the last two pages

    I have created a form that has the last two pages of the form screen only visible. Saved the form and printed it but the last two pages print blank. Is there any way to suppress printing the last two blank pages. If I was the only person using the form I just wouldn't print the last two pages but this is going into a production environment where seeing the last two pages is important but printing the last two pages isn't.
    Thanks.

    Take a look at the script produced by the "Print Button".
    xfa.host.print(1, "0", (xfa.host.numPages -1).toString(), 0, 0, 0, 0, 0);
    The doc for print is available at http://livedocs.adobe.com/livecycle/8.2/acrobat_designer/001735.html
    Steve

  • Allow buyer to suppress printing of item delivery schedule on PO

    Gurus,
    Is it possible to allow buyer to suppress printing of item delivery schedule on PO. If possible can you please propose me a solution.
    Regards

    not with std config for PO creation but can be possible for PO  changes
    by seeting in the SPRO
    MM-Purchasing-messages-fields relevant for printout changes
    here u can do the settings for PO

Maybe you are looking for