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.