Skip to Content
author's profile photo Former Member
Former Member

restricting log on user ID, in the selection screen where S_WERKS=USERID

Hi all,

I wanted to restrict the user in z programme,

Users from 6000-6999 when ever they use a particular transaction (ZSales) In the selection screen (S_WERKS) SITE=USER ID and it has to get disable. For Example if an user ID is STRMGR6009 is the user name when ever he uses a Zsales transaction, in the selection screen it has to be (S_WERKS) SITE=6009. And also he should not be able to see other site details.

I have tried to do it as follows..

PARAMETERS : p_sale RADIOBUTTON GROUP pt1," DEFAULT 'X',
                                    p_stock RADIOBUTTON GROUP pt1 .
SELECTION-SCREEN PUSHBUTTON 3(10) text-018 USER-COMMAND enter .
SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-019.

SELECT-OPTIONS :s_party FOR kna1-kunnr MODIF ID 008,
                              s_werks FOR vbap-werks MODIF ID 010.
SELECTION-SCREEN: END OF BLOCK b1.

AT SELECTION-SCREEN OUTPUT.
 LOOP AT SCREEN .
      IF p_sale = 'X' AND ( screen-group4 = '008' OR screen-group4 = '010').
      screen-active = 1 .
 MODIFY SCREEN .
    ENDIF.
ENDLOOP .

Please help me in restricting the users.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Oct 07, 2010 at 10:26 AM

    Hi,

    You are approaching this the wrong way. SAP delivers a detailed authorisation mechanism to do achieve this requirement in a standard format.

    You should be checking not on the ID but on an authorisation object and appropriate values. The authorisation object & value is then assigned to roles for users who need to access it.

    Do not restrict on the userID name (SAP only does it in very, very limited circumstances), use the role concept to to this.

    Add a comment
    10|10000 characters needed characters exceeded

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.