Skip to Content
author's profile photo Former Member
Former Member

DI : How do I use an existing batch???! Important!

Hi,

I know i already posted this topic but im posting it again. And i'll post it again afterwards until someone arrives on this forum that knows the answer.

When adding a GoodIssue to SAP through the SAP DI,

I need to be able tu use an existing batchnumber so that the client knows where the product came from.

<b>Delphi Code:</b> (even if you dont program delphi you still get the idea)

<i>oGoodIssue.Lines.AccountCode := '_0000000000012';

oGoodIssue.Lines.ItemCode := 'A00001';

oGoodIssue.Lines.Quantity := 10;

oGoodIssue.Lines.Price := 5.5;

oGoodIssue.Lines.BatchNumbers.BatchNumber := 'Btch#4';

oGoodIssue.Lines.BatchNumbers.Quantity := 5;

intRetVal := oGoodIssue.Add;

if intRetVal <> 0 then

begin

oCompany.GetLastError(intErr, StrErr);

strErrMsg := strErr;

booErreur := True;

end;</i>

So if im adding a GoodIssue and "Btch#4" doesnt exist,

SDK will create it, no prob.

But what i need is that Btch#4 DOES exist and I need GoodIssue to ascociate this GoodIssue with it.

So that i know that with "Batch#4" there was <b>25 that came IN</b>

and <b>10 that went OUT</b>

But when i specify a Batch number that exist there is a key violation... cause he try to create the batch insted of using it.

Add comment
10|10000 characters needed characters exceeded

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Mar 24, 2004 at 12:12 PM

    Hi Denis

    We had lots of batch problems programming an AddOn for SBO 6.20.36. In SDK DI 6.20.36 there is no batch object at all. So we had to work directli onto the database tables.

    We found three tables concerning batches:

    OSRD: Keeps all good receipts/deliveries for goods requiering batch management as long as they are just moved into/out of your warehouse, but haven't still got their batch number.

    OIBT: Master table for all batches; keeps batch balance too.

    IBT1: Table of batch transactions.

    Perhaps you could solve your problem by changing that tables in the following way:

    > Add a new line to IBT1

    > Correct the balance in OIBT

    > Correct balance and status in OSRD

    I fear that SAP doesn't like that way of changing their tables - but if SAP doesn't help us, we just have to help ourselves...

    Add comment
    10|10000 characters needed characters exceeded