Add Document (invoice),  linked with payment (DI API)

Hi experts.
I am using SAP 9, PL 11.
DI API is returning the "Invoice receipt & must be paid exactly [OINV.GroupNum]" error when I am adding a document (invoice).
This is because the "Open Incoming Payment" has the value assigned "Bill Of Exchange".
My code is simple, I insert one document (invoice) and then add the payment of that document. The error occurs when I am inserting the document.
                oInv.CardCode = "C40000";
oInv.Lines.ItemCode = "A00005";
                oInv.Lines.Usage = "9";
                oInv.Lines.Quantity = 1;
                oInv.Lines.Add();
oInv.PaymentMethod = "Boleto-Itau";
if (oInv.Add() != 0)
                    throw new Exception(oCmp.GetLastErrorDescription());

Hi Brian,
The problem is that the "Invoice + Payment" transaction is a specific kind of the "Invoice" one, which uses the OINV.IsICT value to differentiate both kinds ; and luckily for us, this value is not visible (so nor updatable) from the DI.
Your only solution, is to book a regular invoice and a regular payment... And to take care of the PaymentGroupCode property, since this is it which will force or not the use of a transaction (Invoice) or the other (Invoice + payment).
In case you continue in this direction, be aware that handling manually transaction to cancel the invoice if for any reason posting the payment fails, will do nothing (so you'll have to post manually a cancellation document).
Regards,
Eric

Similar Messages

  • How do I add URI web link with custom tooltip like "CLICK HERE TO UPDATE" instead of URI web link in tooltip.

    How do I add URI web link with custom tooltip like "CLICK HERE TO UPDATE" instead of URI web link in tooltip.

    You've probably found an answer to this by now, but I think this has been addressed in another forum -- The link below suggested using a button and adding the tooltip to the button. 
    https://forums.adobe.com/thread/304974?start=0&tstart=0
    Sounds like it would work but I haven't actually tried it. 
    Good luck~!

  • How can I add document-internal links in Pages 5?

    I have a number of very large dicttionary documents (300+ pages) all of which have internal links. The internal links allow you to jump from one letter to another, so that, for example, if you're looking at words that begin with S, you can go to the A-Z letterboard at the beginning and end of the S section and immediately jump to any other section. I've also got links in the middle of the document leading to parts in the front matter (so, for example, a mention of the word "relative clause" will be linked to a section in the grammar discussing relative clauses). The nice thing is that these links would remain active when exported to .pdf, so when I shared them with others, the internal links continued to function. Each document has hundreds of these internal links. All of them appear to have been broken by the new version of Pages.
    Is there a way to create document internal links like the ones I used to use for Pages '09, or has this functionality been forever removed from Pages? If the latter, who do I scream at?

    Bookmarks have been removed along with 100 other features.
    You could post at Menu > Pages > Provide Pages Feedback but that is pointless in my experience
    Instead rate/review Pages 5 in the App Store where everyone can see it. In our local App Store, Pages 5.1 is back down to 2 stars with again 61% of users saying they hate it.
    Pages '09 should be in your Applications/iWork folder, use that instead.
    Peter

  • Patch/firmware to add dynamic host link with words for WRT160N?

    Hi!
    is there anywere patch or firmware that can add another option DYNAMIC to the WRT160N (now i have v1.02.2) so i'll able to add link with words not numbers?
    thanks!

    I am afraid, "There is no such Patch"...

  • Document Object Linking with Material

    Dear All,
                  I have a small query regaridng the object linking between document and material. Whenever i create part in CAD system, i am creating a document and material for the part in the SAP PLM system using the CAD Interface. Then if i log onto the SAP PLM system under document i am able to see the linked material in object links. Where as i am not able to see the document link in the material basic data screen.
                   Where can i found the document linkage information for the material in material master screens.
    regards,
    rajesh.

    Hi Rajesh,
    in transactions MM02 and MM03 you have to go to the "Additional Data" Screen. Please use the button and then switch to the "Document Data" tab. Here you should be able to see the linked document info record.
    Best regards,
    Christoph
    P.S.: Please reward points for usefull informations.

  • Removing of default ledger linked with Payment means of inc payment

    Hi
    In payment means of Inc. Payment voucher, when i select cheque tab a default ledger is linked i.e
    144080 of advance Payments and so all transaction of debit is going in this ledger whereas it should go in
    ledger of house bank.
    From G/L account determination i am trying to change ledger of cheques received from advance Payments
    to House bank ledger but it is not visible on pressing tab.
    How to do?
    Thanks

    1.On removing check it is showing and so linked.Whether it is right to remove check box, i mean to say that what effect in system will it show on removing check?
    2.In payment means voucher there are two places of linking account, one at the top and one in column after
    bank name and branch.What is the use of both these accounts?
    Thanks

  • How do I add an excel link with its icon into outlook

    Hi,Below image will help you understand more easily.I want to send a welcome email to new comer. and I also want to add some manual files which located on a file server into content.However, if I drag the manuals, it would be attached on the mail.Is there anyone who knows how to do it?Please advise.
    This topic first appeared in the Spiceworks Community

    Hi,Below image will help you understand more easily.I want to send a welcome email to new comer. and I also want to add some manual files which located on a file server into content.However, if I drag the manuals, it would be attached on the mail.Is there anyone who knows how to do it?Please advise.
    This topic first appeared in the Spiceworks Community

  • Add Invoice with Payment Terms set 'Open Incoming Payment' = Cash - with DI

    Hi,
    I have this type of problem: I have defined a Payement Terms (Payment Terms - Setup) and I have set the field 'Open Incoming Payment' = Cash.
    In this way, when I create an Invoice and I put this 'Payment Terms' in Accounting Label, when I Add the Invoice, Sap open the 'Payment Means' form, and I must set the Total Cash of the payment. I set this field, click Ok, and then I'm able to Add the Invoice (and his Payment).
    If I try to do this operation with DI API, when I call .Add() method, I retrieve this error: "Invoice & receipt must be paid exactly  [OINV.GroupNum]". There is a method or property in SAPbobsCOM.BoObjectTypes.oInvoices that I must set to do automatically this operation?
    What can I do this???
    Thank you
    Marco

    Hi Niall,
    yes, I have set the property vInvoice.PaymentGroupCode = 2 , infact i retrive the error.
    If i try to set PaymentGroupCode = 1 or PaymentGroupCode = 3 (other 'normal' Payments Terms), my procedure work correctly, and the Invoice are added.
    If I try to set PaymentGroupCode = 2, i retrieve the error.
    This is my simple code:
                        vInvoice.Series = 26
                        vInvoice.CardCode = "C0001"
                        vInvoice.HandWritten = SAPbobsCOM.BoYesNoEnum.tNO
                        vInvoice.DocDate = "10/01/2009"
                        vInvoice.DocType = SAPbobsCOM.BoDocumentTypes.dDocument_Service
                        vInvoice.PaymentGroupCode = 2
                        vInvoice.Lines.AccountCode = "11005010"
                        vInvoice.Lines.Quantity = 1
                        vInvoice.Lines.Currency = "Eur"
                        vInvoice.Lines.Price = 110
                        ret = vInvoice.Add()
                        If ret <> 0 Then
                            myDB.GetLastError(errCode, errMsg)
                            myapp.SetStatusBarMessage(errMsg, SAPbouiCOM.BoMessageTime.bmt_Medium, True)
                        End If
    Thank
    Marco

  • Link between invoice no and payment clearing document no

    Hi sap gurus,
    in a reoprt i have to show the payment receive date against the invoice no. i can have the invoice no by customer no (KUNNR) and date range. now i am facing problem how to link invoice document no with payment clearing document no. Because while receiving payment from customer (t code F-28) we are receiving against a invoice. But i checked in BSEG,BSID BSAD but nowhere i was able to track the linkage. Please help.
    regards,
    BKR

    In billing document at header level,  you can see two fields, viz.
    a)  XBLNR   Reference Document Number  and
    b)  ZUONR   Assignment number
    These two fields you can see in FBL5N.  Whatever copy control you set in VTFL at header level for these two fields, based on that values will be populated in billing document which will then be passed on to FI just for information.
    But these two fields are not stored in any table but in structure.  However, you can check in BKPF with field XBLNR which will have link between VBRK (billing document ) and BKPF (Accounting document)
    thanks
    G. Lakshmipathi

  • Object link with finanace Documents (Vendor Invoice) Tcode FB03

    Hi all,
    Can DMS object link be maintained with finance documents for ex Vendor Invoice?
    Tcode FB03.
    Thanks
    Ansih

    Hi,
    you can link documents to purchase order item or purchase requisition then obviously this will be displayed in vendor invoice.
    Best practice is to use SAP DMS standard functions. Don't go to link with vendor invoice.Anyhow MIRO and MIGO transaction are
    depeandent on purchase requisition.I hope this will resolve your query and is a best practice.
    Regards,
    Ravindra

  • Issue In Sales Invoice DTW with down payment

    Dear Friends,
    I am trying to add some Sales Invoice with advance payment by DTW.
    Entries of Sales order , Sales Advance Down Payment request & Payment against Advance Down payment request are already done.
    In Invoice master file for DTW I add down payment amount in DpmAmnt.
    Invoice was successfully uploaded but link between down payment & invoice is not generated.
    But link between Invoice and Sales Order is generated.  
    How to link Down Payment Entry to Sales Invoice in DTW?

    Dear Swapnil,
    After seeing your attached image file, can you please rectify the same in your system as I have done it successfully at my end. Please find below screen shot for your reference.
    Please test it and let me know the same for any issue.
    Regards,
    Vinod Memane

  • Table Relation with Payment and Invoice of Vendor

    Hi all,
         I have one question about Table Relation with Payment and Invoice of Vendor.
         the scenario is.
         2 Purchase Order number : 100000001/100000002
         1 Invoice document number : 200000001 which include  2 Purchase Order.
         1 Payment document number : 300000001
         How should I found out table relation from Payment document number - Invoice document number - Purchase Order number. ?
          I try to link the following table, but it does not work.
          RBKP     *     Invoice Receipt
          RSEG     *     Invoice Receipt document line item
          BKPF     *     Accounting Document Header
    BSEG     *     Accounting Document Segment
    PAYR          Payment Medium File
    BSIK          Accounting: Secondary Index for Vendors
    BSAK          Accounting: Secondary Index for Vendors (Cleared Items)
    BSIS          Accounting: Secondary Index for G/L Accounts (Open Items)
    Does any one know about it ?
    Regards
    KY Chuang

    Hi Venkatesh,
    Thnx a lot for the reply. This has almost solved my problem, however there's one thing left. when I'm trying to take a print out after exporting the info into an excel sheet, the information really looks scattered, i.e.,  is there a way where we can go ahead and get the info in a rather unscattered manner.
    I've tried to take a print directly without actually transferring the info into an excel sheet, then each of the vendor is printed in a separate page, which again they feel is a problem.
    So, if you have an idea pls suggest.
    Thnx again for the information.
    regards
    sandhya

  • Can't add A/P Invoice after down payment

    We had a PO wich was paid 100% from a Down Payment Invoice.  The Goods Receipt PO was copied from the PO - all items were received.  Now we are trying to copy the GRPO to an A/P Invoice.  The invoice correctly shows the applied payment, and the document total is zero.  There are no additional taxes or freight.  When we try to add the invoice, we get an error which says "Invalid total".  The documents are in a foreign currency and the exchange rate has changed in the time since the PO was entered, but the document totals are all the same.  This type of transaction occurs frequently and does not usually cause a problem.  What can we do to add this invoice?
    Thanks for your help.
    Marcia

    Dear Ms Weissman,
    I have tested the scenario you explained us in a demo in version 8.8 and I could not reproduce it.
    I have created the Purchase order, created a Down Payment Invoice with 100% in DMP field. I paid the document in full through the outcoming payment in the banking module.
    Then I have targeted the Order to the GRPO and finally I have targeted the GRPO to the AP Invoice.
    Can you please tell me if these are the steps you took?
    Thank you.
    Marcella Rivi
    SAP Business One Forums Team

  • Link invoices to the payment

    How to Link invoices to the payment in banking?

    Hi,
    In SAP Business One,goto banking-bank statements and reconciliation-link invoices to payment.
    This function enables you to link an A/R or A/P invoice with an incoming or outgoing payment document that was not based on an invoice.
    When the amounts of the linked documents are identical, SAP Business One reconciles the journal entries related to these documents.
    Wish it helps you.
    Thanks and best regards,
    Lucy Shen
    SAP Business One Forums Team

  • PO Service not link with AP invoice service

    Currently usiing SBO 2007A, SP-00, PL 49.
    I have 1 PO service. Base on this PO service, I create AP Invoice service.
    The account no. use in PO service is different from account no. use in AP Invoice service. Since account no. have been overwrite in AP Invoice.
    PO service is missing link with AP Invoice.
    When we open again the PO we couldn't find target document.
    Also same when we open AP Invoice, we couldn't find base document, which is actually the PO.
    Only in AP Invoice's remark we can find the PO no.
    Also in the database, in AP Invoice table base document no. is blank.
    Also it cause the PO not automatically close.
    Previous PL, this error not exist.
    Any one can help.
    Thanks in advance,
    Surya

    Hi,
    Please check Note No. : [ 1334491|https://websmp130.sap-ag.de/sap(bD1odSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1334491] which explains the reported issue.
    Kind Regards,
    Jitin
    SAP Business One Forum Team

Maybe you are looking for