Creation of drop down for a field which is created using otr

Hi experts
I have a requirement wherein i have to create a dropdown for a field which is added using otr (online text repository).
When i did an F2 on the field on the UI i found that it had no context node and attribute and the view in the component workbench did not have a configuration also. The coding for that field is done in the htm page of that view using otr.
For this field i need to create a dropdown (the dropdown values will be fixed). I thought it would be better to code in the method do_init_context.
Request you to help me out with the code for this requirement as i do not have any idea with regard to otr.
Thanks and regards
Preeti Viswanath

Hi Preeti,
1.You need to maintain a page attribute(dd_list_type) which is of table type to the htm page of your view.
2.Then in the set_models method of your view controller add the following code:
* Put the data into the view attribute
  view->set_attribute(
        name   = 'dd_list_type'        
        value  = lt_list_type ).
You can add OTR text list to the internal table lt_list_type.
3.Then add the following code to .htm
* ADDITIONAL CODING IN VIEW
<% data:           lr_listl_type  type ref to data.
   field-symbols: <list_type>   type table.
   get reference of dd_list_type into lr_list_type.
   assign lr_list_type->* to <list_type>.
%>
<htmlb:dropdownListBox id="ListType"
                       table = "<%= <list_type> %>"
                       selection = "<%=controller->gv_model_id %>"
                       nameOfKeyColumn = "KEY"
                       nameOfValueColumn = "VALUE"
                       />
Regards
Leon

Similar Messages

  • Drop down for a field in a table

    hi friends,
       need a help from u, how to maintain the drop down for a field in a table..
    advance thanks..

    Hi,
    You can use the function module F4IF_INT_TABLE_VALUE_REQUEST
    TABLES: T005T.
    DATA: BEGIN OF t_t005 OCCURS 0,
            land1 TYPE t005-land1,
          END OF t_t005.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(6) v_text FOR FIELD P_LAND1.
    PARAMETERS: p_land1  TYPE t005-land1.
    SELECTION-SCREEN COMMENT 13(35) v_text1.
    SELECTION-SCREEN END OF LINE.
    INITIALIZATION.
      v_text = 'Country'.
      v_text1 = ' '.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_land1.
      REFRESH: t_t005.
      SELECT land1
             INTO TABLE t_t005
             FROM t005.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
    *            DDIC_STRUCTURE   = 'T005'
                PVALKEY          = ' '
                retfield         = 'LAND1'
                dynpprog         = sy-repid
                DYNPNR           = sy-dynnr
                dynprofield      = 'P_LAND1'
                callback_program = sy-repid
                value_org        = 'S'
           TABLES
                value_tab        = t_t005
           EXCEPTIONS
                parameter_error  = 1
                no_values_found  = 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
    Naren

  • Contolling drop down for a field in table controll.

    Can we controll the drop down of a field in a table controll ..which will vary from one row to another.
    Like for one row that field shud have add, delete in drop down, and for another row it shud hav only replace in the drop down

    In the screen field attributes of that particular field ( i think the option will be in the third row of the attribute ),
    there change it as list box with key or listbox.
    Sorry i just answered looking at the thread subject.
    Do you want it in drop down or whether you want to correct the error ????
    Edited by: Keshav.T on Jan 7, 2010 2:28 PM

  • Auto drop down for text field

    Hi All,
    I an trying to populate the list of names as and when i enter the first letter in text field,that is just enter a in text field n below that it should show the list of names starting with 'a' and i should be able to do multiple selection from the list.Can you pls end me a sample code.

    Try this. May be it helps you.

  • Not able to set values in drop down for a table field

    Hi All,
    I am not able to set values in drop down for a table field. Although I am able to set these values to a stand alone field but its not happening for a particular table field. I am using ABAP web dynpro for coding.
    Pls help.
    Regards,
    Bhaskar

    Hi Otto,
    Here is the code I am using:
    * navigate from <CONTEXT> to <DATASOURCE> via lead selection
      lo_nd_datasource = wd_context->get_child_node( name = wd_this->wdctx_datasource ).
    * navigate from <DATASOURCE> to <CHANGING_PARAM> via lead selection
      lo_nd_changing_param = lo_nd_datasource->get_child_node( name = wd_this->wdctx_changing_param ).
    * navigate from <CHANGING_PARAM> to <EDUCATION_TAB> via lead selection
      lo_nd_education_tab = lo_nd_changing_param->get_child_node( name = wd_this->wdctx_education_tab ).
      node_info = lo_nd_education_tab->get_node_info( ).
      REFRESH ddlb_value_set.
      DATA: wa_edu_est TYPE t517t.
      SELECT * FROM t517t INTO wa_edu_est WHERE sprsL = 'EN'.
        s_element-text = wa_edu_est-stext.
        s_element-value = wa_edu_est-slart.
        APPEND s_element TO ddlb_value_set.
      ENDSELECT.
      SORT ddlb_value_set BY text.
    *    Set Value_sets to node_info
      node_info->set_attribute_value_set(
         name      = 'EDU_EST'
         value_set = ddlb_value_set ).
    Regards,
    Bhaskar

  • Need a drop down for a selection screen

    HI all,
    I need a drop down for a selection screen.
    say for eg: Field is MARA-MTART   (Material Type). The selection is optional and the dropdown should be using check table: T134
    How to get a dropdown? I think a function module is used , but I dont remember the name.
    Kindly reply.
    Thanks in advance.
    Points will be rewarded

    Hi,
    chk the below code...
    TYPE-POOLS: vrm.
    PARAMETER: pr_spart TYPE spart AS LISTBOX VISIBLE LENGTH 7.
    *AT SELECTION-SCREEN ON VALUE-REQUEST FOR pr_spart.
    INITIALIZATION.
    *----Code for Drop down list....
      DATA: lit_spart_list  TYPE vrm_values, "Table for list of Divisions
              lwa_spart_list TYPE vrm_value,
              lw_name  TYPE vrm_id.            "Name of parameter with list-box.
    *---Assign selected values to table that would be passed to FM VRM_SET_VALUES
      CLEAR : lwa_spart_list,
              lw_name.
    *---Pass required values for list-box display.
      lwa_spart_list-key = 'H'.
      lwa_spart_list-text = 'HL'.
      APPEND lwa_spart_list TO lit_spart_list.
      lwa_spart_list-key = 'S'.
      lwa_spart_list-text = 'SL'.
      APPEND lwa_spart_list TO lit_spart_list.
      lwa_spart_list-key = 'P'.
      lwa_spart_list-text = 'PP'.
      APPEND lwa_spart_list TO lit_spart_list.
      lwa_spart_list-key = 'F'.
      lwa_spart_list-text = 'FR'.
      APPEND lwa_spart_list TO lit_spart_list.
    *Name of parameter to which list is to be assigned
      lw_name = 'PR_SPART'.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = lw_name
          values          = lit_spart_list
        EXCEPTIONS
          id_illegal_name = 1
          OTHERS          = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    Reagrds,
    nagaraj

  • Abt Drop Down For ALV Data cells

    Hi,
    I m unable to create drop down for each cell of ALV table.
    Reply me as soon as possible.
    Thks.

    You need to create an object of type CL_SALV_WD_UIE_DROPDOWN_BY_KEY, which is the UI element for dropdown by key, and set that to be your individual cell editor.
    For whichever column you want a dropdown box, use the method set_cell_editor to make the editor as a dropdown box. Hope this helps.
    Regards
    Nithya

  • In logic X I am trying to normalize but the track and file option in the edit window is not there at all just the drop down for pointer eraser etc. Any ideas? Thanks!..

    In logic X I am trying to normalize but the track and file option in the edit window is not there at all just the drop down for pointer eraser etc. Any ideas? Thanks!..

    Total life saver. Thank you

  • No Drop-Down in One Field of ESS Time Sheet

    Hi All,
              We are facing an issue with ESS, Activity type Dropdown values are coming in CAT2 but being not in ESS time sheet. Drop-down for all other values, eg network, receiving cost center etc., are displayed in ESS.
    Can you please suggest what could be the reason behind it.
    Cheers!!!
    Umang

    Hello Umang
    We are also faced similar kind of issue.
    For that Network,   activity type should be configured that should have enough permission for that PERN (means user).
    My suggesion it is issue with back configuration.
    BR
    Sridhar S

  • Rule Policies:  Value drop down for category blank

    Hello,
    We have implemented Rule Policies in CRM 7.0.  When entering a condition for attribute "ICWC_Category" the drop down for "Value" is blank.  We have checked the following:  Categorization schemas are active and user has access to display categorization schemas.  When checking in all other systems, this is working with no issue, but in the productioin system, the value drop down is blank.
    If you have any ideas to trouble shoot or recreate the issue, it would be appreciated.
    Regards,
    E. Simpson

    Hi Anil,
    There is a SAP note availble for this problem.Please check.
    Thanks,
    Ashish

  • When trying to download an APP, it's requesting answers to 3 security questions and it hangs up the iPad when clicking the drop down for the questions...any ideas?

    When trying to download an APP, it's requesting setup for answers to 3 security questions and it hangs up the iPad when clicking the drop down for the questions...any ideas?

    Had to do a hard reboot on the iPad and we were able to get the questions to pop up. Now it's just slow downloading the apps.

  • SQL 2000 Database Maintenance Plan drop downs for days, weeks, months, not displaying

    When setting up a SQL 2000 Database Maintenance Plan the drop down for Remove files older than is not populating with hours, days, weeks, or months. It is just blank. The version is  Microsoft SQL Server  2000 - 8.00.2039 (Intel X86)  
    May  3 2005 23:18:38   Copyright (c) 1988-2003 Microsoft Corporation  Desktop Engine on Windows NT 5.2 (Build 3790: Service Pack 2). Is there a fix for this issue?

    This also works. All the credit goes to a user named eyechart.  Great directions provided as well.
    http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=47575
    sqlmaint.exe
    was missing from MSDE 2000, but that was fixed in SP1 I think. Since this is SP3
    you probably have a missing registry value for the backup directory.
    I
    had to fix a similar problem last year on a bunch of laptops. They were all
    missing a registry value. Anyway, here is the fix:
    1. Fire up regedit and
    look under HKLM\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer
    2. Ensure you have
    a string value called BackupDirectory. The value for this should be the path to
    your backup dir. The default value is C:\Program Files\Microsoft SQL
    Server\MSSQL\BACKUP
    btw, this fix assumes you have a default instance
    installed. A named instance will have slightly different registry location and
    filesystem path.
    -ec
    Edited by -
    eyechart on 03/25/2005 21:04:27

  • Auto Populate Drop Down and Text Fields from Other Drop Down and Text Fields

    Hi everyone
    I'm trying to pre populate a "Proposed Employment Status" drop down field with the selection from the "Current Employment Status" drop down field and allowing users to select another option if the proposed employment has changed. If it hasn't it would just remain as populated by the Current Employment Status" entry.
    I'm also trying to do this with text fields eg "Proposed Position Title" is populated with "Current Position Title". If the title changes in the bew employment arrangements users can enter it over the Proposed Position Title that is presented when the Current Position Title is entered.
    I can get it to work if the drop down or text field names are the same, but this doesnt solve the problem.
    Any ideas
    Regards,
    Michael

    Java is a full featured-language and you shouldn't have any problem doing the mathematics, etc.
    As far as the rest, Studio Creator is a relatively easy way to create the user interface that you describe. If supports drop-down selectable lists and standard form capabilities. A Web Application architecture would appear to be ideally suited to what you describe, and this is supported by SC. Be aware that this would require a server to serve the application to the client computer.
    If the server is a problem you could consider an applet that would be downloaded from a website, and then run entirely on the client computer. But the first approach is better.

  • How can I enable the automated drop down for the subject line on the email page

    How can I enable the automated drop down for the subject line on the email page as I send more than 300 emails everyday with the same subject line. Before it use to happen in my gmail account but now its not. Please help me as its increasing my work time because I have to type the subject line again and again on each email I send. Please help me guys.

    This is usually caused by one or more bookmarks having a long title.
    You can check that folder in the Library and shorten long names.
    * Bookmarks > Show Al Bookmarks
    *Bug 626066 - History, Bookmarks menus too wide because of pages with long titles on 64bits
    <i>Please do not comment in bug reports: https://bugzilla.mozilla.org/page.cgi?id=etiquette.html</i>

  • I have two macs, i was able to install mavericks on my 17", i can't do it with my 13" MacAir, I get a drop down box after i login, I could use some help. George

    I have two macs, i was able to install mavericks on my 17", i can't do it with my 13" MacAir, I get a drop down box after i login, I could use some help. The drop down box says, unknown error, George

    Welcome to the Apple Support Communities
    Pages for the iPad and Pages for a Mac are completely different, so you have to purchase them twice, one for the iPad and another one for the Mac. The only advantage is that, if you buy another iPhone, iPod touch or iPad, you will be able to install Pages for free on all of them.
    As you are running Mac OS X 10.6.8 on the MacBook, you can't purchase Pages from the App Store, so you have to buy iWork '09 on a DVD on Amazon or eBay in order to install it

Maybe you are looking for