cancel
Showing results for 
Search instead for 
Did you mean: 

Employee should not be able to change the SC after ordering--Please help

Former Member
0 Kudos

Hi all,

When the SC is ordered and awaiting approval, the requestor can change the details.

Also, When the approver rejects or changes the SC during approval process ,the SC is returned to the requestor with the status "In your inbox" and the requestor is again allowed to change the details with the "Change" button.

But in our implementation ,the client wants the requestor must not be able to change the SC details at all in any case after ordering .

BBP_WFL_SECURITY in PFCG for employee role has helped us partially but not completely.

We belive there should be some special task for this.

Please help.

BR,

Disha.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I missed the 'C'.

I meant "read SC status".

To be in transaction "Check status" is not enough for you (it can be an held SC).

I don't think the SC status list in passed in the form parameters. So you might have to read SC item status by yourself.

Except if you can play with

is_env-scen = c_sc_status --> i.e. "Check status"

is_export-wfl_scenario --> see domain BBP_WFL_ACTION for possible values.

Rgds

Christophe

PS: please reward points for helpfull answers

Former Member
0 Kudos

Hi,

I have played with both the parameters is_env-scen and is_export-wfl_scenario for different values of BBP_WFL_ACTION but still its not working....

Any idea what do i need to check more???

BR,

Disha.

Former Member
0 Kudos

Hummm !!!

Copy from my previous answer:

"I don't think the SC status list in passed in the form parameters. So you might have to read SC item status by yourself."

Rgds

Christophe

PS: please reward points for helpfull answers

Former Member
0 Kudos

Hi,

How do I read the SC status???

Regards,

Disha.

Former Member
0 Kudos

Hi Christophe,

Please help me on this with your suggestions....

BR,

Disha.

Former Member
0 Kudos

Hi Disha,

This requires a minimum of analysis, that should be done by yourself (I won't deliver any final coding).

Debug the transaction and find the global data that stores all SC data (something like cs_document, or gt_item...), and get the selected item status list from current item GUID.

Rgds

Christophe

Former Member
0 Kudos

Hi christophe,

The problem got solved..I made changes to the std code BBP_SC_APP.

BR,

Disha.

Former Member
0 Kudos

Great !!!

Can you post some piece of code for the 2 or 3 other SRM SDN posters who are tring to realize the same control on SC change out of the WF security ?

And don't forget to reward points...:-))

Rgds

Christophe

Former Member
0 Kudos

Who are they???

Former Member
0 Kudos

Jose (you answered his question) is actually trying to block SC change/deletion after approval.

Dinesh (you started your question from Dinesh's one) also wants to block SC changes:

Former Member
0 Kudos

Hi Disha,

simply deactivate button "Change" in function of your SC status.

To realize this, change standard ABAP in screen SAPLBBP_SC_UI_ITS 150, in FORM button_modify_screen:

...

WHEN '007'.

*...first check SC change authority

*...show button 'change' if you come from status or empl.inbox or

*...manager inbox

*...don't show button 'change' in the inbox, when not locked

...

and implement your custom logic: deactivate button if SC status is "Ordered" or what you want.

Rgds

Christophe

PS: please reward points for helpfull answers

Former Member
0 Kudos

Hi Christophe,

I had one more doubt regarding this reqt implementation...I have seen many posts on this forum itself where people are sayin that they have usd BADI "BBP_WFL_SECUR_BADI" to implement this....But is this BADI useful to control the authorisation of the approver or the Employee..Just needed clarification on this....

Regards,

Disha.

Former Member
0 Kudos

Hi Disha,

I am not a WF expert, but as far as I know this BADI is designed to control the authorizations of approvers during approval steps, i.e. if a shopping cart can be changed during approval (for everybody, approvers like requestor).

For me it make sense that the requestor can change his/her SC when it has been returned by the approvers. In that case we can say that the WF is finished and we are not anymore in the approval phase.

But I am ok to block the requestor once approval is launched, because mails can be sent out of SAP. Here the BADI is usefull.

Rgds

Christophe

Former Member
0 Kudos

Hi Christophe,

What i wanted to ask is that how do i differentiate between the manager and employee if i want this BADI to work only for Employees and not Managers...

Also,which method should i opt for???Template change or implement the secure BADI??

Regards,

Disha.

Former Member
0 Kudos

Hi Christophe,

Just to tell you what is the exact problem i am facing....the authorisation level for the SC to be changed which i have set for the employee is working fine for 2 of the foll 3 cases :

1> When the SC is ordered, the "requestor/employee" is not able to see the "change" button.(Awaiting approval status).

2> When the Approver changes the SC and SC comes back to the "requestor/employee" he is not able to view the "Change" button.

But for the 3rd case,when the Approver rejects the SC and it comes back to the "requestor/employee" ,he is able to view the change button,he cna change the SC and send it again....

Now in my case,i want that the employee shoild not be able to change the SC even for the 3rd case..

Regards,

Disha.

Former Member
0 Kudos

Disha,

I think the 2 first cases are covered by the BADI because we are in a WF approval phase (even when the SC is modified and returned to the requestor for "approval" of modifications).

But for the 3rd case, the approval is "finished", and the BADI can not do anything.

So for that case, you need to modifiy the Form modify_screen to disable "Change" button if the SC has the status "Rejected".

Rgds

Christophe

Former Member
0 Kudos

Hi Christophe,

Yes..u r right....i need to modify the template...Will get back to you on this....

regards,

Disha.

( Will reward you full points once it is fully done )

0 Kudos

Hi,

maybe I'm wrong but within SU01, tab personalization, paremeter "Workflow security" controls what the user (depending on assigned role) can do within approval proces.

have you yested this?

BR

Q

Former Member
0 Kudos

Hi ,

Yes i have tested this..But this doesnt work when the SC is rejected...

Regards,

Disha.

Former Member
0 Kudos

Hi Christophe,

Which is the service for this template which I should change???

regards,

Disha.

Former Member
0 Kudos

Hi Disha,

you have the template name in my reply.

For the service, it is the usual, the one and only BBPSC01.

(But to implement your logic, you should change, as proposed, the ABAP and not the template, because you won't have the status information in the template).

Rgds

Christophe

PS: please reward points for helpfull answers

Former Member
0 Kudos

Hi christophe,

Which parameter of "is_export" should i check(equivalent to SC is ordered condition) so that i can disble the screen field??

Regards,

Disha.

Former Member
0 Kudos

Hi Christophe,

When it is checking the authorisation for the change and i have mainatined the settings in role--> personlaisation in tcode PFCG,then why is the button stil visible??

Regards,

Disha.

Former Member
0 Kudos

Hi Disha,

read again my first reply:

change FORM button_modify_screen at this place:

WHEN '007'.

*...first check SC change authority

*...show button 'change' if you come from status or empl.inbox or

*...manager inbox

IF is_export-sc_authority-auth_sc_change = gc_yes.

IF is_export-change_visible = gc_yes AND

lv_desktop_flag EQ gc_no.

screen-input = gc_on.

screen-output = gc_on.

screen-invisible = gc_off.

ELSE.

screen-input = gc_off.

screen-output = gc_off.

screen-invisible = gc_on.

ENDIF.

ELSE.

screen-input = gc_off.

screen-output = gc_off.

screen-invisible = gc_on.

ENDIF.

Here add your logic (read S status) and switch off the field:

screen-input = gc_off.

screen-output = gc_off.

screen-invisible = gc_on.

For your 2nd question: I already answered twice: once rejected, the SC approval WF is finished. So WF authorizations do not apply anymore.

Rgds

Christophe

PS: please reward points for helpfull answers

Former Member
0 Kudos

Hi Christophe,

What do u mean by "read S status"???Do i hae to check whether "is_env-scen = c_sc_status"?

BR,

Disha.