Skip to Content
avatar image
Former Member

How can I add service line item for ARInvoice to SAP B1 using SAPBusinessOneSDK?


I'm working on data exportation from our product to SAP Buisness One using SAPBuisnessOneSDK.dll.

I try to export ARInvoice, APInvoice, SalesOrder and PurchaseOrder.

I can fill header fields and ItemLines for these types of documents but I still don't know how to add service items for service table.

Hope you can give me some advice how to insert service lines to service table or probably you can provide some examples of adding new lines to this table.

Waiting for the answer.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    Feb 20, 2017 at 04:06 PM

    Hi Alex,

    If a document will be compose by service or item is a property on Documents object called DocType. After you set up your document for service type, you only need add your services. Below a sample with basically the minimum properties that you need fill.

                    Documents oDoc = oCompany.GetBusinessObject(BoObjectTypes.oInvoices);
                    oDoc.CardCode = "C00000001";
                    oDoc.DocDueDate = DateTime.Now;
                    oDoc.DocType = BoDocumentTypes.dDocument_Service;
                    oDoc.Lines.ItemDescription = "Test";
                    oDoc.Lines.AccountCode = "";
                    oDoc.Lines.LineTotal = 100.00;
                    if (oDoc.Add() != 0)

    Hope it helps.

    Kind Regards,

    Diego Lother

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 22, 2017 at 08:54 AM

    Thank you. This worked for me.

    I must admit that I had to fill TaxCode property like this:

    oDoc.Lines.TaxCode = "NY";

    Is it possible for the document to have both service and item tables?

    Add comment
    10|10000 characters needed characters exceeded