cancel
Showing results for 
Search instead for 
Did you mean: 

Display RFC export table structure field using a label control

aaron_thomas
Participant
0 Kudos

How do I display only one field of data from a SAP table structure, using a .net label control in a ASP.NET web page?

Message was edited by: Aaron Thomas

Accepted Solutions (0)

Answers (1)

Answers (1)

reiner_hille-doering
Active Contributor
0 Kudos

Code:

this.Label.Text = mySAPTable[0].Field;

Databinding:

If the proxy or table is on your WebForm designer, you can databind the label's Text attribute accordingly.

aaron_thomas
Participant
0 Kudos

I do have SAP Proxy on my web form. I take the following steps:

1. Add label control

2. Goto the Databindings property in the Properties panel

3. Click to bring up the Databindings dialog

4. Select the "Text" property.

5. Under "Simple Binding" expand the SAP table return by the BAPI and select the column from the table that I want to display in the label control (this is a table structure that always returns only 1 row).

The BAPI also returns a second table which I have bound to a datagrid. When I execute the web app the datagrid properly binds and displays records from the second table but the label control does not display anything.

reiner_hille-doering
Active Contributor
0 Kudos

Are you sure that you call Page.DataBind() (or this.DataBind() or label1.DataBind())? If yes, you may also post the binding expression (from the HTML view).