2024 Feb 03 5:35 AM - edited 2024 Feb 03 5:40 AM
Hi
I have below code but record not getting added.
Getting error - 1470000838 - Invalid "SerialAndBatchNumbersBaseLine"; specify a valid "SerialAndBatchNumbersBaseLine"
oTfr = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oStockTransfer);
//oGrpo.GetByKey(Convert.ToInt32(DocEntry));
//oPOrder.GetByKey(sOrder)
oTfr.FromWarehouse = "PM";
oTfr.ToWarehouse = "PM1H";
oTfr.DocDate = DateTime.Now;
oTfr.DocObjectCode = SAPbobsCOM.BoObjectTypes.oStockTransfer;
oTfr.Lines.ItemCode = "RM10000020US";
oTfr.Lines.Quantity = 5;
oTfr.Lines.WarehouseCode = "PM1H";
oTfr.Lines.BinAllocations.SetCurrentLine(0);
oTfr.Lines.BinAllocations.BinActionType = SAPbobsCOM.BinActionTypeEnum.batFromWarehouse; oTfr.Lines.BinAllocations.BinAbsEntry = 2;
oTfr.Lines.BinAllocations.Quantity = 5;
oTfr.Lines.BinAllocations.Add();
oTfr.Lines.BinAllocations.SetCurrentLine(1);
oTfr.Lines.BinAllocations.BinActionType = SAPbobsCOM.BinActionTypeEnum.batToWarehouse; oTfr.Lines.BinAllocations.BinAbsEntry = 100;
oTfr.Lines.BinAllocations.Quantity = 5;
oTfr.Lines.BinAllocations.Add();
oTfr.Lines.Add();
Thanks
Request clarification before answering.
Hi,
Check SAP Note 1937920 - How to import serial/batch with Binlocation using DTW. The same records the reported message which you are getting.
Kindly check and see if that helps.
Kr,
Jitin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
A basic premise in B1 is that the first line is already there. I know it is a little counter intuitive, but adding a line actualy creates a new one, that the system then expects you to fill in.
Please drop the last line: oTfr.Lines.BinAllocations.Add();
Regards,
Johan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
30 | |
10 | |
8 | |
8 | |
7 | |
7 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.