Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How do we get complete hierarchy for a WBS element??

Former Member
0 Kudos

Hi All,

Is there any FM to get complete hierarchy for a WBS element??

Or any other method that would achieve this requirement ??

Eg:

C.00103.1

C.00103.1.1

C.00103.1.2.3

C.00103.2

C.00103.2.1 etc

If i give C.00103.1, all the WBS elements in the hierarchy should be displayed.

Any pointers are of great help.

Regards

Prathima

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

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 ]

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

Regards,

Vijetha.

3 REPLIES 3

Former Member
0 Kudos

Hi,

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 ]

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

Regards,

Vijetha.

Former Member
0 Kudos

Hi,

I dont think v have FM to get all the stages of a WBS element.

But v can code the logic in a report or in a FM.

Data: begin of itab occurs 0,
         pspnr like prps-pspnr,
         end of itab.

Select pspnr from prps
into table itab
where posid like 'C.00103.1%' .

Use this code and find all the hierarchy/stages of a WBS Element.

Regards,

Prem.

Former Member
0 Kudos

Hi,

you can use the function module GET_PROJECT_HIERARCHY

which provides the complere hierarcy.

This fun module is used to get the Hierarchy of Project in Project Systesm(PS) module using (PRPS and PROJ tables)

see the sample code

CALL FUNCTION 'GET_PROJECT_HIERARCHY'

EXPORTING

I_PRONR = PRPS-PSPHI

NO_BUFFER = NO_BUFFER

TABLES

T_PRHI = INT_PRHI.

PERFORM GET_TREE_FROM_PRHI USING PRPS-PSPNR.

REFRESH: INT_PRHI.

LOOP AT TEMP_TREE.

PSP_TREE = TEMP_TREE.

APPEND PSP_TREE.

DELETE TEMP_TREE.

ENDLOOP.

Regards,

Raj.