Skip to Content
author's profile photo
Former Member

Work Orders Object not working in 2004 DI?

Hi All,

Can anyone help me? I am trying to use DI to get a work order object, here is my code:

SAPbobsCOM.WorkOrders sapWO = (SAPbobsCOM.WorkOrders)MyCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oWorkOrders);


int i = sapWO.Lines.Count;


string test = sapWO.Lines.ItemCode;

I have this work order created under production order in SAP B1, it has two detail lines. Using the code above, DI does return an object to me, however, it only returns one line(i returns 1), and when I try to get the detail info for this line, everything is empty, looks like SAP is returning an empty object to me...

Does anyone know something about this or have had similar experience? Please help me out...

My email is

Thanks in advance!


Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    author's profile photo
    Former Member
    Posted on Dec 13, 2004 at 11:37 PM

    Hi Weilin,

    Someone correct me if I am wrong, but I don't think Production Orders in 2004 are the same as Work Orders in 6.5. The Production Orders object has not been exposed in the DI SDK, and the Work Orders object is exposed for backward compatibility only - that is, for databases upgraded from 6.5 that contain Work Orders. This might be why you are having problems getting to your Production Order through the Work Order DI object.

    I have not been able to find any information about when this will be changed - whether a service pack will be released for this problem. If anyone has any more information it would be great 😊

    -- Melinda

    Add comment
    10|10000 characters needed characters exceeded