How to mask and unmask screen fields?

Hi,
    I have a PNP LDB selection screen. Also I have an extra Key Date field at bottom ( apart from the std period selection ) , which is defined by me.If i enter some value in a particular field say, Action Type, I need to make my Key Date field an input field. But if the user does not enter any value in Action Type, then the Key Date field has to be grayed out. Right now what happens is , after i input something to Action Type, I need to press 'Enter' key to make the Key date active.
I am looping the screen in At sel screen o/p.  But , I dont want to press enter key. The moment i type something into Action type field, I need the other field to be active, just like the case of radiobuttons.Is ther any way out for this? Pls help....
Thanks in advance...
Mahesh

It's more that we're dealing with "block mode" communication from the GUI to the app server, so data only travels from the user to the program when some function is selected.
So there is a way if you were to set up your Action Type as a listbox (and assuming you are on a recent SAP release)... as per the example below.  This ties a user command into the change of a listbox setting - this example is for fun only of course, but if listbox1 is changed then the date opens, and if listbox2 is changed, it locks again.
Hope this helps.
Jonathan
report zlocal_jc_sdn_listbox_ucomm.
type-pools:
  vrm.
data:
  g_unlock             type sap_bool.
parameters:
  p_bukrs1             like t001-bukrs as listbox visible length 15
                         user-command zcc01,
  p_bukrs2             like t001-bukrs as listbox visible length 15
                         user-command zcc02,
  p_date               like sy-datum.
initialization.
  perform listbox_values_fill.
at selection-screen output.
  perform at_selection_screen_output.
at selection-screen.
  perform at_selection_screen.
start-of-selection.
  format reset.
  write: / 'Listbox 1 - you chose:', p_bukrs1.
  write: / 'Listbox 2 - you chose:', p_bukrs2.
*&      Form  at_selection_screen_output
form at_selection_screen_output.
* Toggle lock / unlock
  loop at screen.
    if screen-name = 'P_DATE'.
      if g_unlock is initial.
        screen-input = '0'.
      else.
        screen-input = '1'.
      endif.
      modify screen.
    endif.
  endloop.
endform.                    "at_selection_screen_output
*&      Form  at_selection_screen
form at_selection_screen.
  case sy-ucomm.
    when 'ZCC01'.  "CC 1 changed
      g_unlock = 'X'.
    when 'ZCC02'.  "CC 2 changed
      g_unlock = ' '.
  endcase.
endform.                    "at_selection_screen
*&      Form  listbox_values_fill
form listbox_values_fill.
  data:
    l_id                type vrm_id,
    lt_value            type vrm_values,
    l_value             like line of lt_value.
* Listbox 1:
  l_id = 'P_BUKRS1'. "name of variable in screen
  l_value-key = '1000'.
  l_value-text = 'London'.
  append l_value to lt_value.
  l_value-key = '2000'.
  l_value-text = 'New York'.
  append l_value to lt_value.
  l_value-key = '3000'.
  l_value-text = 'Canberra'.
  append l_value to lt_value.
  call function 'VRM_SET_VALUES'
    exporting
      id     = l_id
      values = lt_value.
* And re-use the list for listbox 2
  l_id = 'P_BUKRS2'. "name of variable in screen
  call function 'VRM_SET_VALUES'
    exporting
      id     = l_id
      values = lt_value.
endform.                    "listbox_values_fill

Similar Messages

  • How to mask and unmask a creditcard number in oracle

    Hi,
    Is there a way to mask a creditcard number from
    "1234-5678-4321-8765" to "XXXX-XXXX-XXXX-XXXX" and unmask it back to readable format
    using regular expressions in oracle?
    Thanks in advance

    yes, You can.
    With the demonstration at the link I earlier provided; see the testing of Encryption as well as Decryption.
    declare
        cursor c_cur is
            select uname, password from encryption;
    begin
        delete encryption where 1 = 1;
        dbms_output.put_line('Starting Block...');
        insert into encryption values (1, 'purvesh', 'purvesh');
            dbms_output.put_line('Before Encryption');   
            for rec in c_cur loop
            dbms_output.put_line('UName :: ' || rec.uname || '; Password :: ' || rec.password);
            end loop;
            dbms_output.put_line('');
        user_security.update_user_password ('purvesh', 'purv');
            dbms_output.put_line('After Encryption');
            for rec in c_cur loop
            dbms_output.put_line('UName :: ' || rec.uname || '; Password :: ' || rec.password);
            end loop;
            dbms_output.put_line('');
    dbms_output.put_line('Decryption!!!');
            for rec in c_cur loop
                dbms_output.put_line('Original Password for purvesh is ' || user_security.decrypt(rec.password ));
    end loop;
        commit;
        dbms_output.put_line('End Block...');
    end;
    Starting Block...
    Before Encryption
    UName :: purvesh; Password :: purvesh
    After Encryption
    UName :: purvesh; Password :: 6ACBD318D9B3EFA0
    Decryption!!!
    Original Password for purvesh is purv
    End Block...

  • How to find where the screen field is stored in table

    Hi all,
    How to find where the screen field  is stored in the table .
    for some transactions if i press F1 on the field and after checking for the technical help.
    I can only find the struture for the screen field, but whereas i need table name for it.
    Can anybody help me how to find the table name where the field is stored.
    Regards,
    Madhavi

    Hi,
    Just hitting a F1 on screen field and getting structure name will not help in getting table name.
    First you need to know the flow of data in the reqd module, which will help you know all the tables in that module with there most of the fields with the data flow, now you need to work on your own to figure out that in which actual tables that value is stored.
    Hope this helps you.
    Regards,
    Tarun

  • How to display the selection screen fields for selected checkboxes

    Hi all,
             I have 7 checkboxes, for each check box we have some seletion screen fields.if i select first check box,i want to display first slection screen fields only.
    and if we select more than one check box how to display the selection screen fields for selected check boxes,please help me this
    Thanks
    sriman.

    hi,
    Try this code
    report z_13317_sdn2.
    tables : mara, marc, dd03l.
    parameters : p_chk1 as checkbox user-command ABC,
                 p_chk2 as checkbox user-command PQR,
                 p_chk3 as checkbox user-command XYZ.
    select-options : s_matnr for mara-matnr modif id A,
                     s_ersda for mara-ersda modif id A,
                     s_werks for marc-werks modif id B,
                     s_lvorm for marc-lvorm modif id B,
                     s_tab for dd03l-tabname modif id C.
    data: v_chk1,
          v_chk2,
          v_chk3.
    at selection-screen output.
      loop at screen.
        if screen-group1 = 'A' or
           screen-group1 = 'B' or
           screen-group1 = 'C'.
            screen-input = 0.
           modify screen.
        endif.
      endloop.
      loop at screen.
        if v_chk1 = 'X'.
          if screen-group1 = 'A'.
            screen-input = 1.
            modify screen.
          endif.
        endif.
        if v_chk2 = 'X'.
          if screen-group1 = 'B'.
            screen-input = 1.
            modify screen.
          endif.
        endif.
        if v_chk3 = 'X'.
          if screen-group1 = 'C'.
            screen-input = 1.
            modify screen.
          endif.
        endif.
      endloop.
    at selection-screen.
      if sy-ucomm = 'ABC'.
        if v_chk1 = ' '.
          v_chk1 = 'X'.
        else.
          v_chk1 = ' '.
        endif.
      endif.
      if sy-ucomm = 'PQR'.
        if v_chk2 = ' '.
          v_chk2 = 'X'.
        else.
          v_chk2 = ' '.
        endif.
      endif.
      if sy-ucomm = 'XYZ'.
        if v_chk3 = ' '.
          v_chk3 = 'X'.
        else.
          v_chk3 = ' '.
        endif.
      endif.
    Regards,
    Sailaja.

  • How to hide OM infotype screen field

    Hello Experts.
    Please let me know how to hide OM infotype Screen field ? i want to hide Percentage field on IT1011.
    I know i can create alternative screen "Z" and hide the field and attach alternative screen to the Module pool.
    Please let me know if i can do this using BADI so there will not be any change to standard.
    Regards,
    Saurabh

    Hi Shiva,
    To get the detail about a table filed you can use DDIF* function module.
    Here in this particular case you can use FM   DDIF_FIELDINFO_GET.
    Pass the table name & field name.
    After executing that FM you can check   DFIES_TAB  in Tables parameter. i t will be having an entry.
    Check for filed name as   KEYFLAG  , if it is not initial ie.  X then supplied filed is Primary Key.
    If KEYFLAG is initial then supplied filed is not a primary key.
    Thanks & Regards
    Satyam

  • How can we read the screen field values from the report selection screen wi

    Hi expart,
    How can we read the screen field values from the report selection screen with out having an ENTER button pressed  .
    Regards
    Razz

    use this code...
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_posnr.
    **Read the Values of the SCREEN FIELDs
    CALL FUNCTION 'DYNP_VALUES_READ'

  • How to mute and lock screen rotation at the same time? Loved this feature in iOS 5.

    How to mute and lock screen rotation at the same time? Loved this feature in iOS 5.

    You cannot do two different simultaneous VISA writes over a serial bus. There is a single rx line on the pc's com port and a single rx line on the instrument. You only hope is if the instrument allows you to chain commands and the reception of the carriage return triggers the instrument to implement both at the same time. Maybe you can send CTS01 and CTS02 separated by a space or comma. The manual should tell you if that's possible or maybe you need to ask the manufacturer.

  • How to change standard selection-screen fields

    hi i am kishore.
    i have requirement.
    i have to change selection-screen label purchase order to purchase docuement in request for quatation.
    pls suggest that how to change the standard selection screen field labels.

    Hi.
    This is possible.
    Just try out this way.Heres is an example. 
    TABLES: pernr.
    data: i_tab type standard table of RSSELTEXTS with header line.
    initialization.
    i_tab-name = 'PNPPERNR'.
    i_tab-kind = 'S'.
    i_tab-text = 'Employee ID'.
    append i_tab.
    CALL FUNCTION 'SELECTION_TEXTS_MODIFY'
      EXPORTING
        program                           = 'ZESO_TEST'
      tables
        seltexts                          = i_tab
    EXCEPTIONS
      PROGRAM_NOT_FOUND                 = 1
      PROGRAM_CANNOT_BE_GENERATED       = 2
      OTHERS                            = 3
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Thanks and regards,
    Maheshwari.V

  • How to add and hide more fields in PPM?

    Hello,
    Im new to this tool and I would like to know how to add and/or hide customized fields. I've only know that Its somewhere under SPRO > Global Enhancements to Project Elements but Im a little bit lost there. Can somebody explain to me with details how to do this and also, does this need a specific access of developer to do this customization?
    As this is a basic need for all, anybody that is new on the tool and search for this will have a good reference on this thread.
    Thanks in advance.
    Many regards!

    The path is SPRO > Global Enhancements to Project Elements > Setup field control.Herein,once you select the field control you may proceed towards defining the conditions that influence the same. A step by step approach is explained in the below article  that will aid you to change properties of custom fields.
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/3053cee2-4bca-2d10-38ae-efff39ad248e
    Regards,
    Pradeepkumar Haragoldavar

  • How to number and message screening in nokia 5630?

    hi
    can anyone tell me, how to use the number and message screening in nokia 5630. it is a mobile with s60 platform and has number and message screening mentioned as its built in specification. i cant figure it out how? 

    Hi Len,
    actually I thought about highlighting a word, phrase, or passage, holding it with the mouse, and then shifting it around within the text to the desired place, just as I used to do when I owned a PC. Does this work with Mac as well?
    Frank

  • How to make the selection screen field names to apper as in logon language

    hai
    the selection screen field names should appear
    as that of logon language
    and <u>before that once i logon with a language
    it should pop up the (some)message in the logon language</u>.
    For the selection screen filednames to appear as that
    of the logon language whether i have to maintain the textelements for all screen fields in all possible languages or i have to write only in english and tell mentioning it to change

    In <b>SE38</b> --> Goto --> Translate.
    Choose target language, and start making the translation -;)
    Greetings,
    Blag.

  • How to mask and format an input field at the same time?

    Dear Experts,
    I need to have an input field, which has the following behavior:
    1. The input field accepts only number, i.e. characters other than number are ignored (not displayed on the text field).
    2. The number is automatically formatted to ###,###,### as the user enter the number.
    Example as the user enter 1-2-3-4-5-6-7, the sequence of number displayed in the text field is:
    1
    12
    123
    1,234
    12,345
    123,456
    1,234,567
    I have done the following:
    import java.awt.*;
    import javax.swing.*;
    import java.text.*;
    import javax.swing.text.*;
    class FormattedTFDemo {
         NumberFormat cf;
         JLabel jlab;
         JFormattedTextField jftfSalary;
         JFormattedTextField jftfEmpID;
         JButton jbtnShow;
         public FormattedTFDemo() {
              JFrame jfrm = new JFrame("JFormattedTextField");
              jfrm.getContentPane().setLayout(new FlowLayout());
              jfrm.setSize(240, 270);
              jfrm.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              try {
                   MaskFormatter mf = new MaskFormatter("###,###,###");
                   jftfEmpID = new JFormattedTextField(mf);
              } catch (ParseException exc){
                   System.out.println("Invalid Format");
                   return;
              jftfEmpID.setColumns(15);
              cf = new DecimalFormat("###,###,###");
              jftfSalary = new JFormattedTextField(cf);
              jftfSalary.setColumns(15);
              jftfSalary.setValue(new Integer(7000));
              jfrm.getContentPane().add(new JLabel("First field"));
              jfrm.getContentPane().add(jftfEmpID);
              jfrm.getContentPane().add(new JLabel("Second field"));
              jfrm.getContentPane().add(jftfSalary);
              jfrm.setVisible(true);
         public static void main(String[] args) {
              SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                        new FormattedTFDemo();
    }The "First field" adopts no. 1 behavior, i.e. it does not allow any character other than numbers, but the "," are always displayed and the number displayed as I enter 1-2-3-4-5-6-7 are:
    1 , ,
    12 , ,
    123, ,
    123,4 ,
    123,45 ,
    123,456,
    123,456,7
    which is not according to behavior no. 2
    The "Second field" displayed 1,234,567 only after the focus left the text field and not while typing. Moreover, characters other than number can still be displayed and only rejected after the focus left the text field.
    I need a guide of what text field and what filter / format / mask I should use. Am I correct to use JFormattedTextField? Is the only way to accomplish this by using JTextField and create my own PlainDocument for the textfield, where
    I rebuild the displayed output after each character is entered?
    Thanks for any advice,
    Patrick

    So exactly what do you want the user to put in? and what do you want to see?
    I need to have an input field, which has the following behavior:
    1. The input field accepts only number, i.e. characters other than number are ignored (not displayed on the text field).
    2. The number is automatically formatted to ###,###,### as the user enter the number.
    Example as the user enter 1-2-3-4-5-6-7, the sequence of number displayed in the text field is:
    1
    12
    123
    1,234
    12,345
    123,456
    1,234,567The user should type only numbers and when he types other than numbers, the field ignore it.
    What I want to see, as the user, for example, types 1-2-3-4-5-t-6-7 is:
    1
    12
    123
    1,234
    12,345
    <beep / ignore> (because t is invalid)
    123,456
    1,234,567
    Thus, I need a guide of what swing components should I use to accomplish this task. If you can give me the code, that will be perfect.
    Hope you can advise me,
    Patrick

  • How to make the Selection Screen fields Invisible..?

    Hi All,
    I have a selection screen in which I have 2 Radio Buttons and 2 Blocks(with input fields).
    The requirement is when the Radiobutton1 is selected, it should display the BLOCK1 and the BLOCK2 should be Invisible. The same way, when the Radiobutton2 is selected, it should display the BLOCK2 and the BLOCK1 should be Invisible.
    Could someone help me how to do this. Please share your valuable inputs. If anyone has some sample code, that would be greatful.
    Thanks in advance.
    Thanks & Regards,
    Paddu.

    Please search the forum. This question has been asked and answered many times before.
    Rob

  • How to compare and copy the fields from repeating subform to another subform, same structure.

    Dear All,
    I am using LiveCycle Designer 8.2.
    I have the following requirement, and did not figure out the best way to implement it using JavaScript.
    The Form has, say, Subform A with Repeating Inner Subform, say it has the Education History of the Staff.
    I want to put another Subform B, with similar structure to From A, and create a button/function to copy the field data values from A to B.
    Subform A will show the user the fields of education with Read-Only Mode.
    Subform B will show the user the same data values with write-enable mode. This subform will allow the user update his Education Records.
    The fields are:
    0. Staff ID: Text (Key 1) (always read-only and hidden, becuase it is on the main form),
    1. Degree: Text,
    2. Specialization: Text,
    3. Institution: Text,
    4. Start Date: Date (Key 2),
    5. End Date: Date.
    Another function is needed is to compare the same records between form A and Form B.
    (Note: The Education record of a Staff has primary key of Staff ID and Start Date. Meaning, the Staff cannot have tow different degrees in starting on the same date.)
    The user may change the Institution in form B or change the Degree. I need to highlight, on Subform B, the row which was changed or added by the user. This means I need to do lookup against Subform B using the Key Values from Subform A.
    I have already developed the Form, and I have about 5 Subforms to allow updated by Staff: Education, Experience Inside the company, Experience Outside the company, Job Skills, Membership Record, ..etc. One thing I did is that the Field Names I used in Subform A are not the same of the fieldname in Subform B, but the have same suffix, and different prefix. For example, for the Education:
    Subform A - Original Values:
    1. Degree: OrgDegreet,
    2. Specialization: OrgSpecialization,
    3. Institution: OrgInistitution,
    4. Start Date: OrgDateStart (Key),
    5. End Date: OrgDateEnd.
    Subform B - Updated Values:
    1. Degree: UpdDegreet,
    2. Specialization: UpdSpecialization,
    3. Institution: UpdInistitution,
    4. Start Date: UpdDateStart (Key),
    5. End Date: UpdDateEnd.
    I understand if the Key field is updated, then it is like it was deleted, and added a new one.
    I know how to do that in ASP.NET, but need help in Adobe LiveCycle using JavaScript.
    Please help me to write these two functions, as they are very urgent requirement.
    Tarek.

    In the event Exit of the 1st subforum.invoice you will find the code to assign the value to it's "brother" on page4.
    Also, on the add button i added the code to add a record to the page4 subforum.
    To make this work you will have to copy/past the code of the exit event to all fields you want to copy and in the xfa.resolvenode("XXXXXXX[].fieldName") command replace fieldname with the actual name of the field you're at.
    I didnt't do anything to te remove line button because i don't know how you want it to work, but, if you want to control the p4 subform with the p1 subform, you shouldn't allow for lines to be removed directly in the p4 subform.
    Hope this helps.

  • Input Masks and Single Choice Fields (drop down menu) Suggestions

    Here's a few suggestions - I hope this is the right place to post these...
    1. I would like to suggest a pre-filled state single choice field (drop down menu) to be used to get address information.  Or better yet a way to import a csv file to fill the preset fields for an option box.
    2. Input masks that force users to enter the data in the format you prefer.  (000) 000-0000
    3. Ability to enable or disable options depending on other choices.
    4. Option for a list of numbers say 1 thru 100 and as people pick a registration (car number in my case) that choice cannot be picked again by another user for that form.  Load values from a table that can be picked several times or only once could work in both my suggestions.
    Thank You.

    Hello there,
    Thanks for these thoughts! They're all really good (and welcome) suggestions for additions to the FormsCentral service. As you might imagine, we're busily working back here to implement new features; we have big plans for FormsCentral. For these suggestions in particular, I'll do two things:
    1. Send these suggestions to the product team and get them added to the to-do list!
    2. Move the whole thread here into the FormsCentral Ideas sub-forum. That way, your suggestions will be noted as such and well-documented on our end.
    Thanks for the great ideas; let us know if you have any more feedback for us!
    Best regards,
    Rebecca
    Acrobat Services Community Manager

Maybe you are looking for