Insert/Update/Delete Non-PO Invoice Line Item via FM/BAPI?

Does anyone know of a way to insert/update/delete an Invoice Line item (Non-PO Accounting Invoice - Transaction FB60 or FV60) using a BAPI or Function Module (or set of function modules) using ABAP? I have been trying to find some code to accomplish this and am stuck on a couple of issues.
I have found PRELIMINARY_POSTING_FB01 and PP_CHANGE_DOCUMENT_ENJ but both seem to submit the details to background processes. This is an issue because it gives the user a success message after execution but later delivers the error to Workflow. This is for an interfacing program so the results should be as real time as possible.
Has anyone accomplished this via FM or BAPI and if so would you mind sharing your experiences?
Thank you very much,
Andy

SG- Thank you for the reply.
I have been playing with BAPI_INCOMINGINVOICE_PARK and I'm not sure if it is doing exactly what we want, but it is something that I have considered in the past. I plan on looking into BAPI_ACC_INVOICE_RECEIPT_POST this morning, hopefully that will provide some more for us.
If possible I'd like to avoid BDC sessions because this program could hypothetically interface with multiple SAP systems with different configurations.
I will check into those FM's and thank you very much.

Similar Messages

  • Post non PO invoice line items using INVOIC01 and FM IDOC_INPUT_INVOIC_MRM

    hello there SAP folks,
    Have an interesting question for all of you. We currently have a partner through whom we use the IDOC_INPUT_INVOIC_MRM Function module to pass invoices. Now there are multiple line items some times [multi E1EDP01 / E1EDP02] segments which all refer to the same PO but to different line items on the PO. Now all that is well.
    For one particular partner we now have the following requirement. We are going to have the same condition as above, with the added condition that there are going to be some invoice line items with no reference to a PO. the reason is that the vendor is going to calculate the different taxes and send them to us. so when we post the invoice :
    we will now have
    31 Vendor
    40 GR/IR
    40 Tax 1
    40 Tax 2
    50 Tax 3 offset
    instead of
    31 vendor
    40 GR/IR
    to deal with the new situation I tried adding having the following
    first E1EDP02 is going to refer to the PO using qualifier 001, but second E1EDP02 [for tax] s not going to have a qualifier 001. When I do that i get a missing belnr (001) and zeile (001) error.the exact error message is the following
    Required field BELNR(001) is missing in segment E1EDP02
    Required field ZEILE(001) is missing in segment E1EDP02
    Message no. FD070
    Now to bypass that, I added the 001 qualifier for the second E1EDP02 [tax part] and now the error that I get is either the PO is duplicated or if i put some dummy PO number, then it says PO cannot be found.
    =======
    so the question is how is it possible to post  4 items in the idoc , with one being a PO reference and 3 non PO reference using INVOIC01 and IDOC_INPUT_INVOIC_MRM
    I also have to add that it is possible to add a non PO items to the MM invoice in MIRO by entering the additional tax lines using the g/l account tab next to the PO reference tab.

    nvm.
    Edited by: D N on Dec 16, 2008 2:10 PM

  • SQL Tool to insert/update/delete non english data

    I have a requirement to insert/update non English data using command line.
    I know that Sql*Plus cannot be used for this. I have tried Sql*Loader and that works fine for inserts.
    Question is can SQL*loader be used for updates and deletes too.
    Also which utility is the best one to be used in this scenario.

    In another forum I found out that SQL*Plus can actually be used for inserting unicode data.
    Re: Sql script not able to insert unicode data in table

  • Need to delete delivery fparitally invoiced line item

    WE have a scenario. We have a sales order with order qty 10 which were back orderd. The vendor sent 5, and the customer was shipped 5 and invoiced for 5. Then the rest of the 5 were received 2 weeks later, and now the customer does not want the rest 5, but delivery and PGI has been done for the 5 that were received today. The system does not allow us to delete the second delivery. We get a message stating " the original line item has been invoiced". Any suggestions on how we could delete this new delivery would really help.We cannot cancel the invoice. current setting is order related invoicing.
    PLEASE NOTE WE CANNOT CANCEL INVOICE.
    Any suggestions???

    Susan
    I am guessing you already tried Sai's suggestion  but were not able to delete the delivery after reversing the PGI with T code VL09. Is that the issue?
    If so, my suggestion would be to check the item cat definition for Billing relevance and Completion rule, Similarly the Copy control for billing document again the Pos/Neg. Quantity and Billing quantity fields. Somehow the config here is making the system believe with even partial billing that the item is completely referenced or something like that. Even if you fix the config, I am doubtful you can rectify the current situation without canceling the invoice.
    Whatever it  is,  please post the steps you have taken to resolve the issue. We are eager to learn from your experience. Thanks.

  • Update Parked Non PO invoice - FBV2 functionality via BAPI or FM not BDC

    Good day all,
    after searching many days, I have found many threads similar to this request but none have been properly answers.  My scenario: I need to change a header field (ZUONR) and account assignment related fields (KOSTL, AUFNR, etc) in the document items.
    I have tried many FM for this but can't seem to overcome the fact that parked, non-po invoices have no entry in the BSEG table.  I have progressed a long ways with the BAPI
    PP_CHANGE_DOCUMENT_FBV2_ENJ
    But I get an error message:
    No item information transferred into Accounting
    Message no. RW002
    Diagnosis
    The interface into Accounting requires:
    Header data
    Item data
    Currency data
    The item data is missing.
    System Response
    Processing of the data in the Accounting interface is not possible.
    Procedure
    This is a system error of the application which was called up.
    This message seems to derive from a missing set of field what should be coming from the FM
    AC_DOCUMENT_CREATE
    I can't seem to debug there the internal table T_ACCIT should be getting it's values
    Please help troubleshoot this.
    Cheers
    M

    SG- Thank you for the reply.
    I have been playing with BAPI_INCOMINGINVOICE_PARK and I'm not sure if it is doing exactly what we want, but it is something that I have considered in the past. I plan on looking into BAPI_ACC_INVOICE_RECEIPT_POST this morning, hopefully that will provide some more for us.
    If possible I'd like to avoid BDC sessions because this program could hypothetically interface with multiple SAP systems with different configurations.
    I will check into those FM's and thank you very much.

  • BAPI_PO_CHANGE to update the Price for the line item not updating the Price

    Hi,
    I am using BAPI_PO_CHANGE to update the Price for the line item. This BAPI is not updating the Price. I am using external cummit also, but the BAPI is not updating price.
    I am passing following data to the BAPI.
    Plant: CQ11
    PO                   Material                Price
    4500002142     TEST_BATCH     12
    Please provide suggestion.
    Regards,
    Jubin.

    Hi,
    check this link...this has sample code
    [http://www.sap-img.com/abap/sample-abap-code-on-bapi-po-change.htm]
    Regards,
    Surinder

  • Originating document number not updated for one invoice line item

    Hi,
    We have a invoice document number in which the originating document number is not updated for one of the line items ,this is order related down payment invoice .May be this is due to system inconsistency so is there any SAP note to overcome this problem.
    Best Regards,
    Rohit

    Dear All,
             I found out the problem for not updated in F-04. "While create the receipt document in GL master Open item management maintained box was not checked". It can be found in BSIS table - OI Management'.
             Is there any other way to clear this document.
    Thanks...

  • Invoice line items report from DSO compared to Infocube (in HANA)

    Hi Folks,
    As you know Invoice line items are very granular level information. We are facing performance issues on reports based on the Infocubes to display this information. We are migrating to HANA and looking for options to improve the performance. One of the option we are looking at is instead of Infocube can we we report directly on the DSO. I would like to know whether it will help and its Pro & Con's. Please help.
    Thanks,
    B

    Hi B,
    Reading data from a DSO instead of an InfoCube will not improve reporting performance. The benefit in getting rid of the cube is that you have less loading to do.  You still need cubes for planning and inventory scenarios.
    You do not need a composite provider to report from DSOs in BW. Once you've migrated to HANA you use DSOs just as you would today, and you can report from a multiprovider. Yes, you can use a composite provider, but it is not necessary.
    If your report is slow today, you need to find out where it is slow.  HANA could provide a huge benefit as soon as you migrate, or it might not help much.  It depends on the scenario. OSS 1681396 is a good place to start.
    If the DB time is long, and you're not using BWA today, you can expect big benefits when you migrate to HANA.
    If the OLAP time is long, you might see big benefits when you migrate, as the OLAP engine during query execution is pushing more to HANA.
    If the frontend time is long, migrating to a different database isn't likely to change that, you'd need to address that separately.
    Finally, an important point to remember is that once you've migrated you open up additional possibilities for improvement that are not available to you in BW-on-non-HANA.  For example, you might be able to rewrite queries as HANA models.  I did some performance tests on this in a very simple case of exception aggregation.

  • As i am fresher Please share the doc of ECMA script using java script in SharePoint 2013 also how we can insert,update,delete records in list using ECMA script.

    As i am fresher Please share the doc of ECMA script using java script in SharePoint 2013 step by step also how we can insert,update,delete records in list using ECMA script.
    Thanks and Regards, Rangnath Mali

    Hi,
    According to your post, my understanding is that you want to use JavaScript to work with SharePoint list.
    To create list items, we can create a ListItemCreationInformation object, set its properties, and pass it as parameter to the addItem(parameters) function
    of the List object.
    To set list item properties, we can use a column indexer to make an assignment, and call the update() function so that changes will take effect when you callexecuteQueryAsync(succeededCallback,
    failedCallback). 
    And to delete a list item, call the deleteObject() function on the object. 
    There is an MSDN article about the details steps of this topic, you can have a look at it.
    How to: Create, Update, and Delete List Items Using JavaScript
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Insert/Update/Delete in forms6i using Objects table in Oracle9i server

    I am using Oracle 9i server and dev 6i (forms6i).
    i have a form based on Object tables (including REF's items). when i try to insert update, delete the reocrd in the form, it gives error.
    Insert/Update/Delete failed because of OCI_22132: hexadecimal string does not corresopond to a valid REF.
    when i remove REFs items from form (not from database) then it does all functions (insert,update,delete,query).
    Actually i haved used this form with Oracle 8i and it did all functions(insert,update,delete,query). i am using the same tables and types definations in Oracle 9i but it is not working.
    Note: Insert, Update, Delete, or Query is not being done through forms when using REFs items. Others tools like sql*plus are performing the same actions very well.
    Please help.
    I will be thankful to you.
    M. Faisal.

    user563114,
    As James (padders) told you in his reply to a similar question that you posted (Typed tables is treated in the same way as a relational table?) in the Typed tables is treated in the same way as a relational table? forum, the only way you can tell for sure is to try it out both ways, measure and compare the times.
    Of-course, there are many factors that effect the time, apart from whether you use a nested table or a regular table.
    Good Luck,
    Avi.

  • How to delete the Cost center line item data

    How to delete the cost center line item data of particular cost center and only one cost center is exisiting for that company code.
    Is there any way to delete the line items in that cost center.
    Can data archiving & deleting can help us..........
    does it have any effect over other cost center data....
    any input needed.........
    regards
    rajesh

    Hi,
    i found 2 reports for you:
    1) CO_TOTAL_WRI - Archiving CO Totals Records   
    2) RKCOITW1     - Archiving CO Line Items: Write Program        
    from 2) is a linlk to customize archiv-parameters
    -> start it with transaction se38 / sa38
    A.

  • How to find out who made inserts/updates/deletes made to a SQL Table

    I want to know WHO MAKES INSERTS/UPDATES/DELETES TO a particular SQL Table. Bascially I want to AUDIT ANY Edites made to a SQL 2008 TABLE. I need info such as WHO AMDE THE Updates i.e. the user first/lastname, When update was made, what row was updated etc...How
    can I do that with SQL 2008?

    One way to achieve that would be to use triggers to detect when a change is made to the table, and then insert a record into another table/database detailing what changed and who by.
    You'd need three triggers, one for insert, update and delete respectively, and for each of those you use the "inserted" and "deleted" tables (system tables maintained by SQL) to retrieve what has been done. To retrieve who made the change you can query IDENT_CURRENT
    which returns the last identity value for a specific table.
    See :
    Triggers -
    http://msdn.microsoft.com/en-gb/library/ms189799(v=sql.100).aspx
    Inserted & deleted tables -
    http://technet.microsoft.com/en-us/library/ms191300(v=sql.100).aspx
    INDENT_CURRENT -
    http://technet.microsoft.com/en-us/library/ms175098(v=sql.100).aspx
    There may be better / more up to date ways to do this, but I've used this method successfully in the past, albeit a long time ago (on a SQL 2000 box I think!).

  • Restrict deletion of sales order line items

    Hi,
    I need to restrict deleting of sales order line item, I think we can use the user exit, MV45AFZB, USEREXIT_CHECK_XVBAP_FOR_DELE.
    But when i set the flag to 'X', even though it does not delete at tht instance when the sales order save is clicked again the line item gets deleted.
    ANy idea , to prevent that?
    Thanks
    Keshi

    Hi Keshi,
    That is the correct exit, we are using the same without any problem. Just set US_EXIT  = CHARX.
    Regards,
    John.

  • Profit centre needs to be updated in Vendor and Customer line item reports

    We are using ECC 6. 
    Profit centre is updating for vendor and customer line items in document level.  But the same is to be reflected/updated in profit centre field in FBL1N and Reports.

    hi
    Use this T codes you will get Profit center wise  S_AC0_52000888 Paybles (vendor balances )
    Tcode for Profit center wise receviables S_AC0_52000887  (customer balances )
    Regards
    Babu.k

  • Update the change history for line items in CDHDR/CDPOS

    Hi,
    I have a problem in updating the sales order and line items in CDHDR/CDPOS when there is change in header level custom field..
    Actually i have a custom field in VBAK which added in additional data A in the header level of sales order.When we have change in that field only some line items only updating in the change history tables(CDHDR/CDPOS),but we need to capture all the line items when the custom field in the header level is changed.
    i have added change document flag in the data element of the custom field.
    Please advice me how to get all  the line items will reflect in CDHDR/CDPOS when the header level custom field has change .
    Thanks & Regards
    Kiran

    The purpose of CHANGE DOCUMENT tables is to flag the changes with Old and New values. So when Header data is changed only Header details will be tracked and same for Item tables too.
    If you need anything addtional from this then that would customizing.
    I am not sure what is your requirement but to make it simple and achive requirement add same field with same setting to line item tables VBAP, VBKD.. (as required, if that's doesnt impact your Order. These fields no need to be on screen). While changing your Custom field of Header level change the item level field too. Then CHANGE DOCUMENT will generate automatically for all the line item including header.

Maybe you are looking for