I am trying to masked an SSN field depending on if yes is choosen or not

Hi All, Good morning. I am working on a form that should display a masked SSN field in the format of XXX-X9-9999. I did come across the following script on the Adobe Designer forum, and apply it to my form creating two fields, and put the code on the exit event, but it is not working. Please what is wrong with the code, and is there any other way it could be done?
if(form1.page1.subform1.Maskedfld1.rawValue != null) {  
var ssn = form1.page1.subform1.Maskedfld1.rawValue;  
var regExp = /^(\d{9}|\d{3}-\d{2}-\d{4})$/;  
if (regExp.test(ssn)) {    
regExp = /^\d{9}/;
      if (regExp.test(ssn)) {
      this.rawValue = "***-**-" + ssn.substring(5,9);
     form1.page1.subform1.Maskedfld2.rawValue = ssn;     }
      else {
          this.rawValue = "***-**-" + ssn.substring(7,11);
          ssn = ssn.substring(0,3) + ssn.substring(4,6) + ssn.substring(7,11);
          form1.page1.subform1.Maskedfld1.rawValue = ssn;
} else {
   xfa.host.messageBox("SSN must be in the form 123-45-6789 or 123456789.","SSN Error",0,0);
    xfa.host.setFocus("form1.page1.subform1.Maskedfld1");
Thanks
v/r
Tammy

I tried the same code on a single field on exit event, with just one modification: Maskedfld2 replaced with Maskedfld1
It does mask the value.
Can you please be more specific as to what is the expected behaviour.
Thanks

Similar Messages

  • Masking the SSN field in ESS.

    Hello Everyone,
    Can somebody help me in masking the SSN field in ESS.
    In ESS when we go to personal information Iview and click on Personal data and click on change; users are able to change the SSN field. and save the changes. Is there any table where I can disable this SSN field from changes and make it read only like Date of birth.
    We are using ESS Business package for 4.6c.
    Any help will be greatly appriciated.
    Thank you in advance!
    Sasi.

    Try once at this place.
    go to View V_T588M_ESS
    Enter The Function group.
    (To get the Function group go to view T77WWW_SC.
    Check the Function module for ticked for PZ13.
    Then go to se37 and put the FM name and then click GOTO->MAIN PROGRAM
    Now if ur program name is SAPLEHF5 then EHF5 is Ur function group.)
    and then U will find a screen after entering FUnction group where U can change the field attributes accordingly (Display, Edit, Hidden etc).
    What is the country for which U are displaying the personal data screen.
    ~ BiSu
    Message was edited by:
            Biswajit Das

  • How to mask a particular field depending on the user for a protected pdf?

    Hi,
    I have a requirement of showing a particular fiels data to only one user and to hide that critical data to others. For example, suppose I have two users viz, Primary user and Secondary user. I have a field named UID in my protected pdf form which has some critical data. I want only my Primary user enter and view the information entered in the UID field. When the Secondary user opens the document using his credentials, he should not be able to view the data in the UID field. It should be displayed in astrix as in a password field. Can anyone help me how to acheive this for a protected document?
    Thanks and Regards,
    Maria Johni

    It is possible. You should be having a field in your XSD schema for the username. Bind the username to a hidden field in your form.
    In the designer, in form initialize event,
    write the code: if hiddenfield.rawValue == "person A"
                                 subform1.presence = "hidden";
                           if hiddenfield.rawValue == "person B"
                                 subform2.presence = "hidden";
                                 subform1.presence = "visible"   }
    In your process, when your moving from one step to other step, update the uname accordingly and the form will respond according to the username.
    Regards,
    Chaitany

  • ESS webdynpro personal information iView SSN field

    Dear Support,
    I am working with Personal Data WebDynpro iView (sap.com/essuspdata/Per_Personal_US) in EP 6.0 SP18 and ECC 5.0.  Currently, the SSN field is editable.  How can I disable this feature. Please advise.
    Thanks,
    -Bharath

    Did you check this Masking the SSN Field in ESS Personal data iview. ?
    ~Suresh

  • How to mask SSN field?

    Hi,
    Currently, the SSN field on the contract management screens (FPP1, FPP2 and FPP3) are displayed as 123456789. But, once the user saves the contract details and again views it using FPP2 or FPP3, our client wants the SSN field to appear as XXX-XX-6789. I understand that the traditional SAP HR transactions (PA30) do format the SSN and display it as 123-45-6789. However, is there a way to tackle my requirement(masking the first 5 numbers with X)? Did somebody face a similar hurdle in any of your IS-U implementation(s)? How did you tackle?
    Your comments would be highly appreciated.
    - Mrk

    Hi,
    You can create one conversion exit function module on that field data element and attach it.
    Cheers
    Prasad

  • Masking SSN field

    Hi,
    I have a requirement to mask SSN field on PA20 and PA30 transactions. I am aware of making changes in V_T588M to mask fields at the infotype level. I have got it done. However I do not know how to replicate the same at PA20 and PA30 transaction levels.
    Any thoughts as how to about it shall be helpful.
    Thanks in advance,
    VG

    Hi ,
    SSN field will be there for some specifc countries . Ex india dosent have a SSN field in IT0002.
    Your requirement will be for some specific countries where SSN is present and u need to mask it like USA ..
    // have a requirement to mask SSN field on PA20 and PA30 transactions.
    PA20 is display mode then i dont suppose u need to code for this . Just check if thisis on PA40 tcode.
    For PA30 if this is for set of countries then include ZXPADU02 is ok for PBO . If this is for a specific country like USA then you will have to handle the code for that particulare country in that screen no  like 2010 of MP000200.
    Loop at screen .
    if condition.
    screen-input =  '0'.
    modify screen.
    endif.
    endloop
    br,
    Vijay.

  • We are trying to do a Quick payment from payment workbench and getting 'FRM-41830: List of values contains no entries' error for payment document column/field. Payment document setup looks good. Not sure what the issue is.

    We are trying to do a Quick payment from payment workbench and getting 'FRM-41830: List of values contains no entries' error for payment document column/field. Payment document setup looks good. Not sure what the issue is.

    Already gone through following three notes but didn't found resolution.
    APXPAWKB: FRM-41830 When Clicking on Payment Document LOV (Doc ID 1081305.1)
    R12: APXPAWKB: Payment Document Lov Is Empty When Entering A Payment (Doc ID 857587.1)
    R12: Payment Workbench Error: FRM-41830 List Of Values Contains No Entries (APXPAWKB.FMB) (Doc ID 1323875.1)

  • Error while trying to add a new field in search criteria by VO extension

    Hi,
    I am trying to add a new field by using the VO extension to a seeded OAF page used to search Repository contracts.
    I get the following error on opening the page after I have compiled my code on server and bounced apache.
    Message not found. Application: FND, Message Name: FND_VIEWOBJECT_NOT_FOUND. Tokens: VONAME =SSPN_AdvancedSearchAttributesPVO; APPLICATION_MODULE = oracle.apps.okc.repository.search.server.ContractsAdvSearchAM;
    I extended the AM also after this to include the extended VO but still the error comes.
    This page is a dynamic search page where the results change based on the different search criteria.
    Cheers
    Swati

    Hi,
    I extended the AM also after this to include the extended VO but still the error comes.There is no need to extend the AM for extending a VO. Hopefully the VO which u extending already attached to the AM oracle.apps.okc.repository.search.server.ContractsAdvSearchAM.
    Regards,
    Gyan

  • Masking the password field in webdynpro for java

    Hi,
    I am developing a logon view in webdynpro with username and password input fields.But i want to mask the password field.
    How do i do that
    Points will be rewarded for the useful answers
    Bala

    Hi,
    Set the properties of the Input field
    <b>passwordField     true</b>
    Regards
    Ayyapparaj

  • How to pull stars for SSN field in PA30 screen

    Hi all,
    When user display the Employee Personal Details (0002) using PA30.
    I have to display the SSN field with stars.
    ex: If original SSN is        123 45 6789
         I have to display it as  ***   **  6789
    Thanks in advance

    The only thing I can think of is finding a BAdI or user exit (screen exit) in which this field can be accessed / changed. Otherwise you might be looking at a modification of standard SAP.
    Do you try and find some display options in customizing?

  • Hi experts,  Since i am trying to add a new field in pa0006 ...the sap stan

    Hi experts,
    Since i am trying to add a new field in pa0006 ...the sap standard view t528c has been modified..how can i restore the old view(total fields has been changed)

    Check the version mangement and retrive the request with your old changes.

  • How Can I Change Format Mask For All Fields that type's Number Depend on Parameter in Report Builder 10g ?

    I want Change format mask for all fields that type's number
    Such as
    if  :parameter_value = 1 then
       all fields format mask = ' 999,999,990.000' ;
    else
       all fields format mask = ' 999,999,990.00' ;
    end if;
    Regards

    So, i have bad news for you : you'll have to rebuild again.
    Meanwhile i have excellent news for you : there's an online tool made by Johannes Henseler called Sidecar xml which builds the necessary xml file for you, sort of what you find in the Digital Publishing Folio Editor website, but saves it in your Folio folder.
    Next time you import all your folder (with that file), it will place all the necessary information, and even reorder the articles.
    Build once, play many times.

  • Hide SSN Field

    HI Folks,
    How do we lock/hide SSN field to a ceratin user group in the PA30 and PA40 screens with out doing config chnages. Is there anything a security consultant can do? Please advise.

    One option is to use screen variants.
    <a href="http://help.sap.com/saphelp_47x200/helpdata/en/7d/f63a0d015111d396480000e82de14a/frameset.htm">Look at the SAP Help pages</a>
    Good luck
    //freppe

  • Masking the Single Field in SXMB_MONI

    Hi,
    I have a Requirement where I am getting Credit card number in one of my Scenario PI as Middle ware.I want to Mask the Credit card Number which is coming from the payload and after processing I want to Unmask it and Send to Receiver.
    Are there any Module Beans available in PI to achieve this(Masking and Unmasking) ?
    If not then How can I achieve this?
    Thanks &Regards,
    Deepthi.M

    Hi Deepthi,
    As said by Roy, there is no standard adapter module to mask/unmask the field.
    There is another possibility, encrypting the complete payload and decrypting. This will be highly secured.
    Ref: file encription and decription XML file
    Thanks,

  • Input Masks for one field

    Hi,
    Can I assign different input masks for one field on a presentation?
    Thanks

    Hi vijay,
    1. U have not given proper parameters
       while calling the FM.
    2. have a look at this (just copy paste)
    3.
    REPORT ABC.
    DATA : BEGIN OF ITAB OCCURS 0,
    UNAME LIKE USR01-BNAME,
    END OF ITAB.
    data : RETURN_TAB LIKE DDSHRETVAL occurs 0 .
    data : RETURN_wa LIKE DDSHRETVAL .
    PARAMETERS : A(12) TYPE C.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR A.
    ITAB-UNAME = 'U01'. APPEND ITAB.
    ITAB-UNAME = 'U02'. APPEND ITAB.
    ITAB-UNAME = 'U03'. APPEND ITAB.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    DDIC_STRUCTURE = ' '
    retfield = 'ITAB-UNAME'
    PVALKEY = ' '
    DYNPPROG = SY-REPID
    DYNPNR = SY-DYNNR
    DYNPROFIELD = 'A'
    STEPL = 0
    WINDOW_TITLE =
    VALUE = ' '
    VALUE_ORG = 'S'
    MULTIPLE_CHOICE = ' '
    DISPLAY = ' '
    CALLBACK_PROGRAM = ' '
    CALLBACK_FORM = ' '
    MARK_TAB =
    IMPORTING
    USER_RESET =
    tables
    value_tab = ITAB
    FIELD_TAB = FTAB
    RETURN_TAB = return_tab
    DYNPFLD_MAPPING =
    EXCEPTIONS
    PARAMETER_ERROR = 1
    NO_VALUES_FOUND = 2
    OTHERS = 3
    break-point.
    regards,
    amit m.

Maybe you are looking for