cancel
Showing results for 
Search instead for 
Did you mean: 

WBS element hierarchy

arindam_samanta
Participant
0 Kudos

Dear Experts,

I have created one module pool program in PS module for creating project with WBS elements.

Based on Template Hierarchy in CJ93 Tcode, all the WBS elements are displayed  in screen as Table control, Values for WBS element are fetched from prpss table.

Issue:

If the user  creates a new child hierarchy in existing template (CJ93), then it will be saved at last row in PRPSS table based on OBJNR and logic for displaying WBS in screen is based on PRPSS table and its displayed as same sequence in PRPSS table.  But in the transaction CJ93,  the hierarchy is different.

I want to display same sequence of WBS elements as in CJ93 tcode. Is there any logic to display like CJ93?

PRPSS Table Entries: (Same sequence in module pool program also)


MANDT     PSPNR    POSID               POST1              OBJNR         PSPHI

3001812-R0XXX-RBLRoad BuildPT0000018112
3001822-R0XXX-RBL-PKG1Package 1PT0000018212
3001832-R0XXX-RBL-PKG2Package 2PT0000018312
3001842-R0XXX-RBL-PKG1-EEngineeringPT0000018412

CJ93 Transaction Code sequence:


2 2-R0XXX-RBLRoad Build2-R0XXX-RBL
3  2-R0XXX-RBL-PKG1Package 12-R0XXX-RBL-PKG1
4   2-R0XXX-RBL-PKG1-EEngineering2-R0XXX-RBL-PKG1
3  2-R0XXX-RBL-PKG2Package 22-R0XXX-RBL-PKG2

Thanks and Regards,

Arindam Samanta.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Arindam,

Check table PRHIS.

You will have to build the hierarchy using tables PRPSS & PRHIS.

Regards

Shrikant

arindam_samanta
Participant
0 Kudos

Hi srikanth,

Do you have any sample code to build hierarchy based  on prpss and prhis table based on up down left and right combination.

Regards,

Arindam.

Former Member
0 Kudos

Hi,

I am functional consultant so cant help you with the code. The logic would be to leverage 'Level' field from PRPSS table. Further for each WBS, you can fetch below, left, right from PRHIS table to built hierarchy.

Regards

Shrikant

Former Member
0 Kudos

Hi Arindam,

Please use the BAPI "BAPI_PROJECT_GETINFO" to get the WBS details in hierarchy,

Give the project number of the WBS to "PROJECT_DEFINITION" as input and you will get all the WBS and its hierarchy in the TABLES "E_WBS_HIERARCHIE_TABLE".

Cheers

~Niranjan

arindam_samanta
Participant
0 Kudos

Hi Niranjan,

This function module accept the project number. But I am working with PRPSS table. This table contains the template. If you check CJ93 TCODE, it displays hierarchy of WBS element template like following:

LEVEL               WBS Element

12-R0XXX
2 2-R0XXX-PRE
3  2-R0XXX-PRE-SNI0
3  2-R0XXX-PRE-BPC0
3  2-R0XXX-PRE-MIS0
2 2-R0XXX-STC
2 2-R0XXX-FIN
3  2-R0XXX-FIN-CAP0
3  2-R0XXX-FIN-INC0
3  2-R0XXX-FIN-IST0
3  2-R0XXX-FIN-BGB0
2 2-R0XXX-RBL
3  2-R0XXX-RBL-PKG1
4   2-R0XXX-RBL-PKG1-E
3  2-R0XXX-RBL-PKG2

I want to display exactly above template and sequence in my program. Is it possible?

Former Member
0 Kudos

Hi ,

Is your WBS not related to a project?

Cheers

~Niranjan