cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in issue for production in SBO 9.1

fcpeomaior
Participant
0 Kudos
143

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

View Entire Topic
Former Member
0 Kudos

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..

Former Member
0 Kudos

if u use any customization form have done any changes...

Former Member
0 Kudos

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...





fcpeomaior
Participant
0 Kudos

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

atessier
Explorer
0 Kudos

Hi Manuel

I'm wondering if you 've finally managed to find a solution to this problem ?

I'm intrested because i'm facing exactly the same problem.

SAP 9.1 pl03

same error on production issue when issuing ressource

Best regards,

Antoine

fcpeomaior
Participant
0 Kudos

Hi All,

I've reported this problem to SAP and they confirmed it was a but in version 9.1 PL03 .. maybe.

Anyway, this problem was corrected in PL04 or PL05 versions.

Regards,

mdias