cancel
Showing results for 
Search instead for 
Did you mean: 

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

former_member440545
Participant
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

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

former_member440545
Participant
0 Kudos

Dear Ankit,

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

former_member440545
Participant
0 Kudos

Dear Ankit,

Thanks you.Its working fine

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

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