SAP Function Modules

BARC_LOGIC SAP Function module - Logic administration







BARC_LOGIC is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name BARC_LOGIC into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: BARC
Released Date: 16.04.1997
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM BARC_LOGIC - BARC LOGIC





CALL FUNCTION 'BARC_LOGIC' "Logic administration
* EXPORTING
*   graph_cmd = SPACE           " net_graph-gr_mes  User command
* TABLES
*   all_boxes =                 " bcboxes       Box object tables
*   all_box_vals =              " bcvals        Object tables of box attributes
*   all_links =                 " bclinks       Link object tables
*   all_link_vals =             " bcnvals       Object tables of link attributes
*   all_nodes =                 " bcnodes       Node object tables
*   all_node_vals =             " bcnvals       Object table of node attributes
*   all_positions =             " bcposition    Object table of the objects to be positioned
*   boxes =                     " bcboxes       Box transfer table
*   box_vals =                  " bcvals        Transfer table of box attributes
*   deletions =                 " bcdelete      Transfer table of the objects to be deleted
*   links =                     " bclinks       Link transfer table
*   link_vals =                 " bcnvals       Transfer table of link attributes
*   nodes =                     " bcnodes       Node transfer table
*   node_vals =                 " bcnvals       Transfer table of node attributes
*   positions =                 " bcposition    Transfer table of objects to be positioned
    .  "  BARC_LOGIC

ABAP code example for Function Module BARC_LOGIC





The ABAP code below is a full code listing to execute function module BARC_LOGIC including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).

DATA:
it_all_boxes  TYPE STANDARD TABLE OF BCBOXES,"TABLES PARAM
wa_all_boxes  LIKE LINE OF it_all_boxes ,
it_all_box_vals  TYPE STANDARD TABLE OF BCVALS,"TABLES PARAM
wa_all_box_vals  LIKE LINE OF it_all_box_vals ,
it_all_links  TYPE STANDARD TABLE OF BCLINKS,"TABLES PARAM
wa_all_links  LIKE LINE OF it_all_links ,
it_all_link_vals  TYPE STANDARD TABLE OF BCNVALS,"TABLES PARAM
wa_all_link_vals  LIKE LINE OF it_all_link_vals ,
it_all_nodes  TYPE STANDARD TABLE OF BCNODES,"TABLES PARAM
wa_all_nodes  LIKE LINE OF it_all_nodes ,
it_all_node_vals  TYPE STANDARD TABLE OF BCNVALS,"TABLES PARAM
wa_all_node_vals  LIKE LINE OF it_all_node_vals ,
it_all_positions  TYPE STANDARD TABLE OF BCPOSITION,"TABLES PARAM
wa_all_positions  LIKE LINE OF it_all_positions ,
it_boxes  TYPE STANDARD TABLE OF BCBOXES,"TABLES PARAM
wa_boxes  LIKE LINE OF it_boxes ,
it_box_vals  TYPE STANDARD TABLE OF BCVALS,"TABLES PARAM
wa_box_vals  LIKE LINE OF it_box_vals ,
it_deletions  TYPE STANDARD TABLE OF BCDELETE,"TABLES PARAM
wa_deletions  LIKE LINE OF it_deletions ,
it_links  TYPE STANDARD TABLE OF BCLINKS,"TABLES PARAM
wa_links  LIKE LINE OF it_links ,
it_link_vals  TYPE STANDARD TABLE OF BCNVALS,"TABLES PARAM
wa_link_vals  LIKE LINE OF it_link_vals ,
it_nodes  TYPE STANDARD TABLE OF BCNODES,"TABLES PARAM
wa_nodes  LIKE LINE OF it_nodes ,
it_node_vals  TYPE STANDARD TABLE OF BCNVALS,"TABLES PARAM
wa_node_vals  LIKE LINE OF it_node_vals ,
it_positions  TYPE STANDARD TABLE OF BCPOSITION,"TABLES PARAM
wa_positions  LIKE LINE OF it_positions .


DATA(ld_graph_cmd) = some text here

"populate fields of struture and append to itab
append wa_all_boxes to it_all_boxes.

"populate fields of struture and append to itab
append wa_all_box_vals to it_all_box_vals.

"populate fields of struture and append to itab
append wa_all_links to it_all_links.

"populate fields of struture and append to itab
append wa_all_link_vals to it_all_link_vals.

"populate fields of struture and append to itab
append wa_all_nodes to it_all_nodes.

"populate fields of struture and append to itab
append wa_all_node_vals to it_all_node_vals.

"populate fields of struture and append to itab
append wa_all_positions to it_all_positions.

"populate fields of struture and append to itab
append wa_boxes to it_boxes.

"populate fields of struture and append to itab
append wa_box_vals to it_box_vals.

"populate fields of struture and append to itab
append wa_deletions to it_deletions.

"populate fields of struture and append to itab
append wa_links to it_links.

"populate fields of struture and append to itab
append wa_link_vals to it_link_vals.

"populate fields of struture and append to itab
append wa_nodes to it_nodes.

"populate fields of struture and append to itab
append wa_node_vals to it_node_vals.

"populate fields of struture and append to itab
append wa_positions to it_positions. . CALL FUNCTION 'BARC_LOGIC' * EXPORTING * graph_cmd = ld_graph_cmd * TABLES * all_boxes = it_all_boxes * all_box_vals = it_all_box_vals * all_links = it_all_links * all_link_vals = it_all_link_vals * all_nodes = it_all_nodes * all_node_vals = it_all_node_vals * all_positions = it_all_positions * boxes = it_boxes * box_vals = it_box_vals * deletions = it_deletions * links = it_links * link_vals = it_link_vals * nodes = it_nodes * node_vals = it_node_vals * positions = it_positions . " BARC_LOGIC
IF SY-SUBRC EQ 0. "All OK ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_graph_cmd  TYPE NET_GRAPH-GR_MES ,
it_all_boxes  TYPE STANDARD TABLE OF BCBOXES ,
wa_all_boxes  LIKE LINE OF it_all_boxes,
it_all_box_vals  TYPE STANDARD TABLE OF BCVALS ,
wa_all_box_vals  LIKE LINE OF it_all_box_vals,
it_all_links  TYPE STANDARD TABLE OF BCLINKS ,
wa_all_links  LIKE LINE OF it_all_links,
it_all_link_vals  TYPE STANDARD TABLE OF BCNVALS ,
wa_all_link_vals  LIKE LINE OF it_all_link_vals,
it_all_nodes  TYPE STANDARD TABLE OF BCNODES ,
wa_all_nodes  LIKE LINE OF it_all_nodes,
it_all_node_vals  TYPE STANDARD TABLE OF BCNVALS ,
wa_all_node_vals  LIKE LINE OF it_all_node_vals,
it_all_positions  TYPE STANDARD TABLE OF BCPOSITION ,
wa_all_positions  LIKE LINE OF it_all_positions,
it_boxes  TYPE STANDARD TABLE OF BCBOXES ,
wa_boxes  LIKE LINE OF it_boxes,
it_box_vals  TYPE STANDARD TABLE OF BCVALS ,
wa_box_vals  LIKE LINE OF it_box_vals,
it_deletions  TYPE STANDARD TABLE OF BCDELETE ,
wa_deletions  LIKE LINE OF it_deletions,
it_links  TYPE STANDARD TABLE OF BCLINKS ,
wa_links  LIKE LINE OF it_links,
it_link_vals  TYPE STANDARD TABLE OF BCNVALS ,
wa_link_vals  LIKE LINE OF it_link_vals,
it_nodes  TYPE STANDARD TABLE OF BCNODES ,
wa_nodes  LIKE LINE OF it_nodes,
it_node_vals  TYPE STANDARD TABLE OF BCNVALS ,
wa_node_vals  LIKE LINE OF it_node_vals,
it_positions  TYPE STANDARD TABLE OF BCPOSITION ,
wa_positions  LIKE LINE OF it_positions.


ld_graph_cmd = some text here

"populate fields of struture and append to itab
append wa_all_boxes to it_all_boxes.

"populate fields of struture and append to itab
append wa_all_box_vals to it_all_box_vals.

"populate fields of struture and append to itab
append wa_all_links to it_all_links.

"populate fields of struture and append to itab
append wa_all_link_vals to it_all_link_vals.

"populate fields of struture and append to itab
append wa_all_nodes to it_all_nodes.

"populate fields of struture and append to itab
append wa_all_node_vals to it_all_node_vals.

"populate fields of struture and append to itab
append wa_all_positions to it_all_positions.

"populate fields of struture and append to itab
append wa_boxes to it_boxes.

"populate fields of struture and append to itab
append wa_box_vals to it_box_vals.

"populate fields of struture and append to itab
append wa_deletions to it_deletions.

"populate fields of struture and append to itab
append wa_links to it_links.

"populate fields of struture and append to itab
append wa_link_vals to it_link_vals.

"populate fields of struture and append to itab
append wa_nodes to it_nodes.

"populate fields of struture and append to itab
append wa_node_vals to it_node_vals.

"populate fields of struture and append to itab
append wa_positions to it_positions.

SAP Documentation for FM BARC_LOGIC


Confirm mode:
============== ...See here for full SAP fm documentation

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name BARC_LOGIC or its description.