cancel
Showing results for 
Search instead for 
Did you mean: 

Work Orders Object not working in 2004 DI?

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Answers (0)