CL_EHFND_ENA_NODE - custom bopf node
Fill RESBD Structure from EBP Component Structure General Data in Customer MasterThis documentation is copyright by SAP AG.
Functionality
This class encapsulates data and meta data of Business Object Processing Framework (BOPF) node. Itis central part of the Easy Node Access (ENA) framework and gives the possibility to work with BOPF nodes in Object Oriented way.
The class allow read of the node's data with two main approaches:
- iterative approach - methods has_more_rows( ), get_next_row( )
- index access - methods count( ), get_row( lv_index )
The class enables search through and sorting the data with methods find_first_row( field, value) and
set_sort_column( column_name ).
The class allow novigation in the BOPF BO node structure through methods get_root( ), get_parent( ),
get_subnode_by_key( association_key ),, and get_node_by_assoc( association_key ).
Active operation are available with methods insert( row), update( row ) and delete( ).
The class offer message and exception handling with methods add_message( ...) and add_exception( ...).
Relationships
Example
Iterative Read
DATA:
,,lo_node TYPE REF TO cl_ehfnd_ena_node,
,,lr_s_row TYPE REF TO ehhsss_inc_root,
,,lo_node_mngr TYPE REF TO if_ehfnd_ena_node_mngr .
....
lo_node = lo_node_mngr->get_root( ).
WHILE lo_node->has_more_rows( ) = abap_true.
,,lr_s_row ?= lo_node->get_next_row( ).
,,.....,,
ENDWHILE.
Index Read
DATA:
,,lo_node TYPE REF TO cl_ehfnd_ena_node,
,,lr_s_row TYPE REF TO ehhsss_inc_root,
,,lo_node_mngr TYPE REF TO if_ehfnd_ena_node_mngr .
....
lo_node = lo_node_mngr->get_root( ).
IF lo_node->count( ) = 1.
,,lr_s_row ?= lo_node->get_row( 1 ).
,,.....,,
ENDIF.
Notes
The Insert operation require to have reference to the parent node of the current one. That's why always prefer get_subnode_by_key( association_key ) method when navigation because it keeps parent reference.
Further information
More information about BOPF: https://wiki.wdf.sap.corp/wiki/display/BOPF/Home
rdisp/max_wprun_time - Maximum work process run time PERFORM Short Reference
This documentation is copyright by SAP AG.
Length: 2228 Date: 20120526 Time: 115708 triton ( 81 ms )






