SAP BKK_ACCOUNT_HIERARCHY_UPDATE Function Module for Update Module for Account Hierarchy Maintenance
BKK_ACCOUNT_HIERARCHY_UPDATE is a standard bkk account hierarchy update SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Update Module for Account Hierarchy Maintenance processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for bkk account hierarchy update FM, simply by entering the name BKK_ACCOUNT_HIERARCHY_UPDATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: FBH0
Program Name: SAPLFBH0
Main Program: SAPLFBH0
Appliation area: F
Release date: 13-May-1997
Mode(Normal, Remote etc): Normal Function Module
Update: 1

Function BKK_ACCOUNT_HIERARCHY_UPDATE pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'BKK_ACCOUNT_HIERARCHY_UPDATE'"Update Module for Account Hierarchy Maintenance.
EXPORTING
I_MODE = "I=Insert; U=Update
TABLES
T_BKK610 = "New/Current Entry for Root Account
T_BKK615 = "
T_BKK600 = "New/Current Relationships for this Root Account
* T_BKK610_OLD = "Database Entries at Start of Transaction
T_BKK615_OLD = "
* T_BKK600_OLD = "Database Entries at Start of Transaction
EXCEPTIONS
E_WRONG_MODE = 1 E_INSERT_BKK600 = 10 E_DELETE_BKK600 = 11 E_WRONG_TREENR = 12 E_WRONG_T_BKK610 = 2 E_WRONG_T_BKK610_OLD = 3 E_DELETE_BKK610 = 4 E_INSERT_BKK610 = 5 E_UPDATE_BKK610 = 6 E_DELETE_BKK615 = 7 E_INSERT_BKK615 = 8 E_UPDATE_BKK615 = 9
IMPORTING Parameters details for BKK_ACCOUNT_HIERARCHY_UPDATE
I_MODE - I=Insert; U=Update
Data type: IBKK6S2-EMODEOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for BKK_ACCOUNT_HIERARCHY_UPDATE
T_BKK610 - New/Current Entry for Root Account
Data type: BKK610Optional: No
Call by Reference: No ( called with pass by value option)
T_BKK615 -
Data type: BKK615Optional: No
Call by Reference: No ( called with pass by value option)
T_BKK600 - New/Current Relationships for this Root Account
Data type: BKK600Optional: No
Call by Reference: No ( called with pass by value option)
T_BKK610_OLD - Database Entries at Start of Transaction
Data type: BKK610Optional: Yes
Call by Reference: No ( called with pass by value option)
T_BKK615_OLD -
Data type: BKK615Optional: No
Call by Reference: No ( called with pass by value option)
T_BKK600_OLD - Database Entries at Start of Transaction
Data type: BKK600Optional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
E_WRONG_MODE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
E_INSERT_BKK600 -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
E_DELETE_BKK600 -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
E_WRONG_TREENR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
E_WRONG_T_BKK610 -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
E_WRONG_T_BKK610_OLD -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
E_DELETE_BKK610 -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
E_INSERT_BKK610 -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
E_UPDATE_BKK610 -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
E_DELETE_BKK615 -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
E_INSERT_BKK615 -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
E_UPDATE_BKK615 -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for BKK_ACCOUNT_HIERARCHY_UPDATE Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lv_i_mode | TYPE IBKK6S2-EMODE, " | |||
| lt_t_bkk610 | TYPE STANDARD TABLE OF BKK610, " | |||
| lv_e_wrong_mode | TYPE BKK610, " | |||
| lv_e_insert_bkk600 | TYPE BKK610, " | |||
| lv_e_delete_bkk600 | TYPE BKK610, " | |||
| lv_e_wrong_treenr | TYPE BKK610, " | |||
| lt_t_bkk615 | TYPE STANDARD TABLE OF BKK615, " | |||
| lv_e_wrong_t_bkk610 | TYPE BKK615, " | |||
| lt_t_bkk600 | TYPE STANDARD TABLE OF BKK600, " | |||
| lv_e_wrong_t_bkk610_old | TYPE BKK600, " | |||
| lt_t_bkk610_old | TYPE STANDARD TABLE OF BKK610, " | |||
| lv_e_delete_bkk610 | TYPE BKK610, " | |||
| lt_t_bkk615_old | TYPE STANDARD TABLE OF BKK615, " | |||
| lv_e_insert_bkk610 | TYPE BKK615, " | |||
| lt_t_bkk600_old | TYPE STANDARD TABLE OF BKK600, " | |||
| lv_e_update_bkk610 | TYPE BKK600, " | |||
| lv_e_delete_bkk615 | TYPE BKK600, " | |||
| lv_e_insert_bkk615 | TYPE BKK600, " | |||
| lv_e_update_bkk615 | TYPE BKK600. " |
|   CALL FUNCTION 'BKK_ACCOUNT_HIERARCHY_UPDATE' "Update Module for Account Hierarchy Maintenance |
| EXPORTING | ||
| I_MODE | = lv_i_mode | |
| TABLES | ||
| T_BKK610 | = lt_t_bkk610 | |
| T_BKK615 | = lt_t_bkk615 | |
| T_BKK600 | = lt_t_bkk600 | |
| T_BKK610_OLD | = lt_t_bkk610_old | |
| T_BKK615_OLD | = lt_t_bkk615_old | |
| T_BKK600_OLD | = lt_t_bkk600_old | |
| EXCEPTIONS | ||
| E_WRONG_MODE = 1 | ||
| E_INSERT_BKK600 = 10 | ||
| E_DELETE_BKK600 = 11 | ||
| E_WRONG_TREENR = 12 | ||
| E_WRONG_T_BKK610 = 2 | ||
| E_WRONG_T_BKK610_OLD = 3 | ||
| E_DELETE_BKK610 = 4 | ||
| E_INSERT_BKK610 = 5 | ||
| E_UPDATE_BKK610 = 6 | ||
| E_DELETE_BKK615 = 7 | ||
| E_INSERT_BKK615 = 8 | ||
| E_UPDATE_BKK615 = 9 | ||
| . " BKK_ACCOUNT_HIERARCHY_UPDATE | ||
ABAP code using 7.40 inline data declarations to call FM BKK_ACCOUNT_HIERARCHY_UPDATE
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.| "SELECT single EMODE FROM IBKK6S2 INTO @DATA(ld_i_mode). | ||||
Search for further information about these or an SAP related objects