on 2014 Nov 25 11:41 AM
Hi all,
I've an addon that adds issue for production transactions, that works perfect in SBO 8 and 9.
However, I was trying to add a issue for production with a Resource line in my Production Order, to test with the new SBO 9.1 resources functionality, but I'm getting always this error:
This entry already exists in the following tables (ODBC -2035)
The AddOn code to add a issue for production is very simple, and always worked fine:
...
SAPbobsCOM.Documents pDoc = (SAPbobsCOM.Documents)pConn.Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInventoryGenExit);
// Fill ProdOrder number & qty
pDoc.DocDate = DateTime.Now;
pDoc.DocDueDate = DateTime.Now;
pDoc.Comments = "Manual GI for Prod";
pDoc.DocType = SAPbobsCOM.BoDocumentTypes.dDocument_Items;
pDoc.Lines.SetCurrentLine(0);
pDoc.Lines.BaseType = 202;
pDoc.Lines.BaseEntry = iProdOrder;
pDoc.Lines.BaseLine = iLineNum;
pDoc.Lines.Quantity = dQty;
int lRetCode = pDoc.Add();
...
However, it does not work with resources consumption in SBO 9.1. If I add a issue to production manually in SBO, it works fine.
Do I have to set any additional field?
Is there any other way to do it?
Thanks all!
mdias
hi
i need a small information
in what case it is giving
i mean if u press any customization addon while adding the button
or any particular action..
have u put the break point..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i think
pDoc.DocDate = DateTime.Now;
pDoc.DocDueDate = DateTime.Now;
pDoc.Comments = "Manual GI for Prod";
pDoc.DocType = SAPbobsCOM.BoDocumentTypes.dDocument_Items;
pDoc.Lines.SetCurrentLine(0);
pDoc.Lines.BaseType = 202;
pDoc.Lines.BaseEntry = iProdOrder;
pDoc.Lines.BaseLine = iLineNum;
pDoc.Lines.Quantity = dQty;
int lRetCode = pDoc.Add();
pDoc.Lines.BaseLine = iLineNum;
i think above line is giving the error...
Can u plz check it..
iLineNum; means what it is taking can u plz check it...
i mean 0 or 1 like this...
Hello Rachumallu,
The addon in in fact an external application that allows the execution of shop floor operations.
Anyway, the application only uses a DI-API connection and it works fine as long as I do not try to confirm any "Resource" line types in my Production Order.
As I have mentioned, the AddOn currently works correctly in SBO 8.8, SBO 9.
In SBO 9.1, it works fine during "Item" line types GR of my Production Order, but fails when adding "Resource" line types GR for the same Production Order.
I believe I need to set any additional flag or field in oInventoryGenExit document, but don't know what...
With regard to iLineNum, I believe its correct because currently it already works fine for "Item" line types...
Thanks,
mdias
User | Count |
---|---|
109 | |
8 | |
8 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.