Entering content frame

Procedure documentation Inserting a Single Record Node Locate the document in its SAP Library structure

Use

You can use the single record node (This graphic is explained in the accompanying text) to extract single data records from internal tables.

You can extract a single row (record) of a table in two ways:

...

       1.      You enter the row number.

       2.      You specify a search key.
When you specify a search key, the table row is read by the ABAP statement
READ TABLE itab WITH KEY k1 = f1 ... kn = fn result. In this case, the return code SY-SUBRC is inserted in the system field SFPSY-SUBRC.  For more information about this statement, see Structure linkReading Rows of Tables.

Procedure

...

       1.      Select an existing node in the context, under which you want to create a single record node.

       2.      In the context menu of the node, choose Create ® Single Record.

       3.      In the Create Single Record dialog box, enter a table name.

Note

Use the F4 help to display a list of all tables used in the interface.

       4.      Choose Continue.

       5.      The system creates a single record node under the selected node. The node is fully expanded so that you can see the individual fields of the table. In the window under the context, the system displays the properties of this node.

¡        Under Status, you can set the single record node as active or inactive.

Note

You can set individual data nodes in the table as Active or Inactive in the context menu. Only active nodes are sent to the layout in the Form Builder.

¡        Under Row, enter the row number of the internal table that you want to extract.

¡        Select the Binary Search option only if you want to use a search key to display the table row, and you want to perform a Structure linkbinary search.

       6.      You can also use a search key to extract rows from the internal table. Enter this key under With-Key Conditions. Note that you cannot enter any information under Row.

       7.      Under Conditions, enter the prerequisites that need to be met before the table row is processed at runtime and displayed in the form.

Note

You can also specify conditions for individual data nodes in the table. To do this, select a data node. The properties and conditions that are displayed refer to the data node.

 

Result

You have created a complete single record node. When you expand the node, you can see the individual fields of the table. These have been generated and cannot be deleted, which means they are flagged with the This graphic is explained in the accompanying text icon.

In the layout in the Form Builder, you can insert the single record node in the form. At runtime, the data is selected according to your settings.

 

Leaving content frame