Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Re:Goods Receipt Form

Hi All,

In the Goods Receipt System form i have added a button Called Copy from issue.Then i put a CFL for the button(Which list out all the pending issues - Goods Issues).If i select an entry and clicked choose it is adding the value to the matrix row.After adding the Value then i click ADD it is displaying an error like

"Data Cannot be empty in one of the tables Doc1,Doc3 and Doc10.[Goods Receipt - Document Number] [Message 131-158]"

This is my Code to add issue to the Row:

Private Sub GetPurchaseOrderData(ByVal oGetByKey As String)

Dim oGoodsIssue As SAPbobsCOM.Documents

Dim IntICount As Integer

Dim oItemCode, oItemName, oQty, oUnitPrice, oWhse, oAccountCode, oRG23APartINo, oRG23CPartINo As SAPbouiCOM.EditText

Try

oGoodsIssue = Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInventoryGenExit)

oGoodsIssue.GetByKey(oGetByKey)

For IntICount = 0 To oGoodsIssue.Lines.Count - 1

oGoodsIssue.Lines.SetCurrentLine(IntICount)

oItemCode = oMatrix.Columns.Item("1").Cells.Item(IntICount + 1).Specific

oItemName = oMatrix.Columns.Item("2").Cells.Item(IntICount + 1).Specific

oQty = oMatrix.Columns.Item("9").Cells.Item(IntICount + 1).Specific

oUnitPrice = oMatrix.Columns.Item("10").Cells.Item(IntICount + 1).Specific

oWhse = oMatrix.Columns.Item("15").Cells.Item(IntICount + 1).Specific

oAccountCode = oMatrix.Columns.Item("59").Cells.Item(IntICount + 1).Specific

oRG23APartINo = oMatrix.Columns.Item("140000100").Cells.Item(IntICount + 1).Specific

oRG23CPartINo = oMatrix.Columns.Item("140000096").Cells.Item(IntICount + 1).Specific

Try

oItemCode.Value = oGoodsIssue.Lines.ItemCode

Catch ex As Exception

End Try

Try

oItemName.Value = oGoodsIssue.Lines.ItemDescription

Catch ex As Exception

End Try

Try

oQty.Value = oGoodsIssue.Lines.Quantity

Catch ex As Exception

End Try

Try

oUnitPrice.Value = oGoodsIssue.Lines.Price

Catch ex As Exception

End Try

Try

oWhse.Value = oGoodsIssue.Lines.WarehouseCode

Catch ex As Exception

End Try

Try

oAccountCode.Value = oGoodsIssue.Lines.AccountCode

Catch ex As Exception

End Try

oMatrix.AddRow(1, oMatrix.RowCount)

Next

Catch ex As Exception

Throw ex

End Try

End Sub

I have called the above method inside the cFL event of Copyfrom button.How should i sove this problem.

Awaiting for the results.........:)

Thanx in advance

Mohana

Not what you were looking for? View more on this topic or Ask a question