Skip to Content
author's profile photo Former Member
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);

sapWO.GetByKey(1);

int i = sapWO.Lines.Count;

sapWO.Lines.SetCurrentLine(0);

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 wyu@coastalrange.ca

Thanks in advance!

Weilin

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    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 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.