2003 Dec 11 11:28 AM
BAPI experts, need help!!
I am using BAPI_PROJECT_MAINTAIN to add WBS elements to an EXISTING project at level-2.
The project stucture is as below:
====================
1. Level-1
2. Level-2
3. Level-2
4. Level-2
5. Level-1
6. Level-1
====================
I even tried a simple structure as below, but no success (whatever I am adding goes into the project as a level-1 WBS element; but I need to insert it as level-2):
1. Level-1
2. Level-2
3. Level-2
4. Level-2
If I need to add one WBS element; do I need to have
(1) one record in IWbsElementTable(just the new WBS element) OR ALL exisitng WBS elements plus the new WBS element (in its intended place)? I tried BOTH but doesnt work.
(2) one record in IWbsHierarchyTable (the hierarchy of the new one to be inserted) OR the hierarchy of all existing WBS elements plus the new WBS element hierarchy (in its intended place) ? I tried BOTH but doesnt work.
AND
(3) IMethodProject table: Every time I insert a WBS element, is it okay to have these 3 entries in this table as below: (I am not sure if entries below will work)
(i) OBJECTTYPE = 'WBS-ELEMENT'; METHOD = 'CREATE'; OBJECTKEY = 'WBS1234XX'.
(ii) OBJECTTYPE = 'WBS-HIERARCHY'; METHOD = 'CREATE'
(iii)METHOD = 'SAVE'.
I am only able to able to add WBS elements at level-1 despite passing hierarchy of the entire project (including the position of new WBS element to be added); but I need it at level-2.
Thanks a lot.
2005 Mar 24 9:37 AM
Hello VP,
Did you look into the documentation of this BAPI?
Object type: WBS element
You can edit all WBS elements of a project definition. The name and key of the WBS element are identical.
Enter the WBS element in uppercase.
Command: Create
Example - Creating a WBS element for the project definition. Creating three WBS elements TRAINING, TRAINING.1 and TRAINING.2 for project definition PD-TRAINING
IMethodProject
OBJECTTYPE = WBS-Element
METHOD = Create
OBJECTKEY = TRAINING
REFNUMBER = 000001
OBJECTTYPE = WBS-Element
METHOD = Create
OBJECTKEY = TRAINING.1
REFNUMBER = 000002
OBJECTTYPE = WBS element
METHOD = Create
OBJECTKEY = TRAINING.2
REFNUMBER = 000003
OBJECTTYPE =
METHOD = Save
OBJECTKEY =
REFNUMBER =
IProjectDefinition
PROJECT_DEFINITION = PD-TRAINING
IWbsElementTable
Index = 1
WBS_ELEMENT = TRAINING
PROJECT_DEFINITION = PD-TRAINING
DESCRIPTION = Whole project
Index = 2
WBS_ELEMENT = TRAINING.1
PROJECT_DEFINITION = PD-TRAINING
DESCRIPTION = Preparation
Index = 3
WBS_ELEMENT = TRAINING.2
PROJECT_DEFINITION = PD-TRAINING
DESCRIPTION = Execution
Good luck solving your issue,
Sander Pol