cancel
Showing results for 
Search instead for 
Did you mean: 

User status of WBS to be substituted automatically to lower WBS

Former Member
0 Kudos

Hi,

We have a business requirement of setting the top level WBS user status automatically to lower level WBS. Is it possible without manually doing it when a new lower WBS is created?

Scenario : We have all the WBS (Level1, Level2, Level3) created within a project are locked to avoid posting of PO using a user status (POLK). When a new WBS is created, WBS system status is REL with no user status set. IS it possible to auto set the WBS status to POLK when WBS is created so that PO posting can be avoided?

Thanks in advance.

Ashish

Accepted Solutions (1)

Accepted Solutions (1)

former_member209919
Active Contributor
0 Kudos

Hi Ashish,

Check if you have defined the user status POLK as initial, you should have it,

Regards,

Sara

Former Member
0 Kudos

Hi Sara,

Thanks for the reply. POLK is not initial but second status. We have PRLK for blocking PR creation and POLK for PO creation. POLK can be set only after PRLK is set. We can not have PRLK and POLK as initial as after WBS is created and released, we want to allow postings to the WBS.

My question is : i need to substitue the POLK status only when superior WBS is POLK.

Ex :

WBS 1 - Level 1 (System status: REL, User status: PRLK,POLK)

WBS 2- Level 2 ((System status: REL, User status: PRLK,POLK)

After this, One WBS is created under WBS 2 as WBS 2.1 (System status: REL, User status: [ ] )

Can i susbtitue the status from WBS 2 to WBS 2.1 when it is created and saved.

former_member209919
Active Contributor
0 Kudos

Hi,

Then I understandyou need when you create a WBS level >1 automaticaly it is released ( due to the superior level is released) then in this case if the superior level is POLK it should changed to POLK, is this correct?

I think this can not be get by settings and you need develop, you have several options :

1) use BADI WORKBREAKDOWN_UPDATE --> AT_SAVE : here develop your logic to check the conditions and finally set the status

2) Use events : you can configure depending on your status profile that each time that a WBS is set to release a Function Module is launched : In this function module you can include your logic to set or not the status.

I am not sure if this is useful for you....or if there is a easy way to get this,

Sara

Answers (2)

Answers (2)

Former Member
0 Kudos

hi ashish

in standard sap it is not possible. and there is no sap note available for doing such settings. if you authorization might be it helps you other wise you need to developed it. you you can use user exit.

britta_leib2
Participant
0 Kudos

Hello,

you also can create a substitution (transaction code OPSN) which you can use in the project profile.

Greetings Britta

Former Member
0 Kudos

Hi Britta,

Could you tell me the substitution for user status. I am not getting the field to use. Please explain the substitution.

Thanks in advance.

Ashish

Former Member
0 Kudos

Hi Ashish,

I dont think substitution will help. While setting user status to higher level WBS, use Edit>Status>User Status>Set & Pass On in CJ20N. This will set reqd user status and pass on to lower level WBS. Hope this helps.

Regards

Shrikant

Former Member
0 Kudos

Hi Shrikant,

My requirement is different from your understanding. Thanks anyway for reply.

Former Member
0 Kudos

Hi Ashish,

The best option here would be to use the BADI specified in Sara's reply. Call this BADI at save and define a logic with the help of your ABAPer to achieve this.You can define a logic like if the WBS level is >1 check the user status of the level 1 WBS and set and pass this on to the subordinate WBS elements.

Discuss with your ABAPer. It can be done.

Regards,

Gokul

Former Member
0 Kudos

Thanks Gokul,

I will check with ABAPER.

britta_leib2
Participant
0 Kudos

Hi Ashish,

when you use substitution for the field status you have to program something, since the status is not an easy field like e.g. profit center or plant.

In OPSN you create a substitution for WBS element.

Choose a name for your substitution (which you will use in the project profile later). The prerequisite for your step should be: PRPS-STUFE > '1'

The substitution field is ’Only exit’. Choose a technical name for your exit and write a form routine for it. This should be done in the module pool, which is a copy of RGGBS000 (usually ZGGBS000).

Coding: Get the status for the upper WBS by using function module BAPI_BUS2054_GET_STATUS. Set the same status by using function module BAPI_BUS2054_SET_STATUS.

If there is a business reason which does not allow the change of the status you get back the error in the table e_result.

The disadvantage of substitution is that this coding is passed for each wbs. That means if you have ”big” projects with many, many wbs the performance won’t be so good, when you save a project. Then you should rather use BADI as Sara or Gokul already have said and program the coding there.

greetings Britta