Skip to Content
0

HOW TO DO INVENTORY TRANSFER IN DIAPI FOR MULTIPLE LINE ITEMS?

Feb 14 at 08:52 AM

19

avatar image
Former Member

Dear Expert,

This is my code

  1. Dim oDoc As SAPbobsCOM.StockTransfer = oCompany.GetBusinessObject(BoObjectTypes.oStockTransfer)
  2. oDoc.DocDate = Date.Today()
  3. oDoc.FromWarehouse = "01"
  4. oDoc.Lines.ItemCode = "A0001"
  5. oDoc.Lines.WarehouseCode = "02"
  6. oDoc.Lines.Quantity = 10
  7. If oDoc.Add = 0 Then
  8. sbo_application.MessageBox("Stock transfer Issued")
  9. Else
  10. sbo_application.MessageBox(oCompany.GetLastErrorDescription)
  11. End If

Here i did Stock transfer for single item.I need to make it for multiple line items in grid.How can i did it in For loop? please share it soon

Thanks

Manikandan.D

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

ANKIT CHAUHAN
Feb 14 at 09:33 AM
0

Hi Manikandan. D,

Use the following line in order to add another line item:

oDoc.Lines.Add()

You need to use above mentioned line after the following line:

oDoc.Lines.Quantity = 10

Hope it helps!

Kind regards,

ANKIT CHAUHAN

SAP SME Support

Show 3 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Dear Ankit,

Thank you for your Reply.I will try it and update you.

0
Former Member

Dear Ankit,

Thanks you.Its working fine

0

Hi Manikandan. D,

In that case I would ask you to please close this thread by clicking/selecting the correct answer.

Kind regards,

ANKIT CHAUHAN

SAP SME Support

0