on 01-06-2011 7:17 AM
Hi All,
We have a business requirement where client wants to close a company code (say EK10), which is used till now for procurement purpose in SRM. Since we have open POs, users should be allowed to change the existing POs or confirm
goods receipt. So removing EK10 from user attributes in org. struture is not the solution.
As per my knowledge we need to write some code in BBP_DOC_CHECK_BADI to restrict users from creating shopping carts, purchase orders and contracts. Correct me if wrong. Also let me know other BADIs where we should include the code to
achive the desired result.
We do not have proper technical consultant in the project to help. Appreciate if somebody given the technical instructions.
Thanks in advance
Prasad
Hi,
Try to restrict creatinon for shopping cart for company code through authorization profile of the requestor role.
take help of baisis to go to the authorization profile of requestor and for object shopping cart try to restrict that to company code of new company code.
Cheers
Iftekhar Alam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Prasad,
Please find the code below it might help you.
In BBP_DOC_CHECK_BADI you can restrict as below
IF iv_val EQ BUS2121.
Get the Shopping cart details
CALL FUNCTION 'BBP_PD_SC_GETDETAIL'
EXPORTING
i_guid = iv_doc_guid
IMPORTING
e_header = ls_header
TABLES
e_item = lt_item
e_partner = lt_e_partner
e_messages = lt_messages.
SORT lt_e_partner BY p_guid partner_fct.
LOOP AT lt_item ASSIGNING <fs_item>.
READ TABLE lt_e_partner INTO ls_e_partner WITH KEY p_guid = <fs_item>-guid
partner_fct = ''00000016'.
IF sy-subrc EQ 0.
lv_bp_guid = ls_e_partner -partner_no.
*--- Get requestor's USER ID
CALL FUNCTION 'BP_CENTRALPERSON_GET'
EXPORTING
iv_bu_partner_guid = lv_bp_guid
IMPORTING
ev_username = lv_uname.
If this lv_uname (Userid) should not have access to create SC raise an error. (For checking u can create a authorization obj etc)
ls_messages-msgty = 'E'.
ls_messages-msgid = Zbbp_pd.
ls_messages-msgno ='001'.
APPEND ls_messages TO et_messages.
ENDIF.
ENDIF.
ENDLOOP.
ENDIF.
Regards,
Neelima
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prasad,
Yes, I also agree. You can use the BBP_DOC_CHECK_BADI. check the parameter tables, e_account and e_items. you can add validations and restrictions.
Regards,
Saixis
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prasad,
You are right.
You need to use BBP_DOC_CHECK_BADI to ensure that users do not use the company code while creating a document.
You cannot achieve this with authorizations.
Best regards,
Ramki
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.