A/P Invoices FROM Purchase Order

Hi,
       how can I create a Purchase Invoice from purchase Order in DI API ?
thanks
Leonardo Correa

Hi Leo,
you have to create two objects
oPO = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseOrders)
oPI = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseInvoices)
than you use oPO.GetByKey(DocEntryFromPO)
to load the old Purchase Order in the Object
than you copy the properties to the PurchaseInvoice Object
oPI.CardCode = oPO.CardCode
oPI.Lines.SetCurrentLine(0)
oPO.Lines.SetCurrentLine(0)
oPI.Lines.ItemCode = oPO.ItemCode
and you also have to "link" the lines - make a loop.
oPI.Lines.BaseEntry = DocEntryFromPO
oPI.Lines.BaseLine = oPO.LineNum
oPI.Lines.BaseType = bodt_PurchaseOrder
thats it - this are the important steps.
i hope it helps enought
regards
David

Similar Messages

  • Partial Invoice from Purchase Order

    Hi Experts
    I did a Purchase order for 10,000 and invoiced for 5,000 but when I try to do the incoice for the balance amount the sytem does not have any open purchase orders.
    My question is if we do invoice for partial amount can we have the purchase order still open or how to go further
    please help
    thanks and regards
    vinodh

    Hi Vinor,
    In your scenario, you shold have used an AR downpayment Invoice to bill partial amount.
    In SBO, as long as you have copied all quantities from 1 document to the next (In your case, you have copied all qty which is 1 to the next document), hence your Purchase Order was closed. This is a normal behaviour.
    To bill partial payment, do use AR downpayment invoice.
    Hope it helps.
    Warmest Regards,
    Chinho

  • Add Invoice from Purchase Order

    Hi experts,
    I add the Button in Purchase order .and bind the Vendor codes and items, qty, price in matrix(Purchase order matrix) . Now i want to add the Invoice separately  for all vendors who are exist in row level when i click the userdefined button in Purchase order (I need not to open a Invoice). How is it possible
    With Best Regards,
    M.Thippa Reddy

    Hi Vassu,
    Thanks for your reply. I use the following code for adding the invoice but i getting error"-5002 Chooseb BP is not a custome [OINV.Cardcode]{Line:1], "V1010"
    Please rectify me i am done any mistake.
    Dim RetVal As Long
            Dim ErrCode As Long
            Dim ErrMsg As String
            'Create the Documents object
            Dim vInvoice As SAPbobsCOM.Documents
            vInvoice = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices)
            'Set values to the fields
            vInvoice.Series = 0
            vInvoice.CardCode = "V1010"
            'vInvoice.HandWritten = "No"
            vInvoice.DocNum = 84
            vInvoice.PaymentGroupCode = "-1"
            vInvoice.DocDate = System.DateTime.Today.Date
            vInvoice.Lines.ItemCode = "A00001"
            '  vInvoice.Lines.ItemDescription = "Banana"
            vInvoice.Lines.TaxCode = "NY"
            vInvoice.Lines.Quantity = 50
            'vInvoice.Lines.DiscountPercent = 10
            vInvoice.Lines.UnitPrice = 5.0
            vInvoice.Lines.Add()
            'Add the Invoice
            RetVal = vInvoice.Add
            'Check the result
            If RetVal <> 0 Then
                oCompany.GetLastError(ErrCode, ErrMsg)
                MsgBox(ErrCode & " " & ErrMsg)
            End If
    Regards,
    M.Thippa Reddy

  • Block invoice from Purchase Order

    Hi,
    I would like that, for a specific kind of purchase orders, when an invoice are posted to it, they where automatically created with blocked for payment "R".
    This is something I sould decide to do in the purchase order, as for the same vendor and material sometimes I know I will pay the invoice and sometimes I will clear invoices - as in trading operations (only differences between invoices will be paid).
    could you all help me on this?
    Thanks so much!!!

    Hi
    It could be better if you create separate account group for vendors for whom you wanted to block the payment at time of invoice verification (in VMR - in payment transactions - payment block). When ever you create purchase order (as you said specific - document type) then invoice will be blocked.
    Thanks

  • "All items from purchase order cannot be invoiced"

    Hello,<br />
    <br />
    I'm on a SRM 7.0 SP 5 system (ext-classic scenario). Here i try to create an invoice with reference to a Purchase Order, but none of my Purchase Orders can be used for reference. I get the following warning message 'All items from purchase order cannot be invoiced'.<br />
    <br />
    - Created via POWL (create with reference -&gt; invoice/credit memo) i always get the warning message 'All items from purchase order cannot be invoiced'. And no items are converted / can be used for invoicing. Additionally when i use the search option 'find purchase order' within the create invoice transaction i can not find any purchase order to use, it shows 'There is no search result' while there are plenty purchase orders marked with 'invoice expected'.<br />
    <br />
    I am able to create invoices without reference.<br />
    <br />
    I tried vendors set up only for 'invoice expected' and 'GR', 'invoice expected' / 'GR' / 'GR-based-IV' and 'invoice expected' only none of them works, indicators set on vendor master are correctly used on the created purchase order. Outputting PO doesn't make any difference neither.<br />
    <p />
    I have not set up the following (do i need to?):<br />
    - Deactivated the 'CRME' transaction type, no Credit Memo transaction type has been configured/is active.<br />
    - I have not defined the 'INV' transaction type as a follow-on document for my ECPO transaction type within the define transaction type transaction.<br />
    - Tollerances<br />
    <br />
    <b>edit</b> -&gt; i've already searched thorougly for SAP notes but no note seems to cover this particular problem.<br />
    <br />
    Help is very much appreciated

    Solved! Added SYS attribute for back-end system in organisational scheme.

  • Creating asset from purchase orders

    Dear Gurus.
    Please let me know how to create asset from purchase orders.
    Thanks
    Rgds,
    Saurabh

    hi,
    First, determine the information that is necessary for creating the purchase order:
    Check in the Purchasing component whether a purchase requisition exists for the asset (Logistics - Materials management - Purchasing).
    Determine the vendor from whom you are ordering the asset. If needed, enter the purchasing data for the vendor.
    Determine the asset number of the asset that is being ordered. If necessary, create a new asset.
    Create the purchase order. If there is a purchase requisition, use it as a reference (in Purchasing: Purchase order - Create).
    In the initial screen, when you specify the account assignment type A (for asset), this determines
    The account assignment to an asset
    How the goods receipt or the invoice receipt is to be handled (are asset values to be posted at the time of the goods receipt or at the time of the invoice receipt).
    Once you have entered the general purchasing data in the first screen (order date, material group, etc.), a dialog box appears. Enter the asset to which account assignment is to be made in this dialog box.
    If the asset master record for your purchase has not yet been created, you can create it directly from within the purchase order transaction.
    Display the order item and its current delivery status (in Purchasing: Purchase order - List display - By account assignment).
    Later, post the goods receipt or the invoice receipt. (The Customizing definition of the account assignment type determines when the asset values are posted - either at goods receipt or at invoice receipt.) See the corresponding documentation for the Materials Management (MM) component.
    regards,
    Siddharth.

  • DI API: Linking A/P Invoice with Purchase Order throught BaseEntry ..

    Hello
    I try to create A/P invoice (using DI API) and their lines link to lines of Purchase Order. I set BaseType, BaseEntry and BaseLine fields and also I set another quantity. This works fine. But I also need to set another unit price (Document_Lines.Price) and here is the problem. After saving A/P invoice there is price from Purchase Order. Is any possibility to change the UnitPrice? On A/P Invoice form this can be done.
    my code:
    SAPbobsCOM::BoObjectTypes objType = SAPbobsCOM::BoObjectTypes)atoi(header.GetObjType().c_str());
    SAPbobsCOM::IDocumentsPtr oDocument = GetDI()->GetBusinessObject(objType);
    oDocument->CardCode = header.GetCardCode().c_str();
    oDocument->DocDate = header.GetDocDate();
    oDocument->DocDueDate = header.GetDocDueDate();
    oDocument->TaxDate = header.GetTaxDate();
    oDocument->VatDate = header.GetVatDate();
    oDocument->DocCurrency = header.GetDocCur().c_str();
    oDocument->NumAtCard = header.GetNumAtCard().c_str();
    SAPbobsCOM::IDocument_LinesPtr oLines = oDocument->Lines;
    for(unsigned i = 0; i < vecLines.size(); i ++)
         CDocLine& line = vecLines<i>;
         oLines->BaseType = line.GetBaseType();
         oLines->BaseEntry = line.GetBaseEntry();
         oLines->BaseLine = line.GetBaseLine();
         oLines->Quantity = line.GetQuantity();
         oLines->Currency = oDocument->DocCurrency;
         oLines->Price = line.GetPrice();
         oLines->Add();
    oDocument->Add()
    Thanks Tomas

    Dear Tomas Homola,
    Please try to use
    oLines->UnitPrice = "your desired price"
    to change the UnitPrice of the A/P Invoice.
    Best Regards
    Jane Jing
    SAP Business One Forums team

  • Is there is a way to have a link from purchase order to cost center report.

    Is there is a way to have a link from purchase order to cost center report.
    I am meaning kind of:
    Standard way to customized this link?
    or
    User exit to have this link in place
    or
    Any other solution
    Thanks

    For me it does not make any sense from going from PO to cost center report.
    However, if you want to see the purchase order cost incurred with a cost center, execute KSB1 report. Within the layout, bring "Purchasing Document" field, where you can see the purchase order number in cost center line item report.

  • A report to view the cash flow coming from Purchase Orders.

    Hi All,
    Could anyone suggest me a report to view the financial obligations which comes from Purchase Orders?
    Thanks
    Gandalf

    Hi,
    You will have to activate basic cash management (part of FSCM) and use TCode FF7B (liquidity forecast). What the report would do is, based on the delivery date of the purchase order and the payment terms of the vendor (plus some grace days for clearing the payment as per configuration) determine the date of expected payments and project the cash (and bank) balance by days/week or months.
    Alternatively you can write your own ABAP code which will do the same thing.
    a. Take a list of all open POs and determine the delivery date (EKKO and EKPO)
    b. Add the payment terms as per purchase order to the delivery date
    c. Compute the cost of the purchase order item
    d. Display the report which projects expected payments by date
    Rgds
    Shivram.

  • A report to view the cash flow from Purchase Orders.

    Hi All,
    Could anyone suggest me a report to view the cash flow (financial obligations) which comes from Purchase Orders?
    Thanks
    Gandalf

    Hi,
    You will have to activate basic cash management (part of FSCM) and use TCode FF7B (liquidity forecast). What the report would do is, based on the delivery date of the purchase order and the payment terms of the vendor (plus some grace days for clearing the payment as per configuration) determine the date of expected payments and project the cash (and bank) balance by days/week or months.
    Alternatively you can write your own ABAP code which will do the same thing.
    a. Take a list of all open POs and determine the delivery date (EKKO and EKPO)
    b. Add the payment terms as per purchase order to the delivery date
    c. Compute the cost of the purchase order item
    d. Display the report which projects expected payments by date
    Rgds
    Shivram.

  • Error while creating work order from purchase order

    Dear All,
    We are having a subcontracting scenario where we are creating a Work order from PO but getting the below error.
    Error - "No master data assigned to partners-locations-product combination."
    Done all the setting mentioned in the below thread but the error still persist.
    Error in Generating Work order from Purchase Order
    Any suggestions on which master data we need to check?
    Thanks,
    mahesh.

    Hi Mahesh
    In the below transaction
    /SCA/MFGCFG - Work Order Configuration
    Can you maintain Master data Assigment properly
    Valid From
    Valid To
    Active---Checked
    Can you please list what you maintained
    Regards
    Vinod

  • No update of sales order from purchase order

    Hi,
    When I am trying to change the delivery date of a purchase order line item, I get the error
    "No update of sales order xxxxx from purchase order (error V1 348)" How can I resolve this?
    Sincerely,
    Ketan

    Hi,
    Check whether this PO is created w.r.t. PR and PR is created automatically during Sales order creation.
    If it is so then need no to change the delivery date in PO, it will always get updated as per the Schedule Line date of sales order.
    You can go for GR w.r.t. PO directly.

  • Goods receipt with Zero Quantity from Purchase Order

    Dear Expert,
    Is this a policy or something in SAP system?
    Why I can MIGO with Zero Qty from Purchase order that still open quantity?
    Best regards,
    Dedy

    Dear all,
    Thanks a lot for all replies.
    Dear Thiru,
    First thing, all system message i have set error, M7 061 Document does not contain any items
    M7 264 Qty and / or "delivery completed" ind. or final issue ind. are missing.
    Scenario :
    PO not yet tick delivery completed (open quantity), when we doing MIGO w/ zero qty and set delivery completed indicator to --> 2 Set, a document GR is posted w/ zero quantity.
    Also when PO already tick delivery completed, but when MIGO and set delivery completed indicator to --> 3 Do not set, a document GR is posted w/ zero quantity.
    Is this a way that SAP provide to tick delivery completed after PO final release w/ status not changeable so we do not need to cancel release or something like a bug/backdoor?
    Best regards,
    Dedy

  • Down payment Request  from purchase order (me21n)

    We need Down payment Request automatically created as per payment terms from purchase order screen.(ME21N)

    no answer

  • Customisation settings for VC Configuration copy from Purchase order to GRN(Goods Receipt note)

    Hi Experts
    I was looking for Customisation settings for VC Configuration copy from Purchase order to GRN(Goods Receipt note),
    Please share.
    Regards
    Sandeep

    Hi Ritesh
    Thanks for your reply,
    I checked  both of these transaction  we need to select 3 option Characetrstics frm configuration(prio) and classification. I will check that, I had one more question
    In PO VC configuration is called for class type-300  and  in GRN VC configuration  is called for class type -023. How it will fetch the variant class configuration to Batch class configuration?
    Once we had faced some issues the copy from PO to GRN was happening for some batches & some batches it was not happening.
    yes we have activated Mill Functions in our ERP box.
    Regards
    Sandeep

Maybe you are looking for

  • How do I finalise a Project in imovie 10.0.6 (Yosemite)

    Hi guys, I love iMovie, but generally only have time to create one per year.  I upgraded to Yosemite and iMovie was part of the upgrade.  I'm not finding it as easy to use, but just need a few tutorials I'd say. However, after completing my latest cr

  • Controlling the main time line of a movie via a button within a movie on a different level.

    Hi there! I have two movie is two different levels, Level 5 is my base movie and I am loading another movie on top of this into level 10. Once the user clicks onto a button within the movie on level 10, I would like the animation in level 5 to stop (

  • Adobe Premiere Pro CC crush - no Mercury Playback Engine GPU acceleration (OPEN CL)

    I was an happy customer of Adobe CC till few days ago. It were a few weeks I did not update the software in CC due to a problem with connection. Needed to use Premiere Pro CC. It always crushes my MacBook Pro retina 2012 (16 giga ram) during export o

  • No video thumbnails on nautilus

    The title pretty much describes it, I'm getting no video thumbnails on nautilus, I tried following solutions proposed in some older threads on this forum with no luck, I tried installing ffmpegthumnailer, ffmpeg, and all of the gstreamer plugins, rel

  • SP A10: XP SP2 and Maxtor IEEE 1394: Need MS Hotfix?

    I have a Satellite Pro A10 hooked up to a external Maxtor 80Gb disk on a Firewire/IEEE 1394 link. The IEEE 1394 is attached to a PCMCIA card (from Belkin) which uses the NEC 1394 chipset. There is a Hotfix available from Microsoft (see http://support