Loading Cost Center Hierarchy (CCH) into SAP using BAPI & LSMW
Definition – groups of cost centers in a tree structure within a controlling area that represent specific areas of cost incurrence from a Controlling perspective.
A cost center hierarchy comprises all cost centers for a given period and therefore represents the whole enterprise. This hierarchy is known as the standard hierarchy.
Cost Center hierarchies are typically defined before creating cost centers.
Usually considered as configuration objects, high volume and complexity in nesting may call for automated load methods. Here’s one way of automating creation (load) of CCH into SAP.
Define Input/Load File Structure
Since CCH is defined at CO. Area level, a “header” line is used to create CCH per Co. Area. This way, the same process/files can be reused for loading standard and alternate hierarchies under same/different controlling areas.
Columns |
Data type |
Length |
Column Description |
LNIND |
CHAR |
1 |
Line indicator – Header/Line |
VALU1 |
CHAR |
15 |
Controlling Area/Group Name |
VALU2 |
CHAR |
10 |
Hierarchy Level |
VALU3 |
CHAR |
10 |
Value Count |
VALU4 |
CHAR |
40 |
Description |
Sample Data
Header (Co. Area) |
Controlling Area |
|
Value # |
Description |
H |
1000 |
|
|
|
L |
C1000 |
0 |
0 |
IDES |
L |
C1010 |
1 |
0 |
Corporate |
L |
C1110 |
2 |
0 |
Executive Board |
L |
1234 |
3 |
0 |
test |
L |
4567 |
3 |
0 |
yress |
L |
C1120 |
1 |
0 |
Internal Services |
L |
98763 |
3 |
0 |
sdfdsfds |
L |
C1200 |
1 |
0 |
Administration & Financials |
L |
C1210 |
2 |
0 |
Administration |
L |
C1220 |
2 |
0 |
Human Resources |
L |
C1230 |
2 |
0 |
Procurement |
LSMW:
- LSMW method: BAPI – BAPI_COSTCENTERGROUP_CREATE
- Business Object: BUS1112, Cost center group
- Method: CREATE
- Message Type: COSTCENTERGROUP_CREATE
- Basic Type: COSTCENTERGROUP_CREATE01
Structures/Fields to populate:
- E1COSTCENTERGROUP_CREATE (Header segment)
- CONTROLLINGAREAIMP
Note: Populate the above field with controlling area value only for header records
- E1BPSETHIET (Interface structure for groups – Hierarchy table)
- GROUPNAME
- HIERLEVEL
- VALCOUNT
- DESCRIPT
Note: Populate the above fields only for hierarchy lines
Post-load review/reconciliation
- Execute transaction KSH3
- Input Top Node name & Display
- Validate if all nodes have been created correctly
– KP (Blogging Irregular)
New NetWeaver Information at SAP.com
Very Helpfull