Validate that user should not enter more than specified number of digits/chars?

Hello
First case: I have placed a TEXT field on the form. Now i want to put the below validation,
1) User has to enter only numbers (no decimals)
2) Only 10 digits
If not i need to
1) Alert app.alert
2) Make the field either CLEARIng or considering & resetting only the first 10 digits (if user entered more than 10 digits)
2nd case: Same as above, a TEXT field, but, the data is with a DECIMAL notation, the allowed lenghts are as
2 digits as prefix to decimal
2 digits as suffix to decimal position
example, 35.88
Pls. let me knw the Java Script for these 2 cases or do you suggest me PATTERN validation if so, can i CLEAR or reset  and if so, pls. let me know under which TAB(Display / Edit / Data) i need to put the PATTERN validation?

Firstly if you are only allowing numbers then the field should be a numeric field not a text field. You can use patterns to allow only whole numbers or to have 2 digits on either side of the decimal.
In regards to the number of digits you can use the len function to determine the length of the data and if it is too long give a message or clear it.

Similar Messages

  • Dont allow user to enter more than specified number of digits/chars?

    Hello
    First case: I have placed a TEXT field on the form. Now i want to put the below validation,
    1) User has to enter only numbers (no decimals)
    2) Only 10 digits
    If not i need to
    1) Alert app.alert
    2) Make the field either CLEARIng or considering & resetting only the first 10 digits (if user entered more than 10 digits)
    2nd case: Same as above, a TEXT field, but, the data is with a DECIMAL notation, the allowed lenghts are as
    2 digits as prefix to decimal
    2 digits as suffix to decimal position
    example, 35.88
    Pls. let me knw the Java Script for these 2 cases or do you suggest me PATTERN validation if so, can i CLEAR or reset  and if so, pls. let me know under which TAB(Display / Edit / Data) i need to put the PATTERN validation?

    Firstly if you are only allowing numbers then the field should be a numeric field not a text field. You can use patterns to allow only whole numbers or to have 2 digits on either side of the decimal.
    In regards to the number of digits you can use the len function to determine the length of the data and if it is too long give a message or clear it.

  • Residual payment should not allow more than Vendor Invoice

    Hi,
    Eg: Vendor has booked invoice 5000 INR, when user make payment through F-53 or F-58 through "Residual" payment user can pay more than invoice 5002 INR and below accounting entry is posting.
    Bank Cr 5002 INR
            To  Vendor Dr 5000 INR (Invoice amount)
            To  Vendor Dr 02    INR  Excess than invoice 
    Business requirement is system should not allow pay more than invoice amount. How to control suggestion would be appreciated.
    I have done below settings for your understanding here system configuration.
    1. OBA3: Under "Permitted Payment difference" zero for Gain , Loss , Amount, Percent & Adjust Discount By  However "Permitted Payment Differences for Automatic write-Off(Function code AD)" zero.
    2. OBA4: Cash discount per line item: Zero and Under "Permitted Payment difference" Revenues, Expense, Percent & Cash discount  put Zero.
    Regards,
    Babu.

    Hi Prashant,
    I have restricted many fields to use through screen variant now user can not pay more than Invoice amount except through Residual payment process.
    Client side management strongly says that they want to use Partial and Residual payment process options but user should not allow pay more than invoice amount.
    If any solution please guide me.
    Regards,
    Babu.

  • Should not allow more than one attendance or absence code on any given day

    Hi Hr Experts ,
    I need to use customer enhancement in my program.
    CATS should not allow more than one attendance or absence code on any given day. requirement is
    that each day will be either a full attendance or full absence and there will not be any mixture.
    Function/Program: u2022
         EXIT_SAPLCATS_006: CATS: Validate Entire Time Sheet
    transaction code CAT2.
    how to code the same?

    hai,
    check the Time constraint class for absence/attendance types.
    Regards,
    Chiran Reddy.

  • Downpayment should not be more than PO Value

    Dear All
    Down payment against purchase order
    Downpayment should not be more than PO Value
    here i want control material wise taht mean some of the material shouble be allow the exces payment and some of the material should not be allow the exces amount. againt purchase order
    Regards
    Navap

    Hi,
    For your you need to write Validation in OB28 and take help of your ABAPEr, the logic will be:
    1. Create Set through GS01Table MARAField MATNR
    2. Pre-Requisite
        BKPF-BLART = 'Down payment Document"
       Check
        Give Exit Name such as UF101 and in this exit you can ask your ABAper to write code that
    if Material on PO is in Set (created in Step 1) and Advance Amount > PO Amount then post DP
    Message
    Give your own message number
    Hope this helps!
    Br,Vivek

  • Base Amount should not be more than PO net price

    hi
    Base Amount should not be more than PO net price , in MIGO  if the Material is excisable excise tab will be populate i can able to change the base amount . i need the restriction Base Amount should not be more than PO net price , this requirement for purticarly for the dealar relegated tax codes . i am not maintain any conditions relegated BED ,ECESSand SECESS in the taxcode . i will eater the excise tab in MIGO or J1IEX Directly . please advise me how to restrict
    @sakhi

    if that is the case why are you proividing the Authorization for MIGO_GR transcation...........Restrict the MIGO transaction and try to give MB01 transaction .So that there will no discrepancy in PO to GR....

  • ]The requirement is  that users should not allow  them to save if the indic

    hi guys
    when  u are doing GR in  the excise tab page  if u find an <b>icon (yellow one</b>) called <b>more data</b>  if  u click that one  u  go  to other screen where u will find a <b>tab page </b> named <b>miscellaneous</b> ther u can see <b>MRP indicator</b> check.
    <b>The requirement is  that users should not allow  them to save if the indicator is not ticked</b>.
    help me  guys
    kiran

    You can either use Tcode NACE for output procedure pr follow following path in SPRO:
    IMG - SD - Basic Functions - Output control - Output Determination - Maintain Output Determination for Billing Documents - Maintain Output Determination Procedure
    There for your output procedure used for the desired output type maintain requirement routine as 62 : Billing doc released to acctng.
    This requirement is met if the billing document is complete checking the header, pricing, and all items and has already been passed to financial accounting. The requirement also checks that the document is not relevant for an invoice list. This requirement can be assigned to billing document output condition types that should only be processed when the billing document is complete and forwarded to accounting. This requirement can only be used with billing documents.
    Regards
    JP

  • Purchase Order Quantity should not be more than PR quantity

    Dear all,
    We want to control Purchase Order quantity against Purchase Requisition.
    We have configured message setting 00 076 as  ERROR. when we create Material PR for lets say 100 quantity. When we create single or multiple Material PO against this PR for more than 100 quantity system is giving us error. This is exactly what we needed.
    But due to this message setting when we create Service PR and give service quantity lets say 100. and when we create Service PO and give Service quantity 60. First time system is allowing to save the Service PO.
    When we create another Service PO with reference to same Service PR system is showing error as we have configured. Even though quantity 40 is still available.
    What we want is to have control on quantity of Purchase Order for Material as well as service. Quantity should not be more than PR quantity.
    Is there any other way to have such control? please provide other available options to configure.
    Regards
    Kant

    Hi,
    06 076 is only for applicable only in case of material.
    For Service and material both, use 06 400 as error "Materials/services for requisition & & already ordered with & &"
    NOtes 786736
    This may help u !
    Regards,
    Pardeep malik

  • How to write validation in java sript item should not allow more than 20 ch

    HI,
    I need to write validation in java script for a item it should not allow more than 20 characters.
    Thanks
    Nr

    If this answers your question, please mark your question as answered (so everyone knows it is answered) and assign points where you see fit..
    Thank you,
    Tony Miller
    Webster, TX

  • PO Qty should not be more than PR Qty

    Hi All,
    I am creating a PO from PR.
    I want that the PO qty should never be more than PR qty, and if so it should give an error.
    Can anyone tell me the BADI or exit for this? I have already seen exits for PO and PR, but I am not able to figure out which exit to use.
    Thanks in advance.
    Vinod.

    Hello,
      You can use the function exit EXIT_SAPMM06E_012 to carry out this validation.
    Thanks,
    Venu

  • Confirmation qty in co11 should not be more than operation GR qty (subc)

    hi,
    i have an issue after the operation(external process). we made GR in migo. it will be updated in particular production order
    co03 - operation overview - select operation - ext proc tab - GR quantity ( here it is updated after migo)
    now we have to do confirmation in co11. yield+ scrap = GR quantity(external operation quantity) 
    it should not more that of GR quantity.
    sometimes they do partial receipt and do remaining operation in inhse.
    so system should check First operation GR quantity , while making confirmation in co11
    is it possible????
    thanks in advance...

    Prakhash,
    You will have to implement the Production Order Confirmation user-exits to check based on your requirement. Try the below user-exits and see which one meet's your requirement.
    CONFPP01 |PP order conf.: Determine customer specific default values  |
    CONFPP02
    PP order conf.: Customer specific input checks 1
    CONFPP03
    PP order conf.: Cust. specific check after op. selection
    CONFPP04
    PP order conf.: Customer specific input checks 2
    CONFPP05
    PP order conf.: Customer specific enhancements when saving
    CONFPP06
    PP Order Confirmations: Actual Data Transfer
    CONFPP07
    Single Screen Entry: Inclusion of User-Defined Subscreens
    Try and revert back.
    Regards,
    Swapnil

  • Downpayment should not be more than PO Value including tax and other charg

    Hi
    when we create a down payment request thru F-47, it checks on basic amount ,but we want it checks with total PO value and at the same time for all po line itmes. How is possible. please help.
    Regards

    Dear Avinash,
    We had the same issue.
    There is no standard configuration in SAP because system  throws error when the net value in PO is exceeded.
    But your requirement is when Gross value (Net Value + Freight, legalization charges etc) is exceeded the system should throw the error.
    We had to take help of our ABAP team to create user exit.
    They added a break point with the logic of throwing error when Gross value is  exceeded.
    It worked for us.
    Regards
    Saurabh

  • User should not be voiding the dispute created by other User

    Hi,
    I having an Issue at my work place.I have got a Requirement from the Finance Functional Folks that the user should be able to create the dispute case and also void the case created by him.But the user should not be able to void the dispute case created by the Other user.
                                           As of now when I am testing the user is able to void the dispute case created by him and also void the dispute case created by other user.So now I am trying to restrict so that user should not be able to void the dispute case created by other user.
    In the Roles Built at work place I have fdm_coll01-collections Management and also udm_dispute-dispute manamgement T-codes built in One Role.can any one of you let me know at which authorization object this can be restricted as I am having a hard time trying to find out.
    In Ideal SAP World what my idea was a Dispute case created by the user in Production should not be allowed to void the dispute case.so creating a dispute case and voiding a dispute case should be treated differently and should be done by different persons in an organization.

    In Ideal SAP World what my idea was a Dispute case created by the user in Production should not be allowed to void the dispute case.so creating a dispute case and voiding a dispute case should be treated differently and should be done by different persons in an organization.
    So why not talk back to your FI Folks. Also check with your Compliance Team.
    But anyhow, I do not see in the real world a conflict of duties by giving access to both creating a Dispute and voiding a dispute and more over voiding a dispute is considered critical since it would allow to Release Blocked Orders.
    But the user should not be able to void the dispute case created by the Other user.
    If every transcation and conversation with a Customer is recorded in the Collections Management system, I do not see a requirement for the same Team Member having access to close a dispute created by other user. 
    AB.

  • User should not be able to change the payment terms

    Dear All,
    My issue is that user should not be able to change the payment terms in any of the document.I have tried to do it through authorization but it is not working out.
    Mona.

    Dear Mona,
    This may only be done through SP_Transaction_Notification.
    Thanks,
    Gordon

  • Flash lite loadmovie is not loading more than 5 jpeg images

    Hi,
    I am working on flash lite 2.0 for last few days. I am facing
    a big problem when using duplicatemovieclip and loading jpg images
    on these movieclips. It is showing an error that "it can not load
    more than 5 images on one frame on one click "
    I don't find any solutions for this. Please help
    Regards ,
    Gunjan

    why not load them sequentially using preloader code?

Maybe you are looking for

  • PO with FREE item

    HI expert,               i want to make a Po with free item. when i ticked on free the net price colume is blank and condition is also not appearing but i want give a value in net price colume so kindly suggest there is any config change is required

  • Help required in Idoc mapping!!

    Hi, I have an idoc to file scenario: Idoc looks like this Idoc Header E1BPE1WLMV (0.....999)      field1 E1BPE1MALG (0.....999)       field2 Target Details      field3 My requirement is that : field 3 should b mapped to only the first occurence of fi

  • Lost IPTC Info

    I needed larger storage so I installed several internal HD's to cover future growth. After "upgrading" to CS4 and copying everything over, I seem to have lost a lot, not all, IPTC data on my images. Or should I say, more accurately, I lost all IPTC d

  • How Both View Selector and Column Selector in one report dashboard section

    Can we use a view selector and column selector inside a report in one section of the dashboard? env: obiee 10g Appreciate any links and pointers Thanks in Advance Kris Edited by: user566193 on Mar 22, 2011 10:18 PM

  • ALV edit not capturing new value

    Hi In my alv i have made one field as editable..when i edit the field and click save button the control comes to below code.  CALL METHOD gro_grid->get_selected_rows     IMPORTING       et_index_rows = gwa_selected_rows. *Through the index capturing