Maintain
With the Maintain BAPI of the WorkBreakdownStruct business object youcan edit the objects of a project definition. You can also use all thefunctions of the Maintain BAPI of the Network business object. For more information, see Network.Maintain. With WorkBreakdownStruct.Maintain it is possible to edit the project
definition, its WBS elements and their hierarchical relationships. TheBAPI encapsulates a complete transaction in itself. As a result,several operations on project elements can be processed by only one call. The R/3 Project System determines in which order the operations are to
be executed on the objects. The caller can choose the operations in any order. As a result, processing is very speedy and effective. However, thistransaction concept does not include the use and combination of other SAP BAPIs in the same LUW. Procedure
The WorkBreakdownStruct business object is a facade of the project definition for WBS elements and their hierarchy. To edit a project object, enter a command for an object type. Inaddition, enter the object key and a reference to its attributes.
In the table of the IMethodProject parameter enter the object type, thecommand and the object key. As a reference enter the index of theobject data table of the relevant object type. In the object data tableenter the information about the object. If necessary, use an update structure for the object.
When entering the object type and method in the IMethodProject table remember that the entries are case-sensitive. To finish the transaction and store the data in the R/3 database, enterthe Save command. If you only want to test whether the changes can be carried out, do not use the save command.
In general, you cannot change the keys of objects. The return parameter Return indicates whether errors occurred duringprocessing. After the call you find the error messages created during processing in the EmessageTable table. Commands of the Object Types
For the description of the object types Network, NetworkActivity,NetworkActivityElement, ActivityMilestone, and NetworkRelation, see Network.Maintain. Object type: Project definitionThe Maintain BAPI must always refer to one project definition.
Therefore, always enter the structure of a project definition in theIProjectDefinition parameter. Use the project definition as a key. Thereference to the data part is always 1. Always enter the project definition in uppercase. Command: Create Enter the project definition and the project
profile. The project profile must exist in the R/3 Project System.
Example - Create a Project Definition in the R/3 Project System IMethodProjectOBJECTTYPE = ProjectDefinition
METHOD = Create OBJECTKEY = PD-TRAINING REFNUMBER = 000001 OBJECTTYPE = METHOD = Save OBJECTKEY =
REFNUMBER = IProjectDefinitionPROJECT_DEFINITION = PD-TRAINING DESCRIPTION = Training project PROJECT_PROFILE = PPRO001
Command: Update Use this command to change a project definition that already exists inthe R/3 Project System. If you enter an update structure you can changeindividual fields without having to specify the other fields.
Example - Changing the description of a project definition (Only the description is changed.) IMethodProjectOBJECTTYPE = ProjectDefinition METHOD = Update OBJECTKEY = PD-TRAINING
REFNUMBER = 000001 OBJECTTYPE = METHOD = Save OBJECTKEY = REFNUMBER = IProjectDefinition
PROJECT_DEFINITION = PD-TRAINING DESCRIPTION = Training project IProjectDefinitionUp PROJECT_DEFINITION = DESCRIPTION = X
Command: Lock (from R/3 Release 4.6A) Use this command to lock a project definition. The "Master data locked" system status is set for the project definition. LS> Example - Locking the project definition PD-TRAINING
IMethodProjectOBJECTTYPE = ProjectDefinition METHOD = Lock OBJECTKEY = PD-TRAINING REFNUMBER = 000001 OBJECTTYPE =
METHOD = Save OBJECTKEY = REFNUMBER = IProjectDefinition PROJECT_DEFINITION = PD-TRAINING Command: Unlock (from R/3 Release 4.6A)
Use this command to unlock the project definition. The "Master data locked" system status is removed from the project definition.
Example - Unlocking the project defintion PD-TRAINING< IMethodProjectOBJECTTYPE = ProjectDefinition
METHOD = Unlock OBJECTKEY = PD-TRAINING REFNUMBER = 000001 OBJECTTYPE = METHOD = Save OBJECTKEY =
REFNUMBER = IProjectDefinitionPROJECT_DEFINITION = PD-TRAINING Command: Release (from R/3 Release 4.5A) Releasing a project. The system status "released" is set for the
project definition and all WBS elements.
Example - Releasing the project definition PD-TRAINING IMethodProjectOBJECTTYPE = ProjectDefinition METHOD = Release
OBJECTKEY = PD-TRAINING REFNUMBER = OBJECTTYPE = METHOD = Save OBJECTKEY = REFNUMBER =
IProjectDefinitionPROJECT_DEFINITION = PD-TRAINING Object type: WBS elementYou 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 forproject definition PD-TRAINING IMethodProjectOBJECTTYPE = 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 Kommando: Update
Use this command to change a WBS element that already exists in the R/3Project System. If you enter an update structure, you can change individual fields without having to specify the other fields.
Example - Changing the description of the WBS element TRAINING.1 for the project definition PD TRAINING
IMethodProjectOBJECTTYPE = WBS element METHOD = Update OBJECTKEY = TRAINING.1 REFNUMBER = 000001 OBJECTTYPE =
METHOD = Save OBJECTKEY = REFNUMBER = IProjectDefinitionPROJECT_DEFINITION = PD-TRAINING IWbsElementTableIndex = 1
WBS_ELEMENT = TRAINING.1 PROJECT_DEFINITION = PD-TRAINING DESCRIPTION = Preparation and documentation IWbsElementTableUpdateIndex = 1
WBS_ELEMENT = PROJECT_DEFINITION = DESCRIPTION = X Command: Delete Use this command to delete a WBS element that already exists in the R/3
Project System. The WBS element receives the Deletion flag system status and is nor deleted physically. You cannot create a new WBSelement with the same key.
Example - Deleting the WBS element TRAINING.2 for the project PD TRAINING
IMethodProjectOBJECTTYPE = WBS element METHOD = Delete OBJECTKEY = TRAINING.2 REFNUMBER = 000001 OBJECTTYPE =
METHOD = Save OBJECTKEY = REFNUMBER = IProjectDefinitionPROJECT_DEFINITION = PD-TRAINING IWbsElementTable
Index = 1 WBS_ELEMENT = TRAINING.2 PROJECT_DEFINITION = PD-TRAINING Command: Lock (from R/3 Release 4.6A)Use this command to lock a WBS element. The "Master data lock" system status is set for the WBS element.
Example - Locking the WBS element TRAINING.1 IMethodProjectOBJECTTYPE = WBS-Element METHOD = Lock OBJECTKEY = TRAINING.1
REFNUMBER = 000001 OBJECTTYPE = METHOD = Save OBJECTKEY = REFNUMBER = IProjectDefinition
PROJECT_DEFINITION = PD-TRAINING IWbsElementTableIndex = 1 WBS_ELEMENT = TRAINING.1 Command: Unlock (from R/3 Release 4.6A) Use this command to unlock a WBS element. The "Master data lock" system status is removed from a WBS element.
Example - Unlocking the WBS element TRAINING.1 IMethodProjectIMethodProjectOBJECTTYPE = WBS-Element METHOD = Unlock OBJECTKEY = TRAINING.1
REFNUMBER = 000001 OBJECTTYPE = METHOD = Save OBJECTKEY = REFNUMBER = IProjectDefinitionPROJECT_DEFINITION = PD-TRAINING
IWbsElementTable Index = 1 WBS_ELEMENT = TRAINING.1 Command: Release (ab R/3 Release 4.5A) Releasing a WBS element. The system status "released" is set for the WBS element and all lower-level WBS elements.
Example - Releasing the WBS element TRAINING.1 IMethodProjectOBJECTTYPE = WBS-Element METHOD = Release OBJECTKEY = TRAINING.1
REFNUMBER = 000001 OBJECTTYPE = METHOD = Save OBJECTKEY = REFNUMBER = IProjectDefinition
PROJECT_DEFINITION = PD-TRAINING IWbsElementTableIndex = 1 WBS_ELEMENT = TRAINING.1 Object type: WBS milestone (from R/3 Release 4.6A)
The key for the object WBS milestone is the milestone number. Command: Create Use this command to create a new WBS milestone for a network. It is notnecessary to enter a number for the milestone. The system gives themilestone a number when it is created. The system returns the milestone in the message table as an information message.
If however, an external number is entered in the method table, both theexternal and the new milestone number are returned in an information amessage in the message table. A WBS element always has to be entered.
Example - Creating a new WBS milestone for a WBS element TRAINING.2
IMethodProjectOBJECTTYPE = WBS milestone METHOD = Create OBJECTKEY = REFNUMBER = 000001 OBJECTTYPE =
METHOD = Save OBJECTKEY = REFNUMBER = IWbsMilestoneTableIndex = 1 MILESTONE_NUMBER =
WBS_ELEMENT = TRAINING.2 Command: Update Use this command to change a WBS element that already exists in the Project System. It is always necessary to enter the projectdefinition, if you do not explicitly change the project definition. Use the update structure as for WBS elements.
Example - Changing an existing WBS milestone with the number 000000002098 assigned to WBS element TRAINING.2. IMethodProjectOBJECTTYPE = WBS milestone METHOD = Update
OBJECTKEY = 000000002098 REFNUMBER = 000001 OBJECTTYPE = METHOD = Save OBJECTKEY = REFNUMBER =
IWbsMilestoneTableIndex = 1 MILESTONE_NUMBER = 000000002098 DESCRIPTION = Milestone description changed WBS_ELEMENT = TRAINING.2
IWbsMilestoneTableUpMILESTONE_NUMBER = DESCRIPTION = X WBS_ELEMENT = Kommando: Delete Use this command to delete a WBS milestone that already exists in the
R/3 Project System. The milestone is deleted physically. It is alwaysnecessary to enter the project definition, if you do not explicitly change the project definition.
Example - Deleting a WBS element with the number 000000002098 assigned to WBS element TRAINING.2.
IMethodProjectOBJECTTYPE = WBS milestone METHOD = Delete OBJECTKEY = 000000002098 REFNUMBER = 000001 OBJECTTYPE =
METHOD = Save OBJECTKEY = REFNUMBER = IWbsMilestoneTableMILESTONE_NUMBER = 000000002098 WBS_ELEMENT = TRAINING.2
Object type: WBS hierarchyThe WBS hierarchy object type defines the hierarchy of the WBSelements. A project definition always has exactly one hierarchy. If theposition of a WBS element changes, the whole hierarchy has to berebuilt. Therefore, the WBS hierarchy object type has only one command:
Create. Every WBS element receives exactly one entry in the table parameter IWbsHierarchieTable with which it defines its position. Command: Create Use this command to create or change a WBS element hierarchy for aproject definition. Enter the WBS hierarchy object type and the Create
command in the table of the IMethodProject parameter. The commandrefers to all entries in the table of the IWbsHierarchieTable parameterthat contains the data for the data for the hierarchy. Each entry inthe IWbsHierarchieTable refers to a WBS element that describes its position relative to the other WBS elements.
Example - Positioning WBS elements TRAINING , TRAINING.1 and TRAINING.2 . (WBS elements TRAINING.1 and TRAINING.2 are subordinate toWBS element TRAINING. WBS element TRAINING1 is positioned on the left of TRAINING.2.) IMethodProject
OBJECTTYPE = WBS-Hierarchy METHOD = Create OBJECTKEY = REFNUMBER = OBJECTTYPE = METHOD = Save
OBJECTKEY = REFNUMBER = I ProjectDefinitionPROJECT_DEFINITION = PD-TRAINING IWbsHierarchieTableWBS_ELEMENT = TRAINING
PROJECT_DEFINITION = PD-TRAINING UP = DOWN = TRAINING.1 LEFT = RIGHT = WBS_ELEMENT = TRAINING.1
PROJECT_DEFINITION = PD-TRAINING UP = TRAINING DOWN = LEFT = RIGHT = TRAINING.2 WBS_ELEMENT = TRAINING.2
PROJECT_DEFINITION = PD-TRAINING UP = TRAINING DOWN = LEFT = TRAINING.1 RIGHT = Notes
Further InformationFor more information, see the R/3 Library under PS Project System -> Structures -> EPS Interface
|