Avoid duplicate printing in Invoice

Dear ABAPer's,
  I need to control Invoice printing like first time taking the Invoice print i has to print Original and next time while taking the print out it have to disply duplicate....Not like copy window concept...
<Priority normalized by moderator>
Thank Team...
Ramesh
Edited by: Vinod Kumar on Aug 30, 2011 1:33 PM

Hello,
Please use below code.
This will help you to identify original or copy of an invoice.
**-->Check if original or copy
SELECT vstat INTO TABLE t_vstat FROM nast
  WHERE kappl = nast-kappl
  AND   objky = nast-objky
  AND   kschl = nast-kschl
  AND   spras = nast-spras
  AND   parnr = nast-parnr
  AND   parvw = nast-parvw
  AND   nacha BETWEEN '1' AND '4'
  AND   vstat = '1'.
  IF sy-subrc EQ 0.
    w_repeat = c_copy.
  ELSE.
    w_repeat = c_original.
  ENDIF.

Similar Messages

  • Random / Sproradic Duplicate Printing of Invoices

    Hello All,
    I have a scenario happening frequently where Output of Billing Document is Issued manually in VF03 for a single print.
    But multiple prints of same billing document are issued in spite of issuing print single time.
    Kindly provide your valuable inputs in this regards.
    Warm Regards,
    Onkar Khedekar

    Hi Onkar,
    Couple of hints to check
    1. are the duplicates printing across all sales organizations
    2. is it same Layout or even for different layouts it is happening ?
    you may have to check the logic in smartform. Basically your driver program might have called smartform more than once. If you say it is happening only for some layouts or sales organizations then please look at the code in the smartform and driver program
    code to control duplicates will check NAST table with field VSTAT
    with help of your developer check this and revert with your findings
    thanks
    santosh

  • Avoid Multiple Printing of invoices , delivery notes tec...

    Dear Friends,
    In SAP , how to avoid printing multiple times i.e. once the delivery note is printed  by some user ,then particular it should not be printed again. each note should print once once for every transaction from sales to delivery.
    this is happening with display transaction codes i.e. VL03N, VA03,ME23 ETC..
    THANKS & REGARDS,
    KAT

    From the basis perspective the note  119147 - Spool: Authorizations detials contol access to the spooler within SAP.
    Regards.

  • How to reactivate cancelled Invoice, Avoid Duplicate Manul Condition Type

    Salute!! Masters,
    I am sending detail about error, please provide solution for it.
    I shall thankful to you.
    1. How to reactivate cancelled Invoice for which Excise Invoice has been created.
    Reason is; user has created commercial Invoice first then Excise Invoice subsequently. Afterwards cancelled Commercial Invoice, by the time all detail has been posted to different department & paid Excise charges to the respective department.
    Now commercial Invoice detail is required to be maintaining at book level at factory as excise has been paid for the same.
    User canu2019t create new commercial Invoice as for this have to maintain Excise Invoice too & pay.
    2. How it is possible to restrict it ME21N Stock Transfer Order at order level only to not to allow 0 value & repeat entry for the same condition type?
    While making a stock transfer (purchase order) by ME21N from supplying plant (Factory) to other plant (depot), if user make mistake & donu2019t put value for Manual condition type ZMRP, system accept & save the order.
    Afterwards when he realizes the same or immediately come to know about not putting value & put again, system take that second line entry also & create double entry.
    When invoice come then it pick the value from first line & show in negative.
    I have triedu2026.
    a). At pricing procedure, there ZMRP is required entry.
    b). Condition Type - ZMRP, there is C No Limitations
    We can not put D Not possible to process manually or fix this condition type as then we have to maintain condition record & prices are varies depot to depot & day by day.
    c). Since this is a Header Condition, so canu2019t restrict at Access Sequence level.
    This is only has to put manually by user according to the instruction of sales department. 
    Got Suggestion to change at user exit level to put check at delivery to not to allow printing or invoicing by putting 0 value/without any value.
    Please suggest at configuration level only as itu2019s difficult to create User Exit for all requirement.
    3. PGI should not happen for forward date; user can put only either current date or back date.
    Rgds.
    Srivastav
    +91-9694096833
    Edited by: Srivastav100 on Jun 14, 2010 11:22 AM
    Edited by: Srivastav100 on Jun 14, 2010 11:24 AM

    Unsolved, Closed.

  • Printing previous Invoice

    I'm having problem in printing previous invoice not the current one this happens almost 4 times a day, printing around 10000 vouchers per day can anyone explain me why?
    First i update data by using ExecuteScalar and getting Auto-Gen Number from Database
    Then I'm Updating Invoice Number to another Table for Invoice numbering system
    TicketNumberUpdate()
    lbl_Status.Text = "Updating Ticket Number..."
    Application.DoEvents()
    System.Threading.Thread.Sleep(200)
    then i wait and filter according to my ticket number and populate data to richtextbox 
    PrintFunc(" WHERE dbo.tbl_Tickets.TicketNo='" & txtTicket.Text & "' AND dbo.tbl_Tickets.Ticket_Type='" & cboTicketType.Text.Trim & "'")
    lbl_Status.Text = "Loading Ticket ..."
    Application.DoEvents()
    System.Threading.Thread.Sleep(200)
    and save that html text to temporary html file 
    rtb_TicketFormat.Rtf = rtb_TicketFormat.Rtf.Replace("Duplicate.png", "Original.png")
    Dim myFileName As String = IO.Path.Combine(IO.Path.GetTempPath, "_.html")
    rtb_TicketFormat.SaveFile(myFileName, RichTextBoxStreamType.PlainText)
    lbl_Status.Text = "Printing Ticket ..."
    Application.DoEvents()
    System.Threading.Thread.Sleep(200)
    and wait for Save that Invoice in html format after that i call for PrintTktz for printing that file
    Private Sub PrintTktz()
    Dim webBrowserForPrinting As New WebBrowser()
    AddHandler webBrowserForPrinting.DocumentCompleted, New _
    WebBrowserDocumentCompletedEventHandler(AddressOf PrintDocumentz)
    webBrowserForPrinting.Url = New Uri(IO.Path.GetTempPath & "_.html")
    End Sub
    Private Sub PrintDocumentz(ByVal sender As Object, _
    ByVal e As WebBrowserDocumentCompletedEventArgs)
    Dim webBrowserForPrinting As WebBrowser = CType(sender, WebBrowser)
    webBrowserForPrinting.ScriptErrorsSuppressed = True
    webBrowserForPrinting.Print()
    webBrowserForPrinting.Dispose()
    End Sub
    when testing this works fine do you guys think some time when printing if below code could not save the file it gives that error? 
    rtb_TicketFormat.SaveFile(myFileName, RichTextBoxStreamType.PlainText)
    Thank you every one for you kind help!...

    I'm not certain. However from the code you display you are constantly creating a WebBrowser object then never disposing of it when you are done with it. So I would imagine at some point your applications memory is getting really high as you seem to create
    10,000 of them a day or something. Which means 10,000 created objects doing nothing and never to be used again are sitting in your applications memory.
    The code is "Dim webBrowserForPrinting As New WebBrowser()".
    It's possible the code for the sub PrintTktz could be altered as below which should dispose of the WebBrowser object when the code is done with it. But you will need to test it obviously. There's two subs. One has a Using statement which may not work and
    the other has a loop that runs until the WebBrowser finishes. Both may not work really.
    If neither work the issue still needs to be corrected. Of course if the loop runs for a long time the UI could freeze. And if the end using statement occurs prior to the WebBrowser loading well that's not good either of course.
    WebBrowser.IsBusy
    Private Sub PrintTktz()
    Using webBrowserForPrinting As New WebBrowser()
    AddHandler webBrowserForPrinting.DocumentCompleted, New _
    WebBrowserDocumentCompletedEventHandler(AddressOf PrintDocumentz)
    webBrowserForPrinting.Url = New Uri(IO.Path.GetTempPath & "_.html")
    End Using
    End Sub
    Private Sub PrintTktz()
    Dim webBrowserForPrinting As New WebBrowser()
    AddHandler webBrowserForPrinting.DocumentCompleted, New _
    WebBrowserDocumentCompletedEventHandler(AddressOf PrintDocumentz)
    webBrowserForPrinting.Url = New Uri(IO.Path.GetTempPath & "_.html")
    Do Until WebBrowserForPrint.IsBusy = False
    Loop
    webBrowserForPrinting.Dispose()
    End Sub
    La vida loca

  • Print certain Invoices at the certain time to the certain printers !

    How fox,
    Requirement:
    Certain department within the organization needs to print all their invoices at once every night at the certain output device.
    What I have done so far:
    1. Created a condition record with transaction VV31 for the billing type, shipping point, sales office. As the date/time value I have entered "2" (Send with job, with additional time specification).
    2. The above record I have assigned to a specific output device
    3. I have created a job which utilizes the report "RSNAST00" and uses a variant(Otp. Application = "V3", Obj. type = IN06, for every night at 24:00)
    My question:
    How can I avoid that the messages ( invoices ) in the NAST table processed by other batch jobs which runs earlier than the one I have specifically created for this purpose.
    Thanks
    Kami

    Hi,
    In the Job you can assign the VARIANT with OUTPUT type and  BILLING DOCUMENT TYPE.
    So when the job runs only this particular OUTPUT type is processed and no other Job will pick it
    Hope it is  clear,
    regards,
    santosh

  • AR "Invoice Print Selected Invoices" program

    Hi to All,
    When we run the "Invoice Print Selected Invoices" program in AR. What table and column is used to store the flag for printing the invoice. When we look at the invoice, the more tab has the Print Option/Print Date. Where is the print date, time stamp stored?

    Hi.
    Have a look on RA_CUSTOMER_TRX_ALL table and columns PRINTING_LAST_PRINTED, PRINTING_ORIGINAL_DATE, etc.
    Octavio

  • Switch from OINV to ODRF in Crystal Report layout for print the Invoice?

    Hi,
    I have imported in Sap Business One some standard report developed by Sap with Crystal Report (like Sales Invoice).
    I have try to print my Invoices and all is OK, then I have try to print a Draft Invoice and, even in this case, is all ok. Then I have open the Crystal Report designer for this print module, and the entry point is the OINV table. How can he print succesful the Draft Invoice (that is in the ODRF table ObjType = 13)? Formula Field? I don't understand!!
    Thank for the help!!
    Marco

    Hi Marco,
    You only need a single Crystal report for this. Base it on a stored procedure which has two INT type parameters @DocKey and @ObjectId. Within your SQL create IF blocks to handle different @ObjectId values:
    IF @ObjectId = 13 then use the invoices tables OINV/INV1 etc.
    IF @ObjectId = 112 then use the draft tables ODRF/DRF1 etc.
    Don't forget to put the @ symbol at the end of the parameter in the report itself. That is all that is needed to create a single report that works for both added invoices and draft invoices. You could extend the SQL to handle other @ObjectId values like 14 for AR Credit Notes and so on.
    Regards,
    Andrew.

  • Invoice Print Selected Invoices program is failing when language is not US

    Hi All,
    I am trying to run "Invoice Print Selected Invoices" for multiple languages.
    When language in customer setup under "Account Site Information" is 'US' then EN-US: (Invoice Print Selected Invoices) is completing successfully.
    But when I am changing the language from US to some other language let’s say "F”, then "FR-FR: (Invoice Print Selected Invoices)" getting submitted and it is completing in error.
    These are the log messages which I am getting:-
    +-----------------------------
    | Starting concurrent program execution...
    +-----------------------------
    Arguments
    p_order_by='TRX_NUMBER'
    p_customer_id='10044'
    p_open_invoice='N'
    p_check_for_taxyn='N'
    p_choice='SEL'
    p_header_pages='1'
    p_debug_flag='N'
    p_message_level='10'
    APPLLCSP Environment Variable set to :
    Current NLS_LANG and NLS_NUMERIC_CHARACTERS Environment Variables are :
    FRENCH_FRANCE.AL32UTF8
    Entrer mot de passe :
    MSG-00100: DEBUG: AfterPForm_Trigger +
    MSG-00100: DEBUG: Multi Org established.
    MSG-00100: DEBUG: AfterParam_Procs.Get_Country_Details
    MSG-00100: DEBUG: AfterParam_Procs.Switch_On_Debug
    MSG-00100: DEBUG: AfterParam_Procs.Get_Trx_Number_Low
    MSG-00100: DEBUG: AfterParam_Procs.Get_Trx_Number_High
    MSG-00100: DEBUG: AfterParam_Procs.Get_Tax_Option
    MSG-00103: lp_trx_date_clause = and a.trx_date = a.trx_date
    MSG-00100: DEBUG: BeforeReport_Trigger.Build_Where_Clause
    MSG-00100: DEBUG: P_Choice: SEL
    MSG-00100: Oracle Error in call to Before Report Trigger -6502
    REP-1419: 'afterpform': Abandon du programme PL/SQL.
    Report Builder: Release 10.1.2.3.0 - Production on Ma Avr 2 05:59:27 2013
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Can anyone please tell me what is the problem or is there any mistake in my approach?
    Regards
    Akash

    Please see the following docs.
    R12: Invoice Print Errors With REP-0069, REP-57054, REP-1419 [ID 557171.1]
    Invoice Print Error: Printing Selected Invoices (Multiple Languages) Is Erroring Out With REP-0069: Internal error [ID 731171.1]
    Thanks,
    Hussein

  • URG:11i to R12.1.3: Invoice print Selected Invoices fails with REP-1419

    Hi,
    Invoice print Selected Invoices fails with the following error: Forcing NLS_NUMERIC_CHARACTERS to: '.,' for XDO processing
    APPLLCSP Environment Variable set to :
    Current NLS_LANG and NLS_NUMERIC_CHARACTERS Environment Variables are :
    American_America.UTF8
    REP-1419: 'beforereport': PL/SQL program aborted.
    Checked the setups based on 557171.1, 375693.1,1101855.1.
    Still the issue is existing.
    May i know the cause of the issue or is it a bug?
    Thanks
    Nancy

    Hi ,
    The cause of the issue is the standard rdf is set to run for single operating unit. But R12 is a moac setup enable application. Hence The operating unit mode is changed to Single from null in system administration concurrent program setting for the XML report concurrent program.
    This fixed the issue.
    Thanks
    Nancy

  • Printing SAP invoice on SAP printer using custom SAP report

    Hi SAP Experts,
    We have the following requirement.
    We need to create a custom report in ABAP to print the Invoice on the printer specifed in the input selection screen.We don't want to use the external commad using GUI.Can annyone please suggest how can we create a spool directly using the invoicve no in sap.
    Thanks,
    Prathamesh

    Hi Prathamesh,
    Follow this approach.
    Get NAST entry corresponding to invoice number(invoice number = objky).
    insert this piece of code :
         gwa_nast-vstat = 1.
         gwa_nast-erdat = sy-datum.
         gwa_nast-eruhr = sy-uzeit.
         gwa_nast-usnam = sy-uname.
         gwa_nast-manue = 'X'.
         gwa_nast-vstat = 0.
         gwa_nast-LDEST = P_printername_from_selection_screen.
         CLEAR gwa_nast-datvr.
         CLEAR gwa_nast-uhrvr.
         CLEAR gwa_nast-cmfpnr.
       MOVE gwa_nast TO nast.
       PERFORM einzelnachricht_dialog IN PROGRAM rsnast00 USING sy-subrc.
       IF sy-subrc NE 0.
         PERFORM objekt_entsperren IN PROGRAM rsnast00.
         IF sy-subrc EQ 9.
           RAISE print_error_dial.
         ELSE.
           RAISE print_error.
         ENDIF.
       ENDIF.
       SET SCREEN 0.
       PERFORM objekt_entsperren IN PROGRAM rsnast00.
       COMMIT WORK AND WAIT.
    the above will generate a spool.
    Thanks,
    Anil

  • Print Excise invoice in Series grp 111 using J1IP for Billing document 1234

    Dear Gurus,
    I have an issue in which I create Sales Document>>Delivery Document and after that if I save my Billing Document a message pops up like:
    Print Excise invoice in Series grp 111 using J1IP for Billing document 12345
    And Excise Invoice gets generated automatically without J1IIN, to which I can view in the display mode in J1IIN.
    I wish to Create Excise Invoice by using T Code: J1IIN not automatically.
    I have checked all the number ranges and search the forum extensively but couldnu2019t found a possible solution.
    Please help me!
    Regards,
    Ashu

    Hi,
    Create Excise Invoice Automatically
    Instructs the system to automatically create an outgong excise invoice immediately you create a commercial invoice or a pro forma invoice.
    The system creates the excise invoice in the background.
    Dependencies
    If you want to make use of this function, you must also define the default plant, excise group, and series groups in Customizing for Excise Duty, by choosing Business Transactions -> Outgoing Excise Invoices -> Maintain Default Excise Groups and Series Groups
    SPRO>Logistics General>Tax on Goods Movement>India>Basic Settings-->Maintain Excise Groups.
    Under the Outgoing Excise invoice tab there is a check box (Excise invoice during billing)
    Regards,
    Saju.S

  • Print preview invoice issue for a parcular invoice in vf03

    Hi,
    I am facing an issue with the print preview invoice. I have 2 billing document nos., for billing document 3117101008 when I go to "Billing Document"->"Issue to output"-> and click on "print preview" I get an output, but for the other billing document 3117101007 when I click on "Print preview" nothing happens, it just keeps on loading and everything gets hanged.
    Do I need to do any modifications in my custom include "YV0023INV_PRINT_F01" or is there anything linked with the header details table 'IT_HU_HEAD'.
    Please advise, appreciate your efforts.
    Thanks

    Hello Bawneet,
    Are you facing this issue only to this billing document ?
    Did you check the same for 1008 billing document ? First try to open 1007 and then next open 1008 document, here please check are you facing the same issue like screen keeps on loading issue.
    Please check this and come back with your issues.
    Thanks & Regards,
    Lakshmi S

  • Xml report to print AR invoices to multiple companies

    Hi,
    can anyone help me to work on this issue, I need to Develop one XMLP report that prints AR invoices for multiple companies, and multiple invoices for each company.
    It will be thankful, if anyone help me to come out of this issue. I need it urgently
    Thanks

    Hi
    Are you working in EBusiness Suite or another ERP app? IF so then there are already invoice reports built out of the box that you can use quite quickly.
    If not then you need to find out from your users what they want to see on the invoice, then map that to the columns in tables and then write the query to extract the data.
    Tim

  • How to print the invoice(Billing document) using program RSNAST00

    Hi,
      I want to print the invoice using the program RSNAST00,
    but when i fill in selection screen with the following details,
    Output Application : V3
    Object Key : Billing Document Number
    Output Type : ZPFM
    Transmission Medium : 1
    But it is throwing an Information Message "0 outputs were processed in total (0 successfully,0 incorrectly)
    So please guide me, what are settings i have to do and what abap code i have to write to overcome this error.
    Regards,
    Shasiraj.C

    Hi,
      As you told I am using the function module RV_MESSAGE_DIALOG in my program when I directly execute my program its not printing invoice,but when i keep the break point and execute a pop up comes in which i click on the PRINT button that time it is printing the invoice.
    But I dont want to click on Print button manually, my code should automatically take care of printing also.
    Can guide me in this issue.
    Regards,
    Shasiraj.C

Maybe you are looking for

  • Error opening a Test Script inUFT from Solution Manager

    This error is the subject of a call with SAP and HP but I wondered if anyone else has come across this problem. We work with Solution Manager 7.1 (SP11) and HP's UFT 11.53 to create automated testing. We ustilise the two free seat licences for UFT th

  • I get an invalid serial number message

    Crashed my hard drive. Went to my Adobe account and pulled up my Products list. Downloaded CS5 and input the serial number in my Products list. Everything went fine. Downloaded Adobe Acrobat 9 Pro and input the serial number in my Products list. Got

  • Javax.sql.rowset.serial.SerialBlob cannot be cast to oracle.sql.BLOB

    Hi there, I'm facing this exception. My code: final ReportTemplateAttachment rta = new ReportTemplateAttachment(); FileBlob fb = new FileBlob(); fb.setContentType(attachmentDto.getContentType().getValue()); fb.setCreationDate(sysDate); fb.setCreation

  • "set cert delete" command deleting the wrong cert

    We have a scenario where we are trying to automate tomcat cert deletions. The issue is that even though in the GUI, the certs have the names spelled differently (one is capitalized, one is not, but spelled the same) the "set cert delete tomcat-trust

  • How to install Firefox in another directory that it is dirrected ( ex. : I want G not C directory )

    Because I was not inspired when I farmatted my HDD, I have low space on C directory for Windows. That is why I ned to install the other programs on G directory, much larger than C. But Firefox 3.6.10 don't allow me to do this. I can install only in C