Create AR Correction Invoice

Hi All,
  I need create AR Correction Invoice link to AR Invoice, abt system display error "Invalid structure document"
oDoc = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoice)
oDoc.GetByKey(XXX)
_oOCSI = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oCorrectionInvoice)
If _oRecSet.RecordCount <> 0 Then
   _oOCSI.CardCode = oDoc.CardCode
   _oOCSI.DocDate = oDoc.DocDate
  _oOCSI.DocDueDate = oDoc.DocDate
  oOCSI.DocType = SAPbobsCOM.BoDocumentTypes.dDocumentService
  For i = 1 To _oRecSet.RecordCount
      If i > 1 Then
        _oOCSI.Lines.Add()
      End If
      oDoc.Lines.SetCurrentLine(i - 1)
      _oOCSI.Lines.BaseEntry = oDoc.DocEntry
      _oOCSI.Lines.BaseLine = oDoc.Lines.LineNum
      _oOCSI.Lines.BaseType = SAPbobsCOM.BoObjectTypes.oInvoices
      oOCSI.Lines.CorrectionInvoiceItem = SAPbobsCOM.BoCorInvItemStatus.ciisWas
      _oOCSI.Lines.Add()
       _oOCSI.Lines.BaseEntry = oDoc.DocEntry
       _oOCSI.Lines.BaseLine = oDoc.Lines.LineNum
       _oOCSI.Lines.BaseType = SAPbobsCOM.BoObjectTypes.oInvoices
      _oOCSI.Lines.LineTotal = 0
       oOCSI.Lines.CorrectionInvoiceItem = SAPbobsCOM.BoCorInvItemStatus.ciisShouldBe
      _oRecSet.MoveNext()
   Next i
   lErrCode = _oOCSI.Add
Please Help me.

Simply change the order of lines you are adding. First you'll have to create ShouldBe items, than the Was items.
Dim _oOCSI As SAPbobsCOM.Documents
        _oOCSI = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oCorrectionInvoice)
        _oOCSI.CardCode = "12121212212"
        _oOCSI.DocDate = Now()
        _oOCSI.DocDueDate = Now()
        _oOCSI.DocType = SAPbobsCOM.BoDocumentTypes.dDocument_Service
        _oOCSI.Lines.CorrectionInvoiceItem = SAPbobsCOM.BoCorInvItemStatus.ciis_ShouldBe
        _oOCSI.Lines.LineTotal = 0
        _oOCSI.Lines.BaseType = 13
        _oOCSI.Lines.BaseEntry = 122
        _oOCSI.Lines.BaseLine = 0
        _oOCSI.Lines.Add()
        _oOCSI.Lines.CorrectionInvoiceItem = SAPbobsCOM.BoCorInvItemStatus.ciis_Was
        _oOCSI.Lines.BaseType = 13
        _oOCSI.Lines.BaseEntry = 122
        _oOCSI.Lines.BaseLine = 0
        lErrCode = _oOCSI.Add()

Similar Messages

  • Correction invoices for rebate agreements in Poland

    I am currenty working in Poland on rebate agreements. There is a legal requirement that every change in the invoiced and VAT value has to be corrected via a correction invoice , mentioning the original invoice line, updated line and the delta. However the rebate settlement only generates a standard credit note to pay the rebate. The credit note that is generated
    for the rebate contains the settlement material.
    In Poland the correction invoice should have the original quantity ,real material number and invoice value. Does
    anybody have experience in how to create a correction invoice instead of the  standard credit note for the rebates ?
    Many thanks in advance
    Evert Nooijen

    Hello everybody,
    The requirement to create correction invoices might look weird and very painful but I really think it is a legal requirement.
    I have searched the internet and find contradictory information on whether the correction invoice is mandatory for rebate payments in Poland.
    For example the SAP country specifics mention that a correction invoice is needed for rebates:
    "You are required to create a correction tax invoice whenever you need to correct a tax invoice, for example:
    ·        To grant a customer a discount or rebate or increase the price of goods or services
    ·        To correct a tax invoice, for example, if it contains an error in any of the prices, tax rates, tax amounts, net values, gross values, quantities, or units of measure
    ·        When a customer returns some goods to you"'
    However I also found another document that gives me the impression that the Polish regulations on correction invoices have been changed in November 2009 (Polish jurisdiction)
    See the text below that is part of the changes in Poland:
    " The WSA in Wrocław ruled on 12 November 2009 (case ref. I SA/Wr 1155/09) that a rebate causing a reduction
    of the tax base for VAT may be documented not only by invoice but also by other documents.
    The taxpayer received rebates directly from his suppliers and by proxy of a company which negotiated terms of delivery in his
    name. The rebates received directly from suppliers were backed by correction invoices. Those received from the
    intermediary were documented by credit notes. The tax authorities took the view that rebates could only be documented by
    correction invoices. However, the WSA ruled that a rebate could be documented otherwise, for example, by credit note. Such
    a document must be supplemented with additional information which shows who gave whom the rebate and in what amount."
    HOWEVER: I am told by the local Polish organisation that this decision from the court in Wrocław, and not necessarily valid in other areas like Warsaw.
    Then I had contacted Price Waterhouse in Poland and have asked them for an advice:  I have received the following answer from PWC:
    ""Pursuant to the Polish VAT regulations post-transaction rebates should be documented with the correction invoices referring to the original invoice. Therefore, we recommend that the  system is appropriately adjusted to include the discussed functionality. Please note this is a standard in Poland that SAP allows for creation of such correction invoices."'
    So as mentioned, I think we have to enable the correction invoices for Poland, however I don't think we cannot create those in correctoin invoice requests (e.g. document type RK) in standard SAP by the rebate settlement program. We cen build a program to do it automatically, but I was hoping for a standard SAP program that was linked to the rabete functions in SD (automatically as part of the rebate settlement.).
    Hopefully somebody has any recommendation.
    Regards,
    Evert Nooijen
    Edited by: Evert Nooijen on Apr 4, 2010 12:01 PM
    Edited by: Evert Nooijen on Apr 4, 2010 12:03 PM

  • How do I post a Poland SD Correction Invoice for zero amount

    Hi,
    Our setup for creation of Correction Invoices for Poland is as follows:
    1) Create a correction Sales Order with reference to the original Customer invoice - this is a custom-designed document showing the current and 'to be' lines that will eventually appear on the correction invoice.
    2) Create the correction invoice with reference to this correction sales order.
    One of our business users has a situation where all the goods from a delivery were damaged, and a credit is needed as a result. The goods are not being returned, as the quantity is small.  Therefore this should in theory be a correction invoice, to amend the amount invoiced to zero.
    How can this be processed?  I can't create and bill a Correction Sales Order for it, as the 'to be' line item needs to be set to zero, and SAP therefore treats the Order as incomplete - and you can't bill an incomplete document.
    Of course we could just process a Return and then mark the stock as scrapped, but if possible we would prefer to find a solution using Correction Invoices.
    Can anyone advise?
    Val

    Hi,
    You need to use Returns scenario for this purpose and reutnr whole quanitites and created Corrective Invoice for the whole quantity where 'was' section should present the data from original invoice and 'to-be' section should present all items with qty zero. You need to get the 'was' section from original invoice and play with the 'to-be' section on the printout. Pelase remember also to put the correction reason 'Goods returned by customer', as it is Polish law requirement as well.
    Regards,
    Marcin

  • Excise Invoice being created before standard Invoice is created

    Hi
    I create a sales order. With reference to the sales order I create a delivery.
    With reference to the delivery, in VF02, if I try to create an Invoice, I get the following message - Excise Invoice created for the Invoice 597500041.
    I need the standard invoice to be created first and using the Tcode Ji11n I should create the Excise Invoice.
    But instead I get the above message.
    What settings should I check and correct.

    Dear Vaideeson Marap...      
    As per my understanding of your question
    If excise invoice is being created automatically the movement you create the commercial invoice in (vf01) ,you need to remove the check box in "excise invoice during billing " respective excise group.
    Please check and revert
    Thanks&Regards
    Raghu.k

  • Error while creating inter-company invoice  for stock transport

    Hi ,
    I am facing following errors while creating inter-company invoice for STO order.
    We have scenario where standard PO is created in  company code A  & then replenishment delivery is created in company code B.While raising inter-company invoice to company code A, we are facing problem.
    In replenishment delivery we have 10 line items. But  when we try to do inter company invoice through VF01/VF04 we get following log
    XXXXXXXXXX(delivery Number) 000000 Customer XXXXX: Customer master table KNVV is missing (VF-022)
    XXXXXXXXXX (delivery Number)000010 The bill-to party could not be determined (VF-047)
    XXXXXXXXXX (delivery Number)000010 The payer could not be determined (VF-048)
    With this first line item from delivery is not flows to invoice & if we saves this invoice then it is get saved with account determination error as some of the data does not comes into invoice header like account assignment group for customer, Payment term, destination country,region, tax classification for customer etc. That means invoice gets created without first line item from delivery with account determination error & so,no accounting document gets generated.
    I checked customer master for all SP,SH,BP,PY they are correctly maintained.This was working fine few months back, but not working now.
    If anybody had come across such kind of scenario, your valuable inputs will be highly appreciated.
    Thanks & kind regards,
    Ganesh Palatshaha

    Hello
    Kindly check the sales area of customer involved, whether the customer maintain with sales area for STO.
    If that is note the case the refer following link:
    - Error VF 047 & 048 while creating Inter company billing
    Regards
    JP

  • Unable to Change Withholding Tax Base Amount while creating Service AP Invoice through DI API?

    Dear All,
    I am trying to create Service AP Invoice through DI API.
    If I post the document without changing SAPPurchaseInvoice.WithholdingTaxData.TaxableAmount the dount ocument is created in SAP without any problem.
    But if I change amount in above field then DI API throws error Unbalanced Transaction.
    If I post same document in SAP with changed base amount it got posted in SAP without any Issue.
    Where I am doing wrong?
    please guide.
    Using:
    SAP B1 version 9 Patch Level 11
    Location : India.
    Thanks.

    Hi ,
    maybe you can find solution to these note 1812344
    1846344  - Overview Note for SAP Business One 8.82 PL12
    Symptom
    This SAP Note contains collective information related to upgrades to SAP Business One 8.82 Patch Level 12 (B1 8.82 PL12) from previous SAP Business One releases.
    In order to receive information about delivered patches via email or RSS, please use the upper right subscription options on http://service.sap.com/~sapidp/011000358700001458732008E
    Solution
    Patch installation options:
    SAP Business One 8.82 PL12 can be installed directly on previous patches of SAP Business One 8.82
    You can upgrade your SAP Business One to 8.82PL12 from all patches of the following versions:8.81; 8.8; 2007 A SP01; 2007 A SP00; 2007 B SP00; 2005 A SP01; 2005 B
    Patch content:
    SAP Business One 8.82 PL12 includes all corrections from previous patches for releases 8.82, 8.81, 8.8, 2007, and 2005.
    For details about the contained corrections, please see the SAP Notes listed in the References section.
    Notes: SAP Business One 8.82 PL12 contains B1if version 1.17.5
    Patch download:
    Open http://service.sap.com/sbo-swcenter -> SAP Business One Products -> Updates -> SAP Business One 8.8 -> SAP BUSINESS ONE 8.82 -> Comprised Software Component Versions -> SAP BUSINESS ONE 8.82 -> Win32 -> Downloads tab
    Header Data
    Released On
    02.05.2013 02:34:18  
    Release Status
    Released for Customer  
    Component
    SBO-BC-UPG Upgrade  
    Priority
      Recommendations/additional info  
    Category
      Upgrade information  
    References
    This document refers to:
      SAP Business One Notes
    1482452
    IN_Wrong tax amount was created for some items in the invoice with Excisable BOM item involves
    1650289
    Printing Inventory Posting List for huge amount of data
    1678528
    Withholding amount in the first row is zeroed.
    1754529
    Error Message When Running Pick and Pack Manager
    1756263
    Open Items List shuts down on out of memory
    1757641
    Year-end closing
    1757690
    SEPA File Formats - New Pain Versions
    1757898
    Incoming Bank File Format
    1757904
    Outgoing Bank File Format
    1762860
    Incorrect weight calculation when Automatic Availability Check is on
    1770690
    Pro Forma Invoice
    1776948
    Calendar columns are wrong when working with Group View
    1780460
    OINM column description is not translated
    1780486
    UI_System crash when you set extreme value of double type to DataTable column
    1788256
    Incorrect User-Defined Field displayed in a Stock Transfer Request
    1788372
    ZH: 'Unacceptable Field' when export document to word
    1788818
    RU loc: No freight in the Tax Invoice layout
    1790404
    Cash Flow Inconsistency when Canceling Payment
    1791295
    B1info property of UI API AddonsInstaller object returns NULL value
    1791416
    Adding a new item to BoM is slow
    1794111
    Text is overlapping in specific localization
    1795595
    Change log for item group shows current system date in all the "Created" fields
    1797292
    Queries in alerts should support more query results
    1800055
    B1if_ Line break issue in inbound retrieval using JDBC
    1802580
    Add Journal Voucher to General Ledger report
    1803586
    Not realized payment is exported via Payment Engine using 'SAPBPDEOPBT_DTAUS' file format
    1803751
    Period indicator of document series can be changed although it has been used
    1804340
    LOC_BR_Cannot update Nota Fiscal Model
    1805554
    G/L Account displayed in a wrong position when unticking the checkbox "Account with Balance of Zero"
    1806576
    Payment Cannot Be Reconciled Internally
    1807611
    Cannot update UDF in Distribution Rule used in transactions
    1807654
    Serial No./Batch inconsistency by canceled Inventory Transfer
    1808694
    BR: Business Partner Code cannot be updated with CNPJ CPF error
    1809398
    CR_Cannot Display Related Multi-Value Parameters
    1809758
    Arrow key not work for Batch/Serial Number Transactions Report
    1810099
    Tax Amount is Recalculated Even if Tax Code Is Not Changed
    1811270
    Upgrade fails on Serial And Batches object with error code -10
    1811846
    Cannot run Exchange Rate Differences when multi branch is activated
    1812344
    Withholding Tax Amount Is Not Updated in Payment Once Witholding Tax Code Is Changed in Document through DI API
    1812740
    DI:"Operation Code" show wrong value when add "A/P Tax Invoice" based on "A/P Invoice"
    1813029
    US_Vendor address on 1099 Summary by Form/Box Report is not updated according to the latest Invoice
    1813835
    Wrong amounts of Goods Return in Open Item List
    1814207
    Preliminary page prints setting does not keep after upgrade
    1814860
    Value "Zero" cannot be imported to "Minimum Inventory Level" field via Excel file
    1815535
    RFQ: Web front end not displayed in supplier language
    1815810
    GT: Adding Incoming Payment for Some Cash Flow Relevant Accounts Fails
    1816191
    BR:System Crashes While Working with Tax Code Determination Window
    1816611
    CR_Crystal Report Displayed Incorrectly Afte

  • Correction Invoice - Poland/Hungary

    We are facing the following problem in Correction Invoice (RK)
    eg: Sales Order /Delivery/ Invoice (A) created for 100 pieces. Due to the material fault 50 pieces are returned and the credit note (B)is given for that 50 pieces. Later after few weeks we would like to give the price correction for the remaining pieces.
    Here, I create the RK , with reference to the original Invoice (A). By default you get two line is the RK , First the original line from the Invoice and the second line for making any corrections. The Issue is the original line has 100 pieces and this cannot be changed. So any corrections you make refers to 100 pieces , but not for 50 pieces. as the credit (B) to the customer had already been given to the customer for the return of 50 pieces.  This results in totally wrong values .
    Please let me know if there is any possibility that the quantity 100 can be changed to reflect only 50 pieces. or How can this scenario be handled?
    Regards,
    Rahul

                        vCorrReversal.Lines.ItemCode = "00012"
                        'vCorrReversal.Lines.Price = 10
                        'vCorrReversal.Lines.Quantity = 10
                        vCorrReversal.Lines.CorrectionInvoiceItem = SAPbobsCOM.BoCorInvItemStatus.ciis_ShouldBe
                        vCorrReversal.Lines.BaseType = 165
                        vCorrReversal.Lines.BaseEntry = vDocEntry
                        vCorrReversal.Lines.BaseLine = 0
                        'vCorrReversal.Lines.LineTotal = 100
                        vCorrReversal.Lines.Add()
                        vCorrReversal.Lines.ItemCode = "00012"
                        'vCorrReversal.Lines.Price = 9
                        'vCorrReversal.Lines.Quantity = 10
                        vCorrReversal.Lines.CorrectionInvoiceItem = SAPbobsCOM.BoCorInvItemStatus.ciis_Was
                        vCorrReversal.Lines.BaseType = 165
                        vCorrReversal.Lines.BaseEntry = vDocEntry
                        vCorrReversal.Lines.BaseLine = 0
                        'vCorrReversal.Lines.LineTotal = 90
                        RetVal = vCorrReversal.Add
                        'Check the result
                        If RetVal <> 0 Then
                            vCmp.GetLastError(ErrCode, ErrMsg)
                            MsgBox(ErrCode + " " + ErrMsg)
                        Else
                            vCmp.GetNewObjectCode(vDocEntry)
                        End If
                    End If

  • Correction Invoice and "invalid document structure" problem

    Hello!
    Can anybody explain what properties are obligatory for correction invoices? I'm trying to add() one and it always say -5002: invalid document structure.
    In the CSI1 table I see linenum has to be unique, every baseline is twice. Do I make any stupid mistake? If so - where? What's wrong? Something is ommitted?...
                                                                                    Thanks in advance!
                                                                                    This is a snippet (two loops are unnecessary, I was looking for other ways). I'm trying just to zero the invoice. Should quantity in was lines be negative? It does not matter - everytime -5002...
         @Test
         public void testSAPCorrectionInvoice() throws SBOCOMException {
              ICompany company = sapConnector.getCompany();
              // Integer srcDocEntry = 6457;
              Integer srcDocEntry = 7084;// this one has no batches
              logger.debug("Creating correction to: " + srcDocEntry);
              // source doc
              IDocuments srcDoc = SBOCOMUtil.getDocuments(company,
                        SBOCOMConstants.BoObjectTypes_Document_oInvoices, srcDocEntry);
              logger.debug("srcDoc: " + srcDoc.getDocObjectCode() + ", "
                        + srcDoc.getDocNum());
              IDocuments sapDoc = SBOCOMUtil.newDocuments(company,
                        SBOCOMConstants.BoObjectTypes_Document_oCorrectionInvoice);
              // header:
              sapDoc.setHandWritten(SBOCOMConstants.BoYesNoEnum_tNO);
              sapDoc.setSeries(317);
              sapDoc.setDocType(SBOCOMConstants.BoDocumentTypes_dDocument_Items);
              sapDoc.setCardCode(srcDoc.getCardCode());
              sapDoc.setCardName(srcDoc.getCardName());
              sapDoc.setAddress(srcDoc.getAddress());
              String federalTaxID = srcDoc.getFederalTaxID();
              if (federalTaxID.length() > 0)
                   sapDoc.setFederalTaxID(federalTaxID);
              sapDoc.setDocDate(new Date());
              sapDoc.setDocDueDate(new Date());
              sapDoc.setSalesPersonCode(srcDoc.getSalesPersonCode());
              sapDoc.setDocCurrency(srcDoc.getDocCurrency());
              sapDoc.setPaymentGroupCode(srcDoc.getPaymentGroupCode());
              sapDoc.setTransportationCode(srcDoc.getTransportationCode());
              sapDoc.setContactPersonCode(srcDoc.getContactPersonCode());
              // sapDoc.setDiscountPercent(0.0);
              sapDoc.setComments("zwrot towaru");
              // sapDoc.setDocTotal(0.0);
              sapDoc.setVatDate(srcDoc.getVatDate());
              // items
              IDocument_Lines lines = sapDoc.getLines();
              int lineno = 0;
              IDocument_Lines srcLines = srcDoc.getLines();
              for (int i = 0; i < srcLines.getCount(); i++) {
                   srcLines.setCurrentLine(i);
                   logger.debug("line " + i + ", item: " + srcLines.getItemCode());
                   if (lineno > 0)
                        lines.add();
                   lines.setCurrentLine(lineno++);
                   lines.setItemCode(srcLines.getItemCode());
                   lines.setItemDescription(srcLines.getItemDescription());
                   lines.setWarehouseCode(srcLines.getWarehouseCode());
                   lines.setPrice(srcLines.getPrice());
                   lines.setDiscountPercent(srcLines.getDiscountPercent());
                   lines.setTaxCode(srcLines.getTaxCode());
                   lines.setBaseEntry(srcDocEntry);
                   lines.setBaseType(srcDoc.getDocObjectCode());
                   lines.setBaseLine(i);
                   lines.setVatGroup(srcLines.getVatGroup());
                   lines
                             .setCorrectionInvoiceItem(SBOCOMConstants.BoCorInvItemStatus_ciis_Was);
                   double quantity_was = srcLines.getQuantity();
                   lines.setQuantity(quantity_was);
              for (int i = 0; i < srcLines.getCount(); i++) {
                   srcLines.setCurrentLine(i);
                   logger.debug("line " + i + ", item: " + srcLines.getItemCode());
                   if (lineno > 0)
                        lines.add();
                   lines.setCurrentLine(lineno++);
                   double quantity_diff = 0;
                   lines.setItemCode(srcLines.getItemCode());
                   lines.setWarehouseCode(srcLines.getWarehouseCode());
                   lines.setPrice(srcLines.getPrice());
                   lines.setDiscountPercent(srcLines.getDiscountPercent());
                   lines.setTaxCode(srcLines.getTaxCode());
                   lines.setBaseEntry(srcDocEntry);
                   lines.setBaseType(srcDoc.getDocObjectCode());
                   lines.setBaseLine(i);
                   lines.setVatGroup(srcLines.getVatGroup());
                   lines
                             .setCorrectionInvoiceItem(SBOCOMConstants.BoCorInvItemStatus_ciis_ShouldBe);
                   double quantity_was = srcLines.getQuantity();
                   double quantity_is = 0; //quantity_was - quantity_diff;
                   lines.setQuantity(quantity_is);
              int result = sapDoc.add();
              String info = company.getLastErrorDescription();
              logger.debug("res = " + result + ", info: " + info);
              if (result != 0)
                   throw new EBladKorektyNrPartii(
                             "Cannot create document: " + info);
    Edited by: WodzGalopujacySkleroz on Jul 4, 2011 5:03 PM

    Hello,
      Maybe it's an old thread, and you might have the solution or workaround for this. Nonetheless i try to answer, it might be useful for those trying to find a solution for the same problem.
      The two loops are necessary indeed. DI API expects only this structure: Start with all the "ShouldBe" lines, and follow them with all the "Was" lines. So your code is almost good, but you should have swap the two loops with each other.

  • Wrong payer value while creating PRO FORMA invoice for multiple delivery

    Hi experts,
    I am trying to create PRO FORMA Invoice for multiple deliveries thru VF01.
    The problem here is the payer value is copied as the value of payer for the first delivery to all invoices. All other fields are picked up properly.
    Please help me to idenify the problem. Also if I create the invoices thru VF04 the invoices the created with correct payer.
    Thanks in advance.

    Hi Ankur,
    Thanx for the input.
    Right now we have customized routine 909 for header level and std. routine 004 for item level.
    Code for routine 909 is
    FORM BEDINGUNG_PRUEFEN_909.
    SY-SUBRC = 0.
    Fakturasperre
    IF LIKP-FAKSK NE SPACE.
    SELECT SINGLE * FROM TVFSP WHERE FAKSP = LIKP-FAKSK
    AND FKART = TVFK-FKART.
    IF SY-SUBRC = 0.
    PERFORM VBFS_HINZUFUEGEN USING '000000' '014' SPACE SPACE SPACE.
    SY-SUBRC = 4.
    EXIT.
    ENDIF.
    SY-SUBRC = 0.
    ENDIF.
    break-point.
    SELECT * FROM VBFA WHERE VBELV = LIKP-VBELN.
    IF VBFA-VBTYP_N = 'U' .
    PERFORM VBFS_HINZUFUEGEN USING '000000' '148' LIKP-VBELN
    SPACE SPACE.
    SY-SUBRC = 4.
    Insert + Unicode/Upgrade Project
    STOP.
    LEAVE SCREEN.
    Insert - Unicode/Upgrade Project
    ENDIF.
    ENDSELECT.
    ENDFORM.
    can u please check n confirm if the wrong value is coming due to this code?
    Thank in advance.

  • Correction Invoice with Items TreeType != iNotATree

    Hi,
    I want to create Correction Invoice document with Items which TreeType = SAPbobsCOM.BoItemTreeTypes.iSalesTree
    When I'm adding Correction with reference to some document (BaseType = 13 or 165, BaseEntry=... and BaseLine = ...) then everything is OK,
    But when I try add Correction without ref.  (no set BaseType,BaseEntry and BaseLine) then I get error:
    "Wystąpił błąd wewnętrzny (-5002)"
    "Internal error (exception) occurred (-5002)"
    When all Items on Correction has TreeType = iNotATree then I can add this Correction without any reference.
    The property correction.Lines.TreeType default value is iNotATree, but this property is ReadOnly.
    How can I add this document?
    Edited by: Dariusz Maron on Jun 4, 2009 12:07 PM

    Hello Wolf
    1) This was an issue in older releases but has been corrected  (supposedly) since 4.5 B
    Take a look at OSS note: 146091 - Invoice correction: new pricing not possible
    But I am sure you are in a much higher release.  Review it any ways.
    2) Did you try with 'B" or ""C" for the second pricing type? The help says 'You should give a new pricing type to the debit memo item'.
    3) Also is the invoice type you are copying from- does it have a 'M" in the SD document category.? T code VOFA. I believe this is prerequisite
    4) Check how the item cats are set up (G2N/L2N): The Returns field in Business data should be selected for credit items but not for debit items.
    5)  Finally the culprit could be the way you set up PR00 (V/06). Check what changes can be done: Are you allowing manual entries? Just a thought.

  • Print correction Invoice with Advance Layout Designer

    Dear All,
    we will use the Correction invoice in the System.
    But i couldn't find a possibility to create a Layout for this document Type.
    The Document Type is OCSI but this i couldn't find it in the Define Layouts List.
    Thanks and best regards
    Serkan

    Thank you for the info, but this message don't answer my question.
    i search a way to create a Layout with the Advance Layout Designer for the correction Invoice.
    i cant open the designer for that. just can create the standard Layout from the system..
    do you know if the Advance Layout are supported wit the 8.8 Version?
    Thank you very much!
    Serkan

  • AP Correction invoice. Adjust VAT value in local currency

    Hi.
    I need to correct purchase invoice.
    Invoice currency is EUR.
    I whant to register correction invoice
    There is a difference VAT tax that was calculated by SAP and one that is on paper.
    How i can adjust VAT in other currency (local,system)?
    Best Regards

    Hi Steve,
    Thanks for this confirmation.
    Is there any way I can find out which are my stock transport orders are linked to which Outbound deliveries and which are the items in the STO for which it has not created any Delivery or not included that item in the delivery ?
    I have activated the availability check so sometimes system does not include that item while creating the delivery if the stock is zero for this item.
    Also Is there any way to find out quickly,for which of those delieries, GR is still pending ?
    This is a typical business requirement in my project and almost everyday 10-15 deliveries are created wrt STO and each has got almost 50-100 items.
    It would be a great help for me if you suggest me something.
    Can I request you for your eMail ID so that I can send my queries directly to you if they are urgent for me.
    Regards,
    manOO

  • A/R Correction Invoice

    Hi Dear;
    i am using SBO 2005A SP1 PL 42
    i always read A/R Correction Invoice in the documents but i couldn't find it yet.
    what is A/R Correction Invoice?
    how can i find it and Use it?
    thank you Dear;

    Dear Dianne;
    is there any way to correct the A/R invoice other than create A/R Credit Note?
    regards;

  • DI API howto set Correction invoices.

    Hi all.
    I`m trying to add a correction invoices but i don`t know how.
    what properities of document are needed.
    Can anyone  help me pls .
    Thanks

    Hi Michal,
    when you look in the DIAPI - Reference in the SDK Help Direcotry you will under
    Document Object the following vb6 sample
    ok - i changed it a bit
        Dim RetVal As Long
        Dim ErrCode As Long
        Dim ErrMsg As String
        'Create the Documents object
        Dim vDoc As SAPbobsCOM.Documents
        Set vDoc = vCmp.GetBusinessObject(oCorrectionInvoice)
        'Set values to the fields
        vDoc.CardCode = "BP234"
        vDoc.HandWritten = tNO
        vDoc.DocDate = "21/8/2003"
        vDoc.DocTotal = 264.6
        'Lines - Set values to the first line
        vDoc.Lines.ItemCode = "A00023"
        vDoc.Lines.ItemDescription = "Banana"
        vDoc.Lines.Quantity = 50
        'Invoice Lines - Set values to the second line
        vDoc.Lines.Add
        vDoc.Lines.SetCurrentLine(1)
        vDoc.Lines.ItemCode = " A00033"
        vDoc.Lines.ItemDescription = "Orange"
        vDoc.Lines.Quantity = 1
        'Add the Invoice
        RetVal = vDoc.Add
       'Check the result
        If RetVal <> 0 Then
            vCmp.GetLastError ErrCode, ErrMsg
            MsgBox ErrCode & " " & ErrMsg
        End If
    regards
    David

  • Acctg document not created for cancellation invoice

    Hi all,
    We have a vehicle sales order created with payment card. The SO contains one item for vehicle and one item for parts. The items were delivered and invoiced separately. Hence, SO has one vehicle sales invoice (VSI) and one parts sales invoice (PSI).
    The standard procedure was to post VSI first before the PSI. Accounting documents have been created when both invoices were posted. However, there was a need to cancel the PSI. When this was done, cancellation invoice was created but there was no accounting document posted for the cancellation.
    I tried simulating the scenario in our test server and cancelled VSI 90000081 first before cancelling PSI 90000082 to test if this can be an alternative solution. Cancellation for VSI was posted successfully but error persists for PSI cancellation.
    Order 67 06/19/06 Completed
    . Delivery 80000081 06/19/06 Being processed
    .. Picking request 20060619 06/19/06 Completed
    .. GD goods issue:delvy 4900000293 06/19/06 complete
    .. Invoice 90000081 06/19/06 Completed
    ... Accounting document 2000077 06/19/06 partly cleared
    .. Invoice cancellation 90000084 06/19/06 Completed
    ... Accounting document 2000079 06/19/06 partly cleared
    . Delivery 80000082 06/19/06 Completed
    .. Picking request 20060619 06/19/06 Completed
    .. GD goods issue:delvy 4900000294 06/19/06 complete
    .. Invoice 90000082 06/19/06 Completed
    ... Accounting document 2000078 06/19/06 Not cleared
    .. Invoice cancellation 90000083 06/19/06
    .. Invoice 90000085 06/20/06 Blocked
    Accounting status of 90000083 (where error occurs) in VF03->Header->Details is set to K or <b>Accounting document not created (authorization lacking)</b>.
    Any inputs? Thanks in advance.

    Hello Sheila,
    sorry - my first answer was in mistake - Status K means:
    "The transaction is processed using payment cards. The order, however, does not contain valid authorization.
    This problem occurs in billing documents for follow-up deliveries."
    Could you check this ? Last way would be to set a breakpoint into the FM 'RV_ACCOUNTING_DOCUMENT_CREATE'
    and trigger this via VF02 -> Release to accounting.
    Regards Wolfgang

Maybe you are looking for

  • HT5361 I want to permanently remove years old emails from my IMac Mountain Lion system.  How can I do this by year instead of laboriously doing it one message at a time?

    I want to permanently remove years old emails from my IMac Mountain Lion system.  How can I do so by year rather than slowly removing one message at a time?  Many thanks.

  • Changes in extract structure

    Hello All, The extract structure for 2lis_11_vaitm has been changed and since then whenever I try to execute the datasource using RSA3. I get an error Import_mismatch_error. The extractor was working fine in dev. So I collected one structure which wa

  • Zen Micro Installation Prob

    I just bought my green micro today and I tried to install it, but it didn't work. Everything went well until the actual installation part where I got numerous popups saying that _____ could not be registered. The only option I had was to press okay.

  • How to Import SIDs from R/3 to XI

    Hi Friends, We had an R/3 system with the version 640. The systems ids are R3D, R3Q and R3P. Now the R/3 system has been upgraded to ECC6 and there is no more 640 version.the new version is 700. The new system ids are RDU, RQU & RPU. I have been aske

  • Windows 7 64bit issues

    Hey, I have been running a 32bit XP workstaion for a while now for audio and video production.  I decided to jump to win 7 recently and give it a go.  My system ran fine with XP as the os.  (intel core 2 Duo E8400 3.00 GHZ 2gb ram ati radeon HD2600 X