Query on Drop Down .

I am modifying SRM screens .
I want to put a drop down field on the SRM screen and the Drop down values should be taken from a Z table .
Can somebody guide me on how to go about it ?
Values should be taken from Z table .
Regards ,
Ambar

Hi,
If this is a Web Dynpro screen you can do it as follows.
Use the UI element Drop down by Key.
Write the below code in the WDDOINIT to initialize the drop down  values.
DATA : lo_nd_self_book_ui TYPE REF TO if_wd_context_node,
         nodeinfo_self_bk TYPE REF TO if_wd_context_node_info.
  DATA: lt_value_set  TYPE TABLE OF wdr_context_attr_value,
        ls_value      TYPE wdr_context_attr_value.
  DATA : lt_resp_rm_org TYPE /mrss/t_resp_rm_org_tab,
         ls_resp_rm_org TYPE /mrss/t_resp_rm_org.
SELECT * FROM ztable  INTO TABLE lt_resp_rm_org
  LOOP AT lt_resp_rm_org INTO ls_resp_rm_org.
    ls_value-value = ls_resp_rm_org-resp_rm_org.
    ls_value-text  = ls_resp_rm_org-description.
    APPEND ls_value TO lt_value_set.
    CLEAR: ls_value, ls_resp_rm_org.
  ENDLOOP.
  lo_nd_self_book_ui = wd_context->get_child_node( name = wd_this->wdctx_self_book_ui ).
nodeinfo_self_bk = lo_nd_self_book_ui->get_node_info( ).
  nodeinfo_self_bk->set_attribute_value_set( name = 'RESPONSIBLE_RM_ORG' value_set = lt_value_set ).
Regards,
Priya

Similar Messages

  • Pass Multiple Parameters to SQL query in Drop down or Select Boxes

    Post Author: JasonW
    CA Forum: Data Connectivity and SQL
    Hello all- I am using CR XI and SQL server 2000.I have written a SQL statement and used that statement as a 'command' in the Database Expert, to pull data into a report.  There are two issues I have that I need some help/advice on.-. The report needs 4 parameters.  A, B, C, D.-. I can create Parameters in the Database Expert that will prompt me for the data when I refresh the report. However,-. I need to be able to select those parameters in drop down boxes based on data in the SQL database.  The problem is that the parameter cannot pull the data without the criteria - so a drop down box seems impossible.  OR is it?  That is part of my question.  The other part is - Even if it is possible, can Crystal do this somehow?  NOTE: The query is selecting the data rather than Crystal - so Creating a Parameter field IN the report is futile. -. The other half of this problem is that users would like the ability to select multiple values from Field A and from Field B.  

    Post Author: JasonW
    CA Forum: Data Connectivity and SQL
    I ended up using a stored procedure.  This queries the proper data, and allows me to use Dynamic Parameters to make multiple selections on the data.  (I query out a large portion of the data in the stored procedure, then pair it down using Dynamic Parameters in Crystal.) Here is the new problem this has created:My Dynamic Parameters are not pulling all the values from the query.  Ex.  One field in the query is a "directory" listing.  It has 227 unique values in it.  (It has multiple values, it is not constrained.)  When I create a Dynamic Parameter off of this field, I only get 18 of the 227 as available selections in the drop down box.  However, I can type in any of the 227 values into the field manually, I pull the proper data.  So the data is there, its just not showing up in the drop down box.   Anyone have any ideas on this?

  • Query Variable drop down option

    Hi,
    My requirement is
    I had a query with User Entry Variables on 2 Charsu2026.
    Char 1 & Char 2
    Is there any possibility of configuring CHAR2 drop down list in variable screen based on the entry in Char 1 variable
    Ex: If user selects A in CHAR 1u2026then CHAR 2 drop down list should only show 5 values
         If user selects B in CHAR 1u2026then CHAR 2 drop down list should only show 8 valuesu2026u2026
    Is there any possibility to achieve this
    Thanks

    Hi,
    You can use this BADI spot RSR_VARIABLE_F4_RESTRICT.
    http://help.sap.com/saphelp_nw70ehp2/helpdata/en/de/94863bc87cc421e10000000a114084/content.htm

  • Query for Drop Down By key

    Hi,
    Explaining my problem with an example.
    There is a hotel table where user enter hotel details
    Like City, Dep Date, Arr Date, No of Days , rate  etc  and these in turn get saved to table say USER_HOTEL_DETAILS  . When user comes to his plan/entered details again, previously saved data is shown to him.
    For making a selection for City I have to give a dropdown to user with cities list that are maintained in other table say HOTEL_DATA which has city, rate, and currency fields and city is the key of table.
    Now if I use drop down by key or index for city I need to fetch city values from table HOTEL_DATA and have to populate context of city field of USER_HOTEL_DETAILS.
    For dropdown my value text is going to be city .For key if I try to give serial numbers say 1, 2, 3 as key for populating dropdown, the key will get stored in database table against city name. To avoid this while saving data I have to write additional code while saving and retrieving data that take value against selected key.
    To avoid this one way is to use city name as both Key and Value. What is the other alternative I can use for? Please help
      Regards,
      Madhvika

    Hi ,
    It is better to have citykey in HOTEL table and maintain a text table for the same.This is good approach.
    Because tommorow if city needs to be displayed in other text also just adding the same in the text table would be suffice.
    For city texts retrieve it from text table and bind to the node.
    Regards,
    Madhu

  • Dynamic query with drop down lists

    I have two select queries in my program.
    The first query is to obtain and then display the list of
    clients.
    The second query I want to display only projects which are
    linked to a specific client.
    <cfquery name="getClient" datasource="#request.DSN#">
    Select tblClients.ClientID, tblClients.ClientName
    From tblClients
    Order by tblClients.ClientName</cfquery>
    <cfquery name="getProjects" datasource="#Request.DSN#">
    Select tblprojects.ProjectID, tblProject.Project,
    tblProject.ProjectID
    From tblProject, tblClients
    WHERE tblClients.ClientID = tblProject.ClientID AND
    tblClients.ClientID = #getClient.ClientID# </cfquery>
    I am displaying the first select box ok and it is populated
    with the correct information.
    The second select box is ot quite correct. It is only
    displaying one record - the first record in the file.
    <select name="Client">
    <cfoutput query="getclient">
    <option
    value="#getclient.ClientID#">#getclient.ClientName#</option>
    </cfoutput>
    </select>
    <select name="Project">
    <cfoutput query="getProject">
    <option
    value="#getProject.ProjectID#">#getProject.Project#</option>
    </cfoutput>
    </select>
    Any ideas on how to correct this would be greatly
    appreciated.
    Kind regards

    In your second query you are using the variable
    #getClient.ClientID#
    Outside of a <cfloop query=""> or a <cfoutput
    query=""> CF assumes you meant
    : #getClient.ClientID[1]# (which is the first record of the
    getClient Query.
    If you are trying to pull up a list of projects that are for
    the getClient list, then try this instead
    <cfquery name="getProjects" datasource="#Request.DSN#">
    Select tblprojects.ProjectID, tblProject.Project,
    tblProject.ProjectID
    From tblProject, tblClients
    WHERE tblClients.ClientID = tblProject.ClientID AND
    tblClients.ClientID IN (#valuelist(getClient.ClientID)#)
    </cfquery>
    Valuelist changes any 'column' from a query into a list.
    Hope this helps

  • Drop-down list in Interactive forms

    Hi All,
    I am creating an interactive form in webdynpro abap. I would like to include a drop-down list in the interactive form. Data in the drop-down list should come from a database table.
    Can anyone give a sample program to do it? It would be of great use.
    Thanks & Regards,
    Vinod

    hi Vinod,
    You may get many threads with  similar query as yours if you use the search functionality.
    But you may refer these two threads which are close to your query.
      Drop Down List population - Abap dynpro adobe form - type ZCI
      Re: Dynamic Drop Down in Interactive Form not populating values
    Regards,
    Runal

  • When I start to type a search Ff4 completes in the drop down but won't auto complete when I make the selection?

    I have windows XP. When I try to do a search on Firefox 4 (which I loaded yesterday) and start my query the drop down box appears and when I highlight and click my choice it closes up the drop down box but doesn't put the selection back in the Google box? It happens all the time.

    This issue started with Firefox 6 up to the new release 8. It was OK with Firefox 5. For the time being, I re-install Firefox 5.
    '''Yes, it is browser issue.'''

  • How to add drop down list for query manager report in sap business one

    Hi Every one,
    I need drop down list for parameter selection in sap business one Query Manager.I have two Parameters 'Sales Order','Invoice'.
    Please suggest.
    Thanks and Regards
    DEV

    Hi,
    you need to use this :
    /*select from [dbo].[OINV] T2*/
    DECLARE @Invoice varchar(100)
    /*where*/
    set @Invoice =/* T2.DocNum  */N'[%2]'
    you can change the tables and the parameter number but you have to write it exactly that way.
    when you run the query within the SBO you will get list of objects ( in this case list of invoices)
    hope it was helpful
    Shachar

  • Refreshing drop down list in a web template based on a query view

    Refreshing drop down list in a web template based on a query view  
    I have just developed my first set of portal pages displaying the results of Bex queries and query views in the SAP Netweaver portal. I developed the pages using web application designer. Each web template created with W.A.D is using a query or query view. In one template I have that is using a query view I am using a variable in my Bex query. This variable is of type customer exit, is set to variable is ready for input and calls some ABAP code which returns the current fiscal week number and year. When I run the query or query view in isolation through Bex analyzer the variables gets populated correctly. In my web template I have associated my variable from my query view to a drop down list box. However when I run the Iview created from this template the query results get refreshed but my drop down list box does not, it still shows last weeks week number. How do I get the drop down list box to refresh with the latest result from my customer exit variable?
    Regards
    Collin

    Hi  ,
    According to your description, my understanding is that you want to  filter a calendar based a look up column in SharePoint 2013.
    Calendar View not support OOTB filters connection. it is disabled for calendar view, you need to change view(not calendar view) so OOTB filters works and get connected to your view.
    You can achieve this using combination of jQuery and SharePoint OOB techniques.
    For jQuery filters refer to the  blog: enter SharePoint List Filters using jQuery
    Also you can filter Calendar View Web Part using JQuery and SPServices:
    http://blogs.visigo.com/chriscoulson/filter-a-sharepoint-calendar-list-with-a-date-picker/
    http://joshmccarty.com/2011/11/sharepoint-jquery-and-fullcalendar%E2%80%94now-with-spservices/
    http://spservices.codeplex.com/discussions/258846
    Another  way, you can have a look at the SPFilterCalendar :
    http://www.aasoftech.com/SitePages/How%20to%20Filter%20SharePoint%20Calendar%20Dynamically.aspx
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Help with multipule drop down lists in a select query

    Hi I am trying to design a search query using 5 drop down lists coming from tables.  the front end looks like this
    I have the selections going to variables then by $_POST into the msqyl query my other code is
    MY CODE FOR THE FORM IS
      <form action="horse-events-devon.php?url_countyid=<?php echo  urlencode ($url_countyid ['url_countyid'])  ; ?>&go" method="POST">
        <table id="searchtable">
          <tr>
            <th>Find By Discipline</th>
            <th>Find By Venue</th>
            <th>Find By Championship</th>
            <th>Find By Organiser</th>
            <th>Equine Association</th>
            <th>Submit Your Selections</th>
            </tr>
          <tr>
            <td><select name="dis_id">
                                        <?php
                                            $upcomingdis = upcomingdis($url_countyid);
                                            $upcoming_dis_bycounty = mysql_fetch_assoc ($upcomingdis);
                                        ?>
                                        <?php
                                        do {
                                          ?>   <option value="<?php echo $upcoming_dis_bycounty ['dis_id']; ?>" >
                                        <?php echo $upcoming_dis_bycounty ['dis_description']; ?></option>
                                        <?php
                                        } while ($upcoming_dis_bycounty = mysql_fetch_assoc ($upcomingdis));
                                        ?></select></td>
            <td><select name="ven_id">
                                        <?php
                                            $upvenbycounty_set = upcoming_venevents_bycounty($url_countyid);
                                            $upcoming_ven_bycounty = mysql_fetch_assoc ($upvenbycounty_set);
                                        ?>
                                        <?php
                                        do {
                                          ?>   <option value="<?php echo $upcoming_ven_bycounty ['ven_id']; ?>" >
                                        <?php echo $upcoming_ven_bycounty ['ven_name']; ?></option>
                                        <?php
                                        } while ($upcoming_ven_bycounty = mysql_fetch_assoc ($upvenbycounty_set));
                                        ?></select></td>
            <td><select name="champ_id">
                                        <?php
                                            $championship_set = findchampionships();
                                            $champlist = mysql_fetch_assoc ($championship_set);
                                        ?>
                                        <?php
                                        do {
                                        ?>   <option value="<?php echo $champlist ['champ_id']; ?>" >
                                        <?php echo $champlist ['champ_description']; ?></option>
                                        <?php
                                        } while ($champlist = mysql_fetch_assoc ($championship_set));
                                        ?></select></td>
            <td>
            <select name="org_id">
                            <?php
                                $uporgbycounty_set = upcoming_organevents_bycounty($url_countyid);
                                $upcoming_org_bycounty = mysql_fetch_assoc ($uporgbycounty_set);
                            ?>
                            <?php
                            do {
                            ?>   <option value="<?php echo $upcoming_org_bycounty ['org_id']; ?>" ><?php echo $upcoming_org_bycounty ['org_name']; ?></option>
                            <?php
                            } while ($upcoming_org_bycounty = mysql_fetch_assoc ($uporgbycounty_set));
                            ?></select>
            </td>
            <td><select name="***_id">
                                        <?php
                                            $upassbycounty_set = upcoming_assevents_bycounty($url_countyid);
                                            $upcoming_assbycounty = mysql_fetch_assoc ($upassbycounty_set);
                                        ?>
                                        <?php
                                        do {
                                        ?>   <option value="<?php echo $upcoming_assbycounty ['***_id']; ?>" >
                                        <?php echo $upcoming_assbycounty ['***_description']; ?></option>
                                        <?php
                                        } while ($upcoming_assbycounty = mysql_fetch_assoc ($upassbycounty_set));
                                        ?></select></td>
              <td><input name="submit" type="submit" /><input name="countyid" type="hidden" value="<?php echo $url_countyid ['url_countyid']; ?>" /></td>
            </tr>
          </table>
      </form>
      <?php
    if (isset($_POST['submit'])){
        if (isset($_GET['go'])){
        $countyid = $_POST['countyid'];
        $ven_id = $_POST['ven_id'];
        $dis_id = $_POST['dis_id'];
        $champ_id = $_POST['champ_id'];
        $org_id = $_POST['org_id'];
        $event_id = $row['event_id'];
            $sql = "SELECT DATE_FORMAT (events.startdate, '%a, %d, %b')
                       AS stdate, events.event_id, events.title, events.ven_id, events.org_id,
                       venue.county_id, venue.ven_id, eventdisciplines.event_id, eventdisciplines.dis_id, county.county_id, discipline.dis_id \n"
                . "FROM events \n"
                . "LEFT OUTER JOIN eventdisciplines \n"
                . "ON events.event_id = eventdisciplines.event_id \n"
                . "LEFT OUTER JOIN discipline \n"
                . "ON eventdisciplines.dis_id = discipline.dis_id \n"
                . "LEFT OUTER JOIN venue \n"
                . "ON events.ven_id = venue.ven_id \n"
                . "LEFT OUTER JOIN county \n"
                . "ON venue.county_id = county.county_id \n"
                . "WHERE events.ven_id = ({$ven_id} OR events.org_id = {$org_id})\n"
                . "AND events.startdate > NOW()\n"
                . "AND venue.county_id = {$countyid}  \n"
                . "ORDER BY startdate ASC";
        $result = mysql_query ($sql, $connection);
    ?>
    My problem is at the WHERE point,  how do I code for single and multipule selections,  The       . "WHERE events.ven_id = ({$ven_id} OR events.org_id = {$org_id})\n" throws and error.
    How am I best programing this type of query,  ??  Should it be with php ??

    The best thing is to dynamically build your where clause based on the user selection. Test the values of all form fields and if the user does not make a selection, do not include that in the where clause.
    Trying to build a single, static where clause that accounts for all possible user input permutations is extremely difficult.

  • Drop Down List in Query Selection Screen Takes Long Time.

    I open a report, refresh the query and get a selection screen. But when clicked on the drop down list it takes 4- 5 mins for displaying the drop down options.
    How can I speed up the displaying of drop down list in selection screen?
    Could any one please help regarding the setting to enable this?
    Thanks.

    Hi,
    I guess there is a setting to look up the master data tables or use the dimension,which would speed up the time that it takes to display the drop down selections
    Do you have any idea about the setting?
    Thanks.

  • Drop Down List in Query takes Long Time.

    I open a report, refresh the query and get a selection screen. But when clicked on the drop down list it takes 4- 5 mins for displaying the drop down options.
    I guess there is an setting to look up the master data or use the dimension.
    Could any one please help regarding the setting to enable this?
    Thanks.

    Hi ,
    you can do these settings in info object level.
    Go to info object : Select Business Explorer Tab
    Option is : Query Execution Filter Val. Selectn  : here you can specify info provider.
    Plz assign points if it is useful.
    Thanks,
    Vijay Sekahr Reddy.

  • SQL function column in drop down list's data provider's query

    Just wondering, if it is somehow possible to use SQL function column for drop down list through data provider.
    At the moment, I am using id column as return value and name as display value from this query through CachedRowSetDataProvider:
    SELECT ALL someTable.Id,
    someTable.Name,
    someTable.Postal_Code,
    FROM someTable
    However, I want to change display to use calculated column as display value, for example Name_PostalCode from below mentioned changed query:
    SELECT ALL someTable.Id,
    CONCAT(someTable.Name, ' - Pin Code: ',someTable.Postal_Code) Name_PostalCode ,
    someTable.Name,
    someTable.Postal_Code,
    FROM someTable
    But JSC doesn't seem to like this.
    Is it someway possible to achieve this?
    Thanks.

    >
    But JSC doesn't seem to like this. Can you explain more. When doesn't it like it, in the design view, in the query editor, when your run it? What is the error you are seeing?
    See http://blogs.sun.com/divas/entry/displaying_multiple_fields_in_a

  • Drop down box in SAP QUERY

    Hello Friends,
    I have developed a SAP QUERY using SQ01, SQ02, SQ03. It displays an ALV output.
    Now for some particular fields, I want a drop down box in the output ALV. Since in SAP QUERY output alv and final table runs at runtime I am not able to put any of two options I have i.e. VRM_SET_VALUES or DROP_DOWN_HANDLE.
    Can you suggest me the way with which I can display a drop down in the output ALV.
    Please revert if the questions seems confusing.
    Thanks,
    Harjeet

    Dear Sai,
    The Data provider should be the same which is being used by the table and more over you have an option of Read mode over there to display the values in the report based on the Dimension Table values or Posted values or Master data table values.
    Moreover in the specific properties panel of the Drop down, you need to mention on which characteristic you want the drop down box.
    Post back if your issue doest resolve.
    Cheers
    Gattu

  • Drop down like behavior list in a query

    I would like to have drop-down list behaviour in a query. I could do it using with a  UDF (U_TipoMat) with 2 valid values set in a user table.
    DECLARE @TM Float
    SET @TM=(SELECT T0.U_TipoMat FROM .[@PARAMETROS] TO WHERE T0.U_TipoMat = )
    here it lets me select one of the 2 values stored in these UDF but it does not pass the value to the query
    Any ideas?
    Edited by: Héctor Ramón Santos Anaya on Mar 13, 2008 1:36 AM

    Hector,
    Can I know what is the end result you are trying to achieve.
    What are you trying to do with the value in the variable @TM.  Where are you planning to use this query?
    Also [dbo\].[@PARAMETROS\] TO ...you have use TO instead of T0.
    DECLARE @TM Float
    SELECT @TM = T0.U_TipoMat FROM [dbo\].[@PARAMETROS\] TO WHERE T0.U_TipoMat = '[%1\]'

Maybe you are looking for

  • More printer issues

    I have a cable modem, new AExtreme, one g5 imac wired to router, and several laptops(PC and Mac) connecting wirelessly. I have added a HP 4050 laserjet (via ethernet, RJ45 cable). I have tried ever friggin setting, config i can think of, and I cannot

  • Monthly Sales Order query Doc Status problem

    Hi Experts, I am having an problem while making a total monthly sales order query in which I am not getting the document status which are Open - Printed. Also note that these document which are open printed are not having any target document. SELECT

  • Why files created on iweb snow leopards do not open on iweb yosemite

    why files created on iweb snow leopards do not open on iweb yosemite почему файлы iweb созданные на snow leopards не открываются на iweb yosemite how to work? как работать?

  • Fillable Forms for Adobe 8?

    Hi, I currently have Adobe 8.  Is it possible to make fillable forms using that?  If so, what are the steps to going about that?

  • Performed system restore, Photoshop won't reinstall

    So I performed a system restore and now my photoshop is gone. I tried downloading the program again from the adobe website but the application manager still says Update and not Install. So I've tried locating the registration keys even under safe mod