How to get all the index of "selected rows" in table control?

Hi Gurus,
I have a table control, wherein I need to get selected row so that I can get its respective TABIX.
I know that the event for capturing selected row is in PAI.
I also ensure that the w/ selColumn name in my screenpainter is exactly the same as my declaration in ABAP.
TOP INCLUDE
YPES: BEGIN OF Y_ZQID_CHECK,
        IDNUM           TYPE ZQID_CHECK-IDNUM,
        WERKS           TYPE ZQID_CHECK-WERKS,
        MATNR           TYPE ZQID_CHECK-MATNR,
        LICHA           TYPE ZQID_CHECK-LICHA,
        LIFNR           TYPE ZQID_CHECK-LIFNR,
        ECOA_S          TYPE ZQID_CHECK-ECOA_S,
        ID_STAT         TYPE ZQID_CHECK-ID_STAT,
        ID_DATE         TYPE ZQID_CHECK-ID_DATE,
        FLAG_MAILCOA(1) TYPE C,
        MARK(1)         TYPE C, "Name of w/ SelColumn in ScreenPainter: T_ZQIDCHECK_DISCH-MARK
       END   OF Y_ZQID_CHECK.
DATA: T_ZQIDCHECK_DISCH TYPE STANDARD TABLE OF Y_ZQID_CHECK WITH HEADER LINE.
PAI
PROCESS AFTER INPUT.
* MODULE USER_COMMAND_9004.
LOOP AT T_ZQIDCHECK_DISCH.
  MODULE READ_TC_DISCH .
ENDLOOP.
module READ_TC_DISCH input.
  DATA: W_LINE_SEL TYPE SY-STEPL,
              W_TABIX    LIKE SY-TABIX.
  GET CURSOR LINE W_LINE_SEL.
  W_TABIX = TC_ID_ONLY-TOP_LINE + w_LINE_SEL - 1.
  MODIFY T_ZQIDCHECK_DISCH INDEX TC_ID_ONLY-current_line.
If I am selecting single row, I can properly get the selected index via debug.
BUG:
When I'm selecting multiple rows in table control, only the last row is always being read inside the loop of my table control.
Please see the screenshot.
[url]http://img268.imageshack.us/img268/5739/tcselectedrows.jpg[url]
Notice in the debug screenshot, even if it's just in the 1st loop of table control, it automatically gets the 4th table control index, instead of the 2nd one.
Helpful inputs will be appreciated.
Thanks.
Jaime
Edited by: Jaime Cabanban on Dec 9, 2009 3:16 PM

Hi,
Are you sure that you have selected multiple line for tablecontrol in the property window of the tablecontrol.
Flowlogic.
LOOP WITH CONTROL TC_01.
     Module Get_Marked.
ENDLOOP.
Module Pool
Module Get_Marked.
read the data from the internal table where mark  = 'X'.
this should give you only selected records.
Endmodule.
Kindly check the tablecontrol property.
Regards,
Ranjith Nambiar

Similar Messages

  • How to get all the values of a variable with F4 with checkboxes to select

    Dear Experts,
    After Executing a query by giving let 3 values(Out of 10 Values) to a variable.
    To give 2 more input values to the same variable(i.e.,total I wanted to give 5 inputs this time ),after refreshing the query,for that variable if I click F4, I am seeing the historical values(i.e.,3) and remaining 7 values also But with out any Check Boxes besides them to select the 2 inputs.
    In the same F4 Screen, If I click all values(an Icon at The bottom),then also Im seeing but no check Box.
    I hve tried by deleting the Delete Personalization also,but no use.
    Please tell me How to get all the values with F4 with check boxes to select ,whatever I want??
    Thanks in advance

    Take a look at the InfoObject and go to the Business Explorer tab. If the 'Query Def. Filter Value Selection' is set to 'Only Values in InfoProvider', you're only going to get the values in F4 that exist in the InfoProvider, not everything in the Master Data. This would need to be changed to the value of 'Values in Master Data Table' if you want it to show everything possible when F4 is chosen.
    Likewise, you're going to need to look at the query and go to the Advanced tab for the InfoObject. Make sure that the radio button for 'Values in Master Data Table' is selected. If not, then you should change that selection.

  • How to get all the values from the dropdown menu

    How to get all the values from the dropdown menu
    I need to be able to extract all values from the dropdown menu; I know how to get all those values as a string, but I need to be able to access each item; (the value in a dropdown menu will change dynamically)
    How do I get number of item is selection dropdown?
    How do I extract a ?name? for each value, one by one?
    How do I change a selection by referring to particular index of the item in a dropdown menu?
    Here is the Path to dropdown menu that I'm trying to access (form contains number of similar dropdowns)
    RSWApp.om.GetElementByPath "window(index=0).form(id=""aspnetForm"" | action=""advancedsearch.aspx"" | index=0).formelement[SELECT](name=""ctl00$MainContent$hardwareBrand"" | id=""ctl00_MainContent_hardwareBrand"" | index=16)", element
    Message was edited by: testtest

    The findElement method allows various attributes to be used to search. Take the following two examples for the element below:
    <Select Name=ProdType ID=testProd>
    </Select>
    I can find the element based on its name or any other attribute, I just need to specify what I am looking for. To find it by name I would do the following:
    Set x = RSWApp.om.FindElement("ProdType","SELECT","Name")
    If I want to search by id I could do the following:
    Set x = RSWApp.om.FindElement("testProd","SELECT","ID")
    Usually you will use whatever is available. Since the select element has no name or ID on the Empirix home page, I used the onChange attribute. You can use any attribute as long as you specify which one you are using (last argument in these examples)
    You can use the FindElement to grab links, text boxes, etc.
    The next example grabs from a link on a page
    Home
    Set x = RSWApp.om.FindElement("Home","A","innerText")
    I hope this helps clear it up.

  • How to get all the values in one column of a JTable

    How to get all the values in one column of a JTable as a Collection of String.
    I don;t want to write a for loop to say getValueAt(row, 1) eg for 2nd column.

    I don;t want to write a for loop to say getValueAt(row, 1) eg for 2nd column. You could always write a custom TableModel that stores the data in the format you want it. It would probably be about 50 lines of code. Or you could write a loop in 3 lines of code. I'll let you decide which approach you want to take.

  • How to get all the values from a HashMap? thanks

    hi
    can anyone tell me how to get all the keys and their values contained in a HashMap? thanks

    thanks to u all for ur response, i gues if i need to get both keys and values, i need to use keySet() to get a set of keys first and then using each key to get value. is there any other faster way to get both of them (key and value)? thanks again

  • How to get all the data stored on a table?

    Hi.
    I'm tryng to get all the data stored on a database table but I'm losing in trouble. I've looked for a soloution to my problem in the forums but each post I follow related to this issue gives me a different way to solve the problem and no one works :(
    I suppose I have to call the getAllRowsInRange() method from my ViewObject class. But how can I get an instance of my ApplicationModule in order to get the corresponding ViewObject?
    I think I messed my head a lot.
    Could someone help me please?
    Thanks in advance.

    Thanks for your answer.
    However, there are some things that I don't understand. I will look the book but why is necessary to create another ApplicationModule? The fact is that my application just have one ApplicationModule.
    Apart from that, I have tried your suggestion and I've obtained the quite little friendly response that follows:
    javax.faces.FacesException: #{backing_pruebaFilas.commandButton1_action}: javax.faces.el.EvaluationException: oracle.jbo.ConfigException: JBO-33001: No se ha encontrado el archivo de configuración /DatosViewObj/common/bc4j.xcfg en classpath
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:98)
         at javax.faces.component.UICommand.broadcast(UICommand.java:332)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:287)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:401)
         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:95)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:228)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:197)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:123)
         at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:103)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:162)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:620)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:369)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:865)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:447)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:215)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: javax.faces.el.EvaluationException: oracle.jbo.ConfigException: JBO-33001: No se ha encontrado el archivo de configuración /DatosViewObj/common/bc4j.xcfg en classpath
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:150)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:92)
         ... 24 more
    Caused by: oracle.jbo.ConfigException: JBO-33001: No se ha encontrado el archivo de configuración /DatosViewObj/common/bc4j.xcfg en classpath
         at oracle.jbo.client.Configuration.loadFromClassPath(Configuration.java:367)
         at oracle.jbo.common.ampool.PoolMgr.createPool(PoolMgr.java:284)
         at oracle.jbo.common.ampool.PoolMgr.findPool(PoolMgr.java:539)
         at oracle.jbo.common.ampool.ContextPoolManager.findPool(ContextPoolManager.java:165)
         at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1498)
         at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1476)
         at view.backing.PruebaFilas.commandButton1_action(PruebaFilas.java:100)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:146)
         ... 25 more
    At that point, I think a better explanation of my purpose could be helpful. What I'm trying to do is just create a simple page with a command button, and in its action method get all the data stored in the rows of the table. I've seen a possible solution that I understand:
    DCIteratorBinding iter = getIterator("DatosViewObj1Iterator");
    System.out.println("Iterator Binding: "+iter);
    int startRange = iter.getRangeSize();
    iter.setRangeSize(-1);
    Row[] rows = iter.getAllRowsInRange();
    iter.setRangeSize(startRange);
    but the problem is that I don't know what is the class the method getIterator belongs to.
    Could you help me with this last piece of code? If not, I accept, of course, any suggestion. I am absolutely stuck.
    Thanks and regards.

  • OMB Plus : how to get all the generated messages into a text file ?

    Hello,
    I wrote an OMB TCL script and I would like to know how to get all the messages generated during the exécution into a text file.
    I tried this, but it works only for a puts command :
    set DesProjet ACT_1
    set filename [ open "c:\\temp\\INFDE_010_IMPORT_REPOSITORY_$DesProjet.log" w]
    puts "test"
    Thank you for your help

    Hello Alain, you should try the OMBLOG variable. If you set it inside OMBPlus:
    set OMBLOG c:/temp/mylog.txtthen all the OWB specific commands are logged with their output. By OWB specific I mean all those that start with OMB.
    This is more than what you see in the interface, because:
    - messages inside procedures are logged; you wouldn't see them on std.output when you call a proc
    - variables are resolved, so if you issue the command
    set my_var VERY_IMPORTANT_TABLE
    OMBDROP TABLE '$v_myvar'the log will show:
    OMBDROP TABLE 'VERY_IMPORTANT_TABLE'
    Table dropped
    and you know something is wrong... so OMBLOG is very useful to intercept all manipulations on you repository.
    If what you want instead is a dump of the screen output when you execute a script, I suggest you redirect standard output from the operating system command line. Unfortunately OMBPlus doesn't support all advanced redirection and tracing features of the TCL language.
    Hope this helps, Antonio

  • Can anybody please suggest the way i can get all the indexes on a cache

    Can anybody please suggest the way i can get all the indexes on a cache?

    Hi,
    If you want to just see what there is at the moment, the StorageManager mbean IndexInfo attribute shows the toString() representation of the extractor of each index.
    If you want to get it programmatically, you can get hold of it by sending an entry-processor to a key, then casting the entry to BinaryEntry, and calling BinaryEntry.getBackingMapContext().getIndexMap() to get the same Map<ValueExtractor,MapIndex> of indexes which the index aware filters get.
    Best regards,
    Rob

  • How to find all the changes management details (thr DB tables or FMs)

    Hi Experts,
    Could anyone please tell me how to get all the Change management details.
    I mean are there any database tables or FM through which I can get all the Changes Management(CHARM) details.
    like status,priority,texts,descriptions etc...
    I need them for an interface....
    Thanks
    Yogesh Gupta

    Hi,
    Yet another request to use my crystal ball.
    We had one pc which is having oracle 9i enterprise manager configured(windows 2000) only to connect the db.
    This remembers me of the Gospel of St. Luke, chapter 2, where it is stated,
    'and they found the child in the manger'.
    This resulted a Jewish theologian to remark: 'The manger? Well, so that must have been their own manger'
    So what does 'the' db mean? The Linux one? Or a separate on Win2000?
    It is quite possible to manage a Linux database using OEM on Win2000, with OMS on Win2000.
    'But our server is not having enterprise manager'. Yet another riddle. Which server? There seem to be at least two.
    1 Now if I drop these tables, will I be able to connect to our database using the windows2k pc through Enterprise Manager?
    Yes, but only in standalone mode, and you can't use OEM alerts, and jobs anymore. You would be better off using Sqldeveloper, as OEM Sql worksheet is a nightmare.
    2 That is your decision.
    3
    oemctl ping oms
    will check whether you have an Oracle Management Server running.
    You already seem to have the Enterprise Manager Repository, so you must have OMS running somewhere. (Why install the repository, if you don't use it)
    Sybrand Bakker
    Senior Oracle DBA

  • HOW CAN I HAVE THE NUMBER OF SELECTED ROWS IN ALV GRID?

    HI.
    HOW CAN I HAVE THE NUMBER OF SELECTED ROWS IN ALV GRID????
    GABRY =)

    You need to use
    data : grid1  type ref to cl_gui_alv_grid.
      call method grid1->get_selected_rows
        importing
          et_index_rows = i_sel_alvrows[].

  • How can I modify the "right click" menu of a table control?

    Hello,
      How can I modify the "right click menu" of a table control. I would like to be able to remove the ability to add or delete columns and maybe other selections. I want to keep the ability to
    add or delete rows

    Hi Andy,
    Dialog & User Interface VIs -> Menu functions
    Never used them, eh?

  • Selecting rows in table control

    Hi experts,
    I have question regarding selecting rows in table control. How can I select a row when a button is pressed. I cannot use the selection column in this case. Is there any option to achieve my requirement without using the selection column. Thanks.
    regards,
    sriram.

    By,
    Using the Get cursor syntax you can achive the Selected row in Table control.
      DATA : selrow TYPE i,
             selindex TYPE i  .
    * getting the cursor line in Table Control for selected row
      GET CURSOR FIELD selfield LINE selrow.
      selindex = <tablecontrol>-top_line + selrow - 1.
    Prabhu

  • How to get all the values in the Select-option.

    Hi,
    I got the select-option field so_week, for eg. If I give 200923 to 200926 (year and week)  in the selection screen and then I need to pass this value (200923) to the FM 'ZWEEK_GET_FIRST_DAY' to get the first day of the week.
    My question is how can i get all the values from the select option, (i.e) i need to get 200923, 200924,200925, 200926.
    Regards,
    Anbu.

    Hello,
    I will prefer Max's solution. But just for the sake of this req.
    i need to get 200923, 200924,200925, 200926
    i am proposing my soln:
    DATA: V_WEEK TYPE RSCALWEEK.
    SELECT-OPTIONS: S_WEEK FOR V_WEEK NO-EXTENSION OBLIGATORY.
    AT SELECTION-SCREEN.
      DATA:
      V_COUNT TYPE I,
      V_ADD   TYPE I,
      RT_WEEK TYPE RANGE OF RSCALWEEK,
      RS_WEEK LIKE LINE OF RT_WEEK.
      V_COUNT = ( S_WEEK-HIGH - S_WEEK-LOW ) + 1.
      DO V_COUNT TIMES.
        RS_WEEK-SIGN = 'I'.
        RS_WEEK-OPTION = 'EQ'.
        RS_WEEK-LOW = S_WEEK-LOW + V_ADD.
        APPEND RS_WEEK TO RT_WEEK. "RT_WEEK--> Will contain the week values
        CLEAR RS_WEEK.
        V_ADD = V_ADD + 1.
      ENDDO.
    @Max: I was stupid enough not to think of your solution. Need to leave office
    Cheers,
    Suhas

  • How to get all the ID value dynamically in javascript

    Hi,
    Please let me know how to read all the id of the components dynamically from the *.jspx page in adf.
    i want to store all the values in the array of the javascript.
    Thanks

    jdev version -11.1.1.4
    use case:- we are capturing all value entered by the user on screen and storing it in the cookie like (key,value) pair where key is id and value is value of the component keyed-in.
    Later when there is browser close or transaction faliure we are retreiving back all the values from cookie on load of page.
    Now the point is when the screen loads back it is not getting the component id dynamically, we are storing manually the id's of the components to retrieve the value.
    But we want to read all the id of all the components dyanamically once page load and store it in javascript array variable.
    Let me know if there is any method to read all the id of the page in ADF javascript.
    Or any other alternative method.
    Please help.
    Thanks,

  • How to get all the objects in a  stack frame

    Hi, what I'm trying to do is get all the objects on the top of the stack and time stamp them.
    What I have is this:
    static void mearthScanStack(jvmtiEnv *env, jmethodID method, jthread thread){
           jobject obj;
           int i;
           jlong tag;
           jvmtiError err;
           jvmtiLocalVariableEntry *localVarTable;
           jint entryCount;
              err = (*env)->GetLocalVariableTable(env, method, &entryCount, &localVarTable);
              if(err == JVMTI_ERROR_ABSENT_INFORMATION || err == JVMTI_ERROR_NATIVE_METHOD){
                   return;
              check_jvmti_error(gdata->jvmti, err, "mearthScanStack: Could not get local variable table");
              for(i = 0; i < entryCount; i++){
                   if( (localVarTable.signature)[0] == 'L'){
                        err = (*env)->GetLocalObject(env,     thread, 0, localVarTable[i].slot, &obj);
         check_jvmti_error(gdata->jvmti, err, "mearthScanStack: Could not get local object");
                        err = (*env)->GetTag(env, obj, &tag);
                        check_jvmti_error(gdata->jvmti, err, "mearthScanStack: Could not get tag for local object");
                        timeStampObject(env, obj);
              (*env)->Deallocate(env, localVarTable);
    }To walk through, first I get the local object variable table, then I loop through each entry in the table. I check each entries signature to see if it is an object (starts with "L"), and if it is, I try get its tag, and time stamp it.
    This doesn't seem to work, however, because I get JVMTI_ERROR_INVALID_SLOT errors on the call to GetLocalObject. How can it be an invalid slot if I am getting the slot out of the local variable table?  Am I going about this the right way
    Additionally, when I get the the table, I'm ignoring the JVMTI_ERROR_ABSENT_INFORMATION error. I'm not exactly sure under what circustances this information is absent. Is there a way I could scan the stack frame even if it is not available (just probe through the slots maybe?)
    Any help is greatly appreciated.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    I would think if you intanciate the XMLReference and use IIDXMLElement GetChildCount / GetNthChild would do what you are looking for.
    Ian

Maybe you are looking for

  • Few questions about netGroup neighbors limits

    I'm playing around with a p2p messenger type of client where i'm catching neighbors when the netgroup.neighbor.connect event goes off, and then using add neighbor by adding their peerID (not the neighborID, i'm not really quite sure how/why that woul

  • How to block the status mail for an inbound Idoc to a specific user

    Hi, I have to stop sending the error status mail to a specific user depenidng on Partner Type. This will trigger when an inbound Idoc contains status error(message type INVOIC &ORDRSP).This user needs other mails which are getting triggered with the

  • Enterprise or Standalone CA for Windows and linux computers

    Hi i plan to deploy a certificate architecture mainly for our internal web server and no more receive the certificate warning pop up So first i will install an offline Root CA Then i will setup a subordinate CA My question is about the type : standal

  • Help with uppercase letters in Find/Change

    Hiyis. I'm trying to change all instances of "US" to "U.S.," but when I type it into Find/Change, I'm getting stuff like "discuss" highlighted. Any way to specify just uppercase US on its own? Or do I have to go through and review every suggested cha

  • Satellite L850 - warning - Toshiba recovery wizards

    Dears I have Satellite L850 , and one time i have opened it there is a message titled [ Toshiba recovery wizards ] with warning and to option yes or No and by mistake i have clicked yes , all my data are formated and it was happen again , and i think