How to populate the dropdown key values as shown in the below screen shot

Hi
i am trying to populate the drop down by key value for trader , for Trader we  have few values i need to populate the Those values in values columns . as shown in the below screen shot .

Hi,
Follow below steps
Step 1 - Create basic wdp table
Step 2 - Create context to store dropdown values Within your web dynpro application table
Now you need to create a context node to store the dropdown values, but this needs to be within the context node of your table.
For this example I will use fields CARRID and CARRNAME from structure SCARR to create the dropdown list within the table context.
Choose the attributes to represent the id and the text values
The finished context should now look like this
Step 3 - Update context mapping within VIEW
Within the Context tab of your view update the context node you have just modified (CARRIERS) right click and select 'Update Mapping'. Alternatively if this is a new context drag it from the right hand window and drop it onto the context node in the left window,
Step 4 - Update table field
Within the layout tab of the view, field the table field you want to replace with with a dropdown and remove the UI element associated with it
Now insert new dropdownbyindex UI cell element
Step 5 - Assign Dropdown Ui element to Context
Click on your UI element within the Layout tab, you will now see all the properties for this element which can be changed. You now need to assign the field within the context which you want to be displayed in the drop down i.e. it will be the CARRNAME field within context element DROPDOWN_CARR. To do this simply click on the button at the end of the 'texts' property (the one with a yellow square and circle on it) and select the correct context field.
Step 6 - ABAP code to populate dropdown list and set correct initial value
Insert the following ABAP code into the appropriate place. For this example it will go within the WDDOMODIFYVIEW method of the view.
  Data: it_scarr type standard table of scarr, wa_scarr like line of it_scarr, context_node type ref to if_wd_context_node.  Data: it_ddcarr type STANDARD TABLE OF if_main=>element_DROPDOWN_CARR, wa_ddcarr like line of it_ddcarr, lr_element TYPE REF TO if_wd_context_element, ld_tabix type sy-tabix, ld_index type sy-index, it_carriers type STANDARD TABLE OF if_main=>element_CARRIERS, wa_carriers like line of it_ddcarr.  select * from scarr into table it_scarr. sort it_scarr by carrid.  * select * from scarr into table it_scarr. context_node = wd_context->get_child_node( name = 'CARRIERS' ).  * Get all rows of table and values stored in each cell currently displayed to user context_node->get_static_attributes_table( importing table = it_carriers ).  if sy-subrc eq 0. loop at it_carriers into wa_carriers. free lr_element. ld_tabix = ld_tabix + 1.  *     assign context_node to table context context_node = wd_context->get_child_node( name = 'CARRIERS').  *     assign lr_element to row of table lr_element = context_node->get_element( ld_tabix ).  *     assign data to dropdown of the row  context_node = lr_element->get_child_node( name = 'DROPDOWN_CARR'). context_node->BIND_TABLE( it_scarr ).  *     Set correct initial value read table it_scarr into wa_scarr with key carrid = wa_carriers-carrid. ld_index = sy-tabix. context_node->set_lead_selection_index( index = ld_index ).  endloop. endif.
Step 6 - Save, Activate and Run
Save and activate your abap web dynpro, now when you execute it you should see a drop down object similar to the following:

Similar Messages

  • Msg 2601, Level 14, State 1, Procedure sp_flush_commit_table, Line 15 Cannot insert duplicate key row in object 'sys.syscommittab' with unique index 'si_xdes_id'. The duplicate key value is (2238926153). The statement has been terminated.

    I am using SQL server 2008 R1 SP3. And when we are doing back up operations we are facing the below error
    Msg 2601, Level 14, State 1, Procedure sp_flush_commit_table, Line 15
    Cannot insert duplicate key row in object 'sys.syscommittab' with unique index 'si_xdes_id'. The
    duplicate key value is (2238926153).
    The statement has been terminated.
    Please assist me with your inputs.
    Thanks,
    Rakesh.

    Hello,
    Did you enable change tracking on the database? If so, please try to disable and re-enable the change tracking.
    The following thread is about the similar issue, please refer to:
    http://social.msdn.microsoft.com/forums/sqlserver/en-US/c2294c73-4fdf-46e9-be97-8fade702e331/backup-fails-after-installing-sql2012-sp1-cu1-build-3321
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • How can we export the Primary key values (along with other data) from an Advantage database?

    One of our customers is moving from our application (which uses Advantage Database Server) to another application (which uses other database technology). They have asked us to help export their data, so that they can migrate it to another database system. So far, we have used the Advantage Data Architect (ARC32) "Export Table Structures as Code" functionality to generate SQL. We used the "Include existing data" option. The SQL contains the necessary code to recreate the tables and indexes. The customer's IT staff will alter the SQL statements as necessary for their new system.
    However, there is an issue with the Primary Keys in these table. The resulting INSERT statements use AutoInc as the type for the Primary Key in each Table. These INSERT statements contains "DEFAULT" for the value of each of these AutoInc fields. The customer would like to output an integer value for each of these Primary Key values in order to maintain referential integrity in their new system.
    So far, I have not found any feature of ARC32 that allows us to export the Primary Key values. We had been using an older version of ARC32, since our application does not use the latest version of ADS. I did download the latest version of ARC32 (11.10), but it does not appear to include any new functionality that would facilitate doing this sort of export.
    Can somebody tell me if there is such a feature in ARC32?
    Or, is there is another Advantage tool to facilitate what we are trying to accomplish?
    If there are no Advantage tools to provide such functionality, what else would you suggest?

    George,
      It sounds like the approach you are using is the correct one. This seems to be the cleanest solution to me especially since the customer is able to modify the generated SQL statements for their new system.
      In order to preserve the AutoInc values I would recommend altering the table and changing the field datatype from AutoInc to Integer. Then export the table as code which will export the actual values. After the tables have been created on the new system they can change the field datatype back to an AutoInc type if necessary.
    Regards,
    Chris Franz

  • How to populate a dropdown box based on a selection in another Dropdown box.

    I am trying to find out a way to do the following:
    I am using coldfusion ....working on a form. The form has
    couple of dropdown boxes. Based on the selection on the first
    dropdown box another dropdown box needs to get populated with
    different options. These options will be coming from a query. I am
    trying to find out the Javascript code for doing this.
    Thanks in advance.

    jchopra,
    There's a method to doing what you're wanting to do that I've
    used extensively.
    Basically, within my code, I start by invoking the method
    that returns the data for the dropdown lists. Then, I use the
    following code to pour the data returned into a javascript array:
    var locArray = new Array(#evaluate(locs.recordcount+1)#);
    locArray[0] = new Array('','','','','','','','','',);
    <cfloop query="locs">
    locArray[#locs.CurrentRow#] = new
    Array('#JSStringFormat(locationId)#',
    '#JSStringFormat(fkyPolicyId)#',
    '#JSStringFormat(locationNumber)#',
    '#JSStringFormat(description)#',
    '#JSStringFormat(address1)#',
    '#JSStringFormat(address2)#',
    '#JSStringFormat(zipcode)#',
    '#JSStringFormat(city)#',
    '#JSStringFormat(state)#';
    </cfloop>
    Then I wrote a javascript function that is assigned to the
    first dropdown's onChange() event. When the user changes the value
    that is selected within the dropdown, I use javascript to locate
    (using the policyid) the corresponding record in the javascript
    array and populate and/or select the appropriate value(s) in the
    second dropdown.
    If the data returned from the method invocation is too large
    to use within a javascript array, you may need to limit the results
    that are returned.
    Hope this makes sense. If not, please let me know.
    ds

  • How to set a dropdown display value

    I know how to access the current value of a dropdown box. But how can I set it?
    I have a dropdown box and one of the choices is 'Other'. When 'Other' is selected, a text box is enabled so the user can describe what they mean by 'Other'. Now, I want to make the dropdown more robust where if after selecting 'Other' and providing a comment the user willingly or not makes a different selection, the user is warned that the 'Other' description will be deleted with a choice to proceed or not. If the user proceeds the description is deleted and the text box disabled; if the user doesn't want to proceed with the deletion the text box is left enabled with its value untouched and the dropdown value is reset to 'Other'. This is the part that I can't figure out: how do I reset the display value of the dropdown?
    Thanks for the help!
    Marc

    Ok, thanks Malcolm. Yes, you were correct about using the rawValue property to reset the selected value of the dropdown.
    Why I got so confused is because all my scripting, including trying to reset the newly selected value, was done in the Change event of the dropdown. The rawValue property 'appears' to behave differently here I think because of the order of the events, where it holds the original value through the whole selection process. So essentially, the rawValue during the Change event doesn't hold the newly selected value and will not hold it until the Change event is fully completed.
    So I was able to reset the selected value through the Exit event by using a form variable whose value I set in the Change event. So my Change event uses this line at the right location in my script:
    cancelDDSelection.value = "yes";
    and my Exit event uses the following;
    if (cancelDDSelection.value == "yes") //if the Change event reset this form variable to 'yes'
    this.rawValue = "Other"; //reset the selected value to 'Other'
    cancelDDSelection.value = "no"; //reset the form variable to its default value
    Not sure if there's a better to do this, but all works as I wanted it to now.
    Marc

  • *** [23000][2627][Microsoft][SQL Server Native Client 11.0][SQL Server]Violation of UNIQUE KEY constraint 'ClientPushMachine_G_AK'. Cannot insert duplicate key in object 'dbo.ClientPushMachine_G'. The duplicate key value is (16777412). : sp_CP_CheckNewAss

    *** [23000][2627][Microsoft][SQL Server Native Client 11.0][SQL Server]Violation of UNIQUE KEY constraint 'ClientPushMachine_G_AK'. Cannot insert duplicate key in object 'dbo.ClientPushMachine_G'. The duplicate key value is (16777412). : sp_CP_CheckNewAssignedMachine
    CCCRT::RunSQLStoredProc - Failed to execute SQL cmd exec [sp_CP_CheckNewAssignedMachine] N'xxx', 1
    CCRQueueRequest::GetRequestFromQueue - Failed to execute SQL cmd sp_CP_CheckNewAssignedMachine
    I get the above issue and the one below at a client site; the error started with the error below then changed to the one reported above and back to the one below. Everything is working as it should but the issues
    started when one of the admins at the data-centre incorrectly applied a gpo which affected a number of service accounts (sccm inclusive) and they expired....hence reporting in sccm got broke as well as this error in the ccm.log file appeared.
    Remote client install still works but I believe this error affects new client discovered by sccm, so in other words devices discovered by sccm do not get the client installed automatically....but if all access and permissions are in place...pushing out the
    client to the new discovered system works, it just not done automatically, which kinda defeats one the reasons for using sccm.
    I have searched the breadth of the tinternet and I can only find two technet reference to the same error  - one says to edit the stored procedure on the sql server which I don't think should be done... Like Jason said and I concur....its bad joo joos.
    The second suggestion, said you should select all the options in the Client Push Installation properties, I have tried this but hasn't solved the problem.
    I am planning to upgrade the site to the R2 CU3 before the end of the year but I would like to resolve this error before the upgrade.
    The site is currently sccm 2012 sp1 
    Any idea?> Resolution? sil vous plait!
    Merci

    Hi ,
    Please back up the database of the SCCM site. Then run the following query against the Site DB and see how it goes.
    DELETE FROM System_SMS_Resident_ARR
    WHERE ItemKey IN (
    SELECT ItemKey FROM vSystem_SMS_Resident_ARR
    GROUP BY ItemKey
    HAVING COUNT(ItemKey) > 1
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Violation of PRIMARY KEY constraint 'PK_test'. Cannot insert duplicate key in object 'dbo.test'. The duplicate key value is (12610). (Source: MSSQLServer, Error number: 2627) ?

    Hi team,
    How resolve the below error 
    Violation of PRIMARY KEY constraint 'PK_test'. Cannot insert duplicate key in object 'dbo.test'. The duplicate key value is (12610). (Source: MSSQLServer, Error number: 2627) ?
    Thanks,
    Ram
    RAM

    Hi team,
    How resolve the below error 
    Violation of PRIMARY KEY constraint 'PK_test'. Cannot insert duplicate key in object 'dbo.test'. The duplicate key value is (12610). (Source: MSSQLServer, Error number: 2627) ?
    Thanks,
    Ram
    RAM
    There can be two reasons
    1. The insert script used is having multiple instances of the records with Key as 12610 returned from the source query. If this is the issue add a logic to include only the unique set of id values for records by avoiding duplicates. There are several approaches
    for this like using ROW_NUMBER with PARTITION BY, using a join with derived table etc
    2. The record with Key 12610 already exist in your destination table and your script is again trying to insert another instances of record with same key. This can be avoided by adding a NOT EXISTS condition with a subquery which will check and return only
    those records which doesnt already exist in the source
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • How can I make "F5" key value to System

    subject : How can I make "F5" key value to System
    I like to refresh web page automatically.
    so I have to input "F5" key value of keyboard to local system.
    How can I do this job ?

    Thank you so much !
    I solved the problem thanks to your advice .
    Thank you again~

  • IF_IXML : How can i add encoding with value UTF-8 to the document object??

    Hi
    i want to create a xml file with the following content:
    <?xml version="1.0" encoding="UTF-8"?>
    <OpenSearchDescription xmlns="http://...."> 
    </OpenSearchDescription>
    i did this with the if_ixml interface and rendered the content in a file 'D:\usr\sap\IFD\DVEBMGS01\log\TEST_out.xml
    <?xml version="1.0"?>
    <OpenSearchDescription xmlns="http://...."> 
    </OpenSearchDescription>
    BUT the document attribut(?) encoding="UTF-8"?> is missing!
    How can i add encoding with value UTF-8 to the document object?? it should look like:
    <?xml version="1.0" encoding="UTF-8"?>
    *here is my coding.
    TYPE-POOLS: ixml.
    CLASS cl_ixml DEFINITION LOAD.
    DATA: lo_ixml           TYPE REF TO if_ixml,
          lo_streamfactory  TYPE REF TO if_ixml_stream_factory,
          lo_document       TYPE REF TO if_ixml_document,
          lo_parent         TYPE REF TO if_ixml_element,
          lo_ostream        TYPE REF TO if_ixml_ostream,
          lo_renderer       TYPE REF TO if_ixml_renderer,
         lv_rc           TYPE i.
    lo_ixml = cl_ixml=>create( ).
    lo_streamfactory = lo_ixml->create_stream_factory( ).
    lo_document = lo_ixml->create_document( ).
    lo_parent = lo_document->create_simple_element( name   = 'OpenSearchDescription'  "root node
                                                    parent = lo_document ).
    lo_parent->set_attribute_ns( name   =  'xmlns'
                                 value  = 'http://....' ).
    *rausrendern in file
    lo_ostream = lo_streamfactory->create_ostream_uri( system_id = 'D:\usr\sap\IFD\DVEBMGS01\log\TEST_out.xml' ).
    lo_renderer = lo_ixml->create_renderer( ostream  = lo_ostream
                                            document = lo_document ).
    lv_rc = lo_renderer->render( ).
    Thanks for help
    Britta

    Use the following code:
    set an document encoding
      l_encoding = l_ixml->create_encoding( character_set = 'UTF-8'
                                            byte_order = if_ixml_encoding=>co_none ).
      l_success  = l_ostream->set_encoding( encoding = l_encoding ).
    create a xml renderer
      l_renderer = l_ixml->create_renderer( document = l_doc ostream  = l_ostream ).

  • New install of SQL 2014 Std MSDN. Get "The SQL Server product key is not valid. To proceed, re-enter the product key values from the Certificate of Authenticity (COA) or SQL Server packaging."

    Trying to install a new version of SQL 2014 Std 64 or x86. Installing on Windows 8.1Pro 64bit machine.
    I get:
    "TITLE: SQL Server Setup failure.
    SQL Server Setup has encountered the following error:
    The SQL Server product key is not valid. To proceed, re-enter the product key values from the Certificate of Authenticity (COA) or SQL Server packaging.
    Error code 0x858C0017."
    I looked at the summary log and that is the only error.
    I made sure there were no other instances of SQL on this machine. Uninstalled all VS2013 and sql instances just in case. IF there is somewhere to check if a previous version or license is causing the issue, i would be glad to check.
    Any help would be appreciated.

    Hi,
    Please read this thread with similar issue
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/bdd94577-515c-49fa-be44-008eacece057/installing-sql-server-2012-on-a-new-vm-error-code-0x858c0017?forum=sqlsetupandupgrade
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Articles

  • [SQL Server]Violation of PRIMARY KEY constraint 'DeploymentSummary_PK'. Cannot insert duplicate key in object 'dbo.DeploymentSummary'. The duplicate key value is

    I have migrated my SCCm 2007 environment to SCCM 2012 SP1 CU4.
    I noticed in the System Status\Component Status\SMS_STATE_SYSTEM a lot of errors like the one below:
    Microsoft SQL Server reported SQL message 2627, severity 14: [23000][2627][Microsoft][SQL Server Native Client 11.0][SQL Server]Violation of PRIMARY KEY constraint 'DeploymentSummary_PK'. Cannot insert duplicate key in object 'dbo.DeploymentSummary'. The duplicate key value is (1, 0, S0220438, 0). : spUpdateClassi
    Please refer to your Configuration Manager documentation, SQL Server documentation, or the Microsoft Knowledge Base for further troubleshooting information.
    When looking up the deployment ID and recreate the Deployment the problem is solved. But I have 700 packages and don't want to manually do this action on all packages. I think it is related to the migration i did and something went wrong there :-(
    Besides it will retriggers the deployment to the clients which is also not preferred.
    Is there another way to solve this by e.e.g do something directly in the SQL database tables ?

    Hi,
    It is not supported by Microsoft that do something directly in SQL database.
    If you want to do that, you could make a call to CSS.
    Best Regards,
    Joyce
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • SSIS - "Violation of PRIMARY KEY constraint. Cannot insert duplicate key in object ' tablename '. The duplicate key value is 1234 . Though there are no duplicate records.

    Hi,
    I am providing support to one of our clients, where we have jobs scheduled to load the data from the tables in the source database to the destination database via SSIS packages. The first time load is a full load where we truncate all the tables in the destination
    and load them from the source tables. But from the next day, we perform the incremental load from source to destination, i.e., only modified records fetched using changed tracking concept will be loaded to the destination. After full load, if we run the incremental
    load, the job is failing with the error on one of the packages "Violation of PRIMARY KEY constraint. Cannot insert duplicate key in object '<tablename>'. The duplicate key value is <1234>, even though there are no duplicate records. When we
    try debugging and running the failing package, it runs successfully. We are not able to figure out why the package fails and when we run the next day it runs successfully. Request you to help me in this regard.
    Thank you,
    Bala Murali Krishna Medipally.

    Hi,
    I am providing support to one of our clients, where we have jobs scheduled to load the data from the tables in the source database to the destination database via SSIS packages. The first time load is a full load where we truncate all the tables in the destination
    and load them from the source tables. But from the next day, we perform the incremental load from source to destination, i.e., only modified records fetched using changed tracking concept will be loaded to the destination. After full load, if we run the incremental
    load, the job is failing with the error on one of the packages "Violation of PRIMARY KEY constraint. Cannot insert duplicate key in object '<tablename>'. The duplicate key value is <1234>, even though there are no duplicate records. When we
    try debugging and running the failing package, it runs successfully. We are not able to figure out why the package fails and when we run the next day it runs successfully. Request you to help me in this regard.
    Thank you,
    Bala Murali Krishna Medipally.
    I suspect you are trying to insert modified records instead of updating.

  • How do I stop my cursor from selecting things on the page? It shows up like I want to type something and when I press the down key it goes through all the words like its a word document.

    How do I stop my cursor from selecting things on the page? It shows up like I want to type something and when I press the down key it goes through all the words like its a word document.
    == This happened ==
    Every time Firefox opened
    == June 27, 2010

    You have '''caret browsing''' enabled - that preference appears as set in your Troubleshooting Information.
    http://kb.mozillazine.org/Accessibility.browsewithcaret
    Hit the '''F7''' key to disable '''''caret browsing'''''.

  • IPhoto suddenly crashing after it's open for 3 seconds.Its saying Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ __NSCFDictionary 0x18d70d10 valueForUndefinedKey:]: this class is not key value coding-compliant for the key

    Iphoto is suddenly crashing after about 3 seconds on my MacBook Pro. - Here is problem report
    Crashed Thread: 46  Import thread 0
    Exception Type: EXC_BREAKPOINT (SIGTRAP)
    Exception Codes: 0x0000000000000002, 0x0000000000000000
    Application Specific Information:
    *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<__NSCFDictionary 0x18d70d10> valueForUndefinedKey:]: this class is not key value coding-compliant for the key .'
    Why? all of a sudden??
    Thanks

    Wow, that' s awesome, I encountered the same problem with ya today when trying implement Pickers in Tabbar, and can't figure out why, the debugger just throw back such vague message and guess what ? I spent like 3 hours banging my head against the wall wonder why it's not working, I using XCode 2.2.1, my debugger wont work ( program won't stop at break points for what ever I tried ), and not very friendly with those newbie like me - really don't know where are all the Apple's software developer 1337 ? As I remembered, all the good ones goes for the hardware, "the rest" goes for the software =)), but thanks again, thanks, and again, click the tab bar, set both the class and nib file would get rid of the errors, if it would help some one, the credit goes to the two above, say thanks to them, like me. Have a nice day guys, I 'ma happy .

  • When holding down the 'command' key for a few seconds, the Universal Access panel appears.  How can I stop this?

    When holding down the 'command' key for a few seconds, the Universal Access panel appears.  How can I stop this?

    It is a panel that pops up and the heading on the panel is 'Universal Access', it is actually just an image of a panel, you can't access it.  I have checked keyboard shortcuts and none of them are assigned to the command key only

Maybe you are looking for

  • Pointers regarding Currency handling in BI

    Hello All, I am having difficulty in getting to grips with how currency is handled in queries. There is a vast amount of resource out there but I am just starting out on this road of discovery and am looking for a few basic questions answered and als

  • TOC heading bookmarks in PDF

    When I generate a PDF of my Framemaker book, I have bookmarks to TOC chapter names showing up in the PDF bookmarks. I've checked my PDF set-up, and I did not select the TOC chapter names to show up there. Does anyone know how to eliminate this? I hav

  • Please Help me to update my 9300

    please inform me how to update my 9300. my phone in not in the list of Update Software. there is virus in my phone. There is problem in message sending and Web browsing please please help me.

  • JES 2005Q4 installation problems

    When I start the installation it is not copying any files to any folder. On the screen only this message showing: OrionUninstallersun-ps7_0-entsys %1 OrionUninstallersun-ps7_0-entsys %41 OrionUninstallersun-ps7_0-entsys %71 and after the installation

  • I have photoshop elements 11 and I can not get the encoder to work

    I have photoshop elements 11 and when I put the code in for the encode to be activation .It keeps coming up with the code is not right.