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

Similar Messages

  • DMS link with Purchase order,invoices and material master

    Hi, all,
    Here is my ?
    Can we link incoming material invoice with purchase orders for reference purpose throught DMS.
    rgds,
    ben

    hi
    you can link the objects through object link in dms.
    go to  tcode dc10 select the documnet type, click on define object link. click new entry and select object type as EBAN/EKPO
    this way dms is link  to purchase order.
    thanks ,
    regards,
    nitin
    award point if useful

  • Linking document info record and purchase order

    Hi all,
    I hope that someone can help me because I'm having a problem with creating links between document info records and purchase orders.
    By default in SAP I can create links between document info record and purchase order ITEMS! When I create that link, I can see it in document info record under Object links tab, but when I double click on the number of purchase order nothing happens (I expected that this purchase order will open).
    Why is that so?
    Why can't I access purchase order from document info record even though the link exists?
    The other question is about creating object links to purchase orders, not purchase order items! Is it possible to link document info record with purchase order?
    I would appreciate quick answer because we're in the middle of a project and we're stuck with that problem.
    Thanks!

    Hi Karlo,
             As you mentioned, object links could be linked to Purchase order items. In customisation you maintain these entries under the node SPRO > Cross Application Components> Document Management--> Control Data --> Define Document Types --> Define Object Links.
    There are many links in the standard system (possible entries).
    The system automatically determines the screen number (dialog box) where the key data for the object is maintained for document maintenance.
    You can check the screens when the screen entry is missing or contains errors by doing the following:
    Start the Object Navigator and display the objects for the development class  CV.
    Expand the function group 130. The structure nodescreens lista all screens that can be used for object links.
    You can make an object link to SAP objects that are not shown in the possible entries list. To do this, proceed as follows:
    In the standard system, there are already two special screens for the module pools SAPLCV130 and SAPLCV140 for the linked SAP object.
    You must create two new screens with the same number for the module pools SAPLCV130 and SAPLCV140 .
    The processing logic must follow that of screen 1204 in program SAPLVC130.
    Create function module OBJECT_CHECK_XXXX (XXXX = object name)
    If the object can be classified, this function module already exists .
    Otherwise copy the function module for linking equipment DOCUMENT_CHECK_EQUI and change it as required for the new object.
    Hope the above instruction helps in solving your problem,
    Sojan
    Note : Award points if you find the information useful

  • Invoice Verification without GR and with Purchase Order

    Hi all
    During the Logistic Invoice Verfication (MIRO) without GR and with Purchase Order, I want to exclude "Invoice to be received" account (WRX) from the posting. How can I do it?
    Let me know
    Thanks

    it doesn't work. Can you explain me better the solution?
    Thanks

  • How to link asset with purchase order and PO Item.

    Hello,
           I have to generate a report which contains columns
    Asset No , po no(ebeln) ,PO Item(ebelp),Material no etc
    My query is how to link asset with purchase order and      PO Item.
    I am selecting asset and po no. from anla  but how to get
    po item no(ebelp)?
    po line item is important in this report because every line item has differrent asset and material no.
    i tried to match asset no in mseg table but i am not getting asset no in mseg .
    how should i proceed ?

    Thanks Thomas & Srimanta for the quick response.
    When I checked EKKN table by entering PO there is no asset no. in anln1 field.
    Also I would like to add that, In me23n for a PO, account assignment category we are entering 'F' for internal order settlement.
    Where can i find the link between asset and po no(ebeln) and po item(ebelp)?
    Regards,
    Rachel
    Edited by: Rachel on Aug 11, 2008 7:23 AM

  • 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

  • REPORT for list of invoice with an order reason.

    Hi SAP Gurus !
    Is there any standard SAP report which will show me a list of invoice with an order reason field?
    I have tried VF05 and VF05n,but in both of them, order reason as a selection parameter field is missing.
    In case of any clarification kindly revert back to me.
    Regards,
    Ujjawal

    Thanks to all !
    Actually i was going  to create a query with VBRK and VBAK  tables but sales order number is not the common link as sales order number is present in VBAK table only.
    Apart from that i had tried to add VBRK and VBRP table then i was getting the list of invoice with order reasons (because order reason was getting copied from an order to invoice) ,but in this query i'm getting Order reason number with list of invoice only(Description of order reason is not coming).
    Please guide me for this if i'm wrong.
    Regards,
    Ujjawal

  • Print document type Q02( technical delivery terms)  with Purchase Order

    Hi all
    1) I have activated the QM procurement for a certain material and I have assigned the control key that makes mandatory the technical delivery terms on the material master (standard control key 0002).
    2) I have created a Document Info Record Q02 to hold the Technical Delivery Terms assigning a PDF file. Document is released.
    3) I have assigned the DIR to the material master (object link in the DIR).
    I would like to know how to print the this DIR with Purchase Order. I am testing this scenario in IDES system and the form does not get printed.
    Could anyone please advice how to get the PDF file printed with the purchase order?
    Thank you

    Hi Sappmqm,
    There is no internal way, you would have to create an ABAP program to handle this function, where it would search the material record to pull the DIRs linked and then open them on user's screen for printing.
    Additional SAP add-ons are available as 3rd party apps, can click my name and contact me for more detail if you like.
    Good luck.

  • MIRO: posting to G/L Accounts with purchase order reference

    hello
    our company want to post an invoice for other expense in MIRO through the tab "G/L Acconunt" and don't through the tab "PO reference".
    our problem that when we post through "G/L Account" how we allocate the "purchasing document" to the line of G/L Account?
    in miro there is an option to create a posting line with purchase order reference to a g/l account and i read the documentation that says proceed as follows:
    1. choose miro
    2. enter header data as required
    3. allocate the invoice to a document and check the items to be settled - i don't underdand what i need to do in this step?
    4. choose the tab page g/l account
    5. enter data as requierd.
    thanks
    meir

    hi
    in the table below your MIRO screen you will see PO Reference on this tab select the item of the PO that you need post for this PO, in the tab G/L account you can make manual post aditional to the PO, also you can in the tab PO reference modify amounts and quantity if you need, but it is not recommended

  • Create Invoice against Purchase Order

    Dear all,
    I create receipt when goods delivered and a invoice against the receipt
    Please tell me where I can create them
    Thank in advance
    Minhtb

    hi
    You have to do in MIRO Transaction, where u have to take purchase order as reference. then it check the amount of goods receipt with purchase order and post the invoice .
    regards,
    sreekanth

  • Who is using SRM Invoice without Purchase Order?

    Hello,
    I want to implement SRM Invoice without Purchase Order as a method for our employees to enter their own non-purchase order invoices into SRM instead of having Accounts Payable enter them into R/3.  The invoices would then go through financial approval workflow before posting in R/3 and being eligible for the next appropriate cheque run.
    This will be a change to our corporate policy and I would like to connect with other companies who are allowing employees to enter their own invoices to find out whatever information or suggestions they can pass along to me.
    Few facts:
    We are running SRM 5.0 Classic with R/3 ERP 2005.
    The invoices are for $3,000 or less.
    We have Head Office plus many remote locations.
    We would still send the invoices to Accounts Payable for retention.
    Thank you,
    Corinne Taylor

    Hi Taylor,
    We can enter the Invoice with out purchase Order also. But you need Invoice management system in SRM.
    The Below document may help you and guide you further how to achieve.
    Technical Description and Configuration Information
    Purpose
    The Business Package for Invoicing Clerk provides the possibility to use the Invoice Management System in the Portal. The Invoice Management System (IMS) allows you to process incoming invoices
    (with and without purchase order) on the basis of exceptions. 
    Prerequisites
    This document is intended to guide an administrator through the steps required to install and configure the Business Package for Invoicing Clerk. Previous knowledge of SAP architecture and systems, as well as a fundamental knowledge of the Internet and associated technologies are prerequisites.
    To use the Business Package for Invoicing Clerk, the SAP SRM Server 5.5 must be installed in one of following ways in SAP ERP 2005:
    ·        SAP SRM Server as an add-on to SAP ECC Server (product instance SAP ERP 2005 – SAP ECC) to run Supplier Relationship Management (SRM) in one client of the ERP system.
    ·        SAP SRM Server as a separate component to SAP ECC Server.
    It is essential that you familiarize yourself with the contents of the corresponding Master Guide before starting to install the Business Package! All relevant system prerequisites are listed in the Master Guides.
    You can find these guides for mySAP ERP and mySAP SRM on the SAP Service Marketplace at service.sap.com/instguides ®Installation & Upgrade Guides ® mySAP Business Suite Solutions:
    &#9679;      mySAP ERP ® mySAP ERP 2005 ® Planning
    &#9679;      mySAP SRM ® Using SRM Server 5.5
    For more information on configuration, see SAP Solution Manager ® mySAP ERP 2005  ® Roles for the SAP NetWeaver Portal  ®Invoicing Clerk. See also, mySAP SRM configuration information in SAP Solution Manager: Configuration ® mySAP SRM 5.0 ® Basic Settings for mySAP SRM.
    See SAP Note 731386, Import of business packages with SAP NetWeaver. This note describes how to import business package EPA files into the SAP EP and how to install business package SCA files using the Software Deployment Manager.
    Integration
    The Business Package for Invoicing Clerk provides intranet/Internet access to several integrated backend systems. These include:
    ·        SAP SRM Server 5.5
    ·        SAP ECC 6.0
    ·        SAP Business Information Warehouse (BW) 7.0 (BI Content 7.2)
    Prior to beginning your installation, you should establish which components are
    required in your system landscape.
    Architecture
    The architecture of the business package is represented in the figure below:
    Landscape: Business Package for Invoicing Clerk
    Process Flow
    Roles, Worksets, Pages and iViews
    The following objects are available:
    Role Invoicing Clerk
    com.sap.pct.erp.invclerk.invoiceclerk
    Workset: Invoicing
    com.sap.pct.erp.invclerk.invoicing
    Invoice iView
    com.sap.pct.erp.invclerk.create_invoice
    Credit Memo iView
    com.sap.pct.erp.invclerk.create_creditmemo
    Subsequent Credit iView
    com.sap.pct.erp.invclerk.create_subcredit
    Subsequent Debit iView
    com.sap.pct.erp.invclerk.create_subdebit
    Invoice/Credit Memo iView
    com.sap.pct.erp.invclerk.search_invmemo
    Invoice Management iView
    com.sap.pct.erp.invclerk.bbp_inv_main
    Invoice Post Processing iView
    com.sap.pct.erp.invclerk.invpostpro
    Related services iView
    com.sap.portal.navigation.worksetmap.RelatedServices
    Document Overview iView
    com.sap.pct.erp.invclerk.doc_overview
    Document Quick Access iView
    com.sap.pct.erp.invclerk.doc_qaccess
    Excessive Invoice Document iView
    com.sap.pct.erp.invclerk.invoice_report
    Workset: Reports Overview
    com.sap.pct.erp.invclerk.reporting
    Reports Overview
    com.sap.pct.erp.invclerk.reports
    Workset: Service Map
    com.sap.pct.erp.invclerk.service_map
    Service Map iView
    com.sap.pct.erp.common.servicemap
    Thanks & Best Regards
    Girisha M S

  • Quotation Attachment with Purchase Order

    please guide me how to attached the quotation with Purchase order
    regards

    hi
    there will be 2 types of attachment is there
    1       you can copy sales order from the quotation then the document referance is the remarks coloumn.
    2  If you want to attach the External quotation (it ia in any format . like *.Doc *.pdf  etc.,,)
    you should create the UDF called the Link  that UDF type should be general  then structure should be link
    then in the sales order if you click on that table you can able to attach the file
    Gopi

  • Problem with purchase orders and cancelling order lines

    Hi,
    We have a problem with purchase orders and cancelling order lines. For example we have created PO no. 4300291277:
    We have made a GR 5000186897 on 03.09.2010 amount 1.920 and tried to cancel it with GR 5000208866, but it takes the invoice amount 1.724 instead of 1.920. What is the correct way to undo this orders, so we cancel the 1.920 and not the 1.724?
    Please help me, your help will be highly appreciated.
    Regards,
    Najma.

    hi,
    You have to cancel the IR first...and then do cancel the GR...
    yes, there will be diff. in the price(if the price changes in bwtn)..if no changes in the price , the price will taken as old one..
    Process:
    1. Cancel IR
    2. Then cancel GR..
    3. then go the PO and try to delete the line item..
    Regards
    Priyanka.P

  • INVOICE AND PURCHASE ORDER

    What is difference in fields between invoice and purchase order ?

    Hi Jyotirmoy
    Can you please be more specific what exact details you require??
    Thanks
    G. Lakshmipathi

  • Post vendor Invoice without Purchase order.

    Hi all
    good afternoon
    how can i post vendor Invoice without Purchase order.
    And any option
    Regards
    Manju

    Hi,
    Use following transactions to do so;
    1. MIGO - Goods Receipt > Others
    Here use movement type as "501" and enter material, vendor, quantity, Plant, storage location, etc... manually and post the material document.
    Here following A/c entry will appear;
    (BSX) Stock Account - Dr
    (GBB-ZOB) Expense A/c - Cr
    2. FB60 - Post Vendor Invoice
    Here following A/c entry will appear;
    Vendor Account - Cr
    Expense A/c - Dr
    3. F-53 - Post Payment w.r.t. the Invoice posted in step2.
    Here following A/c entry will appear;
    Vendor Account - Dr
    Bank Account - Cr
    Note: - If you don't want to carry out inventory transactions then follow only steps 2 & 3.

Maybe you are looking for

  • I  have no service on my iphone 3gs. Is there a fix for this problem.

    I have no service  or no 3G Network on my iphone 3GS. Is there a fix from Apple for this problem.

  • Benefit Insurance Coverage Amount-???? How to get

    Hi All, In Infotype 0168,-> Insurance Coverage tab There are two fields Basis Coverage & Insurance Coverage. How to get these two amounts in report. I checked these fields are not stored in PA0168. Please Give some BAPI name or some way to get these

  • Dbms_lob Vs Instr

    Hi, To read the clob by line by line dbms_lob.read is better or using instr function is better? experts please suggest. Thanks & Regards, Ramana.

  • My font has changed

    Somehow, my font has changed into a choppy font. As far as I know, I haven't changed anything in the settings for the font.

  • Swf files aren't showing up!

    I have a real problem! Swf files don't seem to show up at all! I've tried everything! At first i thought it was the path to the file but now i reaised they just don't show up at all once i upload the files. If you look at the source you can see the f