How to populate read only input field or text view form value help only

Hi experts,
I have one requirement to populate a read-only field or text view from value help.
User cant put any value there.value comes only from the value help.
For example,
when we read context using Code Wizard,we cant type any value there.value only comes from value help.
How to implement that functionality?
Please reply.
Thanks in advance,
Subhasis.

Yes it is possible.
1.Create a context Attribute and then bind this attribute to the Text view UI element.
2. read context attribute and then set value to the context attribute like this way.
DATA:
    elem_context1                        TYPE REF TO if_wd_context_element,
    stru_context1                        TYPE if_first=>element_context ,
    item_potxt                          LIKE stru_context-potxt.
get element via lead selection
  elem_context1 = wd_context->get_element(  ).
stru_context1-potxt = 'PO'.
elem_context1->set_attribute(
    VALUE  = stru_context1
    name   = 'POTXT'
thanks
Suman
Edited by: suman kumar chinnam on Sep 9, 2008 12:12 PM

Similar Messages

  • How can we change the input field on a view stop showing zeros

    Hello,
           To make screen look consistent with other character input field. How can we change the input field on the view stop displaying zeros even though the data type is NUMC and data type should not be change?
    Edited by: sap_learner on Mar 25, 2010 5:44 PM
    Edited by: sap_learner on Mar 25, 2010 5:49 PM
    Edited by: sap_learner on Mar 25, 2010 5:55 PM

    hello Manas Dua,
                           Thanks for your help. I am able to resolve my problem.
    My code will help  the future comers to resolve this kind of issues.
    *The code is applied to method WDDOINIT of the default view.
      DATA lo_nd_terms_input    TYPE REF TO if_wd_context_node.
      DATA lo_nd_terms_input_i TYPE REF TO if_wd_context_node_info.
      DATA lv_zeros             TYPE wdy_attribute_format_prop.
      lv_zeros-null_as_blank = 'X'.
      lo_nd_terms_input = wd_context->get_child_node( name = wd_this->wdctx_input ).
      lo_nd_terms_input_i = lo_nd_terms_input->get_node_info( ).
      lo_nd_terms_input_i->set_attribute_format_props(
        EXPORTING
          name              = `ENTER THE ATTRIBUTE NAME`
          format_properties = lv_zeros     ).
    Edited by: sap_learner on Mar 26, 2010 5:02 PM

  • OVS on read-only input field

    OVS will not allow me to change the value of a read-only input field.  If the input field is set to read-only, the OVS selection table does not display an 'OK' button, only close.
    Value cannot be copied (field is not editable)
      I do not want the field to be editable on the screen, but only allow input via the selected row in the OVS.  Any suggestions?
    Edited by: Bob DeNuto on Jul 31, 2008 1:22 AM

    Using Dictionary Search Help and OVS in this case will disable the Copy button and you don't have any control.
    Use Freely Programmed Value Help, this will solve your problem
    https://wiki.sdn.sap.com/wiki/display/WDABAP/Freelyprogrammedinput+help
    how to provide f4 help to the read only input field
    Abhi

  • How to right align a read only numeric field in a panel form layout

    Hi, does anyone know how to right align a read only numeric field in a panel form layout? I am using: Style Class = AFFieldNumberMarker, but it only seems to work if the field is disabled. Disabling the field gives it a difference appearance that does not look right on our forms. These are calculated fields, which cannot be modified, so read only is necessary.
    I have looked online for some answers, and it seems that others are having similar issues.
    I have tried different combinations for the properties, but so far I cannot get it to work.
    Thanks
    Judy
    I am using JDEV 11.1.1.5

    Sorry for the delay in my response. Here is the code
    <af:inputText value="#{bindings.TotalAirlineCostEst.inputValue}"
    label="#{bindings.TotalAirlineCostEst.hints.label}"
    required="#{bindings.TotalAirlineCostEst.hints.mandatory}"
    columns="#{bindings.TotalAirlineCostEst.hints.displayWidth}"
    maximumLength="#{bindings.TotalAirlineCostEst.hints.precision}"
    shortDesc="#{bindings.TotalAirlineCostEst.hints.tooltip}"
    id="it20" readOnly="false"
    disabled="true"
    styleClass="AFFieldNumberMarker">
    <f:validator binding="#{bindings.TotalAirlineCostEst.validator}"/>
    <af:convertNumber groupingUsed="true"
    pattern="#{bindings.TotalAirlineCostEst.format}"
    type="number"
    maxFractionDigits="0"/>
    </af:inputText>
    thank you,
    Judy

  • Search help unavailable in Read-only input field since EHP4

    Dear Experts!
    I have a problem with a Portal page since the deploy of the EHP4. The page has standard input fields with Search Helps. I needed to have the input field non-modifiable so the user would have to use the search help to get the proper information.
    Prior to the EHP4 installation, I set the input field to Read Only in the WebDynpro explorer, this disabled the editing while permitting the user to use the Search Help.
    Since the installation, the search help is no longer visible or accessible on a Read Only standard inputfield.
    Do you know if there is a way to allow the search help on a read only field?
    Thanks so much for your answer,
    Brian Foster.

    >Since the installation, the search help is no longer visible or accessible on a Read Only standard inputfield.
    This was a conscious design decision on SAP's part that disabled or read-only fields should no longer fire value help.  I am aware that this situation was used in the past as you describe.  It is even still used in SE80 for the Web Dynpro ABAP wizards. However usability studies showed that this often confused end users and therefore it is no longer allowed.  The field must be input enabled to fire the attached serach help.

  • How to enable/disable the input fields based on the data entered/user action in the web dynpro abap?

    How to enable/disable the input fields based on the data entered in the web dynpro application abap?  If the user enters data in one input field then only the next input field should be enabled else it should be in disabled state. Please guide.

    Hi,
    Try this code.
    First create a attribute with the name readonly of type wdy_boolean and bind it read_only property of input field of which is you want to enable or disable.
    Next go to Init method.
    Set the readonly value as 'X'.
    DATA lo_el_context TYPE REF TO if_wd_context_element.
         DATA ls_context TYPE wd_this->element_context.
         DATA lv_visible TYPE wd_this->element_context-visible.
    *   get element via lead selection
         lo_el_context = wd_context->get_element( ).
    *   @TODO handle not set lead selection
         IF lo_el_context IS INITIAL.
         ENDIF.
    *   @TODO fill attribute
    *   lv_visible = 1.
    *   set single attribute
         lo_el_context->set_attribute(
           name =  `READONLY`
           value = 'X').
    After that Go to the Action  ENTER.
    First read the input field ( first input field, which is value entered field) , next give a condition
    if input value is not initial  then set the readonly value is '  '.
    DATA lo_nd_input TYPE REF TO if_wd_context_node.
         DATA lo_el_input TYPE REF TO if_wd_context_element.
         DATA ls_input TYPE wd_this->element_input.
         DATA lv_vbeln TYPE wd_this->element_input-vbeln.
    *   navigate from <CONTEXT> to <INPUT> via lead selection
         lo_nd_input = wd_context->get_child_node( name = wd_this->wdctx_input ).
    *   @TODO handle non existant child
    *   IF lo_nd_input IS INITIAL.
    *   ENDIF.
    *   get element via lead selection
         lo_el_input = lo_nd_input->get_element( ).
    *   @TODO handle not set lead selection
         IF lo_el_input IS INITIAL.
         ENDIF.
    *   get single attribute
         lo_el_input->get_attribute(
           EXPORTING
             name =  `VBELN`
           IMPORTING
             value = lv_vbeln ).
    if lv_vbeln IS not INITIAL.
        DATA lo_el_context TYPE REF TO if_wd_context_element.
        DATA ls_context TYPE wd_this->element_context.
        DATA lv_visible TYPE wd_this->element_context-visible.
    *  get element via lead selection
        lo_el_context = wd_context->get_element( ).
    *  @TODO handle not set lead selection
        IF lo_el_context IS INITIAL.
        ENDIF.
    *  @TODO fill attribute
    *  lv_visible = 1.
    *  set single attribute
        lo_el_context->set_attribute(
          name =  `READONLY`
          value = ' ' ).

  • 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

  • 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'

  • Input field in display mode; but F4 help has to be avail

    Hi,
                i have a input field in my view and i want that one to be in display mode ( the intention is that i want to have the value to be filled from F4 help values only).  I have set the read only set for the input field. I have tried all the cases of normal ddic help;OVS;Freely input help; context node info value set but no luck.
    In the below forum message Re: how to provide f4 help to the read only input field  i could see the input from Thomas that the Freely input help will be useful in this case;I tired this way too but no luck.
    Can you please let me know do i missed any point ;your inputs are higly appreciated.
    Thanks and Regards,
    Satish A.

    hi,Satish A.
    After check your requirement, i think you can use "Freely programmed Input help".You can search them in this forum or google, i think you will get some clue.
    As a reply, i summarize this topic simply. Take one example.
    Scenario:
    F4-help component will be used for "F4". It displays all the data in table, and you can select one record, then the F4-help will be closed and the "CARRID" will be returned to the Read-only field in your main component.
    F4-help-component
    (1). You should implement one WD Component which implemented the WD interface "IWD_VALUE_HelP".
    (2).In this component, you can add one "Interface event", for example, named "Select". And this event has one parameter "CARRID".
    (3).In the table's  OnSELECT event, you can use:
    method ONACTIONSELECT_ROW .
      data:
        lo_Node      type ref to If_Wd_Context_Node,
        lo_Elem      type ref to If_Wd_Context_Element,
        ls_elem      type wd_this->element_table,
        lt_elem      type wd_this->elements_table.
    *1. get the Solution-list context node
      lo_Node = wd_context->get_child_node( Name = 'TABLE' ).
    *2. set the lead selection of table
      lo_node->set_lead_selection( element = NEW_LEAD_SELECTION ).
    *3. get the attribute value of selected row
      NEW_LEAD_SELECTION->get_Static_Attributes(
        importing
           Static_Attributes = ls_elem ).
    *4. Fire interface event:
    "will return the CARRID parameter
      WD_COMP_CONTROLLER->Fire_select_Evt(
          CARRID = ls_elem-carrid ).
    *5. close the F4 help
      WD_COMP_CONTROLLER->F4_LISTENER->CLOSE_WINDOW( ).
    endmethod.
    In your main component:
    (1). Use your F4-help component as used-component
    (2). set your context attribute's input help mode as "Freely programmed". At the same time, input your component usage which is added in step 1.
    (3). You should add one Event-handler for your F4-help component Interface event, for example, named "On_f4_help". you can use:
    method ON_F4_HELP .
    "This event handler will has one parameter named "CARRID" automatically
      wd_context->set_attribute(
        EXPORTING
          name = 'IPFIELD'
          value = CARRID
    endmethod.
    Hope it can help you a little.
    Best wishes.

  • HOW to include a reference currency fields in a view ?

    Hello Experts,
    <b>I am having Currency fields error in generic extraction</b>
    I have table where I am trying to extract data to BW via generic extraction. When I tried
    to extract with the TABLE its giving me an error
    <b>Invalid extract structure template RPSCO of DataSource ZBW_REP3_TEST
    You tried to generate an extract structure with the template structure RPSCO. This operation failed, because the template structure quantityfields or currency fields, for example, field WLP00 refer to a differenttable</b>.
    Now I created a view with all the fields same as my table.
    But its still giving me the same error and taking all the fields as a primary keys. I have over 12 currency fields in the table. I am confused how to fix this issue and add a currency field to my view?
    hOW to include a reference currency fields in a view ?
    All inputs are much appreciated.
    Thanks and Regards,
    Harish

    Thank you for your responce,
    Can you please check my view and let me know where I am going wrong     
    View    Table   Field  Dataele  Data
    field                    type                                            0                                                                
    WLP01     RPSCO     WLP01     BP_WPL     CURR     15     Period value in ledger currency
    WLP02     RPSCO     WLP02     BP_WPL     CURR     15     Period value in ledger currency
    WLP03     RPSCO     WLP03     BP_WPL     CURR     15     Period value in ledger currency
    WLP04     RPSCO     WLP04     BP_WPL     CURR     15     Period value in ledger currency
    WLP05     RPSCO     WLP05     BP_WPL     CURR     15     Period value in ledger currency
    WLP06     RPSCO     WLP06     BP_WPL     CURR     15     Period value in ledger currency
    WLP07     RPSCO     WLP07     BP_WPL     CURR     15     Period value in ledger currency
    WLP08     RPSCO     WLP08     BP_WPL     CURR     15     Period value in ledger currency
    WLP09     RPSCO     WLP09     BP_WPL     CURR     15     Period value in ledger currency
    If I add a
    Table TCURC against any field what would be the view field and data element
    Do I need to tick MOD?
    Please suggest.
    Kapadia,
    If I do that its still taking all the fields are a primary keys and bringing 6 lakh records to where I originally have 49 records in a table
    Thanks and Regards,
    Harish

  • Enable input fields in a view container

    Hi,
    I have inserted a view in another view's view container.
    But the input fields are disabled.
    can anybody tell me how to enable them?
    readonly property is set to false...

    Hi..
    This situation may arise when the attributes (mapped to the input field in the view) are mapped to the interface controller via the component controler and the IsInputElement property of the node in the interface controller is set to True.
    In this case you cannot change the cardinality of the node from the component controller also.
    If this is the case, try by removing the interface controller and component controller binding.
    Regards,
    Sayan Ghosh

  • Not able to display the values in the input fields of the view

    Hi All.
    I am facing an unique issue.
    My custom element created in my custom node getting a null value
    from a Get Vendor Details RFC written in RFC.
    The values are getting populated in the custom element but not coming in the
    input field of the corresponding view.
    Then, I wrote this code
    wdContext.nodeCustom.setLeadSelection(1);
    and all the output came in the input field.
    Now, after a build it is not coming in the input fields of the view.
    All my custom nodes are Singleton and values are coming in the custom elements
    as I can print them by wdComponentApi.getMessageManager.reportSuccess(""+customnode.getField());
    All my nodes are Singleton.
    Please give your valuable inputs.
    Regards
    Kaushik Banerjee

    Hi
    Check the node property
    initializeLeadSelection     true
    if not make it true , I would suggest to make a value node of the same structure as in RFC after execuation of the RFC populate the value manually.Dont bind it directly to the UI element.
    BR
    Satish Kumar

  • How to see the Table Names & Field Names by other than F1 help

    Hi Experts
       How to see the Table Names & Field Names by other than F1 help, & How to see the List of MM Table Names.
    Rgds

    The only option to see the active table/ field name is through F1 --> Technical Information. Apart from this, you can use any 3rd part application like GUIex (INbuilt in SAP ECC 6.0 ... can be activated by clicking on the tri-color button on the top right), but you need technical knowledge to understand the information. As far consolidated list of MM tables is concerned, SAP don;t provide you the same at one place, it experience and knowledge which help you in this regard. For your immediate reference MM tables are as under :
    EBAN  - Purchase Requisition 
    EBKN  - Purchase Requisition Account Assignment 
    EBUB   - Index for Stock Transport Requisitions for Materi
    EINA    - Purchasing Info Record: General Data 
    EINE     - Purchasing Info Record: Purchasing Organization D
    EIPA     - Order Price History: Info Record 
    EKAB   - Release Documentation 
    EKAN   - Vendor Address: Purchasing Document 
    EKBE    - History per Purchasing Document 
    EKBEH - Removed PO History Records 
    EKBZ    - History per Purchasing Document: Delivery Costs 
    EKBZH  - History per Purchasing Document: Delivery Costs 
    EKEH    - Scheduling Agreement Release Documentation 
    EKEK    - Header Data for Scheduling Agreement Releases 
    EKES     - Vendor Confirmations 
    EKET     - Scheduling Agreement Schedule Lines 
    EKETH   - Scheduling Agreement Schedules: History Tables 
    EKKI      - Purchasing Condition Index 
    EKKN    - Account Assignment in Purchasing Document 
    EKKO    - Purchasing Document Header 
    EKPA     - Partner Roles in Purchasing 
    EKPB     - "Material Provided" Item in Purchasing Document 
    EKPO    - Purchasing Document Item 
    EKPV    - Shipping-Specific Data on Stock Tfr. for Purch. D 
    EKRS    - ERS Procedure: Goods (Merchandise) Movements to b 
    EKUB    - Index for Stock Transport Orders for Material 
    EORD    - Purchasing Source List 
    EQUK    - Quota File: Header

  • How to make Buyer and Planner fields in Master Items Form Required without

    How to make Buyer and Planner fields in Master Items Form Required without using personalization?
    1) Steps to Reproduce
    Under Application Developer Common Modules responsibility,
    1) Query Region MTL_SYSTEM_ITEMS
    2) Click on Region Items
    3) Add Buyer Id and Planner Code attributes with Required checkbox checked.
    4) Bounce iAS server and JVM and clear java cache
    5) Changes not taking effect
    Current Application Release: 11.5.10.2 (3460000)
    Current INV Rollup: INV.J RUP22 (9878808)
    Current WMS Rollup: WMS RUP19 (9951502)
    Product Installation List :
    Product Installation: 11i.BOM.J: Installed
    Product Installation: 11i.EGO.E: Installed
    Product Installation: 11i.ENG.I: Installed
    Product Installation: 11i.INV.J: Installed
    Product Installation: 11i.PO.I: Installed
    Product Installation: 11i.WMS.G: Installed
    client needs to make the Buyer and Planner fields under Inventory->master Items form to be required.
    He tried using the Application Developer Common Modules responsibility, to find the Master Items Region and added the Buyer Id and Planner Code attributes with the Required check-box set to Yes. He bounced the iAS server and cleared java cache, but the changes do not take effect.
    client does not want to use form personalization.
    Can you please provide more assistance for using Application Developer Common Modules responsibility?
    Edited by: jemar98 on Aug 9, 2011 1:44 PM

    A forms developer could make those fields required with a CUSTOM.pll extension if you didn't want to use forms personalization. Both are considered customizations to standard functionality and may or may not require rework after patching or upgrades.

  • How do i read complete line from a text file in j2me?????

    how do i read complete line from a text file in j2me????? I wanna read file line by line not char by char..Even i tried with readUTF of datainputstream to read word by word but i got UTFDataFormatException.. Please solve my problem.. Thanks in advance..

    That is not my problem . i already read it char by char.. i am getting complete line..But this process is taking to much time..So thats why i directly wanna read complete line or word to save time..

Maybe you are looking for

  • Preview application not working

    When I open a pdf, the Preview application opens in the dock, but nothing shows up on the screen. I can force quit Preview by ctrl-clicking, but that's it. Any suggestions?

  • Original iphone used for itunes and now wont sync bc of no sim

    HELP PLEASE.  I had been using this iphone for itunes and decided to get all the pics off so did a restore.  Now it won't let me do anything to it because there is no SIM card in it before.  I could always hook it up and sync before but this time I d

  • Strange behaviour css in login page

    when i want page from protected area, login page appears (without css) after successfull login css file appear in browser i go to page from protected area again and it appears next logins are ok protected pattern is /* i saw in admin app in tomcat th

  • Foreign language setting??

    It seems crazy, but I can't figure out how to put pages into a setting so that I can write in Spanish without red underlining every word...there MUST be a way...right? If you have any idea how to change the language setting, PLEASE let me know! It wo

  • I cannot compose a message in gmail using either FF4 or FF3.6.17 following formatting my PC and re-installing programs.

    Your guess re operating system is correct, problem happens in v4.0, I uninstalled and reinstalled V3.6.17. I have not downloaded any plug-ins at all. Works correctly using MS I Explorer! Is happening in all my gmail accounts (about 5) except one! Hav