Setting the current LOV values in a form

I have report with an edit button that allows the record to be edited in a form , both of which are on the same page (a report + form - created with the wizard).
I have a field "Status" which is a select list in the form.
So when I click on the 'Edit' button of the record in the form , I'd like the current value of this column to be selected in the select list of the form.
I tried to do this with javascript, using an additional item (hidden), P2_HIDDEN_RESULT .
I added a function to the page header (Go to page -> select 'Edit Attributes', insert the following function into 'HTML Header')
function getResultsLOV()
val=document.getelementbyid('P2_HIDDEN_RESULT').value;
setValue('P2_RESULT','val');
then I added the following line to the HTML form element attributes of the Item 'P2_RESULT'
javascript:getResultsLOV();
The value does not get set. Is there anything missing in what I'm attempting?

One last attempt to get any response.....

Similar Messages

  • How to set the current month as the default value of an input control?

    Hello,
    I want to set the current month or current year as the default value of an input control. Something like try to get the month from the currentdate() formula and assign it to the input control.
    Is this possible?
    Thanks & Regards
    SU

    >
    soauniverse wrote:
    > Hello,
    >
    > I want to set the current month or current year as the default value of an input control. Something like try to get the month from the currentdate() formula and assign it to the input control.
    >
    > Is this possible?
    >
    > Thanks & Regards
    > SU
    I don't think so.  I tried to find a property or something in that Input Control but there is nothing to set it that way.

  • How to get the current selected value of a combo box or a option button?

    Hello All,
    I want to catch the current selected value of a combo box and also of a option button and want save it into different variables in my code. These option button and combo box are in a SAP business one form which I have created through VB dot.net coding.
    But I don't know how to do that, can any one send any example code for this.
    Regards,
    Sudeshna.

    Hi Sudesha,
    If you want to get the selected values you can do it as follows: The Combo Box value you can get from the combo box. If you want to get it on the change event, you must make sure that you check when BeforeAction = False. If you want to get an Option Button value you should check the value in the data source attached to the option button.
            Dim oForm As SAPbouiCOM.Form
            Dim oCombo As SAPbouiCOM.ComboBox
            Dim oData As SAPbouiCOM.UserDataSource
            oForm = oApplication.Forms.Item("MyForm")
            oCombo = oForm.Items.Item("myComboUID")
            oApplication.MessageBox(oCombo.Selected.Value)
            oData = oForm.DataSources.UserDataSources.Item("MyDataSourceName")
            oApplication.MessageBox(oData.ValueEx)
    Hope it helps,
    Adele

  • Get three previous records of the current record in an Oracle Form

    Hi,
    I need to get three previous records of the current record in an Oracle Form
    Sorry for the lengthy explanation:
    I have a table name: ARCHIVE_DATA with column name: coll_time and its data type DATE.
    SQL> SELECT COLL_TIME FROM ARCHIVE_DATA;
    COLL_TIME
    12-AUG-05
    12-AUG-05
    12-AUG-05
    12-AUG-05
    12-AUG-05
    12-AUG-05
    12-AUG-05
    12-AUG-05
    12-AUG-05
    12-AUG-05
    10 rows selected.
    SQL> select to_char(coll_time,'dd-mon-yyyy:HH:MI:SS') from ARCHIVE_DATA;
    TO_CHAR(COLL_TIME)
    12-aug-2005:02:42:00
    12-aug-2005:02:43:00
    12-aug-2005:02:44:00
    12-aug-2005:02:45:00
    12-aug-2005:02:46:00
    12-aug-2005:02:47:00
    12-aug-2005:02:48:00
    12-aug-2005:02:49:00
    12-aug-2005:02:50:00
    12-aug-2005:02:51:00
    10 rows selected.
    This is the Requirement:
    In a Form's Block(BLK1), for example: the current_record is the fifth record from the top
    (i.e. 12-aug-2005:02:46:00)
    When the fifth record is the current_record and When I click a button, three previous records of the
    current_record should be populated on the screen.
    See what I did:
    I created another table same as the first table(ARCHIVE_DATA) and its name is: THREE_RECS.
    I am inserting three records from the first table(ARCHIVE_DATA) into the second table: THREE_RECS
    which are less than the current record and ORDER BY DESC.
    CANVAS:
    Two blocks (BLK1, BLK2) based on ARCHIVE_DATA and THREE_RECS are on the same CANVAS.
    But the first block (BLK1) which is based on the first table:ARCHIVE_DATA is populated with one record and the
    second block (BLK2) is empty.
    So when I click a particular button (ex: prev_recs), the second block(BLK2) should be populated with
    three previous records of the current record( :BLK1.COLL_TIME)
    (off course :BLK2 populates with one record and use arrows or scrollbar to get the other two records)
    This is the code I wrote in the trigger and followed by the error:
    1 BEGIN
    2 DECLARE
    3 cursor c1 IS
    4           SELECT MONITOR_ID,
    5               SAMPLE_ID,
    6               COLL_TIME,
    7               DEW_POINT
    8          FROM ARCHIVE_DATA;
    9 cursor c2(passing_date IN date) IS
    10           SELECT MONITOR_ID,
    11               SAMPLE_ID,
    12               COLL_TIME,
    13               DEW_POINT
    14          FROM (SELECT MONITOR_ID,
    15               SAMPLE_ID,
    16               COLL_TIME,
    17               DEW_POINT
    18          FROM ARCHIVE_DATA
    19          ORDER BY COLL_TIME desc)
    20      WHERE COLL_TIME < passing_date;
    21     BEGIN
    22     FOR cur_rec in c1
    23     LOOP
    24          IF (cur_rec.COLL_TIME = to_date(:BLK.COLL_TIME,'dd-mon-yyyy:HH24:mi:ss')) then
    25     FOR second_cur_rec in c2(second_cur_rec.COLL_TIME)
    26          LOOP
    27      IF c2%rowcount < 4 then
    28               BEGIN
    29               INSERT INTO THREE_RECS
    30                    values(second_cur_rec.MONITOR_ID,
    31                         second_cur_rec.SAMPLE_ID,
    32                         second_cur_rec.COLL_TIME,
    33                         second_cur_rec.DEW_POINT);
    34               COMMIT;
    35               END IF;
    36 END LOOP;
    37 END IF;
    38 END LOOP;
    39 END;
    40 END;
    This is the error I am getting:
    Error 103 at line 14
    Encountered the symbol "(" when expecting one of the following
    a PL/SQL variable or double quoted string
    an expanded name
    an expanded name link
    a table reference __expression
    a key word
    Resuming parse at line 126, column 46
    Thanks in advance

    Change C2 to:
    cursor c2(passing_date IN date) IS
      SELECT MONITOR_ID, SAMPLE_ID,
                   COLL_TIME, DEW_POINT
        FROM ARCHIVE_DATA
        WHERE COLL_TIME < passing_date
        ORDER BY COLL_TIME desc;And rather than populating a table with the three records, you could just select the three records using: where COLL_TIME between Prev3_time and Prev1_time

  • Limit the no of segments per IDOC to less than the current default value

    Hi friends,
    please help me in the following issue.
    The possibility to limit the number
    of segments per IDOC to less than the current default value.
    Purpose is to limit the traffic of IDOCs between systems.
    How to solve this issue to avoid traffic
    Thanks in advance.
    Regards
    Sandeep

    Hi Kiran,
    Actually we are using standard ones at that time we are getting prolems. When using custom developed ALE's
    we are putting segment size is less.To decrease segment size is there any filtering at the sender side? To change segment size may be nedd to take help form SAP.
    But if have filtering at any level from sender side need to confirm before consult SAP.
    Regards
    Sandeep

  • Unable to open windows using boot camp.  Get message "The bless tool was unable to set the current boot disk."  Any thoughts, Thank you.

    Unable to open windows using boot camp.  Get message "The bless tool was unable to set the current boot disk."   I am using an Imac , Lion operating system, and Windows 7.  It worked a few days ago.  Any thoughts, Thank you.

    Note that nowhere in the Boot Camp instructions does it tell you to use Disk Utility to format the Windows partition. The Boot Camp Assistant program creates the partition & sets the +partition scheme info+ of the disk as appropriate for the Windows installer but the Windows installer itself is responsible for formatting the new partition with the appropriate +file system scheme+ (NTFS for Windows 7).
    If you follow the instructions in the Boot Camp Installation & Setup Guide to the letter you should have no problems installing Windows.

  • How to get the current month value for a customer exit variable?

    How to get the current month value for a customer exit variable? 
    And also if we have an InfoObject with date value (including date, month, year), then how to derive the month value from this date type of Char.?
    Thanks!

    Hi Kevin,
    Check here........
    Re: Customer Exist for "From Current Date To Month End"
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/25d98cf6-0d01-0010-0e9b-edcd4597335a
    Cal month
    Regards,
    Vijay.

  • Set the default field value to transaction code field, when calling from WD

    Hi all,
    Can we pass the value in a input field of a standard transaction calling from WD application. Suppose we are calling a transaction VA03 in an external window, then how will be pass the value in the VBAK_VBELN screen field.
    Is there any way to pass the value to this transaction field. I have also tried out to set the parameter ID 'AUN' for VA03 transaction VBELN field. But it did not work for me.
    Is there any way to set the default field value to transaction code field, when calling from WD?
    Please suggest, if anyone have any idea.
    Thanks
    Sanket

    Hi,
    I am using the below code to open a standard transaction. It will help you to explain my point more easily.
    DATA: url TYPE string,
              host TYPE string,
              port TYPE string.
    *Call below method to get host and port
      cl_http_server=>if_http_server~get_location(
         IMPORTING host = host
                port = port ).
    *create URL
      CONCATENATE 'http'
      '://' host ':' port
      '/sap/bc/gui/sap/its/webgui/?sap-client=&~transaction=' 'VA03'
       INTO url.
    *get the window manager as we are opening t code in external window.
      DATA lo_window_manager TYPE REF TO if_wd_window_manager.
      DATA lo_api_component TYPE REF TO if_wd_component.
      DATA lo_window TYPE REF TO if_wd_window.
      lo_api_component = wd_comp_controller->wd_get_api( ).
      lo_window_manager = lo_api_component->get_window_manager( ).
    call the url which we created above
      lo_window_manager->create_external_window(
      EXPORTING
      url = url
      RECEIVING
      window = lo_window ).
      lo_window->open( ).
    Note*
    One more query I want to add to this thread, that is there any possibility to call a custom transaction as well?

  • Why customer exit variable to grab the current month value doesn't work?

    In CMOD, input the following code to grab the current month value from the system date:
    Grab the month value with System Date
    WHEN 'CURMONTH'.
        CLEAR l_s_range.
        l_s_range-low = SY-DATUM+4(2).
        l_s_range-sign = 'I'.
        l_s_range-opt = 'EQ'.
        APPEND l_s_range TO e_t_range.
    In Query Designer, create a formula variable CURMONTH processed by customer exit and the dimension under the Currency/Unit tab is "Number".  Put the formular variable in the column as a KF.  When running the query, the column with the formular variable shows values of "2,0000000" other than just "2" I want for the current month.  If  the dimension under the Currency/Unit tab is "date", the column with the formular variable shows values of "00/00/0000".  Any idea?  How to grab the correct current month value which is 2 from the system date.
    Thanks!

    Oh ok , try the below options, As such I dont see any errors in our code .
    Not sure if you have ABAPER's in your team, just check with them once on the FM we are trying to see .
    Next , do you hvae 0CALDAY available in your report ? If so try to restrict that field with variable "0DAT" and write the same code you have written for your formula variable , but instead change the variable name to "0DAT" and try if this gets the month . let me know if I'm not clear .

  • Setting the current in an ADF table via click

    Hi,
    I have created a HTML table in a jsp by dragging a DataControl from the DataControl Palette. Can I set the current row by clicking a table row?
    Thank you for any Information!
    Simon

    hi,
    take a look at this thread
    how to get a pagination dropdown inside an ADF Faces Rich Client Table ?
    Timo

  • How to get the current zoom value in ID?

    Is there any way that can get the current zoom value in InDesign?
    Thanks a lot.

    You could peek at the widget indicated in your screen shot, at least when that MDI (?) frame is showing.
    The window title at kLayoutPresentationBoss, IID_IDOCUMENTPRESENTATION also reflects the value.
    Probably best would be the kLayoutWidgetBoss, with its IID_IPANORAMA, GetXScaleFactor() - and GetYScaleFactor()!!!
    I just try to imagine how a document would look if these differ from each other ;-) and, even better, how to achieve that from the UI.
    Btw, one notification is on kDocWorkspaceBoss, protocol IID_IWINDOW, command kUpdateDocumentUIStateCmdBoss.
    Another one: there is a kDocWindowTitleModifyService ...
    Edit: of course I should again mention IID_IPANORAMA, observable from kLayoutWidgetBoss subject.
    Dirk

  • How do I set the IFSshell timeout value?

    How do I set the IFSshell timeout value?
    I open an ifsshell and move to a directory.
    Do something. Come back in 10 minites and the shell has timed
    out. Have to logout and log back in and move to the directory
    again.
    Thanks
    -Mitch

    FYI,
    IFS.PROTOCOLSERVER.SESSION.DEFAULT.Timeout
    IFS.PROTOCOLSERVER.SessionStateTimeoutPeriod
    IFS.PROTOCOLSERVER.SessionStateTimeoutPeriod
    in cup server configuration

  • DAQmx+6009: Reading the current counter value is too slow

    I have a thread that runs a software loop that I need to run as fast as possible. One of the things I need to do is poll the current counter value from my 6009, and branch if it's changed from the last time I read it. Over 90% of the time spent in my 1.2ms loop is doing this read. My goal is to get the loop under 50us.
    What I really need here is an accurate timestamp (20us or better) for every time the counter changes (up to 1kHz). When I detect a change, I currently get the timestamp by calling QueryPerformanceCounter().
    Here's how I create the task:
        DAQmxErrChk( DAQmxCreateTask("",&taskHandle) );
        DAQmxErrChk( DAQmxCreateCICountEdgesChan( taskHandle, line, "", DAQmx_Val_Falling, 0, DAQmx_Val_CountUp ) );
        DAQmxErrChk( DAQmxStartTask(taskHandle) );
    And here's the line of code that goes so slow in my loop:
        DAQmxErrChk( DAQmxReadCounterScalarU32( taskHandle, 10.0, &count, NULL ) );

    I updated a robot control from a Mac Powerbook with a PCI expansion chasis running Mac OS9, Labview 5 and DAQ to a Mac Mini (intell) with 6009 and 6501 USB cards  running Mac OSX, Labview 8.5, and DAQmx-base.  I have connected wheel encoders (pule train and direction) to a 6009 and a 6501.  It all seems to work, except the tuning of velocity control loops is not as good as before, indicating some delays.  The loops run every 100msec (10Hz update) so I expected a synchronisation problem rather than latency.  I did some measurements today and found that reading the 2 counters and the 2 digital inputs takes over 20msec.
     I get better performance from VISA with a serial to USB converter.  I have a program reading 25byte packets every 20msec.  Although I did run into the USB latency problem with another serial application.  I have a serial device that requires a response t changing CTS (clear to send) in less than 1.2msec, and VISA was taking 1.5msec.
    On the same machine I am reading 1024 samples from an analog input every 100msec with out any timing issues - (once I got the incredibly slow start and stop vis outside the loop - they take about 200msec each.  Taking the start and stop vis outside the loop reduced my loop time from 450msec (approx) to 100msec.  The only problem is that to do this I have to run in continuous mode and can't  use an external trigger (it has to restart on every trigger, so the start and stop vis have to be in the loop).
    So it appears that I have updated my technology by 10 years only to find that USB is incredibly slow - something that is not in any of the NI doccumentation that I can find.  Does NI have any documentation on what to expect in terms of performance from these USB devices and any suggestions on how to get better performance, apart from buying more expensive hardware?
    Thanks 

  • Setting the container element values

    Hi Experts,
    While I am trying to set the container element values, it is resulting in an error.
    We are designing a leave request WF using WS12300111. We are using ABAP classes.
    Inside a method, I have written the following code :
    swc_set_element container 'PERNR' lv_pernr.
    It is giving an error. It says 'SWC_SET_ELEMENT' not defined.
    First of all i would like to know if we can use this statement in ABAP classes. If we have to set a value of a container element, how can we go about doing the same in ABAP classes.
    Kindly guide me on the same.
    Cheers,
    Belinda Clarke

    Hi,
    No, you cannot use those in the ABAP classes. (EDIT: Or you can, put it doesn't make really any sense.)
    Just make exporting parameters into your method. Put your variables (PERNR, etc.) in those. Then do the binding from method to the task container (in the task editor). This way you will get the values from a method to the task container.
    Regards,
    Karri
    Edited by: Karri Kemppi on Sep 9, 2011 9:24 AM

  • If the system prameter has value bigger than 1 trap the current copie value

    Hi.I have a report in which there is a requirement to be printed in two copies.So I put in the initial value of system parameter copies value 2.But I must print in the margin at the bottom of the page a label with TITLE-1 if we are in the first copie!!!, and a label with TITLE-2 if we are in the second copie.The report builder now always has the value copies=2.Is there some way to control the current copie value which means something like current page number in analogy current copie?
    Thanks in advance thrylos97.

    Hello,
    The parameter COPIES is treated by the "Printer Driver" and not by the "Data Model" / "Data Layout"
    If you want to be able to print Copy #1 / Copy #2 on the output, you have to create a repeating frame enclosing everything,
    base this repeating frame on a sql query :
    select "Copy 1" from dual union all select 'Copy 2' from dual
    and put the Copy # on the Layout
    Regards
    Edited by: dsegard on Mar 30, 2009 11:26 AM

Maybe you are looking for

  • Can I transfer pictures from my pc to a new mac via an ipod touch?

    Hiya So my new macbook pro is on it's way and i was trying to think of some easier file sharing from my old pc to my new mac than a thumbdrive back and fourth x amount of times. My Pc's wireless card burnt out or something like that happened that mak

  • IDE Locks up in infinite loop

    When I try to open a certain java file it locks up the IDE and spits out an infinite number of the following error messages: at oracle.javatools.editor.BasicView$LineRowMap.rebuildRowMap(BasicView.java:3286) at oracle.javatools.editor.BasicView$LineR

  • When opening a pinned program from the taskbar the programs opens in a new icon in the taskbar.

    Hey In some special occasions, I have the problem that when you press an pinned icon the program is not "grouped" with the pinned icon, but opens in a new icon, please see this image to better understand: http://misc.norphf.dk/PinnedIcon.bmp As you c

  • Identifying selected tabs within tab control

    I'm looking for a way to determine which tab is selected within the CVI tab control. The index is available, but the index isn't that helpful if the tabs aren't always in the same order. The Constant Name is used to identify controls on the tab page,

  • Delete New version of Sapscript

    HI all, Good morning to all my friends in this forum. I have a script called z_acct_st which has been copied from another script. Now that I don't need this script I just want to delete this. Can anyone tellme how can I do this. Thanks and Regards, B