Can we do input field readonly and it will takes data only from F4

Hi  experts,
I want user only fill data in inputfield by F4, not manualy , can we do somwthing for that.
Thanks & Regards
Prashant Gupta

Hi Prashanth,
   We can handle your requirement. I will give one example and it is working.   
    Address -  Node
     Firtst_Name-    Node  attribute    and this attribute will have DDIC search help.
   Create Input field 'FIRSTNAME' for this attribute in screen with transparent container  'TC' and bind the above context to the UI element.  Now this UI element is Context is 'ADDRESS.FIRSTNAME'.
Now add the below code in MODIFYVIEW hook method.The below code will add search help with read only input field but for display mode again you have to disable the search help for this field. i have not written code for that.
  DATA: lo_first_name       TYPE REF TO cl_wd_input_field,
        lo_first_name_new   TYPE REF TO cl_wd_input_field,         " New input field
        lo_transp_cont      TYPE REF TO cl_wd_transparent_container. " TC container
        lo_new_container    TYPE REF TO cl_wd_transparent_container.
  DATA: lv_bound_value      TYPE string,
        lv_read_only        TYPE wdy_boolean.
   IF iv_first_time EQ abap_true.
lo_first_name_input ?= io_view->get_element( id = 'FIRST_NAME' ).
lo_first_name_input->set_width( '0' ).
lv_bound_value = lo_first_name_input->bound_value( ).  "ADDRESS.FIRST_NAME"
    Create new dynamic Input Field
      CALL METHOD cl_wd_input_field=>new_input_field
        EXPORTING
          bind_value = lv_bound_value     
          id         = 'FIRST_NAME_NEW'
          read_only  = abap_true
          view       = io_view
        RECEIVING
          control    = lo_first_name_new.
    Create new dynamic Transparent Container
      CALL METHOD cl_wd_transparent_container=>new_transparent_container
        EXPORTING
          id      = 'TC_NEW'    " New container
          view    = io_view
        RECEIVING
          control = lo_new_container.
      " I used flow layout thats why i am using the flow layout
      cl_wd_flow_layout=>new_flow_layout( container = lo_new_container ).
      cl_wd_matrix_data=>new_matrix_data( element = lo_new_container ).
  " Get old field container
   lo_transp_cont ?= io_view->get_element( id = 'TC' ). 
   IF NOT lo_transp_cont IS INITIAL.
    "Using a new Transparent Container both Fields for FIRST_NAME are shown as only one Field
        cl_wd_flow_data=>new_flow_data( element     = lo_first_name_new ).
        lo_new_container->add_child( the_child = lo_first_name_new ).
        " remove the child means old FIRT_NAME
        lo_first_name ?= lo_transp_cont->remove_child( id = 'FIRST_NAME' ).
        cl_wd_flow_data=>new_flow_data( element = lo_first_name ).
        lo_new_container->add_child( the_child = lo_first_name ).
      lo_transp_cont->add_child( index      = 2
                                 the_child  = lo_new_container ).
   ENDIF.
endif.
Regards,
Devi

Similar Messages

  • Make Input field readonly at run time.

    Hi,
    I have a input field on a view , i want to make it <b>readonly</b> during run time depending on some value.
    plz help. reward point is sure.

    Hello Manoj
    You can also make the input field readOnly dynamically during run time. For this you need to write a simple code in wdDoModifyView of your view controller. Code is as follows
    IWDInputField inputField = (IWDInputField)view.getElement("<id of inputfield>");
    if(<reqd condition>)
    inputField.setEnabled(false);
    else
    inputField.setEnabled(false);
    Try this, if things donot get much complicated on doing this. I hope it helps u and makes thing simple.
    Regards
    Kapil

  • Making the input fields readonly

    hi
       iam  calling  a RFC  and it is a Custom  and not
    a pre-defined 
           and  now i need to show some data  of the  table 
         in the pop-up window   in the input fields  and all this
            fields should be readonly .  there are about  30 
           input fields and it difficult to make each and every input
    field  as readonly  ,  is there any alternative  that allows
      me too make the all the input fields readonly.

    Hi, Kishore,
    Even I tried the same but not successful. Because your container will not have Readonly propert so only way is to do it is doing for each and every element. for this also two ways are there.
    1. directly set the readonly property of each and every element in Layout tab or
    2. create a context variable of type boolean and map it to the readonly property of the UI.
    Regards,
    Srinivas.

  • I have the latest downloadable version of LR5.  It crashed while it was createing 1:1 previews during an import. After a Win7(64) restart, it shows a message that LR needs to quit because it can't read the preview files and it will try to fix it the next

    I have the latest downloadable version of LR5.  It crashed while it was createing 1:1 previews during an import. After a Win7(64) restart, it shows a message that LR needs to quit because it can't read the preview files and it will try to fix it the next time is launches.  I get the same message the next and every subsequent time it launches so I can't launch LR at all now.
    I get that the preview file got corrupted somehow.  Is there some way to fix this problem without building a new catalog?

    Use Windows Explorer to open the folder containing your catalog. You will see a folder with the extension .lrdata. You need to delete that folder and then start Lightroom again. Lightroom will generate a new previews folder.

  • Can anybody can give me an apple ID and Password for free app. only. Pleaseee

    Can anybody can give me an apple ID and Password for free app. only. Pleaseee

    http://support.apple.com/kb/ht2534
    Create an Apple ID as above.

  • I have an Imac in my bedroom and apple tv hooked to my big screen in my living room. When I select mirror Imac on the Imac to view on the big screen in living room, can I get a wireless keyboard and track pad to control Imac from living room?

    I have an Imac in my bedroom and apple tv hooked to my big screen in my living room. When I select mirror Imac on the Imac to view on the big screen in living room, can I get a wireless keyboard and track pad to control Imac from living room?

    I do something like that, and can confirm 20 feet won't be a problem. More than 30 or so might be.

  • Can I copy my iTunes files and folders to Time Capsule wirelessly from my PC?

    Can I copy my iTunes files and folders to Time Capsule wirelessly from my PC? I was wondering since my iTunes files and folders are connected to iTunes.

    You can but the TC is the worst possible location. The design is slow to start and quick to stop data connections.. that will cause trouble.
    Moving folders has specific instructions.
    http://support.apple.com/kb/ht1364
    Move it to an external hard disk fine.. but be very sure you will not be happy with the TC as a location.

  • Can we buy warranty for ipad and macbook air after 3 years from any external agencies

    Can we buy warranty for ipad and macbook pro after 3 years from any external agencies?

    I'm sure you can, however I am not aware of any companies.  Consider addining them to your homeowners/renters insurance if possible.

  • I can't access my itunes store and cannot sync my songs etc from iTunes to my iPad3. HELP please.

    i can't access my itunes store and cannot sync my songs etc from iTunes to my iPad3. HELP please.

    Need more information. What happens when you try each of those actions? Error messages?
    Can you connec to the internet with oher apps?

  • I can not remember my security questions and it will not let me reset

    I can not remember my security questions and it will not let me reset

    You need to ask Apple to reset your security questions; this can be done by clicking here and picking a method, or if your country isn't listed, filling out and submitting this form.
    They wouldn't be security questions if they could be bypassed without Apple verifying your identity.
    (108234)

  • Hi! I just bought a new iPhone and I was wondering how i can make sure all my pictures and music will be transfered from my old iPhone to my new one?

    Hi! I just bought a new iPhone and I was wondering how i can make sure all my pictures and music will be transfered from my old iPhone to my new one?

    Pictures are held in the iPhone backup. If you backup the old device just prior to the activation of the new one, then restore from that backup, the photos will be there. Music is in iTunes on the computer and when you do the restore, it will download the music from iTunes to the device during the restore. Make sure any music purchased on the iPhone that has not been transfered to iTunes on the computer is done before beginning the restore.
    You can also view information in this support document http://support.apple.com/kb/HT2109

  • Someone hacked my computer I done a complete reset and lost all my data only seemed to make it worse, I keep getting crash reports, can anyone help?

    Someone hacked my computer I done a complete reset and lost all my data only seemed to make it worse, I keep getting crash reports, can anyone help?

    Wayne Brydon wrote:
    ... I keep getting crash reports,
    Post the entire text of the most recent crash report.

  • HT4623 I updated my iPhone 5S to iOS 7.0.2 and iBooks will not load anything from the Store and Safari keeps crashing

    I updated my iPhone 5S to iOS 7.0.2 and iBooks will not load anything from the Store- I cannot search or even view my purchases.
    Also Safari keeps crashing. I have shut down the phone and restarted it twice and that hasn't helped. Any ideas?

    Libellen wrote:
    I updated my Iphone 5s with IOS 7.0.5
    The Update would not have Installed if it was not suitable for your Device.
    Libellen wrote:
    ...  anyhowe the phone is now totaly "dead" and will not turn on
    First try a Reset  ( No Data will be Lost )
    Press and hold the Sleep/Wake button and the Home button at the same time for at least Ten seconds... (But can take Longer)... until the Apple logo appears. Release the Buttons
    If no joy... Try a Restore...
    1: Connect the device to Your computer and open iTunes.
    2: If the device appears in iTunes, select and click Restore on the Summary pane.
    Restoring  >  http://support.apple.com/kb/HT1414
    3: If the device doesn't appear in iTunes, try using the Steps in this article to force the device into Recovery Mode.
    Note on Recovery Mode.
    You may need to try this More than Once... Be sure to Follow ALL the Steps...
    Once you have Recovered your Device...
    Re-Sync your Content or Restore from the most Recent Backup...
    Restore from Backup  >  http://support.apple.com/kb/ht1766

  • I am using itouch for music can i also us my nano 3rd generation to uploat podcasts only from the same library?

    I have an ipod touch that i use for my music in itunes, my question is can i restore an older nano 3rd generation ipod and use it for podcasts only, from the same account that i use for the itouch...sorry if this doesnt make sence! I want to use two ipods in my library, one for music and one for podcasts...
    appreciate any help! thx!
    Linda

    Yes.  There is no limit to the number of iPods, iPads, and iPhones you can sync with one computer/iTunes library or account. On top of that, how you sync one iPod does not affect the syncing preferences of another.
    How to use multiple iPods, iPads, or iPhones with one computer
    Simply configure the Nano to only sync podcasts and nothing else.
    B-rock

  • I have a first gen iPad, and it will randomly go home from the Internet when I don't press any button.  I have a wireless connection at home.

    I have a first gen iPad, and it will randomly go home from the Internet when I don't press any button.  I have a wireless connection at home.  Is this a known bug?  What can I do?

    You maybe running low on memory since you are using the original iPad with iOS 5.1.1 and the iPad is crashing. This may help and it certainly won't hurt.
    Quit all apps completely and reboot the iPad. Go to the home screen first by tapping the home button. Double tap the home button and the recents tray will appear with all of your recent apps displayed at the bottom. Tap and hold down on any app icon until it begins to wiggle. Tap the minus sign in the upper left corner of the app that you want to close. Tap the home button or anywhere above the task bar.
    Reboot the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider if it appears on the screen - let go of the buttons. Let the iPad start up.
    Do this before you launch Safari again. Go to Settings>Safari>Clear Cookies and Data. You don't have to clear the history.

Maybe you are looking for

  • Multiple Digital Signatures - each signer enters their comments then signs

    Background / Problem:  I currently have a Microsoft Word Document I print out (multiple pages). Everyone reads the first page, puts their comments in their section, then signs under their comments. The same group of papers (2-3 pages) gets signed by

  • How to add two date format in web i report.

    Hi Every One,                  I have Fields like Start Date,New Date, Close Date, End date balance. that Fields all are in date format like start date(05/05/14), New date(06/05/14),Close date(09/05/14) But i need result (start date+new date)-close d

  • Empty Array in setPlSqlIndexTable

    I am calling a stored procedure with a PL/SQL table as a parameter. Everything works fine until I try to pass in a zero-length array. I get the error "wrong number or type of parameters...". What I don't understand is the type is still the same (an a

  • Java.io.InvalidClassException: org.eclipse.persistence.internal.helper.DatabaseTable

    Hello im using weblogic 10.3.5 and jpa 2, but i cant make that my project works coz i have this issue.... 56177847, local class serialVersionUID = -8219935847209476671 java.io.InvalidClassException: org.eclipse.persistence.internal.helper.DatabaseTab

  • Mail 6.0  or Keychain problem with passwords

    I'm using Mountain Lion and mail 6.0 but it seems that mail or keychain keeps on asking for my password. Mail bounces on by dock because it needs attention.  When I go to it, I see a dialogue that says "cannot coonect to the server" It is asking me f