Generating a new table based on user choices - Code Problems

A while ago someone posted on one of the Adobe forums the following code (sorry I do not remember the name / link). This code is meant to generate a second table (an Object list in this case) according to the user’s choices at another table (in this case a dropdown list):
form1.TableA.TableTitles.Row1.DropDownList1::change - (JavaScript, client)
var str_itemtext = xfa.event.newText;
var olist2 = xfa.resolveNode("form1.TableA.TableTitles.Row2.ListBox2");
var arrayADVS = new Array("Acad", "Disp", "Advs");
var arrayCD = new Array("Proj-", "HRS");
if (str_itemtext == "ADVS") {
makelist(olist2, arrayADVS);
olist2.presence = "visible";
else if (str_itemtext == "CD"){
makelist(olist2, arrayCD);
olist2.presence = "visible";
function makelist(olist, arrayitem) {
var i = 0;
olist.clearItems();
for (i = 0; i < arrayitem.length; i ++){
olist.addItem(arrayitem[i], arrayitem[i]);
I made a couple of minor changes but generally preserved the original code and it seemed to work fine. The problem arises after the completed form is saved:- the “object list” (second table) disappears even though I set it as visible. I tried changing the Type (from user entered required to read only) but to no avail.
Could someone please help me figure out what is wrong with this code? Why does this Object List object disappears after the form is saved?
Thanks.

If you could post the form or send a copy to [email protected] I would be happy to take a look, otherwise, it is hard to diagnose.
Steve

Similar Messages

  • Generating a internal table based on the fieldcatalog

    hi,
    i want to generate an internal table based on field catalog which will be generated after the user has selected a particular layout.
    For eg. Suppose there are at present 25 fields at the ALV output and out of which user selects 10 fields using layout option and i save the layout.
    Now i want an internal table with these 10 fields in my internal table not all the 25 fields.
    any ideas?
    regards
    jignesh.

    Hi,
    Look at the sample code below.
    FIELD-SYMBOLS: <outtab> TYPE ANY TABLE,
          <l_line>  TYPE ANY,
          <l_field> TYPE ANY.
    DATA: new_table TYPE REF TO data.
    DATA: new_line  TYPE REF TO data.
    DATA: it_fieldcat TYPE lvc_t_fcat.
    DATA: wa_fieldcat TYPE lvc_s_fcat.
    DATA: BEGIN OF itab OCCURS 0,
          matnr TYPE matnr,
          aenam TYPE aenam,
          END OF itab.
    "Fill the fieldcat here
    "For example say it contains two fields MATNR AENAM
    CALL METHOD cl_alv_table_create=>create_dynamic_table
            EXPORTING
              it_fieldcatalog = it_fieldcat
            IMPORTING
              ep_table        = new_table.
    ASSIGN new_table->* TO <outtab>. "This is the required table
    CREATE DATA new_line LIKE LINE OF <outtab>.
    ASSIGN new_line->* TO <l_line> . "Work area forthe same
    SELECT matnr aenam UP TO 5 ROWS
    FROM mara
    INTO TABLE itab.
    LOOP AT itab.
      ASSIGN COMPONENT 'MATNR' OF STRUCTURE <l_line> TO <l_field>.
      <l_field> = itab-matnr.
      ASSIGN COMPONENT 'AENAM' OF STRUCTURE <l_line> TO <l_field>.
      <l_field> = itab-aenam.
      INSERT <l_line> INTO TABLE <outtab>.
    ENDLOOP.
    LOOP AT <outtab> ASSIGNING <l_line>.
      WRITE: / <l_line>.
    ENDLOOP.
    Regards,
    Manoj Kumar P

  • How to create a new table based out of old data rows

    Hi All,
    How to create a new table based out of old data rows. Also how can we find out the DBF for different users in a database?
    Saqib

    Not very clear what you need. I'll try to interpret...
    How to create a new table based out of old data rowsIf this means how to create a table from an existing one, then you can do :
    SQL> create table <new table> as select * from <old table>;
    if you need a subset of rows you can add a where clause.
    how can we find out the DBF for different users in a database?Here I need some more clarification. What do you mean exactly ?

  • Create a new table maintenable by user using SM30 transaction

    Hi,
    is it possible to create a new table maintenable by user using sm30 transaction with class C without opening the customizing each time there is a modification to do.
    thank you.

    Hi,
    u told u alredy create table and corresponding view. Now u can follw below this process.........
    go to se11.
    go to menu Utilities ->table maint. generator.
    after that u will go to menu -> Environment -> maintence Object -> Generate.
    then u select category -> CUSY
    Transport -> 2 automatic transport
    Adjustment-> automatically adjustment
    then save it and create T. code .
    I think your problem will be solve.
    Regards,
    Tarapada D.

  • Insert new rows based on user selection on a table display on the screen

    Hi..
    In my requirement i need to display the line items of a PO# to the user on the screen for specific fields. Each row should also include an additonal checkbox when displayed for the user. When the user checks this check box or clicks on it a new row should be inserted below to that row with the existing data of that row being copied to newly inserted row and allowing the user to make any changes.
    The newly inserted row should also include a check box , so that when the user checks it again a new row should get inserted. Finally what ever data user enters on the screen, i should be able to update my internal table with those new values and records.
    Appreciate if anyone can guide me on how to proceed on this or any alternative approaches.
    Will reward helpful answers.
    Thanks.

    Hi ..
    Can you please be more detailed. First I need to know how to create the initial table display for the existing line items and then the techniques for inserting the new rows based on the check marks and finally add those news rows to my existing internal table..
    Appreciate ur help.
    Thanks.

  • Create new table based on old table

    Hello All,
    I have a JTable. The user can re-arrange columns in this table. Then the user can select a couple rows and create a new selection set table based on these rows. The problem is as follows: When the user re-arranges the columns, I cannot seem to retrieve the new order.
    Ex)
    A table is created with fields: A B C
    User rearranges to: B A C
    I call code and fields are returned as: A B C
    for(int i=0; i<((DefaultTableModel)super.getModel()).getColumnCount(); i++) {
      String name = ((DefaultTableModel)super.getModel()).getColumnName(i);
      System.out.println("Name: " + name);
    }Thanks for any/all help!

    Nevermind, got it to work by the below code. Still don't understand why the above code didn't work though.
    Enumeration e = super.getTableHeader().getColumnModel().getColumns();
    while(e.hasMoreElements()) {
      String name = (String)((TableColumn)e.nextElement()).getHeaderValue();
      System.out.println("Name: " + name);
    }

  • How to create a sharepoint list to add/change/delete the data in SQL server Table based on users inputs

    I have a table in sql with employee_num and I need to create a list and link that list to this table to make changes to table based on values user enter or selects.

    Hi,
    In addition, you could refer to one similar thread for related information:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/8ee8a7b2-ddfc-4654-b84e-b062aeb527ae/how-to-create-exernal-list-in-sharepoint-which-fetch-data-from-multiple-sql-table?forum=sharepointgeneral
    Regards,
    Rebecca Tu
    TechNet Community Support

  • Filter one table based on user selection

    Hi all ,
              I am creating simple employee data application in VC. It consists of roadmap. On first step user searches for employee by giving first name , last name then he searches for employee and all the data related to employee's is fetched out at one shot through BAPI_EMPLOYEE_GETDATA. Now after step one no of employee comes.
    When I select one record I want that for the selected rows employee's personal data should be fetched out from another table (which is populated during first BAPI call). so I want to pass the selected key value and filter that table based on passed value to table and filter the table .
    Kindly give a solution as to implement filter on a table without making another BAPI call .
    Thanks in advance
    Abhay

    Hi Abhay,
    There's a trick to get a 'dynamic' filter (i.e. a filter that filters on a value that can change) out of the normal static filters:
    Just click on the output of your data source, then 'configure' and on the '+'  - sign in the lower right corner. Add a boolean field called 'condition', for example. Then, you write the condition that filters out the row(s) that you need. In the filter that comes next in the dataflow you just filter on this 'condition' - field being true.
    Hope that helps,
    Sincerely,
    Florian

  • How to update records in a table based on user selection..

    Hi all,
    This time the above doubt is totally based on the logic of coding which I tried a lot but didn't get any solution. so atlast I come to sdn site.
    please help..
    The requirement is like that I have a table with 6 fields (1 primary key and other are nonkeys). If the user inputs some values in the fields on the screen, then a row will be added in the table. Upto this i have done well. but when the user want to change some value  in the existing row of the table my program unable to do so. Because I couldn't get any logic to do that as there are 5 nonkey fields, so if any one field is modified then the respective row should be selected first based on the user selection and then it should be updated.
    At this point I could not get any idea as it may take a lots of if conditions (I guess) to reach to that particular row.
    Please help..
    thanks ,
    sekhar

    Hi Sekhar,
    I am afraid, the whole design of your program is wrong, let me explain
    Let us say you have two rows(5 non key fields) that the user wants to update and the data in these five non key fields are identical and in your program you are getting a number(which is the key) using a number range object. So you will have two entries in the table for the same data.
    And on the update page when the user enters the non key fields, how will the program know(or for that matter any one of us) which record to pick, if you have two identical books and if asked for a book wouldn't you ask which one among these two do you want?
    Possible Solution: Identify a possible key maintaining the integrity of the data, that is a combination of the non key fields which will help you identify a unique row and make these fields as key fields in the table.
    A more costly solution(if you do not want to change the non key field keys to key fields) would be to, adding a check(using select statement) to see if the non key fields combination already exists in the Z table before inserting a record into the table.
    If yes, throw a message to the user and just update the values in the table, else insert the record.
    Another solution would be to, use the non key fields to generate a key(using some logic) and using this instead of the number range object.
    regards,
    Chen

  • Using javascript to save a pdf to a different directory and generating a new filename based on form fields in the document.

    I have built the following script in an attempt to create a submit button that will automatically save the document in a different directory on my computer. It will also use the form field data "customer" and "date" to generate the filename. I printed out the variable myPath and it looks like it printed the correct string. I keep getting the following error:
    TypeError: redeclaration of const path
    any help would be much appreciated.
    var customer = this.getField("Customer").value;
    var date = this.getField("Date").value;
    var path = "C:/Users/awilliams/My Documents/Test/"
      var reg = date.match(/(\d+)\/(\d+)\/(\d+)/);
    var myPath= "C:/Users/awilliams/My Documents/Test/" + customer + "_" + reg[1] + "." + reg[2] + "." +
    reg[3] + ".pdf";
    this.saveAs(myPath);

    "path" is a keyword within a PDF you should not use keywords as a name for any other object as a general rule.
    Have you checked the PDF Reference to see how to create a file path name within a PDF,  3.10.1 File Specification Strings page 118?
    Did you carefully read the Acrobat JavaScript Reference for the saveAs method?
    The notes following the description:
    Note: This method can only be executed during a batch or console event. See Privileged versus non-privileged context for details. The event object contains a discussion of JavaScript events.
    (Adobe Reader S): This method is available in Adobe Reader for documents that have Save usage rights.
    How to Save a PDF with Acrobat JavaScript

  • Inserting millions of records into new table based on condition

    Hi All,
    We have a range partitioned table that contains 950,000,000 records (since from 2004) which is again list sub-partitioned on status. Possible values of stauts are 0,1,2,3 and 4.
    The requirement is to get all the rows with status 1 and date less than 24-Aug 2011. (Oracle 11g R2).
    I trying below code
    CREATE TABLE RECONCILIATION_TAB PARALLEL 3 NOLOGGING  
    AS SELECT /*+ INDEX(CARDS_TAB STATUS_IDX) */ ID,STATUS,DATE_D
    FROM CARDS_TAB
    WHERE DATE_D < TO_DATE('24-AUG-2011','DD-MON-YYYY')
    AND STATUS=1; CARDS_TAB has tow global indexes one on status and another on date_d.
    Above query is running for last 28Hrs! Is this the right approach?
    With Regards,
    Farooq Abdulla

    You said the table was range partitioned but you didn't say by what. I'm guessing the table is range partitioned by DATE_D. Is that a valid assumption?
    You said that the table was subpartitioned by status. If the table is subpartitioned by status, what do you mean that the data is randomly distributed? Surely it's confined to particular subpartitions, right?
    What is the query plan without the hint?
    What is the query plan with the hint?
    Why do you believe that adding the hint will be beneficial?
    Justin

  • Designer is slow when generating a new universe based on a BEX query

    Hi
    When we generate a universe on the basis of a BEX query, so it may take up to 30 minutes before we have a universe.
    Regards,
    Rikke

    Hi,
    could you setup the tracing on the client with the Universe Designer and post a link that as the file for download ?
    you can follow the note here for the tracing details:
    Windows : Note 1260004
    also make sure that the client is on the same fixpack level as the backend
    Ingo

  • EDI - IDoc - User Exit - Code - Problem - Help - Wanted

    Hi EDI Experts,
    I have extended ORDERS05 IDOC twice.
    ZVKSEG1 is the the segment under extended idoc ZVKORDRS05. This is for one partner.
    Z1DATESH01 is the segment under extended idoc Z1ORDER05. This is for another partner.
    I have completed the configuration thing in WE82 for both the extensions.
    Now the requirement is, whenever a PO is created for the first partner - 100290, the IDoc generated should contain the extra segment ZVKSEG1 and whenever PO is created for the second partner - 10099,the Idoc generated should contain the extrasegment Z1DATESH01.
    Using WE20, i have added the extended IDoc type in both the partner profiles under ORDERS message type.
    Now i've written the user exit for this using EXIT_SAPLEINM_002.
    tables: edidc.
    data: z_edidd like edidd occurs 0 with header line.
    data: y1dath01 like z1datesh01.
    data: yvkseg1 like zvkseg1.
    if edidc-rcvprn = '10099'.
    z_edidd[] = int_edidd[].
    loop at z_edidd.
    if z_edidd-segnam  = 'E1EDK01'.
    read table z_edidd  with key segnam  = 'Z1DATESH01'.
    if sy-subrc <> 0.
    y1dath01-DELDATE = sy-datum.
    clear z_edidd.
    z_Edidd-sdata = y1dath01.
    z_Edidd-segnam = 'Z1DATESH01'.
    append z_edidd.
    endif.
    endif.
    endloop.
    int_edidd[] = z_edidd[].
    elseif edidc-rcvprn = '100290'.
    z_edidd[] = int_edidd[].
    loop at z_edidd.
    if z_edidd-segnam  = 'E1EDK01'.
    read table z_edidd  with key segnam  = 'ZVKSEG1'.
    if sy-subrc <> 0.
    yvkseg1-name1 = 'ZVK Chemicals'.
    clear z_edidd.
    z_Edidd-sdata = yvkseg1.
    z_Edidd-segnam = 'ZVKSEG1'.
    append z_edidd.
    endif.
    endif.
    endloop.
    int_edidd[] = z_edidd[].
    endif.
    Could you please go through the code and tell me where did i go wrong. The extra segments are not being created for both the partners.
    I created PO using ME21n once for each vendor.
    Please help me out guys.
    Thanks,
    Matt

    I myself fixed this problem. I made use of XLFA1-LIFNR to manipulate the partner numbers.
    Thanks

  • How to restrict the entries of a database table based on the user name

    Hi All,
    I have created a Database Table. Table maintenance generator is generated for the table.
    UNAME(user name) is one of the fields in the table. whenever the user creates a new entry, the field UNAME will be populated automatically with SY-UNAME value. I have used Table event '05' to do this.
    My requirement is...
    When a user tries to maintain the entries of the table using SM30, when 'DISPLAY' is chosen, all the records of the table should be displayed.
    When 'MAINTAIN' is chosen, only those records which have UNAME = SY-UNAME(User Logged in) should be in EDIT mode. and rest all the records should be in DISPLAY mode(greyed out). It should allow to edit only those records which are created by the user logged in.
    Could you please tell me how to do this..? Thanks in advance.
    Thanks & Regards,
    Paddu.

    HI,
    In table main. gen there are number of events , try to select one event like 05 for the Sy-uname.
    For the  requirement:
    In that event write the code like
    this is basic idea not the code:
    Case ' Sy-ucomm'.
    when 'display'.  " button
       Nomally for the display button it will show all the records, but we need to write a code like this.
    select all records frm the table.
    ( Need to write the code in case if the user first maintained the data then again press the display , list has to be refreshed.)
    when ' Maintain'. " button.
    Fetch the records that are with SY-UNAME and find out the edit function and implement it on each and every record.
    endcase.
    Thanks and Regards,
    Bharani.

  • Creation of new table with attributes of another ??

    how can i create a new table which has the same attributes as another ? Please note that the records/tuples in the already existing table shouldn't be copied into the new table.
    Illustration:
    Table Employee_Details with attributes/fields Name and IDno is present.
    A new table Supervisor should have the same attributes/fields Name and IDno.
    But the data in Employee_Details table shouldn't be copied into this table (Supervisor).
    Can anyone write a query in SQL that does the same i.e. use the attributes of another table during the creation of a new one?
    Also can anyone explain why the following query is erroneous ?
    sql> create table supervisor as (desc employee_details);
    Thanks for your help!

    create table new_table as select * from old_table
    where 0=1;This statement doesn't create the new_table in the same tablespace than old_table... to take for example only the tablespace, but that's right for storage clause too.
    Assuming TITI is my old table, and TOTO my new table :
    SQL> show user
    USER is "H89UCBAC"
    SQL> select default_tablespace from dba_users where username='H89UCBAC';
    DEFAULT_TABLESPACE
    PSDEFAULT
    SQL> create table titi(coltiti number) tablespace tools;
    Table created.
    SQL> create table toto as select * from titi;
    Table created.
    SQL> ed
    Wrote file afiedt.buf
      1* select table_name,tablespace_name from dba_tables where table_name in ('TITI','TOTO')
    SQL> /
    TABLE_NAME                     TABLESPACE_NAME
    TOTO                           PSDEFAULT
    TITI                           TOOLS
    SQL>   1* select replace(dbms_metadata.get_ddl('TABLE','TITI'),'TITI','TOTO') from dual
    SQL> /
    REPLACE(DBMS_METADATA.GET_DDL('TABLE','TITI'),'TITI','TOTO')
      CREATE TABLE "H89UCBAC"."TOTO"
       (    "COLTOTO" NUMBER
       ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
      STORAGE(INITIAL 65536 NEXT 65536 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "TOOLS"
    SQL> drop table toto;
    Table dropped.
    SQL> CREATE TABLE "H89UCBAC"."TOTO"
      2   (    "COLTOTO" NUMBER
      3   ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
      4  STORAGE(INITIAL 65536 NEXT 65536 MINEXTENTS 1 MAXEXTENTS 2147483645
      5  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      6  TABLESPACE "TOOLS"
      7  /
    Table created.
    SQL> select table_name,tablespace_name from dba_tables where table_name in ('TITI','TOTO');
    TABLE_NAME                     TABLESPACE_NAME
    TITI                           TOOLS
    TOTO                           TOOLS
    SQL> HTH,
    Nicolas.
    Message was edited by:
    N. Gasparotto

Maybe you are looking for

  • Error -- Oracle.xdo.XDOException: oracle.xdo.XDOException

    Hi all, When I create a data model using Oracle BI analysis, it turn this error: Oracle.xdo.XDOException: oracle.xdo.XDOException: oracle.xml.parser.v2.XMLParseException: End tag does not match start tag 'saw:text'. And how can i make it, thank you i

  • Profit Center(Controling ) integration with SAP CRM Billing

    Hi, we are using SAP CRM5.O & R/3 4.7. Can you please some body give the information of Integration CRM Service billing integration with Controling(profit center). Regards Chandra Edited by: Chandra Sekhar Reddy.Botla on Apr 22, 2008 10:14 AM

  • Will these apps work in 10.4?

    Hello all. I've done some searching, and have not found definate answers on this... I am looking to upgrade from 10.3.x to 10.4. I am wondering if anybody has firsthand knowledge of the following apps. working in 10.4? Photoshop 7 HCP HD 4.5 After Ef

  • Which OC4J instance to use for Soa Suite: oc4j_soa or home ?

    When I setup Soa Suite I am asked which OC4J instance I want to use: home or oc4j_soa By default "home" is filled in the entry field. However in sample tutorials I saw always "oc4j_soa" and never "home" What is the difference and which one is recomme

  • Images Missing in Email

    Anytime I receive an email that includes an imbedded image to my Yahoo Mail account the image is missing.  Is this a phone problem or an issue with the Nokia mail software program?