cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Object for Inventory Transfer Request for DI API

saintneo007
Explorer
0 Kudos

I want to apologize in advance If this post is already answered. Since I didn't find any related to this.
I can't find SAP object for the DI API of Inventory Transfer Request even from the SAP documentation. Im have this error DI error "Error: (-10) Internal error (-10) occurred" . Any recommendation or workaround for this? Thank you so much

Accepted Solutions (0)

Answers (2)

Answers (2)

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert

Hi saintneo007,

Here is the complete code:

SAPbobsCOM.StockTransfer oST = (SAPbobsCOM.StockTransfer)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInventoryTransferRequest);
oST.Comments = "Created via DI";
oST.Lines.FromWarehouseCode = "01";
oST.Lines.WarehouseCode = "02";
oST.Lines.ItemCode = "A00001";
int AST = oST.Add();

Hope it helps!

Kind regards,

ANKIT CHAUHAN

SAP Business One Support

saintneo007
Explorer
0 Kudos

Hi ANKIT,
Thank you for this, I have a similar code and it works when I remove "oITR.Lines.UoMEntry". But, without this the default UOM is "pcs" the lowest UOM, I need to include the required UOM for a particular transaction. Is there any workaround that you can suggest or am I doing it in wrong way? Thank you so much.

saintneo007
Explorer
0 Kudos

@ankit.chauhan1

My code is something like this and still has the same error.

Dim oITR As SAPbobsCOM.StockTransfer            
oITR = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInventoryTransferRequest)

oITR.CardCode = "V000001"
oITR.FromWarehouse = "600"
oITR.ToWarehouse = "100"
oITR.DocDate = DateTime.Now.ToString("MM/dd/yyyy")
oITR.DueDate = DateTime.Now.ToString("MM/dd/yyyy")
oITR.TaxDate = DateTime.Now.ToString("MM/dd/yyyy")
oITR.Comments = "System Generated"

oITR.Lines.ItemCode = "111222333"
oITR.Lines.UoMEntry = "13"
oITR.Lines.UnitsOfMeasurment = 1
oITR.Lines.Quantity = 3
oITR.Lines.Price = "124.083333"
oITR.Lines.FromWarehouseCode = "600"
oITR.Lines.WarehouseCode = "100"
oITR.Add()
ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi saintneo007,

Do you have an option to change UoM manually using SAP Business One client?

If no, the same cannot be done via DI API also.

Kind regards,

ANKIT CHAUHAN

SAP Business One Support

saintneo007
Explorer
0 Kudos

Hi @ankit.chauhan1
Yes, the users use a barcode in the manual transaction, apparently, this module doesn't have codebars in the document members DI API? Is there any other to do it using codebars?
Thank you so much.

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi saintneo007,

Even if it is Barcode, do you have an option to change UoM manually using SAP Business One client?

If no, the same cannot be done via DI API also.

Kind regards,

ANKIT CHAUHAN

SAP Business One Support

saintneo007
Explorer
0 Kudos

Hi @ankit.chauhan1,

Direct changing of UoM I think it's not possible, but it will change depending on the Barcode of the item going to be input manually.
Example on this item, if I use the itemcode and the default UoM will always be PCS in DI API, how will I make it to another UoM if the uomcode is read-only in Inventory Transfer Request. I'm working with the uomentry so I have the error "Error: (-10) Internal error (-10) occurred". Is there any other solution or workaround that you can suggest?

Thank you so much.

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert

Hi saintneo007,

Check Object Type: 1250000001.

Hope it helps!

Kind regards,

ANKIT CHAUHAN

SAP Business One Support