Problem with MultiLeadSelection in a table

Hi All,
I am still having the problem with the multilead selection in a table.
I am setting the table properties to multi and I have an event handler for the onaction property, named as leadselection.
I am writing the code below for the event handler.
public void onActionLeadSelect(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
int selectedRow = firstNode.nodeOPENITEMS_open().getLeadSelection();
    int sizeOfOpen = wdContext.nodeOPENITEMS_open().size();
     IOPENITEMS_openElement element = (IOPENITEMS_openElement)firstNode.nodeOPENITEMS_open().getElementAt(selectedRow);
     for(int i=0;i<wdContext.nodeOPENITEMS_open().size();i++){
          if(wdContext.nodeOPENITEMS_open().isMultiSelected(i)||selectedRow == i){
               wdContext.currentContextElement().setMultiDocNumber(wdContext.nodeOPENITEMS_open().getOPENITEMS_openElementAt(selectedRow).getDOC_NO());
               wdContext.currentContextElement().setMultiItemno(wdContext.nodeOPENITEMS_open().getOPENITEMS_openElementAt(selectedRow).getITEM());
               wdContext.currentContextElement().setMultiRepItem(wdContext.nodeOPENITEMS_open().getOPENITEMS_openElementAt(selectedRow).getREP_ITEM());
               wdContext.currentContextElement().setMultiSubitem(wdContext.nodeOPENITEMS_open().getOPENITEMS_openElementAt(selectedRow).getSUB_ITEM());
What i am trying to do is..On multiselection or on single leaad selection, I should pass the whole amount to the BAPI or the amount related to only the leadselection.
But when I am trying to run..this code..I am nt able to select in a multiple way..and more over if I press ctrl then I am able to make the other rows highlighted with orange color..but not normally and after making them highlighted also i am not able to pass the amount for all the selected rows..together..
Kindly suggest me..something..
Regards
DK

Hi,
Try this ,
for(int i=0;i<wdContext.nodeOPENITEMS_open().size();i++){
if(wdContext.nodeOPENITEMS_open().isMultiSelected(i)){
wdContext.currentContextElement().setMultiDocNumber(wdContext.nodeOPENITEMS_open().getOPENITEMS_openElementAt(i).getDOC_NO());
wdContext.currentContextElement().setMultiItemno(wdContext.nodeOPENITEMS_open().getOPENITEMS_openElementAt(i).getITEM());
wdContext.currentContextElement().setMultiRepItem(wdContext.nodeOPENITEMS_open().getOPENITEMS_openElementAt(i).getREP_ITEM());
wdContext.currentContextElement().setMultiSubitem(wdContext.nodeOPENITEMS_open().getOPENITEMS_openElementAt(i).getSUB_ITEM());
If you use the selectedRow variable in if condition, it will fetch only one row from table. Because the getLeadSelection() method gives the number of row which got selection on first click before pressing Ctrl key. So you can get only one value for leadselect. that's why the if loop failure for other selected rows.
regards
karthik

Similar Messages

  • Problems with retrieving data from tables with 240 and more records

    Hi,
    I've been connecting to Oracle 11g Server (not sure exact version) using Oracle 10.1.0 Client and O10 Oracle 10g driver. Everything was ok.
    I installed Oracle 11.2.0 Client and I started to have problems with retrieving data from tables.
    First I used the same connection string, driver and so on (O10 Oracle 10g) then I tried ORA Oracle but with no luck. The result is like this:
    I'm able to connect to database. I'm able to retrieve data but from small tables (e.g. with 110 records it works perfectly using both O10 and ORA drivers). When I try to retrieve data from tables with like 240 and more records retrieval simply hangs (nothing happens at all - no error, no timeout). Application seems to hang forever.
    I'm using Powerbuilder to connect to Database (either PB10.5 using O10 driver or PB12 using ORA driver). I used DBTrace, so I see that query hangs on the first FETCH.
    So for the retrievals that hang I have something like:
    (3260008): BIND SELECT OUTPUT BUFFER (DataWindow):(DBI_SELBIND) (0.186 MS / 18978.709 MS)
    (3260008): ,len=160,type=DECIMAL,pbt=4,dbt=0,ct=0,prec=0,scale=0
    (3260008): ,len=160,type=DECIMAL,pbt=4,dbt=0,ct=0,prec=0,scale=1
    (3260008): ,len=160,type=DECIMAL,pbt=4,dbt=0,ct=0,prec=0,scale=0
    (3260008): EXECUTE:(DBI_DW_EXECUTE) (192.982 MS / 19171.691 MS)
    (3260008): FETCH NEXT:(DBI_FETCHNEXT)
    and this is the last line,
    while for retrievals that end, I have FETCH producing time, data in buffer and moving to the next Fetch until all data is retrieved
    On the side note, I have no problems with retrieving data either by SQL Developer or DbVisualizer.
    Problems started when I installed 11.2.0 Client. Even if I want to use 10.0.1 Client, the same problem occurs. So I guess something from 11.2.0 overrides 10.0.1 settings.
    I will appreciate any comments/hints/help.
    Thank you very much.

    pgoel wrote:
    I've been connecting to Oracle 11g Server (not sure exact version) using Oracle 10.1.0 Client and O10 Oracle 10g driver. Everything was ok.Earlier (before installing new stuff) did you ever try retrieving data from big tables (like 240 and more records), if yes, was it working?Yes, with Oracle 10g client (before installing 11g) I was able to retrieve any data, either it was 10k+ records or 100 records. Installing 11g client changed something that even using old 10g client (which I still have installed) fails to work. The same problem occur no matter I'm using 10g or 11g client now. Powerbuilder hangs on retrieving tables with more than like 240 records.
    Thanks.

  • Problem with Emailing the Internal table data as an excel attachment

    Hi Friends,
    I am facing problem with Emailing an internal table data as an excel file. I am using standard function module "SO_NEW_DOCUMENT_ATT_SEND_API1" which is using SOLI structure can have record with 255 character length. But my Internal table having each record means after concatenating all the fields it is going to be morethan 450 characters. so i t is not displaying all the data in excel file.
    Can somebody help me if there is any other function module or any other way that i need to follow.
    thanks for help
    venkat.

    You must use the the :
    CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB as a field seperator and
    CL_ABAP_CHAR_UTILITIES=>CR_LF as a record seperator.
    Check this example:
    http://www.sapdevelopment.co.uk/reporting/email/attach_xls.htm
    Regards,
    Naimesh Patel

  • Problem with trigger and mutating table

    Hello,
    I have a problem with the following trigger. Everytime it starts I got an error message:
    ORA-04091: table ccq_test.QW_QUALIFIER is mutating, trigger/function may not see it
    ORA-06512: at "QW_AFTER_UPDATE_ALL", line 3
    ORA-06512: at "QW_AFTER_UPDATE_ALL", line 10
    ORA-04088: error during execution of trigger 'QW_AFTER_UPDATE_ALL'
    Here is the trigger:
    CREATE OR REPLACE TRIGGER qw_after_update_all
    AFTER UPDATE ON ccq_test.QW_QUALIFIER FOR EACH ROW
    DECLARE
         CURSOR c1 IS SELECT id AS mx FROM QW_QUALIFIER_LOG WHERE msgid = :NEW.msgid AND messagedate BETWEEN SYSDATE - (1 / (24 * 60 * 6)) AND SYSDATE AND transfer = 1;
         CURSOR c_qwprod IS SELECT value FROM ccq_test.QW_QUALIFIER WHERE msgid = :NEW.msgid AND name = 'product';
         CURSOR c_qwgesch IS SELECT value FROM ccq_test.QW_QUALIFIER WHERE msgid = :NEW.msgid AND name = 'geschaeftsfall';
         qw_rec c1%ROWTYPE;
         qw_prod c_qwprod%ROWTYPE;
         qw_gesch c_qwgesch%ROWTYPE;
    BEGIN
    OPEN c1;
    OPEN c_qwprod;
    OPEN c_qwgesch;
         FETCH c1 INTO qw_rec;
         FETCH c_qwprod INTO qw_prod;
         FETCH c_qwgesch INTO qw_gesch;
         IF c1%NOTFOUND THEN
              IF (:NEW.name = 'product') THEN
                   INSERT INTO QW_QUALIFIER_LOG VALUES (QW_QUALIFIER_LOG_SEQ.NEXTVAL, :NEW.msgid, :NEW.value, qw_gesch.value, SYSDATE, 1);
              ELSE
              INSERT INTO QW_QUALIFIER_LOG VALUES (QW_QUALIFIER_LOG_SEQ.NEXTVAL, :NEW.msgid, qw_prod.value, :NEW.value, SYSDATE, 1);
         END IF;
         ELSE
              IF (:NEW.name = 'product') THEN
                   UPDATE QW_QUALIFIER_LOG SET product=:NEW.value, messagedate=SYSDATE WHERE id = qw_rec.mx;
              ELSE
                   UPDATE QW_QUALIFIER_LOG SET geschaeftsfall=:NEW.value, messagedate=SYSDATE WHERE id = qw_rec.mx;
         END IF;
         END IF;
    CLOSE c1;     
    END;
    Can anyone help me?

    You are trying to lookup data from qw_qualifier you are currently modifying. You could see the data in a inconsistent way and Oracle is protecting you from it.
    You could read here about how to program around this problem.
    But: your table design seems questionable. You have two records for qw_qualifier and you are trying to log it into one qw_qualifier_log record. Maybe you could fix that, and the need for querying the same table as you are updating is removed.
    Regards,
    Rob.

  • Problems with RowSelection in adf table

    I have problems with selection of a row in a adf table. Even though I have set the property : rowSelection="single" , when i select a row, the two other rows that follow, get selected too. For example I have 10 records an when i select the 7th row, the 8th and 9th row are also selected. This doesn't happen with the first rows.
    Also when i evaluate an attribute on selectionListener, it is always getting just the one from the first row.
    <f:facet name="second">
    <af:panelBox id="pbCon" showDisclosure="false" text="Históricos"
    binding="#{pageFlowScope.HistoricoEnvios.pbCon}">
    <af:table var="row" summary="Histórico de envios"
    rows="#{bindings.VOHistoricoEnvios.rangeSize}"
    emptyText="#{bindings.VOHistoricoEnvios.viewable ? 'No se encontraron resultados.' : 'Access Denied.'}"
    fetchSize="#{bindings.VOHistoricoEnvios.rangeSize}"
    rowBandingInterval="0" id="tHist"
    disableColumnReordering="true"
    value="#{bindings.VOHistoricoEnvios.collectionModel}"
    binding="#{pageFlowScope.HistoricoEnvios.thist}"
    rowSelection="single">
    <af:column width="32" id="c13" align="center"
    headerText="#{bindings.VOHistoricoEnvios.hints.Rownum.label}"
    rowHeader="unstyled">
    .

    I have two panelBox, one for a set of options with commandMenuItem and the second one wich shows the result in a table. The first commandMenuItem generate records an show them in the table. Here i got no problem with selection. The third commandMenuItem execute a log of the records generated, here is the problem.
    Thes two pages are part o a template, the template has a panelSpliter, in the right are the set of commandMenuItem an in the second is the part that i can edit.
    I have also drag an drop from the datacontrol again and have the same result
    The table that shows the records is :
    <af:panelTabbed id="ptReg" styleClass="AFStretchWidth"
    visible="true"
    binding="#{pageFlowScope.EnvioSunasa.ptReg}"
    partialTriggers="::dpEnv">
    <af:showDetailItem text="Datos Personales" id="sdiDp"
    stretchChildren="first"
    inflexibleHeight="100">
    <af:panelSplitter id="psDP" orientation="vertical"
    splitterPosition="216">
    <f:facet name="first">
    <af:panelBox id="pbErrDP"
    text="Registros con Error:#{pageFlowScope.EnvioSunasa.numRegErrDP}"
    showDisclosure="false">
    <af:table var="row" summary="Errores Datos Personales"
    rows="#{bindings.VOErrDatosPersonalesAfiliado1.rangeSize}"
    emptyText="#{bindings.VOErrDatosPersonalesAfiliado1.viewable ? 'No se encontraron errores.' : 'Access Denied.'}"
    fetchSize="#{bindings.VOErrDatosPersonalesAfiliado1.rangeSize}"
    rowBandingInterval="0" id="tErrDp"
    disableColumnReordering="false"
    value="#{bindings.VOErrDatosPersonalesAfiliado1.collectionModel}"
    rowSelection="single"
    binding="#{pageFlowScope.EnvioSunasa.terrDp}">
    .

  • Performance problem with query on bkpf table

    hi good morning all ,
    i ahave a performance problem with a below query on bkpf table .
    SELECT bukrs
               belnr
               gjahr
          FROM bkpf
          INTO TABLE ist_bkpf_temp 
         WHERE budat IN s_budat.
    is ther any possibility to improve the performanece by using index .
    plz help me ,
    thanks in advance ,
    regards ,
    srinivas

    hi,
    if u can add bukrs as input field or if u have bukrs as part of any other internal table to filter out the data u can use:
    for ex:
    SELECT bukrs
    belnr
    gjahr
    FROM bkpf
    INTO TABLE ist_bkpf_temp
    WHERE budat IN s_budat
        and    bukrs in s_bukrs.
    or
    SELECT bukrs
    belnr
    gjahr
    FROM bkpf
    INTO TABLE ist_bkpf_temp
    for all entries in itab
    WHERE budat IN s_budat
        and bukrs = itab-bukrs.
    Just see , if it is possible to do any one of the above?? It has to be verified with ur requirement.

  • Problem with the regeneration of Table Maintenance

    My Scenario is like this.
    I have to add a Long Description with a length of 4000 Charecters. For this I have created in my Z TAble ZINT  INT2  5  and ZZLONG_DESC  LCHR  4000. I have activated the ZTABLE. I have Adjusted & Activated the Database by using Data Base Utility. I have regenerated the Table Maintenance (SM30), here my concern is I am not able to see the ZZLONG_DESC Field for Value Entry. I have seen all other Fields are ready for input, except this field. How do you achieve this.
    What ever I will type in ZZLONG_DESC, when I say SAVE it should be available in ZTABLE.
    How to read the Long TExt for 4000 charecters, is it possible using the Function  Module "READ_TEXT".  Please suggest me.
    Thanks & Regards,
    Sivaram Kandula

    Hi Sivaram,
       Yes, there is a problem with fields of long lengths. But, can I know exactly what type of table maintenance u have generated? Is it a one step or a two step? I suggest you to go ahead with creation of two step table maintenance. Then you will definitely see that in the second screen means, when you click on "New Entries" you should be able to see it. Plz have a try at this and let me know with the update. Hope this should work out.
       Otherwise, better to go with Text table concept. Hope you got it.
    Thanks,
    Adithya K
    SAP Practise.
    Note:  Reward points for the helpful answers.

  • Real Time Simulation, problem with the 3D Lookup table

    Hello,
    I have a problem with LabVIEW RT. I want to read under the parameters of temperature, time and voltage, the current out of a matrix.
    The matrices differ only in the temperature (first entry in a matrix).
    If the 3D Lookup table only get one matrix, I often get "Not a Number" as result. But not always, although the parameters remain the same.
    If the 3D Lookup table gets three or more matrices, the result never be "Not a Number". But the 2 other matrices are "dummys" filled up with zeros, expect the temperature. Also the problem appears only if I start the test sequence as Startup on the RT-System. If I start the test sequence from the Front Panel, the 3D Lookup table works well, whether one or more than three matrices!
    Its confusing, I know ^^
    The appendices contains pictures from a matrix an from the Block Diagram
    Attachments:
    Block DIagram.jpg ‏146 KB
    Current-Matrix.png ‏27 KB
    Dummy-Matrix.png ‏12 KB

    Hello salomon,
    The 3D lookup table is not generated in my code, but is invoked as a constant. I examine the behavior of electrical loads in the cars. Consumers were in a climate chamber measured at various temperatures and these values ​​were packed into a 3D lookup.
    Helps you even further? : D

  • Problem with refresh issue in Table Overflow Area for LOV in edit mode

    Hi Friends,
    I am facing a problem with LOV if i keep this in Table Overflow area,
    When i select a Employee name from the List of Value clicking on select button it will not refresh the lov to display the currently selected Employee Name, but if i click on show and hide link of Table overflow the selected employee name will be displayed.
    But the if move the same lov item from Table Overflow area to Table layout it works fine.
    I tried my best to look into this but i could not, can any one suggest me what i need to do for this refresh issue.
    Regards,
    Rahul

    Hello Rahul,
    Strange, it's working for me.
    I assume you added Employees as reference entity to your updatable entity in your ViewObject.
    Did you uncheck "Key attribute" in EmployeeId of your reference entity?
    Anything in the log?
    Groeten,
    HJH

  • Problem with Vertical scroll in table control

    Dear All,
    I am facing a problem with table control in module pool program. currently it displays 6 lines, but it does not display the vertical scroll button, even though when I fill data in the six rows and hit enter.
    I have set the vertical scroll option on the table control properties also.
    Can someone help me by sending some sample code?
    Thanks,
    Amit Goyal

    HI Amit ,
        If you have already selected the properties of vertical and horizontal scroll bar then no other operations needed .. if the number of rows increases then that of the table control , you will automatically see the Vertical scroll in your table control ..
      if still you dont see it then write back ..
    Reward if helpful !
    Thanks
    Ranjita

  • Problems with saving Word 2007 table as PDF

    I have a table in MS Word 2007 with some merged cells. If I use the Save as ... PDF or XPS option in Word 2007 to save this document as a PDF, the resulting PDF has a table with a discontinuous table grid. The table lines around the cells are broken.
    Is this a problem with the Word table or does the Save as PDF command not work well with tables.
    Thanks,
    Karl Smith

    What versions of both programs and how did you create the PDF? Can you post an example of the PDF?

  • Problems with layout and printing tables

    Hello,
    my first ADOBE-Form "projekt" makes more problems than expected, especially with the layout.
    Layout Problem 1:
    I want to print the data of a table (thats my only parameter in the interface and the table itself is deep structures with other tables). So I have bound the "standard" subform (the one ADOBE inserts automatically" to the table and selected that the subform is repeated after every record.
    Anyhow ADOBE processes only the first record of this table.
    Maybe the reason is, that I need to display the data of one record on two pages. So I created two pages each with the "standard" subform and bounded both to the table.
    What am I doing wrong? Do i have to do the page split another way?
    Layout Problem 2:
    I have a text field with multiple lines allowed. But it overwrites the content of the object, that comes below.
    Its the same with my other subforms for table data.
    How can I tell the system, that an object needs to be pushed downside on the page, if the context above needs more space?
    Thanks in advance for your answers!
    Regards,
    Frank

    Yeah, you say it
    subforms and they "flowing" etc. properties are killing me, but after some hours I think I got the concept.
    The form looks quite well, everything is pushed downwards if an item above gets expanded.
    But one problem remains: this form only prints the very first record of my table.
    I have no problems with the tables nested inside the main table. They work perfectly and everything is fine there!
    But I cant tell the form to print my other records...
    I somehow played around and made it work, but then the next record was not on the next page but directly after the subform created by the context area (if this terminology is correct).
    I played around even further and created a paging with reference to the context area, but then the first page looked quite odd (page 2, 3, 4... looks perfect).
    I tried to fix also this and then I somehow messed up my form and could not undo my changes (it was only a "to play with" copy...)
    Just to explain it again:
    I have one table (lets call it the "main table" because its the import parameter of the interface) and inside this table are other nested tables.
    I want to print one record of the "main table" across 2 pages and after that the next record of the "main table" should be printed beginning at the 3rd page.
    As I said, the two pages look wonderful (even though I have not yet covered the issue of what should happen, two pages are not enough for one record of the "main table"). but as soon as I try to display the next records of the "main table" as well, i am stucked in unpredictable layout problems.
    I cant believe that I try anything extraordinary. Lets hope that I can solve this with your very appreciated help.
    Thanks in advance Otto!!!
    And kind regards, Frank

  • Problem with CASE and Object tables.

    Hi guys,
    Have a problem which I am unable to understand how to solve.
    I have the following object
    create type obj_numeric_id_table as table of number(30);
    create type obj_search_rec as object
    ( zones number(4),
      locs obj_numeric_id_table
    create type obj_search_tbl as table of obj_search_rec;
    /Now this object Obj_search_tbl is being passed as an IN parameter to a procedure...actually the object has many more columns but the problem at hand is with the locs column.
    The problem is - if I use the count for the locs column in an IF statement, then all works fine, but if I use it inside a CASE statement in the SELECT clause, it gives me an error.
    create proc proc_1 (abc obj_search_tbl) .....
    L_search obj_search_rec;
    begin
    L_search_rec := abc(1); -- for the moment there is only one record.
    IF L_search_rec.locs.count() > 0 then -- this works perfectly
    END IF;
    select (case when L_search_rec.locs.count() > 0 then 1 end) from some_table;
    -- now this case statement gives me the following error
    "PL/SQL: ORA-00904: "L_SEARCH_REC"."LOCS"."COUNT": invalid identifier"Am I doing something wrong....am unable to understand why this is so...
    Thanks,

    Other possibility:
    select count(t.column_value) from
    (select obj_search_rec(1, obj_numeric_id_table(1,2)) obj_search_rec from dual) l,
    table(l.obj_search_rec.locs) t;

  • Problem with parameters and non table based items

    Hi,
    I have a situation where I have some not table based items on a page (shuttles and select lists). It is parameters that the end user inputs. I have another page with the same items just here they are Display Only and also not table based. When the user press a button I branch from page 1 to page 2 and set the items on page 2. My problem is that the input the user keys in are not copied to the items on page 2. I can see the data in the session state.
    I assume that this is a silly question and I have just set Source Used or Source Type wrong one one of the items but I can not get it working. Can anybody help?
    It works fine if I use a Application Item and creates a process on page 1 where I copy the item value from the session state but that should be needed right?
    Regards Pete

    Thanks Scott,
    I think I got it working. If I remove all the colons from the data it works. I select several entries in a Shuttle and the result is a colon delimited string of values. If I remove these in a process it works fine. Is there a way of escaping the output from a Shuttle?
    Regards Pete

  • Problem with RFC and empty table

    Hi,
    I have a problem using and RFC function module. The problem is that the RFC returns a table type, but even though the table is emtpy the tag is returned. I have this target structure who has a required subsstructure:
    Input:
    <RFC_function_module>
    <customers>
      <customer1>   
        <table1>  (0..1)
          <item>  (0..Unbounded)
           <salesorder>
      <customer2>   
        <table1>
          <item>
             <salesorder>
        <table2>     
           <item>        
              <accountdoc>
    result:
    <customers>
      <list1> (0..1)
        <table1> (1..Unbounded)
      <list2> (0..1)
        <table2> (1..Unbounded)
    The problem is that if i just do at simpel mapping the mapping returns error because the missing table2 in the result. Then i have tried with an Exists function but it seems like the mapping program searches the hole file for just one occurences. Not record by record.
    Do anyone understand my problem an has a solution?
    /Jakob

    OK - what do you mean by to level of mapping? Mapping to an "internal" structure first and then for the final output?
    The reason i do not whant to change the External defintions is because of changes. If the ones who have designet the external defintions ie.  adds a field or something like that, we should remember to change this kind of thing before updating.
    Jakob

Maybe you are looking for

  • Error when launching j2ee (j2sdkee1.3.1)  in Windows XP Professional

    Hi! I use j2sdk1.4.2_03 on Windows XP Professional and I just installed j2sdkee1.3.1. (I do have assigned environment variables J2EE_HOME, JAVA_HOME and PATH accordingly) When launching > j2ee -verbose I do get the following error: Could anyone give

  • Is there a way to erase dates from photos?  Smart fill option?

    I had an old photo shop program that allowed me to circle the date or anything I wanted removed from the picture and it would smart fill with the background.  Does this Adobe Photoshop Elements 13 do the same?  If so, how?

  • InDesign CS 5corrupting file

    Hi there, I'm running InDesign CS5 on Windows 7. Last month, I had one file that became corrupt. And by that I mean when I went to open the file I immediately got the "InDesign CS5 has stopped working message." The file never appeared to open. I had

  • Help with Lightroom 4.4!

    Several hundred RAW files were deleted from my hard drive. I had done a lot of editing and processing on them ready for delivery when it happened. They show up in Lightroom 4.4 as missing files but the settings, metadata, and star rating are still th

  • Prepaid for 12 months. Says I'm using the trial version. [was: I paid!]

    I paid for 1 year in advanced it is saying I am using a trail version.