How to get the focus in a Table Control

Hello Experts,
                     I have a simple Table control in my screen . I want to know under which column my cursor is ? Basically i want to get the focus the table control . How can i achieve this  ?
Thanks
Vivek

>
Vivek Joshi wrote:
> Hello Router ,
>                      I do not want to set the focus , I want to get focus . User can click on any cell in the table and then press a button in the toolbar . Now in the event handler of the button i want to under which column User has set the focus .
> I hope , I am clear now .
> Thanks for your help
> Regards
> Vivek
An yet you keep getting suggestions of how to set the focus.   I looked through the API documentation and I don't see anything that would suggest you can request to see where the current focus is.  Perhaps someone might still come along with a solution, but my hopes wouldn't be too high at this point.  I can pass the requirement onto Product Definition, as the use case does seem interesting.  Perhaps it is something we have even considered in the past. 
But for now, there might be a better way to solve your problem.  It will probably mean redesign the interaction.  What exactly are your requirements?  Do you need to be able to get the data in a particular cell of table when a button is clicked?  Just throwing out some ideas here, but maybe just use the lead selection to select the row, but then have a button choice to choose the action associated with the column you want. A hack for sure - but it might work.  Also it doesn't help you right now, but in the near future update to NetWeaver 7.0, WDA does have a onColSelect event for the table.

Similar Messages

  • How to get the data from Pooled Table T157E.

    Hi Experts,
    How to get the data from Pooled Table T157E.
    Any help.
    Thanks in Advance,
    Ur's Harsha.

    create some internal table similar to T157E and pass all data as per SPRAS.
    After that use internal table in your program as per the requirement.
    Regds,
    Anil

  • How to get the focus at the end of text ?

    I am having applet with awt TextField component and some default text. (MSQ-)
    To have a focus to text field I am using :
    refnoTextField.requestFocus();
    But this gives focus at the biginning and not at the end of text. I want the focus at the end (i.e. after MSQ-)
    How to get the focus at the end of text ?
    any help ?
    manisha
    manisha

    public void focusGained(FocusEvent e) {
         if (e.getSource() == yourtextbox) {
         yourtextbox.setSelectedEnd(yourtextbox.getLength());
    try this thing - not sure if it'll work, but I figgured out how to apply it to my textareas for keeping the focus on the last line of the textarea..it might work for your textboxes..
    shrug

  • How to get the focus of particular UI Element

    Hi All,
    How to get the focus of particular UI Element in webdynpro Page,
    I have a page where i am creating a ALV, I want to get that keyboard focus is on that element is there or not?
    Can anyone please give some update?
    Best regards,
    Rohit

    I would suggest try invoking REFRESH of ALV on the ON_CELL_ACTION event.
    Below excerpt is from Thomas
    The Events of inner UI elements are not exposed directly as they normally would be if they were standalone. Generally you can capture them using either the
    ON_DATA_CHECK:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/c8/6c80dbedfe42d1a93f8e6df1d7244a/frameset.htm
    This gets trigger for any press of ENTER, so it generally works like the Input Field onEnter.
    You could also consider ON_CELL_ACTION:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/45/12093591152464e10000000a1553f7/frameset.htm
    It is a higher level Event that encompasses both ON_DATA_CHECK and ON_CLICK.
    if you want to capture & refresh on some hot key combination then refer to this thread
    [https://www.sdn.sap.com/irj/scn/profile?editmode=true&userid=3760417]

  • How to read the field value from Table Control

    Hello Experts,
    I am creating my first Table Control Screen. Basically I have to create a screen (102) with a table control which has 2 fields: A_QTY, B_QTY and 2 Buttons: SAVE, EXIT.
    When Clicked on 'SAVE' the data (MATNR) from a previous screen (101)  and the data (A_QTY, B_QTY) from the new screen (102) should be saved into a Z-table.
    Internal table t_data has 3 fields.
    MATNR
    A_QTY
    B_QTY.
    Table Control TC_RACK was declared like this:
    controls tc_rack type tableview using screen 0102.
    I/0 Fields:
    A_QTY type ZQTY.
    B_QTY type ZQTY.
    The screen Flow Logic:
    process before output.
    module status_0102.
      loop at t_data into w_data with control tc_rack.
      endloop.
    process after input.
      module exit_0102 at exit-command.
      loop at tc_rack.
      endloop.
    module user_command_0102.
    module status_0102output.
      set pf-status 'STATUS_102'.
      set titlebar 'TITLE_102'.
      describe table t_rack lines tc_rack-lines.
    endmodule.                 "status_0102 output
    process after input.
    module user_command_0615 input.
    case ok_code.
       when 'SAVE_RK'.
       when others.
    endcase.
    endmodule.                 "user_command_0102 input
    Now for eg, when the users enter values for A_QTY and B_QTY like this:
    A_QTY     B_QTY
    1000         2000
    3000         4000
    How can I read these values and pass them to T_DATA so that I can save it into Z-table?
    I greatly appreciate your help.
    I've gone through some previously posted threads and could not understand because my knowledge in this area is preliminary.
    Thanks a lot.
    Could you please let me know
    Edited by: dev a on Jan 13, 2010 2:46 PM

    Hi dev a
    You should use
      DATA: lv_name(30) TYPE c.
      FIELD-SYMBOLS: <QTY> type ZQTY.
    GET CURSOR FIELD lv_name.   "Get the field name in table control
    check sy-subrc = 0.
    assign  (lv_name) to <QTY>.  "Here you get the value in <QTY>
    check sy-subrc = 0.
    Also use <your table control>-current_line to get the table index uo're currently on.
    Hint: Do not use GET CURSOR LINE if you want to get table index since this gives you the line relative to dialog screen
    Good luck
    Dean Q.
    Edited by: Dean Q on Jan 13, 2010 11:11 PM

  • Popup - how to get the focus in a specific compent

    Hi,
    I am trying to get the focus of my pop-up in the second component.
    Use case: New button in the table shows a popup to get the input from the user. There is a Undo Edit link (top-left) to discard changes, on top of the pop-up so by default the focus goes to the top left. I have input text boxes under that. And I am trying to get the focus (mouse cursor) in the first input text box rather than the undo Edit link. Any idea to implement that without using javascript ?
              <af:popup id="newPopup" contentDelivery="lazyUncached"
                        popupCanceledListener="#{commonUtils.CreatePopupCanceledListener}">
                <af:dialog id="createPopupDL" type="none"
                           title="#{viewcontrollerBundle.NEW_COURSE_PLAN_STRUCTURE_QUALIFIER_HEADER}"
                           resize="on">
                  <af:separator id="s1"/>
                  <af:panelGroupLayout id="pgl2" layout="vertical" halign="left">
                    <af:panelGroupLayout id="pgl3" layout="horizontal">
                        <!-- csc:undoEdit is a custom component to undo change
                        By default the focus is coming to this component -->
                      <csc:undoEdit id="ue1"/>
                    </af:panelGroupLayout>
                    <af:messages id="m1"/>
                    <af:spacer width="10" height="10" id="s2"/>
                    <af:panelFormLayout id="pfl1" labelAlignment="start"
                                        labelWidth="140">
                      <af:spacer width="10" height="10" id="s3"/>
                          <!-- I want to get my mouse cursor in this box -->
                          <af:inputText id="it2"
                                    label="#{bindings.QualifierCd.hints.label}"
                                    value="#{bindings.QualifierCd.inputValue}"
                                    showRequired="true"
                                    required="#{bindings.QualifierCd.hints.mandatory}"
                                    columns="#{bindings.QualifierCd.hints.displayWidth}"
                                    maximumLength="#{bindings.QualifierCd.hints.precision}"
                                    shortDesc="#{bindings.QualifierCd.hints.tooltip}"
                                    autoSubmit="true">
                        <f:validator binding="#{bindings.QualifierCd.validator}"/>
                      </af:inputText>
                    </af:panelFormLayout>
                  </af:panelGroupLayout>
                  <af:spacer width="10" height="10" id="s4"/>
                  <af:separator id="s5"/>
                  <f:facet name="buttonBar">
                    <af:group id="g2">
                      <af:panelGroupLayout id="pgl4" layout="horizontal"
                                           halign="start">
                        <af:commandButton text="#{smsCommonViewBundle.CreateBtn}"
                                          id="createCB" action="doCommit"
                                          partialSubmit="true"
                                          accessKey="#{smsCommonViewBundle.CREATE_ACCESS_KEY}">
                          <f:actionListener type="au.com.callista.sms.framework.view.lifecycle.PopupDismissActionListener"/>
                        </af:commandButton>
                        <af:spacer width="10" height="10" id="s6"/>
                        <af:commandLink text="#{smsCommonViewBundle.CANCEL_LNK}"
                                        id="cancelCL" action="doCancel"
                                        accessKey="#{smsCommonViewBundle.CANCEL_ACCESS_KEY}"
                                        immediate="true">
                          <f:actionListener type="au.com.callista.sms.framework.view.lifecycle.PopupDismissActionListener"/>
                          <af:resetActionListener/>
                        </af:commandLink>
                        <af:spacer width="400" height="10" id="s9"/>
                        <af:icon name="required" id="i1"/>
                        <af:spacer id="sp3" width="5" height="0"/>
                        <af:outputText value="#{smsCommonViewBundle.requiredLbl}"
                                       id="ot1" styleClass="requiredText"/>
                      </af:panelGroupLayout>
                    </af:group>
                  </f:facet>
                </af:dialog>
              </af:popup> Edited by: user9319679 on Sep 6, 2011 10:43 AM

    I dont think so that possible without javascript.. AFAIK
    <af:clientListener method="setFocus()" type="load"/>
          <af:resource type="javascript">
               function setFocus(event){
                 var input1 = document.getElementById('pt1:r1:3:pt1:it1::content'); // the complete id of the inputText - change it according to your jsff.. use firebug to get the proper id
                 if(input1!=null)
                 {input1.focus();
          </af:resource>

  • How to get the value from Advanced table

    Hi,
    In the Advanced table have 2 LOV fields, I need LOV field value dynamically in the controller to validate the save button, if iam not selected any value in lov save button will not allow to save the data. In the table i am using 'Add another row'. How to get the lov field value in the process form request??? and how to do this requirement
    Thanks
    Naresh

    1. You can specify required property on LOV field to "yes". For events where you wish to disable the client side validations, set the property disable client side validation to "true".
    2. If above behavior is not what you are looking for, then you need to handle in AM and not CO.
    a. Call an AM method from CO.
    b. In that AM method, get handle of VO.
    c. Iterate the VO Rows and check for your validation rules.
    -Prince
    http://www.princekapoor82.blogspot.com

  • How to get the script of a table or view in SQL Developer?

    Dear friends/expert,
    Could you tell me how to get the script for a view or a table easily in SQL Developer like pressing F4 in TOAD?
    I found that I can press SHIFT+F4 for a view in SQL Developer and get the script of the view in Details Tab. But how to move the script to SQL worksheet to edit? It is very easy to do in TOAD.
    And I didn't find a way to get the script for a table till now. Is there any way to do that?
    Thanks in advance.
    Best regards,
    Ning

    1. Although the team might put a lot of effort in keeping track on the forum, a lot of posts still go by without answer.
    2. If you have an enhancement request, log it at the announced SQL Developer Exchange, so others can vote to add weight on the issue. Be clear and detailed in the explanation.
    3. Given the structure of the application, I guess it won't be easy (maybe impossible) to add the functionality you are asking. Do you have a suggestion on how to access the info?
    4. If your request gets accepted, still another year or two may go by until the functionality gets added. For sure you'll be better off writing a user defined extension or report (querying DBMS_METADATA.GET_DDL).
    Hope that helps,
    K.
    Edited by: -K- on 12/01/2009 09:37

  • How to Get the focus of the textbox.

    Hi all,
    I have a problem in getting the focus of the textbox, The scenario is in this way,
    I have 3 textboxes in a window, each one should should get enabled one after the other only (i.e) Textbox2 should be enabled only after Textbox1 is filled and pressed the TAB button and Textbox3 is enabled only after Textbox2 is filled and pressed the TAB button. Textbox2 is also enabled when the cursor is in Textbox3 and SHIFT+TAB is pressed,
    I tried this with the Focus Listener but i cant able to get the cursor in the textbox. Please help in this, how to do this.
    Thanks in Advance.

    844031 wrote:
    Hi all,
    I have a problem in getting the focus of the textbox, The scenario is in this way,
    I have 3 textboxes in a window, each one should should get enabled one after the other only (i.e) Textbox2 should be enabled only after Textbox1 is filled and pressed the TAB button and Textbox3 is enabled only after Textbox2 is filled and pressed the TAB button. Textbox2 is also enabled when the cursor is in Textbox3 and SHIFT+TAB is pressed,
    I tried this with the Focus Listener but i cant able to get the cursor in the textbox. Please help in this, how to do this.
    Thanks in Advance.Hello user,
    If you are talking about 'TextBox' of javafx then please start a new thread on Javafx Category here:JavaFX 1.x and JavaFX Script [ARCHIVE]
    Thanks.,
    narayan

  • WD ABAP: How to get the contents of selected table lines?

    Hi,
    I'm trying to figure out how to get the contents of table lines back from the UI. I display a table with several lines of data. The user selects some rows. I want to move the contents of the selected rows to another table. I have a context attribute, say DATA, with attributes FIELD1... FIELDn, using a DDIC structure. These are bound to the table UI element and the corresponding table columns. To get the selected rows, I use wd_context->get_selected_elements(). This works, but what I get from this method is references to if_wd_context_element. How do I know which row (row number = ?) this corresponds to? And how do I get the actual data? I want a structure with FIELD1 = value1 FIELD2 = value2 etc. My context attributes FIELD refer to table columns, but I'm looking for the table line...
    Can somebody help me?
    Thanks,
    Ira

    Hi Ira,
    wd_context->get_selected_elements() returns WDR_CONTEXT_ELEMENT_SET which is a table type of IF_WD_CONTEXT_ELEMENT. You can loop through the WDR_CONTEXT_ELEMENT_SET, get into variable say node_elelement which is of type ref to If_Wd_Context_Element. Then you could use the method GET_STATIC_ATTRIBUTES of If_Wd_Context_Element which returns a structure with values of all the attributes in the selected row.
    If you need the row number, while populating the node you could have an additional attribute called rowno and populate it correctly. When you select the data using method GET_STATIC_ATTRIBUTES, you would get the appropriate row number.
    Regards,
    Srini.

  • How to get the data in a table in horizontal order

    when i execute the command "select empno from emp" i would get the output in vertical order
    How to get the output in horizontal order

    Did you search in the forum before posting your question? Every week similar question like yours is being posted. Anyway find below the query.
    SELECT LTRIM(MAX(SYS_CONNECT_BY_PATH(EMPNO,';')),';')
    FROM
    SELECT EMPNO,ROW_NUMBER() OVER(PARTITION BY 1 ORDER BY 1) CURR,ROW_NUMBER() OVER(PARTITION BY 1 ORDER BY 1)+1 NEXXT
    FROM EMP
    START WITH CURR=1
    CONNECT BY CURR = PRIOR NEXXT
    Regards,
    Mohana

  • Newbie ques : How to get the list of all tables in the database

    Hi,
    I'm very new to Oracle (using Oracle8i currently). I wanted to know if there is a way to get the list of all tables in the database. Like in mySQL you can use the command " show tables" to get the list of all the tables.
    Any help will e greatly appreciated. Please "cc" any reply to [email protected] also.
    thanks
    Deven

    Hi
    Select table_name, owner from all_tables;
    will give u all the tables in the database.
    all_tables, dba_tables, user_tables
    all_objects, dba_objects, dba_objects
    there are many, more tables. login as system and query the tab and try to describe the tables.
    Thanks
    Malar

  • How to deactivate the fields in a table control of a standard screen

    Hi,
       I have an requirement to deactivate the fields in a table control of a standard screen in ME22n transaction.I am using a BADI "ME_PROCESS_PO" and in item mathod i am looping at screen for the screen field name in the table control.But it is not working. Can anyone give me the possible solution . Thanx in advance.
    With Regards,
    Ajit.

    >
    Vivek Joshi wrote:
    > Hello Router ,
    >                      I do not want to set the focus , I want to get focus . User can click on any cell in the table and then press a button in the toolbar . Now in the event handler of the button i want to under which column User has set the focus .
    > I hope , I am clear now .
    > Thanks for your help
    > Regards
    > Vivek
    An yet you keep getting suggestions of how to set the focus.   I looked through the API documentation and I don't see anything that would suggest you can request to see where the current focus is.  Perhaps someone might still come along with a solution, but my hopes wouldn't be too high at this point.  I can pass the requirement onto Product Definition, as the use case does seem interesting.  Perhaps it is something we have even considered in the past. 
    But for now, there might be a better way to solve your problem.  It will probably mean redesign the interaction.  What exactly are your requirements?  Do you need to be able to get the data in a particular cell of table when a button is clicked?  Just throwing out some ideas here, but maybe just use the lead selection to select the row, but then have a button choice to choose the action associated with the column you want. A hack for sure - but it might work.  Also it doesn't help you right now, but in the near future update to NetWeaver 7.0, WDA does have a onColSelect event for the table.

  • How to get the menu reference of a control while runtime

    Hello...
    i want to disable the control's short-cut menu programmatically. i could do it by using the event structure and 'shortcut menu activation' event.
    this is why i am asking about getting the menu reference if individual control.
    is there any other way out without using event structure?

    "Share_Good" <[email protected]> wrote in message
    news:[email protected]..
    > Hello...&nbsp;i want to disable the control's short-cut menu
    programmatically. i could do it by using the event structure and 'shortcut
    menu activation' event.&nbsp;this is why i am asking about getting the menu
    reference if individual control. &nbsp;is there any other way out without
    using event structure?&nbsp;&nbsp;
    No. You have to use the event. But if you simply disgard the activation, you
    don't need to change it's run time menu. You'll need the event structure
    anyway to catch the selected menu item.
    Regards,
    Wiebe.

  • How to get the sum in BSEG table using select statement

    hai all
    i made the internal tale "itab1" .. i want to get the som  feild of  DMBTR in BSG table my code is here but its not working gave som error massage (Aggregate functions and the addition DISTINCT are not supported in field lists for pooled and cluster tables.)  plz tel me how should i do it..... i want to get the som of that feild....          
    loop at itab1
         SELECT sum( DMBTR  ) from bseg INTO itab1-DMBTR141_45
             where GJAHR = itab1-GJAHR
             and   BELNR = itab1-BELNR.
    endloop.
    regard
    nawa

    SELECT BELNR GJAHR SHKZG DMBTR
                 from bseg
                 INTO table it_bseg
                 for all entries in itab1
                 where GJAHR = itab1-GJAHR
                   and BELNR = itab1-BELNR.
    loop at it_bseg.
        IF it_bseg-shkzg = 'H'.
          it_bseg-dmbtr = it_bseg-dmbtr * ( -1 ).
        ELSE.
          it_bseg-dmbtr = it_bseg-dmbtr.
        ENDIF.
        MODIFY it_bseg.
    endloop.
    loop at it_bseg.
    READ TABLE itab1 with key belnr = it_bseg-belnr
                               gjahr = it_bseg-gjahr.
    if sy-subrc = 0.
    collect it_bseg into it_bseg_amount.
    endif.
    endloop.
    U can use the collect statement
    Regards
    Gopi

Maybe you are looking for

  • An unexpected error has occurred.  Please quit and reopen Keynote.

    I am suddenly unable to duplicate slides after duplicating 115 of them and am receiving the above message.  This makes me so sad.  I am going to have to tell a client that I couldn't finish his presentation.  Perhaps there has been too much emphasis

  • Pcsuite problem connecting to the phone using blue...

    Hi, I'm having this intermittent problem, with my pcsuite not connecting to the phone. Most of the time it connects without any problem, but every now and then, I see the PC Suite tray icon with an X (phone unavailable). In those cases, when I open P

  • Interactive report using Infoset quiereis with SQ01,SQ02,SQ03.

    Hi,          I have to create a report by using the infoset query with SQ01,SQ02 and  SQ03 Tcodes. But problem my requerment is that I have to create one interactive report with these quereis. Can any body tell me how to create this interactive repor

  • An hourglass coming up instead of picture in elements 11.

    An hourglass coming up instead of picture in elements 11.  What can be done to fix this problem? Message was edited by: clblack

  • Delete source system fails

    I've got a flat file source system definition which I deleted via rsa1 --> source system --> right-click --> delete.  it deleted all the dependant objects (transfer rules, psa, EDI config, etc), but the system still shows up in RSA1.  There's an entr