Ansicht
Dokumentation

/SAPAPO/SNPCOST1 - Supply Network Planning: Maintain Costs

/SAPAPO/SNPCOST1 - Supply Network Planning: Maintain Costs

Fill RESBD Structure from EBP Component Structure   BAL Application Log Documentation  
This documentation is copyright by SAP AG.
SAP E-Book

Description

Report SAPTREX1 demonstrates how the tree controls are used in the column mode.

The displayed tree has three columns. Columns are described by the dictionary structure TREEV_COL. Each column has a name (field NAME). In this example, the names "Column1", "Column2" and "Column3" were chosen.
Each column has a header (dictionary structure TREEV_HDR). The first header on the left-hand side always appears and has the name (field NAME) "HierarchyHeader" and the title "Hierarchy Header". The left-hand sides of all columns under this header correspond to the hierarchy levels of the nodes in the tree. In addition, the area below the hierarchy header has its own horizontal scrollbar. The hierarchy header appears above "Column1", "Header2" above "Column2", and "Header3" above "Column3".

Nodes of the tree are described by the dictionary structure TREEV_NODE. The NODE_KEY field contains the node key.
Each node of the tree can contain items. Items are described by the dictionary structure TREEV_ITEM, which the user of the tree control must expand to include the TEXT character field (any length!) In this example report, TREEV_ITEM is included in the structure MTREEITM in order to add a field with the name TEXT. The NODE_KEY field determines the node to which an item belongs. The ITEM_NAME field defines in which column the item appears.
Example: The three items of the top root node appear:

NODE_KEY ITEM_NAME TEXT

Root Column1 Root Col. 1
Root Column2 Root Col. 2
Root Column3 Root Col. 3

Selection

You select the items of a node individually. You select the entire node by choosing the file/page icon.
You can configure the system so that by a click the entire node is always selected (set the ITEM_SELECTION parameter of the function module TREEV_CREATE_COLUMN_TREE to initial). In this case, pushbuttons, links and checkboxes that are ready for input are not allowed.

Events

The events that occurred are displayed in the frame on the right-hand side of the screen. The following events could be triggered in the example program:

node_dbl_clk (node double-click)

You double-clicked on a node. In the example, you do this by double-clicking on the file/page icon. If ITEM_SELECTION is set to SPACE, this event is triggered when you double-click on any part of the node.

item_dbl_click (item double-click)

You double-clicked on an item of the tree. This event can only occur if ITEM_SELECTION = 'X'.

item_context_men

If you click the right mouse button on an item, this event is triggered. The parameter of the event is the node key and item name.

node_context_men

If you click the right mouse button on the file/page icon, this event is triggered. The parameter of the event is the node key.

expand_nc (expand no children)

A node can display one +, although children do not exist in the control (set the field expander in the TREEV_NODE). If you click on such a node, in this example the "Child1" node, the event EXPAND_NC is triggered. The example program reacts to this event by copying two new nodes to the control (New1 and New2).

header_click

You clicked on a control header. The name of the header on which you clicked is displayed in the node_key display field.

button_click

You clicked on an item that is a pushbutton.

link_click

You clicked on an item that is a link.

Requirements

Output

Example






CPI1466 during Backup   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.

Length: 3833 Date: 20240426 Time: 060716     sap01-206 ( 81 ms )