To pass the selected data to a variable from the drop down list in abap wd

Hi,
I have already created a drop down list and populated it with data from table by using the node and linking it with the internal table. Now I need to know which element is selected so based on that I need to perform some function. eg. based on the selected data , i need to populate the next drop down list.
A demo code will be really helpful.
Thanks and Regards
Tenzin

Hi,
On selcting the value from the drop down, we have one event ONSELECT.
Write the code in this event.
Get the attribute value to lV_xxxxxx using get attribute.
then using that you can fill the next DDBK attribute.
method wddoinit .
  data:
        lo_nd_spfli type ref to if_wd_context_node,
        lo_el_spfli type ref to if_wd_context_element,
        ls_spfli type wd_this->element_spfli.
  data:
      lv_carrid LIKE ls_sflight-carrid,
         itab_carrid type wd_this->elements_spfli,
         wa_carrid type wd_this->element_spfli,
         lo_nodeinfo_spfli type ref to if_wd_context_node_info,
         lt_value_set type wdy_key_value_table,
         ls_value_set type wdy_key_value.
  lo_nd_spfli = wd_context->get_child_node( name = wd_this->wdctx_spfli ).
  lo_nodeinfo_spfli = lo_nd_spfli->get_node_info( ).
  select carrid
    from spfli
    into corresponding fields of table itab_carrid.
  if sy-subrc = 0.
    sort itab_carrid by carrid.
    delete adjacent duplicates from itab_carrid comparing carrid.
  endif.
  loop at itab_carrid into wa_carrid.
    ls_value_set-key = wa_carrid-carrid.
    ls_value_set-value = wa_carrid-carrid.
    append ls_value_set to lt_value_set.
  endloop.
  lo_nodeinfo_spfli->set_attribute_value_set( name = 'CARRID'
  value_set = lt_value_set ).
endmethod.
in the event of first DDBK, write the select statement wsing where condition of lv_XXX.
and append the record as above.
Regards,
sarath

Similar Messages

  • How do I pass a username form variable from a drop down list/menu to another page?

    Hi,
    I have a login_success.php page that has a drop down list/menu (which lists usernames). I want the user to click on their user name, and when they click the submit button the username information to be passed over to the username.php page which will contain a recordset, sorted by username.
    How do I pass the username info from the drop down list/menu to the username.php page?
    The drop down menu is connected to a recordset listUsername, I have filtered the recordset with the Form Variable = username, and I have used the POST method to send the username to the page username.php. I'm not sure how to structure the php or which page to place it on.
    <form id="form1" name="form1 method="post" action="username.php">
         <label for="username_id">choose username:</label>
         <select name="username_id" id-"username_id">
              <option value="1">username1</option>
              <option value="2">username2</option>
              <option value="3">username3</option>
              <option value="4">username4</option>
         </select>
         <input type="submit" name="send" id="send" value="Submit" />
         <input type="username" type="hidden" id="username" value="<?php echo $row_listUsername['username']; ?>" />
    </form>
    Could somebody help me please?
    Thanks.

    I would not post the variable over, In this case I personally would send it through the URL and use the $_GET method to retreve it. For Example.
    <html>
         <head>
              <title>Test Page</title>
              <script type="text/javascript">
                   function userID(){
                        //var ID = form1.userIDs.selectedIndex;
                        var user = form1.userIDs.options[form1.userIDs.selectedIndex].value;
                        window.location = "test.html?userID=" + user;
              </script>
         </head>
         <body>
              <form id="form1">
                   <select name="userIDs" id="userIDs" onchange="userID();">
                        <option>Select a User</option>
                        <option value="1">User 1</option>
                        <option value="2">User 2</option>
                        <option value="3">User 3</option>
                        <option value="4">User 4</option>
                   </select>
              </form>
         </body>
    </html>
    //PAGE TO RETRIEVE THE USERNAME
    <?php
    if(isset($_GET['userID'])
         $userID = $_GET['userID'];
         echo $userID;
         die;

  • How to populate data from dynamic drop down list to the text field

    Hi,
    I tried to populate data from dynamic drop down list to city field. I would like to concat data from drop down list.When selecting add button to add the item and select item from drop down list, data should be displayed in the text field. However, Please help. I spent alot of time to make it works I am not successful.
    Please see the link below.
    https://acrobat.com/#d=SCPS0eVi6yz13ENV0cnUdw
    Thanks for your help
    Cindy

    Hi Rosalin,
    Loop the hidden table, get the values and populate drop down in each iteration.
    DropDownList1.addItem("Text","Value");
    You can use one more solution for this scenario. If it is a matter of 2,3 dropdowns, put three dropDowns in the form layout and give seperate static data binding to them. At run time make the dropDowns hide/visible as per the requirement.
    Hope this helps.
    Thanks & Regards,
    Sanoosh

  • How do I select a item from a drop down list on a web in Safari On An. IPad 2.  The list apears and disapears só QuickClips I cannot TAP anything On The list Quickly enough.

    I tried to select an item from a drop down list on a web page in safari and discovered that the list disapeared to quickly for me to make a selection.  Has anyone else found this and solved the problem.  Many thanks.

    Demo wrote:
    I tried it on my iPad and I see what you mean. From what I can see when I go to the site on my Mac, it is Flash based and that will not work anyway.
    Actually, it is Javascript and uses the 'onmouseover' event.

  • The actual date is not transferred from the (PS) milestone

    Hello ,
    In an order with header billing plan dates that are value-based, the actual date is not transferred from the Project System (PS) milestone, even though the actual date of the assigned milestone was changed via transaction CJ20N.
    We are repeatedly facing this error , I have applied Note number 1395078 but still once in a while I am still facing the issue
    Regards
    Muralidharan.S

    Check the following path in SPRO
    IMG - PS - Revenue & earning - planned revenues - Automatic Plan Revenue cal - Maintain Billing Plan Settings
    There, you use the billing plan to plan dates on a WBS element whose payment requests or invoices relevant to sales are to be sent to customers.
    The system updates the planned revenue and planned payment receipts to the relevant WBS element. The planned revenue is updated using the revenue element stored in the planning profile for the work breakdown structure and using the financial item assigned to the revenue element.
    You make the settings given below for the billing plan. To do this, you carry out the following steps:
    - Maintain billing plan type
    - Maintain date description for billing plan
    - Maintain revenue element for billing plan
    - Assign billing plan type to project profile
    Hope this can assist you.
    Thanks & Regards
    JP

  • External XML data files to add values to drop down lists

    I would like to have external XML data files to add values to drop down lists in my form.. But when i create a data connection it is working properly only in the Preview in Livecycle Designer.. but not in the PDF form(Adobe Reader). Moreover im not sure whether it will work in the form manager..!plzz help me!
    Raghava Kumar V.S.S.

    Hi,
    For the case of raghavakumar, Is it really that I need to have LiveCycle Reader Extensions? Is there any other way that could do the same?
    Thank you

  • How to Get the Current data into Planning Layout from the Planning cube

    Hi,
    I have a problem in BPS.   I am selecting the data from cube based on Month org details but I want to see the latest data.   How can i get this data into planning cube.
    Like
    data
    Tran           cal month            org               amt
    1                 jan                        a                  100
    1                 feb                        a                   200
    if i want to read based on Tran org as input values I shoud get the below data but I am getting the previous data.   
    Tran           cal month            org               amt
    1                 feb                        a                   200
    Kindly help me in this regard
    Thanks
    Naveen

    Naveen,
        Are yo having issue when you save something in the layout, the data doesn't appear in the listcube ? Or do you have issue that the latest data you see in the cube doesn't appear in the layout ?
    For the former issue, please look at your selections of listcube and for the second issue, please check your planning level definition, make sure all the restrictions you have applied are valid for this latest data to be presented in the layout.
    Hope this helps.
    Cheers
    Srini

  • Using the values from a drop down list to display in a separate cell

    Hi all,
    I must apologise if I don;t use the right 'terminology' as I am just an ordinary guy who uses a mac. I am also deaf which means I am totally dependant on the internet for fixing solutions.
    Basically, I wanted to create a drop down list which I had no problem doing.
    In the drop down, I have the options One-Piece, Two-Piece and Three-Quarter.
    I would like to get it so that when I select the One-Piece, the value of 160 appears in a separate cell. If I select Two-Piece, then I would need 130 to appear in that separate cell. Likewise, Three-Quarter to produce 150.
    Just to clarify, if we had a two-column and one row table, then the drop-down would be in A1, which the values would appear in B1.
    I do not know the formula, and cannot find any instructions anywhere as I am probably using the wrong terminology or function name!
    Any help would be much, much appreciated..
    Carl

    I don't guess what I may add.
    The contents of the table named lookup appear on the screenshot.
    cell A1 contains the string One-Piece, cell B1 contains the 'associated' value 160.
    cell A2 contains the string Two-Piece, cell B2 contains the 'associated' value 130.
    cell A3 contains the string Three-Quarter, cell B3 contains the 'associated' value 150.
    Now table Main
    In column B the cells contain a pop_up menu with four items like the ones described by Jerrold.
    In column C of the cells contain the formula :
    =IFERROR(VLOOKUP(B,Tableau 2 :: A:B,2,FALSE),"")
    I enhanced it since yesterdays because I forgot to treat the case when cell is blank in column B.
    I apologize but as I'm using my machine in French, the screenshot display the French formulas.
    I repeat that you may find useful infos in the PDFs files which we may download from the menus:
    Help > Numbers User Guide
    Help > iWork Formulas and Functions User Guide
    As you are in Stoke-on-Trent maybe your system is set to use the comma as decimal separator.
    If it's that, you must replace the comma by semi-colons in the formulas (you may see them in my screenshot).
    Yvan KOENIG (VALLAURIS, France) mercredi 24 mars 2010 09:27:53

  • Detail region does not refresh when selecting from a drop-down list in master region

    I am using DW CS3 and have updated to version 1.6.1 of Spry.  Using an XML dataset, I am able to create a Spry table as the master region that links to a detail region that displays a small JPG graphic.  It works fine in this format (clicking on a row displays the correct graphic).  However, my table has 80 rows and requires the user to do too much scrolling. So I changed the master region to a drop-down repeat list, but the graphic does not change when a new selection is made in the drop down list.  Listed below is the code produced when I used the insert Spry Repeat List.  I got the same results when adding a spry:setrow="dsChartNurse".  I also tried -- onclick="dsChartNurse.setCurrentRow('{ds_RowID}');" -- which again made no difference.
    When I removed children from the spry:repeat, the master region displayed as a two column list of all 80 items in a drop-down list format.
    <div spry:region="dsChartNurse">
           <select name="select" spry:repeatchildren="dsChartNurse">
             <option value="{name}">{name}</option>
           </select>
    </div>
    <div id="image" spry:detailregion="dsChartNurse">
       <img src="{dataimage}" align="center" style="margin:50px 0 0 0"width="320" height="164" />
    </div>
    Thanks so much to anyone who can help correct my code in order to have a drop-down list display information correctly in the detail region.

    Thanks for the quick reply.  I did solve the problem I was having by changing from onclick to onchange in the master region.  But, now I have another problem with, of course, IE.  I just put in online at http://www.minursemap.org/ageDistNurse.html.  When opened in IE, the drop down list displays the last entry, but the image is for the first in the list.  Thanks again for your help.

  • How to grab the value from a drop down list inside a table cell

    Hello,
    My situation is I have a few columns displayed in a table format using repeater tag. Some cells is a dropdown list(<netui:select /> tag). My question is how can I grab the value when user made a selection.
    I believe I can get the row index but I can't use the datasource attribute to get the user selection since it is in a repeater. All the cell use the same datasource and workshop will give "NULL" value when there are more than one tag bind to the same form valiable.
    Any suggestion are very much appreciated! Thanks a lot in advance.
    My snippet code are:
    <netui-data:repeater dataSource="{pageFlow.ownedTask}"><netui-data:repeaterHeader></netui-data:repeaterHeader>
    <tr valign="top">
    <td><netui:select dataSource="{actionForm.userName}" optionsDataSource="{pageFlow.nameList}" onChange="getUser()" ></netui:select>
    </td>
    <td><netui:select dataSource="{actionForm.empDept}" optionsDataSource="{pageFlow.deptList}" onChange="getSelectedDept()" ></netui:select>
    </td>
    <td><netui:label value="{container.item.status}" />
    </td>
    </tr>
    </netui-data:repeaterItem>
    <netui-data:repeaterFooter></netui-data:repeaterFooter>
    </netui-data:repeater>

    1) let drop down box be g_dd.
      if g_dd is initial.
      g_dd = option2.
      endif.
    2)
    by default same pf-status is used by all the screens in the same program
    if sy-dynnr = 'screen_no'. " for screens for which you do not want button to come
    set pf-status 'abc' excluding 'fcode_of_button'
    endif.
    or
    data: git_fcode type sy-ucomm with header line.
    git_fcode = 'fcode_of_button'.
    append git_fcode.
    if sy-dynnr = 'screen_no'. " for screens for which you do not want button to come
    set pf-status excluding git_fcode
    endif.
    Edited by: Amit Gupta on Oct 11, 2008 11:36 AM

  • The back/forward button no longer has a drop-down list of previous pages visited in that tab: or is this accessible some other way?

    The question says it all, really. I just installed Firefox 4, and noticed a significant (for me) reduction in utility: in the previous version, the back button used to have a drop-down arrow which showed the previous pages visited in a particlular tab, and allowed you to go back several pages in one go, if you wanted to (say, when browsing a series of sites to buy something or other). Firefox 4 no longer has this facility, which I personally found very useful from time to time.
    Is it available by some other means? If not, maybe I should consider reverting to the previous version, which suited me better, in this regard at least.

    Just put the little arrow back into the system. Fix this now. I don't want 2 other options. Get this right for "nontech" people.

  • The Back button only allows me to go back one page at a time instead of selecting a previous page from a drop-down list. This is a real problem: anyone have any ideas?

    In the previous version of Firefox, I could go back to a previous webpage by clicking on a part of the Back button which brought up a list of recently visited sites, and by clicking one of these, could jump straight back to that page. This facility does not seem to be available in the latest Firefox, and the Back button only goes back one page at a time. This is really inconvenient, as,
    it now takes longer to get to an earlier page
    there is no visibility of previous pages visited
    any actions carried out on webpages are undone when going back through them - this does not happen when jumping back several pages in one go.
    This is a real problem as I used to the old system constantly, and cannot continue to use Firefox 4.0 unless there is a way around it.

    For me, I have the same question, this is a poorly done upgrade and I want to go back to 3.6

  • Using a variable/drop down list in header of planning layout

    Dear all,
    I have created a simple BPS application for purely GL planning (No CO related objects like cost centre involved). I have the following characteristics in the header of the manuel planning layout.
    Business area
    Chart of accounts
    Company code
    Currency
    Currency Type
    Fiscal year
    Fiscal Year Variant
    Fiscal year/period
    Value type
    Version
    I have created variables for Business area, Fiscal Year, Fiscal Year Period, Posting Period and Version. The client wants either a variable or a drop down list for these characteristics in the header in the web application. When I assign a variable and put the characteristic in header, I get the error message in the web application saying header characteristic can only have a fixed value. Can someone tell me if it is possible and if so than how? I'll be very grateful for any inputs. Thanks a lot.
    Regards,
    Sumit

    Hi,
    When you create a variable, assign some values to the variable. These then become available in the drop down box. Ths first time a Web interface is called, these variable values are initial.As a result, u get the error messages. Select the variable values and then the error message should go away.
    Thanks,
    -NS

  • PR Deliv Date doesn't take from the Master data or Info Record

    Dear All,
    When i create a PR manualy by ME51N, the delivery date can always calculate from the planned delivery time in info record or Material master, but when the PR is generate from a Sales order, the delivery date always the date when the SO is created.
    Can anyone please advice me on this issue?
    Thank you very much,
    Regards,
    Chee Wee

    CW,
    You still have not mentioned the Planned delivery time in the two purchase requisitions (auto vs manual).  I will assume they are the same for now. Planned delivery time can be viewed in ME53N > select item; review item details, select 'quantities/dates' tab.  PDT is displayed, along with GRPT.  Let me know if they are dramatically different.
    It sounds like you are using SAP's "Individual Purchase Order" functionality.
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/dd/5601d4545a11d1a7020000e829fd11/frameset.htm
    If you are not, then it is probably a similar but customized functionality ('create PO automatic' is not typical unless you have an EDI relationship that needs this functionality).  No matter, the solution is probably the same..
    In this scenario, during Sales order entry, the system will normally propose a date to the order entry person, based on planned delivery time.  If this person does not 'fix' the date at that time, then the system will create a purchase requisition with a delivery date that matches the requirements date of the Sales order, regardless of Planned delivery time.   If the order entry person instead selects the 'Fix date qty flag' during order entry, the system will accept the standard Purchase Requisition scheduling (starting from today and including Planned Delivery time), and create a confirmation date in the Sales order that is consistent with the planned delivery time.  The confirmation date then becomes the requirements date for the Sales order.
    You can review the fix-date-qty flag in the sales order.  VA03 > select item > then Goto > item > schedule lines. The Fixed Date and Qty is a checkbox in the upper left hand side.  I am not in front of a system this evening, so I can't advise you if you change the flag and re-ATP the order, if the Purchase requisition will automatically be rescheduled.  If it is not, you should be able to first delete the PR, and then set the FDQ flag in the SD order/item to get the schedule dates you require.
    It is possible to have the fixed date quantity flag to be defaulted to 'set' if it meets with your business requirements.  OVZJ > Select Sales Org/Dist channel/division.  Set or unset as the default setting.  You can always change this flag manually within the sales doc, regardless of the default setting, so there is little danger here.
    Rgds,
    DB49

  • How do I use one drop down list to refresh the list in another drop down?

    I am using a drop down list full of years (i.e. 2008, 2009..etc). When I make my selection from this drop down list (say for instance I select 2009) I want it to update the available data in the second drop down list. I have the query statement set up within the JSP page but it needs to be a dynamic SQL statement based off the value I selected in the first drop down.
    String sql = "SELECT GameId, GameDescription FROM Games WHERE Year = " + year;
    The variable "year" is the value I need to figure out how to assign. Now this variable is a Java variable (attribute) and Im unsure how to get the value from the previous drop down and assign it to that. Basically I need the JavaScript value from the first drop down assigned to the Java attribute "year".
    Anyone able to help me with this???
    Thanks,
    Jed

    Here are my two drop down lists. As you can see I build the second list dynamically based off the value of the year. I want to be able to assign my year to the value I select in this first drop down. How do I do that?? I only want to show games for the year I select. I currently have the year hardcoded to "2009" as you see below. How can i change that to be assigned to the JavaScript value i extract from the first select box?
    <select name="season">
    <option value='2009' selected>2009</option>
    <option value='2008'>2008</option>
    </select>
    <select name="gameselect">
    <%
    try
    String year = "2009";
    String connectionURL = "jdbc:mysql://localhost:3306/ElmwoodExpos";
    Class.forName("com.mysql.jdbc.Driver");
    Connection con = DriverManager.getConnection(connectionURL, "root", "thejedster");
    String sql = "SELECT GameId, GameDescription FROM Games WHERE Year = " + year;
    Statement s = con.createStatement();
    s.executeQuery(sql);
    ResultSet rs = s.getResultSet();
    while(rs.next())
    %>
    <option value="1"><% out.print(rs.getString("GameDescription"));%></option>
    <%
    catch(Exception e)
    %>
    </select>
    Thanks,
    Jed

Maybe you are looking for

  • Windows 10 Preview load SL 9926 (upgrading from windows 8.1) Error 80070032

    Follow the log from "WindowsUpdate" file: After a long period sending "data" setup fails with error 80070032 2015-02-19 11:54:56:451 708 15d0 Agent  * Added update {4B9F6CAB-3750-47A4-9944-57EEA40AC186}.102 to search result 2015-02-19 11:54:56:451 70

  • Help! 875P Neo ATA133 configuration

    Hello to u all, I've got some doubts about my configuration. The person that mounted my pc has done as follows: got a cd writer connected on IDE1, a dvd reader connected on IDE2 . IDE1 and IDE2 are the two socket for ATA100 devices. That's ok. The ha

  • Export/import text with all styles (indesign CS3 (XP SP2))

    I'm looking for the best way to export text so authors can edit their text using MS Word, Excel or xml. (they don't want to use Indesign). after they are done editting I want to import the text back into Indesign (with par, char, obj styles). I know

  • Parsing xml payload and edit it

    Hi I am trying to parse xml payload in sender side.I have inserted a stateless session bean before " local ejbs call sap adapter".But changes made to string are not reflected in xml file.The code written in ejb is as follows package com.cts.xi; impor

  • Chatting messenger

    I am final year student. I am making project on instant messenger,I am using Socket programming .I want from my application that when client1 want to chat with any of the online client2,he send that name of the client2 to the server then server send