on 04-21-2005 8:28 AM
Hello,
I use RFC_READ_TABLE in VB.Net.
After read, I bind table512 to DATAGRID
but every selected fields are merged into one
datagrid column. How can I split each selected fields
in table512 to each datagrid column?
Thank you in advance for your help.
Teerakorn
This is my VB.Net code :
Private Sub RfcReadMatDoc()
Dim oTableOption As New RFC_DB_OPTTable
Dim oOption As New RFC_DB_OPT
Dim oTable As New RFC_DB_FLDTable
Dim oField_0 As New RFC_DB_FLD
Dim oField_1 As New RFC_DB_FLD
Dim oField_2 As New RFC_DB_FLD
Dim oField_3 As New RFC_DB_FLD
Dim oTable512 As New TAB512Table
'
oField_0.Fieldname = "MBLNR"
oTable.Add(oField_0)
oField_1.Fieldname = "MJAHR"
oTable.Add(oField_1)
oField_2.Fieldname = "MATNR"
oTable.Add(oField_2)
oField_3.Fieldname = "DMBTR"
oTable.Add(oField_3)
'
oOption.Text = "MJAHR = '" & txtDocYear.Text & "' AND MBLNR = '" & txtDocNo.Text & "'"
oTableOption.Add(oOption)
'
Try
SapProxy21.Rfc_Read_Table("~", "", "MSEG", 0, 0, oTable512, oTable, oTableOption)
Catch ex As SAP.Connector.BapiException
MsgBox(ex.Message.ToString)
End Try
Try
DataGrid1.DataSource = oTable512
Catch ex As Exception
MsgBox(ex.Message.ToString)
End Try
End Sub
Thank you for your answer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
The function module RFC_READ_TABLE is not released for customer and therefore will not be supported by SAP. Generally, we discourage the use of such unsupported function modules.
To your question, you need to parse the contents of the table "DATA" according to the column descriptions returned by table "FIELDS" and split this one-column SAPTable to a ADO.NET DataTable.
Regards,
Guangwei
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.