cancel
Showing results for 
Search instead for 
Did you mean: 

Issue for Production

Former Member
0 Kudos

Dear all,

I am using Sap Business one 2007 application. I want to create an entry to Issue for Production using diapi. Is any method / class available for this ?.

Please let me know.

Many thanks,

Manikandan.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Dear Manikandan P,

The issue that the BaseRef is empty is a known issue and fixed on B1 2007 A PL 30.

You could refer to SAP Note 1126940 for detailed information.

Best Regards

Jane Jing

SAP Business One Forums team

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi..

Read this one...

When upgrading SAP Business One from release 2004 to 2005, the value of the PlannedQuantity property will be as follows:

If the 'Quantity' field in the work order is positive, the system will create a 'Standard' production order type, and the planned quantity will be similar to the work order quantity.If the 'Quantity' field in the work is negative, the system will create a 'Disassembly' production order type, and the planned quantity will be the same as the WO quantity without the minus sign (i.e. -9 will be 9 and order type= disassembly)

Regards...

Billa 2007

Former Member
0 Kudos

Hi,

U need to use the Documents object to create the issue for productions. Documents(oInventoryGenExit).

Just check the SDK help for more information.

Vasu Natari.

Former Member
0 Kudos

Hi ,

Thanks for your reply. My code is given below.

Set oGDI = oCompany.GetBusinessObject(oInventoryGenExit)

With oGDI

.DocNum = IssueNo

.DocDate = Date

.Reference2 = "Test"

.JournalMemo = "ISSUE FOR PRODUCTION"

.Comments = "iSSUE FOR PRODUCTION"

.Lines.SetCurrentLine (0)

'.Lines.ItemCode = "m1001"

.Lines.Quantity = 1

.Lines.WarehouseCode = "01"

.Lines.BaseType = "202"

.Lines.BaseEntry = "4"

.Lines.Add

iRet = .Add()

end with

when executing the code,I got this error "-5002 - Referenced work order type should be "disassembly" [OIGE.DocStatus][line:1].

Could you please say the solution for this.

Many thanks,

Manikandan.

Edited by: Manikandan P on Oct 21, 2008 12:39 PM

Former Member
0 Kudos

Hi Manikandan,

The best way to debug these types of issues is to add the same document from the UI.. Just try to add the Issue for Production with the same data frm SAP UI itself, and check for the error. Cause from the look of it, i feel its not a coding issue but a functional issue. Just ur not following the standarts. Just post the same doc frm the UI and check u'll understand the error better.

Vasu Natari.

Former Member
0 Kudos

Hi Vasu Natari,

I changed my code as below.

With oGDI

.DocNum = IssueNo

.DocDate = Date

.JournalMemo = "ISSUE FOR PRODUCTION"

.Comments = "iSSUE FOR PRODUCTION"

.Lines.SetCurrentLine (0)

.Lines.BaseLine = 1

.Lines.Quantity = 1

.Lines.WarehouseCode = "01"

.Lines.BaseType = "202"

.Lines.BaseEntry = "4"

.Lines.Add

iRet = .Add()

End With

Now, it adds a issue for production. but, BaseRef field is empty in the table.

Do you know why this ?

Many thanks,

Manikandan.