Getting the first option selected by default in a dropdown

Hi all,
I am using a dropdown within a form. I am populating the dropdown using the values I retrieved from the database by making use of for loop. Now, I have to make the first option selected as default. Also, I have to make use of the value in the drop down to retrieve further data without calling the form handler.
To be more clear, While displaying the page for the first time the first option should be shown as selected and the associated contents of the first option should be displayed by default.
Please help me in this.

I'm going to basically repeat the answer to your other question that you seem to be ignoring completely:
What part are you having trouble with? reading out the resultset, or building the html code. Do you have anything coded yet.

Similar Messages

  • How to get the values of Select-options from the screen.

    The value of parameter can be obtained by function module 'DYNP_VALUES_READ' but How to get the values of Select-options from the screen? I want the F4 help values of select-options B depending on the values in Select-option A.So I want to read the Select-option A's value.

    Hi,
    Refer this following code..this will solve your problem...
    "Following code reads value entered in s_po select options and willprovide search
    "help for s_item depending upon s_po value.
    REPORT TEST.
    TABLES : ekpo.
    DATA: BEGIN OF itab OCCURS 0,
    ebelp LIKE ekpo-ebelp,
    END OF itab.
    SELECT-OPTIONS   s_po FOR ekpo-ebeln.
    SELECT-OPTIONS s_item FOR ekpo-ebelp.
    INITIALIZATION.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_item-low.
      DATA:
      dyn_field TYPE dynpread,
      temp_fields TYPE TABLE OF dynpread,
      zlv_dynpro TYPE syst-repid.
      zlv_dynpro = syst-repid.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname     = zlv_dynpro
          dynumb     = syst-dynnr
          request    = 'A'
        TABLES
          dynpfields = temp_fields
        EXCEPTIONS
          OTHERS     = 0.
      LOOP AT temp_fields INTO dyn_field.
        IF dyn_field-fieldname EQ 'S_PO-LOW'.
            SELECT * INTO CORRESPONDING fields OF TABLE itab FROM ekpo
            WHERE ebeln EQ dyn_field-fieldvalue.
            EXIT.
        ENDIF.
      ENDLOOP.

  • (JTable) How can i get the first columns cell in a selected row?

    Hello. I am trying to figure out how i can get the first columns cell within a selected row no matter what cell is selected in that row. I have a class that extends AbstractTableModel which represents the table. Now i have another class that extends DefaultSelectionModel. Each model is added to the JTable via setModel(TableModel dataModel), setSelectionModel(ListSelectionModel newModel). Now i don't understand what i have to return from getMaxSelectionIndex(). Any ides? Thanks.
      class xTableModel extends AbstractTableModel{
         private static String[] cols;
         private Object[][] data;
            public void setTableModel(Object data[][], String[] cols){
             this.cols = cols;
             this.data = data;
            public String getColumnName(int col){
             return cols[col];
            public int getRowCount() {
             return data.length;
            public Object getValueAt(int row, int col) {
             return data[row][col];           
            public void setValueAt(Object value,int row,int col){
             data[row][col]=value;
            public int getColumnCount(){
             return cols.length;
    class ColumnListenerModel extends DefaultListSelectionModel{
         public int getMaxSelectionIndex(){}

    int row = table.getSelectedRow();
    Object data = table.getValueAt(row, 0);

  • Anytime I try to print in Firefox a Microsoft KB article that is 1 page, I always only get the first page.

    Anytime I print any Microsoft KB article, I only get the first page worth of text. This is very troubling because the articles are typically long, and I only get 1 page. The second page always comes out blank (even though in IE it will print out multiple pages with all the text).
    My specific example today is listed in the URL below. This example will only print to the "DIR" command, I don't get the full page printed out.
    Anyone else have this problem? Anyone have a resolution? I hate having to hit up IE just to print a single article.
    I updated to FF 8.01 just to make sure, and I have tried different printers and even computers, to no avail. Even the print preview has the issue, only the first page worth of text is printed and the second page is always blank (even if there are 3, 4, 5, etc pages of data to be printed).
    I have also tried the Firefox Menu -> Print command, and the "on-page" print command. I have seen moderate success with highlighting all the text that I want to print and going to "Print-Selection" but it is ugly.
    Any feedback or assistance is greatly appreciated.

    '''Try the Firefox Safe Mode''' to see how it works there. The Safe Mode is a troubleshooting mode, which disables most add-ons.''
    ''(If you're not using it, switch to the Default theme.)''
    * You can open the Firefox 4.0+ Safe Mode by holding the '''Shift''' key when you use the Firefox desktop or Start menu shortcut.
    * Or use the Help menu item and click on the '''Restart with Add-ons Disabled...''' menu item while Firefox is running.
    ''Don't select anything right now, just use "'Start in Safe Mode"''
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before using the Firefox shortcut (without the Shift key) to open it again.''
    '''''If it is good in the Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one.
    Please follow the [[Troubleshooting extensions and themes]] article for that.
    ''When you figure out what's causing your issues, please let us know. It might help other users who have the same problem.''

  • TS4022 why am I not getting the Advance options when I am in my iCloud account?

    Why am I not getting the "Advance" option when I am in my iCloud account?

    There is no 'Advanced' option at icloud.com. Is this a question of changing the default email address? I quote:
    In iOS 6
    Go to Settings > iCloud > Account (your Apple ID) >Advanced: Mail.
    Under iCloud Account Information, tap your email address.
    From the list of addresses available, tap the @icloud.com email address you would like to use as the default address for sending mail from iCloud Mail.
    In OS X Mountain Lion or Lion v10.7.2 (or later)
    Go to Mail Preferences > Composing.
    Click the Send new messages from drop-down and select the @icloud.com email address you’d like to use.
    At iCloud.com
    Go to the Mail app.
    Click the Action (gear icon) menu and choose Preferences.
    Under Composing, click the Set a default address drop-down and select the @icloud.com address you’d like to use.

  • Bug: WebcamPublisher always gets the first camera

    Hi,
    It seems WebcamPublisher always gets the first camera in the list, no matter what camera is chosen by the end user. Beside this, at some point in WebcamPublisher, it has been hardcoded to use Apple's isight camera, if no cam was found:
    if( _camera==null){
    // If there is no camera , create it and attach it to the stream
    if (_cameraNameIndex==null && Capabilities.os.indexOf("Mac OS 1")!=-1) {
    // it's silly season - let's try to detect iSight cams, if nothing gets specified
    var l:int = Camera.names.length;
    for (var i:int=0; i<l; i++) {
    if (Camera.names[i]==ISIGHT_NAME) {
    _cameraNameIndex = i+"";
    break;
    Could someone from the lccs development team respond about the quality of code in lccs library, and whether the lib is supposed to be ready for production use. I have asked this in my previous post, but not response has been given so far.
    Aureliano

    Hi,
    The WebcamPublisher by default, selects what is returned by the player's Camera.getCamera() API i.e. the default camera player could detect. This is when _cameraNameIndex is null. If you want, you can set the cameraNameIndex property i.e. the camera name string( you can do that by getting Camera.names API in flash player) before starting the Webcam. It will then take the camera you mentioned.
    In fact we have one of our real life application that uses this property to set the camera you want to see.
    You can always use your handler to the selected value of camera in SecurityPanel.CAMERA and set it to the cameraNameIndex property.
    And lastly, yes our code is production ready. We have our own commercial apps as well as enterprises using it for building application. If you want to change any part of the code, you are free to do so.
    Hope this helps
    Thanks
    Hironmay Basu

  • How can I print Double A4 with HP Officejet 6500? I only get the first page...

    I try to print a large photo in "landscape" Double A4 with my HP Officejet 6500.
    I can select "Double A4" to print but I only get the first page. So I only have  half a photo.
    What should I do?

    chris
    You can not attach a multi-page .pdf document to Pages.
    Just create a folder in which you enclose both your Pages letter and the .pdf.
    Peter

  • How to get the first and the last record of every month within a time range in sql

    I am trying to get the first record and the last record of each and every month in a given date range using sql. I have a sample code
    where i have just selected everything within the date range now i have to extract the first and the last records of each and every month.
    SELECT PurOrderNum,
    OrderDate
    FROM Purchasing.PurOrder
    WHERE OrderDate >= '2013-02-28'
    AND OrderDate <= '2014-12-29'

    SELECT PurOrderNum,
    OrderDate
    FROM
    SELECT PurOrderNum,
    OrderDate,
    MAX(OrderDate) OVER (PARTITION BY DATEDIFF(mm,0,OrderDate)) AS MaxDate,
    MIN(OrderDate) OVER (PARTITION BY DATEDIFF(mm,0,OrderDate)) AS MinDate
    FROM Purchasing.PurOrder
    WHERE OrderDate >= '2013-02-28'
    AND OrderDate <= '2014-12-29'
    )t
    WHERE OrderDate = MaxDate
    OR OrderDate = MinDate
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Getting the first row for each group

    Hi Everyone,
    I have a query which returns a number of rows, all of which are valid. What I need to do is to get the first row for each group and work with those records.
    For example ...
    client flight startairport destairport stops
    A fl123 LGW BKK 2
    A fl124 LHR BKK 5
    B fl432 LGW XYZ 7
    B fl432 MAN ABC 8
    .... etc.
    I would need to return one row for Client A and one row for Client B (etc.) but find that I can't use the MIN function because it would return the MIN value for each column (i.e. mix up the rows). I also can use the rownum=1 because this would only return one row rather than one row per group (i.e. per client).
    I have been investigating and most postings seem to say that it needs a second query to look up the first row for each grouping. This is a solution which would not really be practical because my query is already quite complex and incorporating duplicate subqueries would just make the whole thing much to cumbersome.
    So what I really new is a "MIN by group" or a "TOP by group" or a "ROWNUM=1 by group" function.
    Can anyone help me with this? I'm sure that there must be a command to handle this.
    Regards and any thanks,
    Alan Searle
    Cologne, Germany

    Something like this:
    select *
    from (
       select table1.*
       row_number() over (partition by col1, col2 order by col3, col4) rn
       from table1
    where rn = 1In the "partition by" clause you place what you normally would "group by".
    In the "order by" clause you define which will have row_number = 1.
    Edit:
    PS. The [url http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/functions004.htm#i81407]docs have more examples on using analytical functions ;-)
    Edited by: Kim Berg Hansen on Sep 16, 2011 10:46 AM

  • How  to  get the FIRST DAY OF THE CURRENT MONTH

    how to get the FIRST DAY OF THE CURRENT MONTH in oracle 9i.
    plzzzzz send immedaily.advance thanks

    TEST@test SQL> select trunc(sysdate,'MON') from dual;
    TRUNC(SYS
    01-OCT-06
    TEST@test SQL>                                  

  • How to get the index of selected values in SelectManyChoice...

    How to get the index of selected values in SelectManyChoice... the value which i get is coming when i submit the value second time

    By using the given code i get the value of the selected indices, but problem here is i get the value when it get submits at the second time... First time the length of that int array is 0.
    Second time it shows the value two times (i.e) First time submitted value and the second time submitted value. After that it works fine.. I have problem while clicking first time only..
    The Following error also raises.. One multiselect is dependent on other multiselect.
    DF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase PROCESS_VALIDATIONS 3
    java.lang.ArrayIndexOutOfBoundsException: 6
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlListBinding.findObjectFromIndex(FacesCtrlListBinding.java:334)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlListBinding.getInputValue(FacesCtrlListBinding.java:199)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.internalGet(JUCtrlValueBinding.java:2416)
         at oracle.jbo.uicli.binding.JUCtrlListBinding.internalGet(JUCtrlListBinding.java:3717)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlListBinding.internalGet(FacesCtrlListBinding.java:500)
         at oracle.adf.model.binding.DCControlBinding.get(DCControlBinding.java:749)
         at javax.el.MapELResolver.getValue(MapELResolver.java:164)
         at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
         at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
         at com.sun.el.parser.AstValue.getValue(Unknown Source)
         at com.sun.el.ValueExpressionImpl.getValue(Unknown Source)

  • I've read two solutions to my problem and neither worked. I can't get the repeat option to show in some events, though it does appear in others.

    I can't get the "repeat" option to show in some events, though it does appear in others. How can i get it to show when I need it? (I read two "soluntions" that supposedly worked, but neither worked for me.)

    Greetings,
    I can't say I've seen that behavior before.  I' be curious to see a screen shot of it in the edit mode where you edit the fields.
    Beyond that I'll offer generic troubleshooting steps:
    Go to Apple Menu > System Preferences > Language & Text > Formats > Region. Region should be set to the country of your choice. Do not have it set to "Custom" as this can have unexpected results in the iCal window.
    If that doesn't resolve the issue:
    1. First make an iCal backup:  Click on each calendar on the left hand side of iCal one at a time highlighting it's name and then going to File Export > Export and saving the resulting calendar file to a logical location for safekeeping.
    2. Go to iCal > Quit iCal
    3. Remove the following to the trash and restart your computer:
    Home > Library > Caches > com.apple.ical
    Home > Library > Calendars > Calendar Cache, Cache, Cache 1, 2, 3, etc. (Do not remove Sync Cache or Theme Cache if present)
    --- NOTE: To get to "Home > Library" in Lion: Click anywhere on the desktop and then click on the "Go" menu at the top of the computer screen while holding down the "option" key on the keyboard.  You will see "Library" in the menu.
    4. Launch iCal and test.
    If the issue persists:
    1. Go to iCal > Quit iCal
    2. Remove the following to the trash and restart your computer:
    Home > Library > Caches > com.apple.ical
    Home > Library > Calendars > Calendar Cache, Cache, Cache 1, 2, 3, etc. (Do not remove Sync Cache or Theme Cache if present)
    Home > Library > Preferences > com.apple.ical (There may be more than one of these. Remove them all.)
    --- NOTE: Removing these files may remove any shared (CalDAV) calendars you may have access to. You will have to re-add those calendars to iCal > Preferences > Accounts.
    3. Launch iCal and test.
    Hope that helps!

  • Why do I not get the checkout option when clicking on the document link in the SharePoint workflow task?

    We are trying to use workflows to review and edit pdf files in sharepoint 2010. We are having a couple of issues and am hoping someone has the answer.....
    1)  When myself and coworkers click on the pdf document in the library, we get the check out option as expected.  However when we click on the document link in a workflow task (on the sharepoint site), the pdf opens as a temporary file and we do not get the check out option.  Why does this happen????? 
    2)  The same thing happens when we click on the document link in the workflow task email;   HOWEVER,  one of our co-workers does get the check out option when clicking on the link in the email task.  Why would she get the checkout option using the email and not when clicking on the link in the task list on the sharepoint site ????  We have compared our internet settings and adobe settings to ours and found no differences.
    We are using Sharepoint 2010, Windows 7, IE8, Adobe Reader X or XI.  Some of us have Adobe Pro X and have the same issues.

    No the person who can check out using the link in the email has the same permissions as me.  We have looked at all kinds of settings, profile etc and nothing evident can be determined to explain the reason.  However, one difference we did notice is that this person does not have a default web browser set and thus when clicking on items to open, it always pops up a dialog box asking which program to use to open it with.  This person chooses Adobe Reader and it opens on the Sharepoint server as it should and she gets the checkout option in a dialog box just like clicking on the document in the library.  My theory is that this step of choosing the program to open with is interrupting the typical way a pdf file is handled when clicking on URL links to the document, which is…. it is opened as temporary internet file rather than on the Sharepoint server.   Hopefully someone can figure this out ☺

  • How to get the first month of the year inputed by user manually

    Hi Expert,
    Just like the subject, I 'd like to get the first month of the year inputed by user manually, but don't know how to set the variable, please help.
    For example, user execute a query and input the value of variable Year = 2010, and what I want to get is 201001 into another variable, so that I can use this variable to setup another selection.
    Thank you.
    Andy

    Hi Andy,
    1) U will create a user input varaible for year and say it is ZYEAR.
    2)  U will create another variable  for calmonth  which has processing type : customer exit ..single value ...mandatory ....say ZCMONTH.
    This needs to be populated using the year( user inputted )  and calmonth '001'
    This code will fetch the user input value into ZYEAR and append '001' to the user input value and the value
    will be passed to the ZCMONTH varaible...
    Sample Code is....
    When 'ZCMONTH'.
    IF I_STEP = 2.
         READ TABLE I_T_VAR_RANGE WITH KEY VNAM = 'ZYEAR'.
         IF SY_SUBRC = 0.
                    L_S_RANGE-LOW  =  I_T_VAR_RANGE-LOW.
                   L_S_RANGE-LOW+4(3) = '001'.
                  L_S_RANGE-SIGN = 'I'.
                 L_S_RANGE-OPT  = 'EQ'.
                      APPEND L_S_RANGE TO E_T_RANGE.
        ENDIF.
    ENDIF.
    Regards
    vamsi

  • How to get the first day of current month

    hi guys,
    i am trying to get the first day of current month which get from the date i input at the selection screen. my method is not so good, so i was wondering if there is better way to get the this,
    thanks.

    Try this .
    data : DAYNR LIKE  HRVSCHED-DAYNR,
         DAYTXT LIKE  HRVSCHED-DAYTXT.
    data langu like sy-langu value 'EN'.
    Parameters PDATE LIKE SY-DATUM.
    PDATE+6(02) = '01'.
    CALL FUNCTION 'RH_GET_DATE_DAYNAME'
      EXPORTING
        LANGU                     = LANGU
        DATE                      = PDATE
      CALID                     =
    IMPORTING
       DAYNR                     = DAYNR
       DAYTXT                    = DAYTXT
      DAYFREE                   =
    EXCEPTIONS
      NO_LANGU                  = 1
      NO_DATE                   = 2
      NO_DAYTXT_FOR_LANGU       = 3
      INVALID_DATE              = 4
      OTHERS                    = 5
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    WRITE :/ PDATE, DAYNR, DAYTXT.
    Cheers

Maybe you are looking for

  • Setup problem - Extreme no longer found by Mac

    I'm trying to set up an Extreme base station and extend the network with an Express (and use airtunes). I had successfully set up airtunes, but the range was not being extended. After trying to change to a WDS arrangement, I now have a flashing amber

  • My computer is completely frozen, after two days of installing yosemite

    Two days ago I did the Yosemite update. I did the vault security encryption because it was suggested. After it, the login was taking longer than before, but the laptop was working fine. Then I shut down the computer from the initial page after it was

  • Width of application header SAP-UI5

    Hi All, I am creating a login application using  SAPUI5. My questions are 1. If i am skipping height in AbsoluteLayout why is is not working ? how it will take full screen height irrespective of screen size 2. There is a gap between window and the Ab

  • Question - Downloading Time for contribute CS5 for Mac

    Yes,  I followed the steps in email to download Contribute CS5 for Mac. It has been 1 hour.  How much time does it take. I have not typed in lisence key yet Thank you

  • Application associations

    I am a GNOME user, however I do admit to loading up XFCE and KDE sometimes, to see if the grass is greener on the other side. Usually, I could do this without anything changing on the GNOME side, but nowadays I'm finding that when I installed KDE, so