Sapass

 Simplify SAP R/3 development with Excel VBA/VB RFC  
Home> Bapi>WorkBreakdownStruct



Index

WorkBreakdownStruct

WorkBreakdownStruct


The business object Work breakdown structure is a model of a
project, that represents in a hierarchy the actions and activities to
be carried out in a project. The work breakdown structure (WBS) enables you to have an overview of the project.


A WBS consists of a number of WBS elements. The WBS elements describe a
concrete task or partial task in the project which must be carried out within the prescribed period.



Integration


Costs and revenues are collected in the WBS elements.


11-Dec-2005


Methods

Available Methods


  • Getinfo : Read detailed information about WBS [ BAPI_PROJECT_GETINFO ]
  • Maintain : BAPI: Project maintenance [ BAPI_PROJECT_MAINTAIN ]
  • SaveReplica : Replicate work breakdown structure (ALE) [ BAPI_PROJECT_SAVEREPLICA ]

11-Dec-2005


Getinfo

Getinfo


You use this method to read detailed information about projectdefinitions and the WBS elements of certain projects from the system.

Notes

Enter the project definitions and/or the WBS elements, which you wantdetailed information about, in the parameter PROJECT_DEFINITION or I_WBS_ELEMENT_TABLE respectively.


If you only enter project definitions, the details of all the WBS thatbelong to the project definitions are read including the hierarchy. If you explicitly enter WBS elements, only these are read.

Messages are returned in Return parameters. For information about the
return values and their meaning, see the parameter documentation.


11-Dec-2005


Maintain

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 definition

The 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

  • IMethodProject
  • OBJECTTYPE = ProjectDefinition

  • METHOD = Create
  • OBJECTKEY = PD-TRAINING
  • REFNUMBER = 000001
  • OBJECTTYPE =
  • METHOD = Save
  • OBJECTKEY =

  • REFNUMBER =
  • IProjectDefinition
  • PROJECT_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.)

  • IMethodProject
  • OBJECTTYPE = 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


  • IMethodProject
  • OBJECTTYPE = 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<

  • IMethodProject
  • OBJECTTYPE = ProjectDefinition

  • METHOD = Unlock
  • OBJECTKEY = PD-TRAINING
  • REFNUMBER = 000001
  • OBJECTTYPE =
  • METHOD = Save
  • OBJECTKEY =

  • REFNUMBER =
  • IProjectDefinition
  • PROJECT_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

  • IMethodProject
  • OBJECTTYPE = ProjectDefinition
  • METHOD = Release

  • OBJECTKEY = PD-TRAINING
  • REFNUMBER =
  • OBJECTTYPE =
  • METHOD = Save
  • OBJECTKEY =
  • REFNUMBER =

  • IProjectDefinition
  • PROJECT_DEFINITION = PD-TRAINING
  • 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 forproject 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
  • 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


  • IMethodProject
  • OBJECTTYPE = WBS element
  • METHOD = Update
  • OBJECTKEY = TRAINING.1
  • REFNUMBER = 000001
  • OBJECTTYPE =

  • METHOD = Save
  • OBJECTKEY =
  • REFNUMBER =
  • IProjectDefinition
  • PROJECT_DEFINITION = PD-TRAINING
  • IWbsElementTable
  • Index = 1

  • WBS_ELEMENT = TRAINING.1
  • PROJECT_DEFINITION = PD-TRAINING
  • DESCRIPTION = Preparation and documentation
  • IWbsElementTableUpdate
  • Index = 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


  • IMethodProject
  • OBJECTTYPE = WBS element
  • METHOD = Delete
  • OBJECTKEY = TRAINING.2
  • REFNUMBER = 000001
  • OBJECTTYPE =

  • METHOD = Save
  • OBJECTKEY =
  • REFNUMBER =
  • IProjectDefinition
  • PROJECT_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

  • IMethodProject
  • OBJECTTYPE = WBS-Element
  • METHOD = Lock
  • OBJECTKEY = TRAINING.1

  • REFNUMBER = 000001
  • OBJECTTYPE =
  • METHOD = Save
  • OBJECTKEY =
  • REFNUMBER =
  • IProjectDefinition

  • PROJECT_DEFINITION = PD-TRAINING
  • IWbsElementTable
  • Index = 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

  • IMethodProjectIMethodProject
  • OBJECTTYPE = WBS-Element
  • METHOD = Unlock
  • OBJECTKEY = TRAINING.1

  • REFNUMBER = 000001
  • OBJECTTYPE =

  • METHOD = Save
  • OBJECTKEY =
  • REFNUMBER =
  • IProjectDefinition
  • PROJECT_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

  • IMethodProject
  • OBJECTTYPE = WBS-Element
  • METHOD = Release
  • OBJECTKEY = TRAINING.1

  • REFNUMBER = 000001
  • OBJECTTYPE =
  • METHOD = Save
  • OBJECTKEY =
  • REFNUMBER =
  • IProjectDefinition

  • PROJECT_DEFINITION = PD-TRAINING
  • IWbsElementTable
  • Index = 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


  • IMethodProject
  • OBJECTTYPE = WBS milestone
  • METHOD = Create
  • OBJECTKEY =
  • REFNUMBER = 000001
  • OBJECTTYPE =

  • METHOD = Save
  • OBJECTKEY =
  • REFNUMBER =
  • IWbsMilestoneTable
  • Index = 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.

  • IMethodProject
  • OBJECTTYPE = WBS milestone
  • METHOD = Update

  • OBJECTKEY = 000000002098
  • REFNUMBER = 000001
  • OBJECTTYPE =
  • METHOD = Save
  • OBJECTKEY =
  • REFNUMBER =

  • IWbsMilestoneTable
  • Index = 1
  • MILESTONE_NUMBER = 000000002098
  • DESCRIPTION = Milestone description changed
  • WBS_ELEMENT = TRAINING.2

  • IWbsMilestoneTableUp
  • MILESTONE_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.


  • IMethodProject
  • OBJECTTYPE = WBS milestone
  • METHOD = Delete
  • OBJECTKEY = 000000002098
  • REFNUMBER = 000001
  • OBJECTTYPE =

  • METHOD = Save
  • OBJECTKEY =
  • REFNUMBER =
  • IWbsMilestoneTable
  • MILESTONE_NUMBER = 000000002098
  • WBS_ELEMENT = TRAINING.2

  • Object type: WBS hierarchy

    The 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
  • ProjectDefinition
  • PROJECT_DEFINITION = PD-TRAINING
  • IWbsHierarchieTable
  • WBS_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 Information

    For more information, see the R/3 Library under PS Project System -> Structures -> EPS Interface


    11-Dec-2005


    SaveReplica

    SaveReplica


    Notes

    The function module BAPI_PROJECT_SAVEREPLICA is only used internallyas part of the ALE business processes for work breakdown structures, delivered by SAP.

    If you want to create or change a work breakdown structure, you shouldtherefore use the function module BAPI_PROJECT_MAINTAIN, in which a
    complete check of the work breakdown structure is carried out before saving.

    The method BAPI_PROJECT_SAVEREPLICA replicates a work breakdownstructure (project definition and WBS elements) as part of an ALE business process in an external R/3 system (receiving system).


    Furhermore the relevant status of the project definition and the WBS elements is set in the receiving system.

    The statuses "Availability control active" and "Budget tolerances exceeded" are always set to inactive in the receiving system,irrespective of the status of the work breakdown structure in the master system, because a work breakdown structure can only have a
    budget in its master system. Consequently an availability control is not possible in the receiving system.

    It is checked to see if the organizational units that have been enteredin the work breakdown structure are valid on the current date.

    Other checks are not carried out in the receiving system. In particular no authorizations checks or status checks are made.


    An existing work breakdown structure is only overwritten in thereceiving system, if its master system corresponds to the logical system in the MASTERDATA-LOGSYSTEM field.

    If the status "Deletion flag, can be archived" is contained in theOBJECTSTATUS import table and has been set to active, the corresponding
    work breakdown structure is deleted in the receiving system, together with all its dependent tables.

    Further Information

    For more information, refer to the documentation for ALE business processes for work breakdown structures.


    11-Dec-2005