cancel
Showing results for 
Search instead for 
Did you mean: 

WBS elements hierarchy

Former Member
0 Kudos
939

Hi,

I need to know the WBS elements hierachy in table PRHI.

Say for eg. in PRHI my WBS elements is E.00011. (just imagine it is tree structure ). I have 4 fields of UP,DOWN,RIGHT and LEFT. So for a perticular node,I need to process all the left ,right and down node and for each node i need to do some calculation.

So from parent I need to process from left to right ,up to down.

Kindly clariify,

Points will be awarded

Thanks in advance.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Jayasree,

can you better explain what you need? Since you already know the table PRHI, you can read the WBS element hierachy, cant you?

Regards

René

Former Member
0 Kudos

Thanks RENE,

I can read the WBS element hierarchy say for eg. WBS element POSNR = E.000110

PSPHI = E.000110

UP =

DOWN = E.000110.10

LEFT =

RIGHT =

If this is the case,I will consider this node has no node to left & right but has one node in the down. So I will do some calculations for this node and the down node. like this I should process all the node from left to right and top to down.

Caution: If i move to the next node, I need to store the previous calculation also add it up to the corresponding node.

Ponits will be awarded

Thanks in advance

hymavathi_oruganti
Active Contributor
0 Kudos

declare table

I_HIERARCHY STRUCTURE IFHIERIM

DATA: BEGIN OF ITAB_EXT_INT OCCURS 0,

POSID LIKE PRPS-POSID,

PSPNR LIKE PRPS-PSPNR,

END OF ITAB_EXT_INT

CALL FUNCTION 'CJDW_PRHI_CHECK_EXT'

TABLES

I_HIERARCHY = I_HIERARCHY

EXCEPTIONS

INCONSISTENT_HIER = 1

INCOMPLETE_HIER = 2

DIFFERENT_PROJECTS = 3

OTHERS = 4.

LOOP AT I_HIERARCHY.

MOVE I_HIERARCHY-POSID TO ITAB_EXT_INT-POSID.

COLLECT ITAB_EXT_INT.

MOVE I_HIERARCHY-UP TO ITAB_EXT_INT-POSID.

COLLECT ITAB_EXT_INT.

MOVE I_HIERARCHY-DOWN TO ITAB_EXT_INT-POSID.

COLLECT ITAB_EXT_INT.

MOVE I_HIERARCHY-LEFT TO ITAB_EXT_INT-POSID.

COLLECT ITAB_EXT_INT.

MOVE I_HIERARCHY-RIGHT TO ITAB_EXT_INT-POSID.

COLLECT ITAB_EXT_INT.

ENDLOOP.

the above type of code may halp u

Former Member
0 Kudos

Maybe you have look at FM BAPI_PROJECT_GETINFO?

Set parameter WITH_SUBTREE

Regards

Rene

Former Member
0 Kudos

Thanks a lots.

Now If I need for a particular PRPS-PSPNR = e.0011,where should i have to import it?

Kindly help me

Points will be awarded more

hymavathi_oruganti
Active Contributor
0 Kudos

in the i_hierarchy,

pspid is equal to pspnr

Former Member
0 Kudos

WBS_ELEMENT = prps-<b>posid</b>

append wbs_element to <b>I</b>_WBS_ELEMENT_TABLE.

Strange though that posid rather than pspnr is requested.

Regards

Rene