How to rescrict the user to enter a manual condition type once in pricing

Hi All,
We are using a condition type ZSP1 in our pricing procedure. I want that the user should be able to enter the condition type only once during pricing.
eg Suppose the user has entered ZSP1 as 100 in the sales order , then he should not be able to enter ZSP1 again in the pricing. Only one entry should be allowed for the condition type ZSP1
Please respond if you need any further clarification.
Regards
Adity

Hi,
  you can Restrict the entry of Condition type Twice with Following User Exit
USEREXI
                         USEREXIT_PRICING_PREPARE_TKOMK
USEREXIT_PRICIN
we have Implemented for one our Client

Similar Messages

  • How to restrict the user to enter only numeric values in a input field

    How to restrict the user to enter only numeric values in a input field.
    For example,
    i have an input field in that i would like to enter
    only numeric values. no special characters,alphabets .
    reply ASAP

    Hi Venuthurupalli,
    As valery has said once you select the value to be of type integer,once you perform an action it will be validated and error message that non numeric characters are there will be shown. If you want to set additional constraints like max value, min value etc you can use simple types for it.
    On the project structure on left hand side under local dictionary ->datatypes->simple types create a simple type of type integer
    The attribute which you are binding to value property ;make its type as simple type which you made
    Hope this helps you
    Regards
    Rohit

  • How to Limit the user to enter in Array

    Hii Friends'
    I am having 1 array control in front panel .In which the user will enter the values.... now actually in real time i will visible upto 20 elements in the array control ...But the user have to enter only 5 elements in the array ....how to restrict them......... 

    Will the array ever containg more than 5 elements?  If so, would you want to have more than 5 elements to be shown?   If you could have 6 elements shown, would you want the user to still be restricted to only editing the first 5?
    You can resize your array on the front panel so that only 5 elements are shown.  Then right click on the array, Visible Items, and remove the check mark from index display.  Now they are restricted to seeing 5 elements and have no means of indexing the array on the front panel to get to any others.
    If your use case is more complicated than that, then you will need to explain it more so that a programmatic way can be devised to allow or disallow editing of other elements.

  • How to force the user to enter a value in the prompt

    Is there a way to force the user to enter a value in the prompt before they run the report?
    We have a customer specific dashbaord. The user has to enter a customer number in Dashbaord prompt on a first page of the dashboard. We store that value in a presentation variable. That presenatation variable value is being referenced in all the other pages of the dashabord. If the user does not enter a values in the first page and directly navigates to the other pages on the dashbaord, the reports on the other pages start to run for all the customers. Is there a way to force the customer to enter a value in the prompt before running any of the reports on the dashboard?
    Thanks!

    by Answer prompts, do you mean Column prompt?
    I can not use Column prompt in this senario as the user should not have to enter the same customer number over and over again when he navigates from one page to another on the same dashboards. If there is a way to default the column prompts then this would be an acceptable solution.
    I have already defaulted the prompt to a value as suggested in hte blog, but the issues occurs when the user erases the defaulted value. Is there are way to set the default value within the report?
    Can you please explaing mroe about option 3 regarding Java Script. Also please let me know what other options there are so that I can check whether they will fit my needs.
    Thank you very much!

  • How to restrict the user to enter the item in purchase order?

    I want to restrict user to enter the item in purchase order.
    How can i do this?
    Please help
    Abhishek

    Hi,
       You may create a transaction variant for ME21N in SHD0 transaction. Make the item field as output only as shown below:
    Result:
       You may check the doc: Learning SHD0 with Example
    Regards,
    AKPT

  • How to force the users should enter records in detail block.

    Hi members,
    we have a master-detail form. ex like DEPT (master), EMP(detaisl multi record). after entering new dept, i want the users shoudl not leave with out EMP entries for that new dept. how can we achieve this.
    thanks in advance

    In Pre-insert trigger of Master block just check if there are any records in the detail block before commiting the record. If not found then Raise A Excepiton.

  • How to get The users from a Collaborator that is type Group.

    Hello, I'm trying to get the users (and their emails) of a collaborator inside a Master Agreement that is type group.
    I've tried the following methods:
    1- Using a IBeanHomeLocator to get the GroupIBeanHomeIfc (with the static variable of sHOME_NAME) and then trying to get the Group with the DocumentId that the colaborator's method (getDocumentId()) returns and the GroupIBeanHome method findGroup().
    The result was null
    2 - Using exactly the same method as before, but instead of using the DocumentId, I did a query, in order to get the field USER_GROUP_OBJECT_ID,  to get the Id of the group.
    The result is still null.
    I'm not sure if there is a direct way to get it, or if i'm misusing the GroupIBeanHomeIfc.
    Thanks in advance!

    Hi Oscar,
    In the document collaborator class there is a method getCollaboratorType() which returns CollaboratorTypeEnumType and there are certain values assigned to them.
    user - A user collaborator
    group - A group collaborator
    contact - A user contact
    So, hashcode of 2 returns the group.
    Please have a look in to the below code.
    collaborators = doc.getCollaborators();
         if(collaborators.size() > 0)
            collabIter = collaborators.iterator();
              while (collabIter.hasNext())
                 member = collabIter.next();
                 collabType= member.getCollaboratorType();
                 hashValue= collabType.hashCode();
                    if(hashValue==2)
                              collabName= member.getDisplayName();
                              throw new ApplicationException("collabName:" +collabName);
    In the above code collabName returns the name of the group, with this you can search for the specified group using IbeanHomeLocator for group and then you can get the members in it and their mail Id's
    Hope it helps you and let me know if you need any assistance.
    Thanks,
    Raj.

  • How to find the corresponding programs for a particular condition type

    Hi experts,
    I have one condition type( KSCHL ).
    I need to find the programs where this condition type is used.
    Thanks in Advance.

    Dear Nagireddy,
    You have to go further by using where-use list option(Arrow Direction Icon) from SE11 or from SE38 editor. Then the system will show you the places where the condition type KSCHL is being used.
    Thanks & Regards,
    Dinesh

  • How to get the user entered data?

    Hi all,
    I have created an HTMLB DynPage component.
    In That i have created my input screen with textboxes using response.write method.
    i have added one onConfirm event on which the data whould validate.
    so onConfirm method im trying to get the data with request.getParameter method which returns null...
    how to do...how to get the user entered data to do my validations...can anyone plz advice.
    Thanks,
    Viswes

    Hi
    inputfield or textbox component entered directly using response.write(...) are not htmlb , but html.
    to create portal input field (ie HTMLB), you should do something like
    this in the doProcessBeforeOutput member function
    InputField field1 = new InputField("Id1");
    field1.setSize(8); // 8 characters
    this.getForm().addComponent(field1);
    and in doProcessAfterInput member function
    InputField field1 =
    (InputField) this.getComponentByName("Id1");
    you can then manipulate the content of the field.
    Hope this help,
    Guillaume

  • How to customize SAPlogon so that the user cannot enter transaction code?

    I use PFCG to create a role which limit the choices of menu.  I create a user and set the role to the user.
    I would like to disable or hide the COmmand Field so that the user cannot enter transaction code directly.
    Is it possible to do so?
    If yes, would anyone show me how?
    Any discussion is welcome.

    anyway you are going to restrict the user authorization vai role, insted of going throught the whole tree to execute the tcode there is shotcut as command line. here you can save much more time for the user insted going through the tree always. there is no harm for the system if you keep the command line option. What and why you think it should be disabled?
    Cheers,
    -Sunil

  • How to ristric the user when data enter in lov column.

    Hi all,
    i have one page,page having lov column and submit button.
    here user select the value in to lov column and click on the submit button details ll be displayed.
    but user did not select the value in to lov means user enter the value in manually and click on the submit button at that time lov window ll be open.so how to ristric the user.plz help me its very urgent.
    Thanks
    Seshu.

    Hi,
    What is your requirement?
    You want to validate value entered by user in LOV field or not?
    If yes, then this the correct behavior.
    In no, you can disable client validations. In this case the value entered won't be validated against the LOV vo and value will be stored in the vo attribute mapped to LOV bean.
    Thanks,
    Mukesh Uchaniya

  • How to capture the user change in an input field on a selection screen?

    I am coding a selection screen in which there are two input fields. The first field takes a Unix directory from the user input. Based on the input value, the second field will be populated with a the name of a file under the corresponding directory.
    My question is how I can make the program capture the user input without having to make the user press ENTER after they enter the value in the first field?
    Any help will be greatly appreciated.

    Venkat,
    Actually you led me to the real solution! It's the function module DYNP_VALUES_READ that does the trick for me. This function enables the program to capture dynamic user changes without recourse to PAI. Please refer to the code below:
    REPORT   zreiabsintf MESSAGE-ID zreiabsintfmc.
    *<HGDC------------------------------------------------------------------
    *  Selection screen for the conversion program
    *HGDC>------------------------------------------------------------------
    SELECTION-SCREEN BEGIN OF BLOCK input WITH FRAME TITLE text-001.
    PARAMETERS: p_indir   LIKE epsf-epsdirnam OBLIGATORY,                   " Inbound file directory
                p_infile  LIKE epsf-epsfilnam DEFAULT gc_infile OBLIGATORY, " Inbound file name
    SELECTION-SCREEN END OF BLOCK input.
    *<HGDC------------------------------------------------------------------
    *   Displays a file-open dialog when the user clicks the search
    *   help button next to the inbound file text field. The user
    *   can select the inbound file visually.
    *HGDC>------------------------------------------------------------------
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_infile.
    * Capture any user change to the directory.
      PERFORM check_dir_change.
    * Display the file open dialog
      PERFORM file_open_dialog CHANGING p_infile.
    *<HGDC------------------------------------------------------------------
    * Global constants
    *HGDC>------------------------------------------------------------------
    CONSTANTS:
        gc_indir  LIKE epsf-epsdirnam
                  VALUE '/interfaces/<SID>/inbound/',      " Default inbound directory template
        gc_infile LIKE epsf-epsfilnam VALUE 'input'.       " Default inbound file name
    *<HGDC------------------------------------------------------------------
    * Global data
    *HGDC>------------------------------------------------------------------
    DATA:
        gs_dynpfields   TYPE dynpread,                        " Fields of the current screen
         gt_dynpfields   LIKE STANDARD TABLE OF gs_dynpfields. " Table of the screen fields
    *&      Form  file_open_dialog
    *       Opens a dialog window for the user to choose a file in
    *       the specified Unix directory.
    *      <--P_FILE is the file to be selected.
    FORM file_open_dialog  CHANGING p_file.
    * Validate the directory.
      OPEN DATASET p_indir FOR INPUT IN BINARY MODE.
      IF sy-subrc NE 0.
        MESSAGE i001(zreiabsintfmc) WITH p_indir.    " Unable to open the given directory
        EXIT.
      ENDIF.
      CLOSE DATASET p_indir.
    * Call the dialog window to open a file in the directory.
      CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
        EXPORTING
          directory        = p_indir
        IMPORTING
          serverfile       = p_file
        EXCEPTIONS
          canceled_by_user = 1
          OTHERS           = 2.
      IF sy-subrc NE 0.
        MESSAGE i002(zreiabsintfmc).                 " Failed to open the file.
        EXIT.
      ENDIF.
    ENDFORM.                    " file_open_dialog
    *&      Form  check_dir_change
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM check_dir_change .
      CLEAR gs_dynpfields.
      CLEAR gt_dynpfields.
      gs_dynpfields-fieldname = 'P_INDIR'.
      gs_dynpfields-fieldvalue = p_indir.
      APPEND gs_dynpfields TO gt_dynpfields.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname               = sy-repid
          dynumb               = sy-dynnr
        TABLES
          dynpfields           = gt_dynpfields
        EXCEPTIONS
          invalid_abapworkarea = 1
          invalid_dynprofield  = 2
          invalid_dynproname   = 3
          invalid_dynpronummer = 4
          invalid_request      = 5
          no_fielddescription  = 6
          invalid_parameter    = 7
          undefind_error       = 8
          double_conversion    = 9
          stepl_not_found      = 10
          OTHERS               = 11.
      IF sy-subrc  NE 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      READ TABLE gt_dynpfields INTO gs_dynpfields INDEX 1.
      p_indir = gs_dynpfields-fieldvalue.
    ENDFORM.                    " check_dir_change
    Thanks for all your answers! The problem is now solved.
    Edited by: Ning Hu on Apr 9, 2008 11:32 AM
    Edited by: Ning Hu on Apr 9, 2008 11:34 AM

  • Reading from a file. How to ask the user for file name at run time????

    I have the code to read from a file but my problem is how to prompt the user for the file name at run time.
    import java.io.File;
    import java.io.FileNotFoundException;
    import java.util.InputMismatchException;
    import java.util.Scanner;
    public class FileRead {
        public static void main(String args[]) {
            Scanner scan = null;
            File file = new File("Results.txt");
            String number;
            try {
                scan = new Scanner(file);
                while (scan.hasNext()){
                number = scan.next();
                System.out.println(number);}
            catch (FileNotFoundException ex1){
                System.out.println("No such file");
            catch (IllegalStateException ex2){
                System.out.println("Did you close the read by mistake");
            catch (InputMismatchException ex){
                System.out.println("File structure incorrect");
            finally{
                scan.close();}
    }Any hints would be greatly appreciated. Thank you in advance

    I have read through some of the tutorials that you have directed me too and they are very useful, thank you. however there are still a few things that i am not clear about. I am using net beans 5.0 I have placed a text file named Results.txt into the project at the root so the program can view it.
    When I use the code that you provided me with, does it matter where the file is, or will it look through everywhere on the hard drive to find a match?
    This code compiles but at run time it comes up with this error
    run-single:
    java.lang.NoClassDefFoundError: NamedFile
    Exception in thread "main"
    Java Result: 1
    BUILD SUCCESSFUL (total time: 3 seconds)
    import java.util.Scanner;
    import java.io.*;
    class NamedFileInput
      public static void main (String[] args) throws IOException
        int num, square;   
        // this Scanner is used to read what the user enters
        Scanner user = new Scanner( System.in );
        String  fileName;
        System.out.print("File Name: ");
        fileName = user.nextLine().trim();
        File file = new File( fileName );     // create a File object
        // this Scanner is used to read from the file
        Scanner scan = new Scanner( file );     
        while( scan.hasNextInt() )   // is there more data to process?
          num = scan.nextInt();
          square = num * num ;     
          System.out.println("The square of " + num + " is " + square);
    }his is the code that i used. It is the same as the code you posted for me (on chapter 23 I/O using Scanner and PrintStream) Sorry im just really stuck on this!!

  • How to find the user exits and BADIS from SPRO

    Hi all,
    please let us know how to find the User exits or BADIS for an application from SPRO.
    Regards,
    Madhavi

    Hi Varisetty,
    Finding user exits and BAdis from SPRO can be cumbsersome. In most instances you know the standard SAP program and want to check (find) an exit called in the flow of the transaction. You can do this as follows:
    For User Exit:
    Put "/h" in the command box (to start debugging)
    Execute your transaction
    When you enter debugging - put a breakpoint at statement
    CALL CUSTOMER-FUNCTION
    the control will stop at all calls to User Exits
    For BAdi (it's simpler)
    Go to class CL_EXITHANDLER in SE24
    Enter method GET_INSTANCE
    Put a breakpoint in this method
    Run your standard transaction - control will stop at all BAdis called within the flow since this method is used to check BAdi implementations before invoking them
    Also, if you want to find enhancements by package - go to SE80, enter the package and check function groups starting with X - those contain function exits (conventional user exits). For BAdis in a package, there is normally a separate tree node (under the package) for Enhancements hence clearly identifiable.
    Cheers,
    Adi

  • Chat App: how to store the user IP in database when they login.

    hello,
    i am working on chat application. first i made a login GUI form. after login when we run the Chat program, it ask the ip address of the server to whom it want to connect. and if u enter the ip address, it will connect to the server and chat will begin, thats working perfect.
    but i want to show the list of users who r logged on and when i simply click on the user name, chat should begin.
    i have the logic that when any user log in, then its IP address will be stored in the database. this ip address will shown to the online users.
    but i dont know how to store the user information in database when they log in. can any body suggest me wht lines of code i should use.
    thanks.

    palakk wrote:
    i have the logic that when any user log in, then its IP address will be stored in the database. Bad approach. That will only work if this chat is only intended for use on a LAN. If it's used on the internet, then your users' IP addresses will almost always be either a) those of their routers, or b) private IP addresses, and in both cases, multiple users can have the same IP address.
    this ip address will shown to the online users. Why would you want to do that? I want to chat with "Bill", not with "1.2.3.4".
    but i dont know how to store the user information in database when they log in.Do the same thing that you're currently doing to store the IP address, but with the other information you want to store.
    can any body suggest me wht lines of code i should use. This is not a code writing service.

Maybe you are looking for