Skip to Content

restriction on components withdrawals in PM order for specific users

How do you restrict certain users from withdrawing materials using PM orders.

Either the material tab should not be visible or they should not be allowed to enter any items in the components tab

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Jul 19, 2014 at 09:32 AM

    Hello Praneet,

    Put this code in the include ZXWOCU07 of User Exit IWO10009.

    DATA: L_COUNT TYPE I,
    L_LINES TYPE I.

    FIELD-SYMBOLS: <FS_RESB> TYPE ANY.

    DATA: BEGIN OF I_RESB OCCURS 100.
    INCLUDE STRUCTURE RESB.
    DATA:END OF I_RESB.

    ASSIGN ('(SAPLCOBC)resb_bt[]') TO <FS_RESB>.
    I_RESB[] = <FS_RESB>.

    SELECT COUNT( * ) INTO L_COUNT FROM RESB
    WHERE AUFNR = CAUFVD_IMP-AUFNR.

    DESCRIBE TABLE I_RESB LINES L_LINES.

    IF ( SY-UNAME = 'TEST_USER1' OR SY-UNAME = 'TEST_USER2' ) AND L_LINES <> L_COUNT.
    MESSAGE ' Sorry! Component additions are not authroized.' TYPE 'E' DISPLAY LIKE 'I'.
    ENDIF

    With this code:

    When Users, namely TEST_USER1 and TEST_USER2 will add lines in components during Create or Change (IW31 or IW32) and Click Save they get this error. Hope you understood that you need to put your UserIds in place of the UserIds mentioned above.

    The same logic can be extended to prevent changes in the existing component lines by these persons. (Your ABAPer will easily be able to do these with the above inputs)

    Hope this satisfies your requirement.

    Best of Luck

    Jogeswara Rao K


    Capture.JPG (51.4 kB)
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 20, 2014 at 10:57 AM

    Praneet Sadekar,

    I'm a little confused with your question:

    How do you restrict certain users from withdrawing materials using PM orders.

    Do you mean withdrawing stock items against a work order? And/or do you mean adding components to the work order??

    PeteA

    Add a comment
    10|10000 characters needed characters exceeded

    • Praneet Sadekar,

      We are currently using user-exit CNEX0037 to inhibit users adding materials to the work order Components tab. With this user-exit you don't have to wait till the order SAVE event to make the check (as with IWO10009 above).

      We have included a new authorisation object in this development to allow Super Users to add materials if required. A popup is issued if the user is not authorised, and the material is automatically removed from the Components tab.

      PeteA

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.