Skip to Content
author's profile photo Former Member
Former Member


Hi All,

I am not sure, whether this is right thread or I should post this message in ABAP thread.

I am trying to create incoming invoice using BAPI_INCOMINGINVOICE_CREATE, below is my code. But I am getting Error with ID F5 and with Number 104 as "Vendor is not defined in company code 0100". I am a .Net Developer, I am not getting how do I pass Vendor code to this BAPI.

Can anybody please help me to get rid of this error?

Dim conn As String = ConfigurationSettings.AppSettings("SAPConnectionString")

BbpIncomingInvoice1.ConnectionString = conn

Dim vHeaderData As New sapnet.BAPI_INCINV_CREATE_HEADER

Dim vItemTable As New sapnet.BAPI_INCINV_CREATE_ITEMTable


Dim vAccountingData As New sapnet.BAPI_INCINV_CREATE_ACCOUNTTable

Dim vGLAccountData As New sapnet.BAPI_INCINV_CREATE_GL_ACCOUNTTable

Dim vMaterialData As New sapnet.BAPI_INCINV_CREATE_MATERIALTable

Dim vTaxData As New sapnet.BAPI_INCINV_CREATE_TAXTable

Dim vWithTaxData As New sapnet.BAPI_INCINV_CREATE_WITHTAXTable

Dim vVendorItemSplitData As New sapnet.BAPI_INCINV_CREATE_VENDORSPLITTable

Dim vBapiReturn As New SAP.Connector.BAPIRET2Table

vHeaderData.Invoice_Ind = "X"

vHeaderData.Doc_Date = "20050813"

vHeaderData.Pstng_Date = "20050813"

vHeaderData.Comp_Code = "0100"

vHeaderData.Gross_Amount = "100"

vHeaderData.Currency = "INR"

vHeaderData.Calc_Tax_Ind = "X"

Dim ItemDataTable As New DataTable

ItemDataTable = vItemTable.ToADODataTable.Clone

Dim drDataRow As DataRow

drDataRow = ItemDataTable.NewRow()

drDataRow("INVOICE_DOC_ITEM") = "000010"

drDataRow("PO_NUMBER") = "3520000227"

drDataRow("PO_ITEM") = "00010"

drDataRow("TAX_CODE") = ""

drDataRow("ITEM_AMOUNT") = "100"

drDataRow("QUANTITY") = "2"

drDataRow("PO_UNIT") = ""


For i As Integer = 0 To ItemDataTable.Rows.Count - 1



BbpIncomingInvoice1.CreateFromData(vHeaderData, vAddressData, vItemTable, vAccountingData, vGLAccountData, _

vMaterialData, vTaxData, vWithTaxData, vVendorItemSplitData, vBapiReturn, "", "")

DataGrid1.DataSource = vBapiReturn.ToADODataTable


Thanks in advance,


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Aug 13, 2005 at 09:26 AM

    Solved like this.

    vItem.Invoice_Doc_Item = "000010"

    vItem.Po_Number = "3520000227"

    vItem.Po_Item = "00010"

    vItem.Tax_Code = ""

    vItem.Item_Amount = 100

    vItem.Quantity = 2

    vItem.Po_Unit = ""


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.