restricting log on user ID, in the selection screen where S_WERKS=USERID
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.