on 10-21-2008 7:38 AM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
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.
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.