cancel
Showing results for 
Search instead for 
Did you mean: 

Issue (Batch) for Production Error

barend_morkel2
Active Contributor
0 Kudos

Hi All,

I'm on SBO 2005 PL01 SP22.

When I try to issue to production order (batch item), I get the followinf error:

<i>Referenced work order type should be "disassembly" [OIGE.DocStatus][line: 1]</i>

Here is my Code:


IssueToProd = oAppObj.oDICompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInventoryGenExit)

            IssueToProd.DocDate = Now
            IssueToProd.DocDueDate = Now
            IssueToProd.Comments = "Hello " & edDisp.Text
            IssueToProd.DocType = SAPbobsCOM.BoDocumentTypes.dDocument_Items
            
            IssueToProd.Lines.BaseType = "0"
            IssueToProd.Lines.BaseEntry = edDisp.Text
            IssueToProd.Lines.Quantity = 1
            IssueToProd.Lines.WarehouseCode = "01"
           
            IssueToProd.Lines.BatchNumbers.BatchNumber = "a5"
            IssueToProd.Lines.BatchNumbers.Quantity = 1
            IssueToProd.Lines.BaseType = ""
            'IssueToProd.Lines.BatchNumbers.Add()

            LRes = IssueToProd.Add()

            If Not LRes = 0 Then
                oAppObj.oDICompany.GetLastError(LRes, sErrMsg)
                oAppObj.SBO_App.MessageBox("Error : " & sErrMsg)
            Else
                '
            End If

View Entire Topic
former_member192187
Participant
0 Kudos

When Issue For Production run, You use in number of Production Orders.

You have to set Status menu in Production Order form on "Released".

hope this help

ks

barend_morkel2
Active Contributor
0 Kudos

Yes, the Production Order is set as released.

Everything is fine when I do it using the GUI of SBO, I'm having this problem when replicating it in the DI.

What boggles me is that when I do the release from Production, it works fine (even with the batch numbers). So I'm trying the issue for Production, but having this problem...

former_member192187
Participant
0 Kudos

Is value of line;

IssueToProd.Lines.BaseEntry = <u>edDisp.Text</u>

is consistent with value in Production Orders?

ks

barend_morkel2
Active Contributor
0 Kudos

Yes, it is.

All the values are consistent with the Production Order in question.

former_member192187
Participant
0 Kudos

Try set value in oGoodsIssue.Lines.BaseLine

ks

former_member192187
Participant
0 Kudos

In You case: IssueToProd.Lines.BaseLine

ks

barend_morkel2
Active Contributor
0 Kudos

Thanks Krzysztof!

Enjoy your weekend!