BAPI_INVOICEEC_CREATE

Hello All,
My team is trying to use BAPI_INVOICEEC_CREATE to electronically post invoices from our external supplies to SRM 5.0 using an XI interface.
However,  at present we are testing the BAPI using SE37 test tool.   We have set up a test sequence in which the BAPI_INVOICEEC_CREATE is called with test data and the the BAPI_TRANSACTION_COMMIT is called to post the data to the database.
Two things are happening... the first:  the process_type is being changed from INV to CREME  (INvoice to Credit Memo) This is validated using trx  BBP_PD
The second issue is that our line item data is not being written to the database.  This is also validated using trx  BBP_PD
We noticed that there does not seem to be a field to link the line item details with the invoice header detail structure.
Does anyone have expereience in posting invoices into SRM using the BAPI?

Hi Wally,
Have you looked at BAPI Documentation.
See FM Documentation in SE37 transaction.
It should create data if thse field are populated as described.
Regards,Nishant
FU BAPI_INVOICEEC_CREATE
Functionality
You can create invoices with this method.
Note that this method is only for local purchase order handling. You cannnot create invoices with reference to purchase orders in the backend system.
Transfer
You transfer the header and item data for the invoice, the business partner, taxes, shipment costs, and texts.
If the data is incomplete (for example, account assignment missing) data from the PO or the confirmation document for goods receipt/service is used.
Returned data
Header and item data of the created invoice and account assignments are returned.
Messages
Messages are returned in parameter Return
Documents can be saved with errors. Note the following message categories:
E
These messages are output as a result of erroneous or missing data (for example, missing vendor) and usually mean that the purchase order requires postprocessing.
A
These messages refer to serious errors that prevent the document from being saved.
Pointing of header data, item data, and set tables
All the BAPI tables have to be supplied with pointers identifying them as either header or item data.
The following fields are used for pointing (these are of type character with a length of 32 and entry area 0-9 and A-F. SAP recommends that you use only numerical values.):
BUSINESSPROCESS
Technical key of the transaction on header level.
ITEM_GUID
Technical key of the item.
PARENT  /  PARENT_GUID (in each case one of these fields identifies the item).
Field of the item that is used as pointer and that refers to the hierarchy level above.
With structures consisting of header and item data, the field refers to the header level. See the explanations for the header/item data structure below.
In the case of multi-level hierarchies, the field refers to the next highest hierarchy level.
PARENT_GUID
Field of set table that points to the header or item according to whether header or item data exists. Set tables are available for:
Partners
Organizational data
Taxes
Account assignments
Limits
Status
Long texts
Attachments
Note:
The fields PARENT and PARENT_GUID have the same meaning at item level. PARENT_GUID can be either in a set table or in an item table. If part of an item table, the field points to the higher-level hierarchy level. If part of a set table, the field points to the header or item data.
Make sure that the applications of SAP Enterprise Buyer do not always use all set tables.
Header/item data structure
The following display illustrates the connectivity. We have used the example of a purchase order to demonstrate pointing. Note that the other purchasing documents use the same logic even when other data (such as account assignment data) also has pointers.
(PO) Header
123456
|__________ G_L_ACCT 400000
|
|__________ITEM 10
|
|__________ G_L_ACCT 400001
Header data
BUSINESSPROCESS OBJECT_ID OBJECT_TYPE ... 
1 123456 BUS2201    ...----
Item data
ITEM_GUID PARENT OBJECT_TYPE NUMBER_INT ...
2 1 BUS2201001 10 ...
Explanation:
Value 1 in field PARENT of item data table refers to
value 1 in field BUSINESSPROCESS in the header data.
Account assignment data
GUID PARENT_GUID G_L_ACCT ...
5 1 400000    ...
8 2 400001    ...
Explanation:
Value 1 in field PARENT_GUID of the set table for account assignment refers to
value 1 in field BUSINESSPROCESS in the header data.
Value 2 in field PARENT_GUID of set table for account assignment refers to
value 2 in field ITEM_GUID in the item data.
Parameters
I_INV_HEADER
I_INV_HEADER_CUST
I_INP_TYPE
I_TESTRUN
E_INV_HEADER
E_INV_HEADER_CUST
I_INV_ITEMS
I_INV_ITEMS_CUST
I_INV_ACCASS
I_INV_ACCASS_CUST
I_INV_PARTNER
I_INV_TAXES
I_INV_SHIPCOST
I_INV_TEXT
I_INV_ATTACH
E_INV_ITEMS
E_INV_ITEMS_CUST
E_INV_ACCASS
E_INV_ACCASS_CUST
E_INV_PARTNER
E_INV_TAXES
E_INV_SHIPCOST
E_INV_ORGDATA
E_INV_TEXT
E_INV_STATUS
E_INV_ATTACH
RETURN
Exceptions
Function Group
BBP_BUS2205

Similar Messages

  • Creating an Invoice from XI doesn't work

    I have tested in se37. It works but it doesn't in XI RFC Adapter. All paramters are the same. I have got an exception - The system could not determine the "Ordering Party". Could you help me which parameter is incorrect?
    I have read notes 206068, 730870. And I added all needed zeros to nummeric values.
    My parameters are:
    <?xml version="1.0" encoding="UTF-8" ?>
    <ns0:BAPI_INVOICEEC_CREATE xmlns:ns0="urn:sap-com:document:sap:rfc:functions">
         <I_INP_TYPE>2</I_INP_TYPE>
         <I_INV_HEADER>
         <PROCESS_TYPE>INV</PROCESS_TYPE>
         <CURRENCY>USD</CURRENCY>
         <CURRENCY_ISO>USD</CURRENCY_ISO>
         <LANGU_ISO>EN</LANGU_ISO>
        </I_INV_HEADER>
        <I_INV_ITEMS>
          <item>
               <QUANTITY>1.000</QUANTITY>
               <PRICE>100.0000</PRICE>
               <PRICE_UNIT>1</PRICE_UNIT>
               <VALUE>100.0000</VALUE>
               <PO_NUMBER>0200000112</PO_NUMBER>
               <PO_ITEM_NUMBER>0000000001</PO_ITEM_NUMBER>
               <CONF_NUMBER>0100000111</CONF_NUMBER>
             <CONF_ITEM_NUMBER>0000000001</CONF_ITEM_NUMBER>
          </item>
      </I_INV_ITEMS>
    </ns0:BAPI_INVOICEEC_CREATE>

    Hi Sergey,
    It sounds like the issue you had with BAPI_CONFEC_CREATE.
    The same logic apply to complete the GR or IV data before creating it in SRM.
    You did not reply to my previous answer:
    "Execute BBP_GET_PURCHASING_PARTY in SE37 with your PO GUID to check if the system can determine the ordering/purchasing party.
    This BAPI is designed for standalone PO, but not for extended POs.... so the result is not guaranteed."
    Is your PO 0200000112 a standalone PO ?
    If yes, what is the result of BBP_GET_PURCHASING_PARTY ?
    Rgds
    Christophe

Maybe you are looking for

  • Battery Pack for iPod Nano

    Can anyone recommend a good battery pack for the Nano? I'm having a heck of a time finding one.

  • Being able to 'Read & Write' on an external hard drive on the Mac

    Hi there, I can't seem to be able to add things to my external hard drives on my MacBook Pro. I can with my USB stick but not with the larger external hard drives. Could someone help me change the permission settings to allow me to 'Read & Write' rat

  • Problems javadoc inner classes...

    Hi all, I have a problems documenting an inner class. I've implemented it this way: * In file TestClass.java I have an inner class "class MainClass" (this is the "upper" class of the file) * MainClass instantiates a TestClass (which in the file is de

  • Form settings using SDK

    Hi Friends I am doing on Purchase order form.i need to set visible some column of matrix visible and active (in table Format and RowFormat) with out using form setting inter face , means through code using SDK.Is it possible Thanks

  • Can't override AI10 when opening files from Bridge or Explorer.

    I have Illustrator 10 installed (on windows 7) because I need to work with .cgm files. The problem is that I can't double click to open .ai files in my newer Illustrator CC, they always try to open in AI10. Yes, I've changed the file type association