Hi how to restrict * in seelction screen

Hi abapers,
In selection screen am having field s_matnr.
After giving input as * and pressing F4 its fetches all the materials.But i want to restrcit using * and then pressing F4.
How can i do it.

Hi,
Use the FMs, SELECT_OPTIONS_RESTRICT & RS_INT_SELOPT_RESTRICT
<b>Example Code</b>
REPORT selectoptionsrestrict.
* Author   :  Lakshmi Sunitha
* Date     :  February 19, 2003
* Include type pool SSCR
TYPE-POOLS sscr.
TABLES :
  marc.
* defining the selection-screen
select-options :
  s_matnr for marc-matnr,
  s_werks for marc-werks.
* Define the object to be passed to the RESTRICTION parameter
DATA restrict TYPE sscr_restrict.
* Auxiliary objects for filling RESTRICT
DATA : optlist TYPE sscr_opt_list,
           *** type sscr_***.
INITIALIZATION.
* Restricting the MATNR selection to only EQ and 'BT'.
  optlist-name = 'OBJECTKEY1'.
  optlist-options-eq = 'X'.
  optlist-options-bt = 'X'.
  APPEND optlist TO restrict-opt_list_tab.
  ***-kind = 'S'.
  ***-name = 'S_MATNR'.
  ***-sg_main = 'I'.
  ***-sg_addy = space.
  ***-op_main = 'OBJECTKEY1'.
  APPEND *** TO restrict-***_tab.
* Restricting the WERKS selection to CP, GE, LT, NE.
  optlist-name = 'OBJECTKEY2'.
  optlist-options-cp = 'X'.
  optlist-options-ge = 'X'.
  optlist-options-lt = 'X'.
  optlist-options-ne = 'X'.
  APPEND optlist TO restrict-opt_list_tab.
  ***-kind = 'S'.
  ***-name = 'S_WERKS'.
  ***-sg_main = 'I'.
  ***-sg_addy = space.
  ***-op_main = 'OBJECTKEY2'.
  APPEND *** TO restrict-***_tab.
  CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
   EXPORTING
    restriction                  = restrict
   EXCEPTIONS
     TOO_LATE                     = 1
     REPEATED                     = 2
     SELOPT_WITHOUT_OPTIONS       = 3
     SELOPT_WITHOUT_SIGNS         = 4
     INVALID_SIGN                 = 5
     EMPTY_OPTION_LIST            = 6
     INVALID_KIND                 = 7
     REPEATED_KIND_A              = 8
     OTHERS                       = 9
  IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
Regards
Sudheer

Similar Messages

  • How to restrict some users from viewing a screen of standard transaction

    Hi All,
    I need to restrict certain user ids from viewing the 'Payment Transactions' screen for the below mentioned transactions.
    FK01, FK02, FK03, MK01, MK02, MK03, XK01, XK02, XK03
    The Basis consultant has tried to configure it. However its not working. So need to find other solution.
    For all transactions other than FK01, MK01, XK01 (create vendor), the BAdi GOS_SRV_SELECT is called before the payment transaction screen appears. But for transactions FK01, MK01and XK0, no such BAdi is there.
    Also I'm not able to figure out how to restrict that particular screen using Badi GOS_SRV_SELECT. What will be the service name for this?
    Please help !!!
    Thanks in advance,
    Radhika

    hi,
    u can do this using user exits.
    identify the appropriate exit for ur transaction and thn put condition like
    if username = ...
    loop at screen.
    hide..
    endloop.
    i was just trying to give u some hint .make it to ur best.
    reward if hlpful.

  • How to restrict user at selection screen while executing in background mode

    hi all,
    how to restrict user at selection screen while executing in background mode
    Regards
    Deepak

    Hi,
    We can get the Program whether this is running in background or not then we need to use SY-BATCH, if the SY-BATCH is set to X then the program is running in Background,
    so in the INITIALIZATION event, you can use this SY-BATCH and check the User names, and give the error messsage which you want to restrict
    Regards
    Sudheer

  • How to restrict the fields in a std screen i.e addtional data b of va01

    how to restrict the fields in a std screen i.e addtional data b of va01
    certain document type
    as i already added some fields in it
    can u help me with the setp
    With regards
    rohan Shetty

    Hi Rohan,
    Can you please let us know the solution that you had, i have similar requirement?
    Thanks,
    Manohar.

  • How to restrict field range in selection screen in adhoc report

    Hi Experts,
    I have created one adhoc report in which i have to restrict region values range when i searched for particular company code.is it possible to restrict in adhoc report.
    For example when i searched for particular company code US the values in region gets restricted automatically to US country itself.
    Thanks&Regards,
    narasimha.

    Hi,
    how to restrict  region list to particular company code in Adhoc report.Could you please explain it in brief .
    Regards,
    narasimha.

  • How to restrict S_ALR_87003642 - Open and Close Posting Periods entry/updat

    How to restrict S_ALR_87003642 - Open and Close Posting Periods entry/update for certain group of users
    eg. for Subsidiaries to openr/close periods of their own company only.
    Refer to my screen, Company 1010 and 1060 is for Head Office while 1210 is for our Malaysia Company. How to restrict my Malaysia Company user to open and close only for 1210 and cannot perform any change to other Company.

    Hi,
    I guess you can use company code itself. Talk to your basis guy or else if you have some expertise & Authorization try out PFCG.
    Regards
    Santosh Hegde

  • How to restrict multiple ess session and access?

    Hi experts,
    how to restrict multiple session for ess user? and multi access for same ess user?
    our problem is when user login to ess (doing session, for example leave request) and at the same time their manager is accessing travel approval task for that user, the approval process getting error. (we use travel workflow to approve travel request)
    how to overcome this situation?
    thanks.

    but there is no information on ESS screen for user being lock.
    how to show the information on ess screen?
    thanks

  • How to restrict the job start conditions (only "Immediate" type) ?

    Hi,
    We allow our users to schedule and execute in background mode transactions (example IP19, IW38). We gave them for that authorizations (object S_BTCH_JOB with LIST, PROT, RELE and SHOW - objetct S_PROGRAM with BTCSUBMIT).
    We would like that users can schedule and execute their jobs only with the u201CImmediateu201D job start condition (in the Start Time screen for the type of start condition : Immediate, Date/Time, After job, After event, or At operation mode).
    Another solution: prohibit the scheduling and the execution background job in a certain time interval ...
    How can restrict the job start conditions ?
    Thank you.
    Patrice.

    Hi Jan,
    Yes, sa38 makes it possible indeed to execute in background into immediate mode a job but
    the user have to know the name of the program to be carried out ...
    The user knows only the name of these transactions trade. For example, IW38.
    In the menu of this transaction, SAP gives the possibility to execute in background :
    Program --> Execute in Background --> display of Start Time screen for the type of start condition :
    Immediate, Date/Time, After job, After event, or At operation mode).
    It is at this time there that we want that the user can only choose the "immediate" mode.
    We must thus prohibit the other choices (Date/Time, After job, After event, or At operation mode) ... and
    and we don't know how to restrict these other options in this screen "Start Time screen for the type of start condition".
    Thank you.
    By.

  • How to restrict the options available in variables while reporting

    Hi all,
       i am having a requirement, while generating the reports the end user able to see the codes for the other sales office when he press f4 in the variable field. how ever he is not having authorization to view the report but ther requirement is that dey dont want this codes avail when dey press f4 in the variable field. plzzzzzzzz any can tell me how to restrict dis. suppose when i enter company code the end use what his sales off availabe in the field not other.
    Help=******************,
    Regards
    KK

    Hi KK,
    I think a variable proccessed by authorization should help. Mark "ready for input"
    and only values user is authorized for, are displayed in F4 screen.
    Please follow the steps mentioned in this helpful thread:
    https://www.sdn.sap.com/irj/sdn/directforumsearch?q=variable%20authorization&objid=c4&searchid=7180432&rankby=10001&threadid=404736
    Regards
    Joe

  • How to restrict the view in a application?

    hello colleagues,
    need your help to find the best solution. There are two restriction which I need to implement:
    1. different view for single field groups
    2. different view for a complete application
    Additional Point 3) multiple view assignment to a role
    Point 1)
    I need to have for the Role the original view (leave standard) but only in the specific field group structure I want to extend with the additional view. The system need to check if the additional view is available if not it need to take the standard, if yes, than it should take the assigned view. My question, is this behaviour possible without enhancements only with the assignment of the new created view? If yes, how I can assign the view to the role that this behaviour will be covererd?
    Point 2)
    I need to change the Account structure but only for the Business application "COMM_BUPA" and not for all related Business application. The Account reference to so many application that I need to restrict the changes to avoid the overlapping to other areas and try to do this with a new created view which I assign to the relevant role. Is this possible, if yes, how?
    Point 3)
    Is it possible to assign multiple view to one role? Is there a specific setting required and how can I do this and where I assign the view to the role?
    System News: CRM 4.0 = Channel Management , EP 6.0
    Waiting for your responds -
    Thank you and regards,
    Anja

    Dear Thiruamala,
    Thank you for your answer. I still need more information, please can you help me again?
    Point 1)
    - Which Transaction (e.g. /nsu01) I can assign the iview to the role in the customizing?
    - Which are the process steps and what I need to do each step need more details - or a screen shoot?
    Point 3)
    I have customized a new view for accounts which I need to assign to all the roles and additional some roles need to have additional views depend on the roles. How I would realize this without having multiple views to a role? How I can work with screen variants in CRM 4.0?
    Thank you and best regards,
    Anja
    Message was edited by:
            Anja Herrmann

  • How to restrict the user in MIRO for not modifying  price

    Hi All 
    My requirement is How to restrict the users in MIRO screen for not modifying Material Prices  of only the for specific  ROH types .
    For example :
    Valuation class             RM description
      3021                             RM - A
      3022                             RM - B
      3024                             RM - C
    when ever we procure  the above Raw materials A,B and C and
    the Quantity of each Raw material @ 10 units  and value @ 1 INR  for each unit
    RM - A procured qty 10 @1 total price is INR  10
    RM - B procured qty 10 @1 total  price is INR 10
    RM - C procured qty 10 @1 total  price is INR 10
    total price of PO is INR 30
    when we received invoice material prices are  assume it INR 1 is excess for each material.Now the invoice price for each RM has become INR 11.
    in MIRO we want restrict the user to change the price from INR 10 to 11.
    suggest the best possible ways to restrict in MIRO screen
    Thanks & Regards
    Mala

    Dear:   
                      Take help of ABABPER fo implement exit using INVOICE_UPDATE or MRMH0003 Logistics Invoice Verification: Revaluation/RAP exit. If this does not help then seek help of MM functional who will help you to find exit for the required task.
    rEGARDS

  • How to restrict the user from making any changes in Sales order- item level

    Hi to all
    How to restrict the users from making any changes in sales order at item level if the same sales order is released by senior user through status profile.
    Regards
    Anish Parikh
    Edited by: anish parikh on Jan 24, 2008 5:16 AM

    Hi Anish,
    This can be achieved through the roles and authorization.
    This can be done through the basis team. they can create user profiles and roles.
    For the roles they assign some transaction codes so that they can view the only assigned tr. codes.
    Like that ur requirement can be done.
    Also u can prevent the user to change any fields in the sales order screen (VA02). for that please modify the authorisations.
    Hope i answers.
    Reward points if useful.
    Edited by: kaleeswaran bhoopathy on Jan 24, 2008 9:57 AM

  • !!!How to restrict user for making  changes in Sales order , partner level

    Hi all,
    Can anybody tell me how to restrict user for making  changes in Sales order  at partner level, is it through user exit?

    Hi Ruchi
    I hope u had gone to the screen fields which u want them not to be editable. So there u select all the fields contents which u do not want to to be changed and check the boxes with W.content and Display and save it. Once evrything is done u have to activate the particular transcation going in to the standard variants and put the name and click the activate button.
    Hope its clear
    Reward if help ful
    Sri

  • How to restrict service purchase orders in MEIS report

    We create service PO (Doc type NB)with acct assignment u201CKu201D and with material description (No Item category and without service master) , GR with MIGO and invoice with MIRO.
    While executing MEIS report (INTRASAT Arrivals-EU countries) it should not show the service PO. but due to EU region vendor
    System is populating Import tab at header and item level with Number of foreign trade data say as 0000203584 and Delivering country as GB
    How to restrict these service POu2019s is there any configuration or some input data I need to maintain in PO to restrict or any user exit to restrict.
    Regards,
    Gopala.S

    Hi Venu,
                 You can go for the Dynamic Selection, at the Purchasing Document Item Level and in that you will find Material,
    on selecting it, in the field for Material,
    Double Click it, a screen will pop-up Giving "=", Not Equal to Options, there you Select "not Equalt To" Option.
    that means, you want the line item with the Material No present in it.
    Hope it helps you.
    regards,
    Yawar Khan

  • How to restrict field values

    Hello Experts,
    I got a basic question to ask. Iu2019ve created a custom table and then attached a check table with one of its field. This field is not PK. Now through help u2018F4u2019 I can see the values coming from check table. But other then those values let say if I enter any data (any garbage) it is getting stored in the table. Can somebody tell me how to restrict this field so that user must have to select the values from the list not on his own?
    Thanks

    Do a validation of the input that the user gives.
    Select single xxx from Ztable
    where xxx ( eq selection screen parameter )
              ( IN select options )
    If Sy-subrc eq 0.
    Through an error message
    Message e000 'Pls enter a correct value for the XXX '
    Endif.
    The whole code should be under AT selection screen event.
    i guess you will agree with this solution.
    Thanks,
    Karthik

Maybe you are looking for

  • HP OfficeJet Pro 8500A Plus "unable to connect to the server"

    I have had this printer for a couple years and now it is saying it is unable to connect to the server.  The light under the wifi symbol is not lit up and nothing happens when I press that button.   I have restarted the printer, reinstalled the driver

  • Replace function in xslt for BPEL 2.0

    Hi, We have a requirement where special characters (e.g. \, ., &, @) will be replaced with ' ' .  As the position of the special characters are not fixed, I believe I won't be able to do it by substring function. Got some link suggesting this  <xsl:v

  • Using MainStage with multiple MIDI inputs (two keyboards!)

    Hi Guys, I use two keyboards for my live gigs, and am thinking about moving all my sounds over to MainStage. Most of my recording uses Native Instruments and Logic's standard AU instruments, and then I have to find similar sounds on my Korg and Kurzw

  • Run-as role not active for filters

    Hi, I have a servlet which has a security role assigned. Accessing a secured datasource from inside the servlet works fine. Additionally I have a filter configured for that servlet where I also need to access the secured datasource. <filter> <filter-

  • Mac on 10.5 can't connect to Mac running 10.7 with firewall on

    I have a PowerPC Quad G5 tower running  Leopard (10.5.8), and a Macbook Pro running 10.7.2 Lion. The Macbook is my main computer. The old tower needs to be able to read files from my shared folder on the Macbook. I have made sure File Sharing is enab