Skip to Content

SAP B1 Inventory Transfer (Stock Transfer) - DI API

Hello,

I have an issue in stock transfer. I have pass 5 Quantity to transfer and checked the stock it's affected by 1 qty only

Here Is my code

SAPbobsCOM.StockTransfer transfer; transfer = Startup.CompanyObject.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oStockTransfer); transfer.DocDate = _iCommon.ServerDateTime;

transfer.FromWarehouse = 2;

transfer.ToWarehouse = 100;

transfer.Lines.SetCurrentLine(i); transfer.Lines.ItemCode = 1102

transfer.Lines.FromWarehouseCode = 2;

transfer.Lines.WarehouseCode = 100;

transfer.Lines.BinAllocations.SetCurrentLine(0);

transfer.Lines.BinAllocations.BinActionType = SAPbobsCOM.BinActionTypeEnum.batFromWarehouse; transfer.Lines.BinAllocations.BinAbsEntry = 2;

transfer.Lines.BinAllocations.Quantity = 5;

transfer.Lines.BinAllocations.Add();

transfer.Lines.BinAllocations.SetCurrentLine(1);

transfer.Lines.BinAllocations.BinActionType = SAPbobsCOM.BinActionTypeEnum.batToWarehouse; transfer.Lines.BinAllocations.BinAbsEntry = 100;

transfer.Lines.BinAllocations.Quantity = 5;

transfer.Lines.BinAllocations.Add();

transfer.Lines.Add();

int result = transfer.Add();

Thanks and Regards

Amol Gangawane

Add a comment
10|10000 characters needed characters exceeded

  • Hi Amol,
    Thank you for visiting SAP Community to get answers to your questions. I am here to help you to get the most out of it.
    First of all, I recommend that you familiarize yourself with https://community.sap.com/resources/questions-and-answers (if you haven't done so already), as it provides tips for preparing questions that draw responses from our members.
    Please also make sure you're using all appropriate tags, so the right experts can find your question. Overall, the more details you provide, the more likely it is that members will be able to assist you. Should you wish, you can revise your question by selecting Actions, then Edit (although once someone answers your question, you'll lose the ability to edit the question - but if that happens, you can leave more details in a comment).

    Finally, if you're hoping to connect with readers, please consider adding a picture to your profile. Here's how you do it: https://www.youtube.com/watch?v=F5JdUbyjfMA&list=PLpQebylHrdh5s3gwy-h6RtymfDpoz3vDS. By personalizing your profile with a photo of you, you encourage readers to respond.

    Best,

    Lena (SAP Community Moderator)

Assigned Tags

Related questions

1 Answer

  • Posted on Aug 21 at 08:55 PM

    Hola,

    intenta esto.

    Transferencia SAPbobsCOM.StockTransfer; transfer = Startup.CompanyObject.GetBusinessObject (SAPbobsCOM.BoObjectTypes.oStockTransfer); transfer.DocDate = _iCommon.ServerDateTime;

    transfer.FromWarehouse = 2;

    transfer.ToWarehouse = 100;

    transfer.Lines.SetCurrentLine (i); transfer.Lines.ItemCode = 1102

    transfer.Lines.FromWarehouseCode = 2;

    transfer.Lines.WarehouseCode = 100;

    transfer.Lines.Quantity = 5

    transfer.Lines.BinAllocations.SetCurrentLine (0);

    transfer.Lines.BinAllocations.BinActionType = SAPbobsCOM.BinActionTypeEnum.batFromWarehouse; transfer.Lines.BinAllocations.BinAbsEntry = 2;

    transfer.Lines.BinAllocations.Quantity = 5;

    transfer.Lines.BinAllocations.Add ();

    transfer.Lines.BinAllocations.SetCurrentLine (1);

    transfer.Lines.BinAllocations.BinActionType = SAPbobsCOM.BinActionTypeEnum.batToWarehouse; transfer.Lines.BinAllocations.BinAbsEntry = 100;

    transfer.Lines.BinAllocations.Quantity = 5;

    transfer.Lines.BinAllocations.Add ();

    transfer.Lines.Add ();

    int resultado = transfer.Add ();

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.