ADF - New columns in DB table need to be reflected in Data Control Palette

I am new to ADF. I am editing a JSF that does add and edit to data in database table. I added new columns to the table and need to modify the JSF accordingly.
I have not been able to find info on how to take a new "snapshot" of the database table that will reflect my new columns in the DataBindings.cpx.
Can someone steer me in the right direction?
Thanks,
Chris

Chris,
if your business service is ADF BC, then synchronize the EO with the database for it to pick up the changes. Once this is done, go to the VO and add the two new attributes. Right after that the data control palette will show the new entries.
If you use EJB as a business service layer, change the entity classto expose the two attributes, re-generate the session facade ad then re-generate the data control.
Frank

Similar Messages

  • Adding tables not reflecting in data control palette

    hello
    i am using jdev 10 g and oracle xe
    i connected the database to the new aplication, then i can now use the datas but in the middle of my work i want to add another table, how can i add the new table in the data control palette so i can continue my work.
    i am doing my project all over again because i always forgot some tables that i needed.
    can you give me the steps in adding the tables. the REFRESH button also doest work for me
    thanks!

    You didn't mention what technology you are using to access your database, but assuming it is ADF Business Components - then you can create a new entity and view at any time for more table.
    Also make sure to edit your application module and get the new view object exposed in the data model.

  • Check 2 tables(Table A and Table B) and figure out new columns present in Table A and add these new columns to Table B

    How to check 2 tables(Table A and Table B) and figure out new columns present in Table A and add these new columns to Table b.
    DDL-
    Create table A
    ( A INT,
    B INT,C VARCHAR(2)
    Create table B
    A INT,
    B INT
    Any advice on the best approach or method to achieve this.
    I understand that I need to check the schema of the columns and then do a match between 2 tables and find new columns and then alter my target table
    Mudassar

    Can you try this..
    CREATE TABLE A ( A INT, B INT, C VARCHAR(2) )
    CREATE TABLE B ( A INT, B INT )
    Declare @ColumnVar nvarchar(128),@DatatypeVar nvarchar(128)
    SELECT @ColumnVar=x.COLUMN_NAME, @DatatypeVar=x.DATA_TYPE
    FROM INFORMATION_SCHEMA.COLUMNS AS x
    WHERE TABLE_NAME = 'A'
    AND NOT EXISTS ( SELECT *
    FROM INFORMATION_SCHEMA.COLUMNS
    WHERE TABLE_NAME = 'B'
    AND COLUMN_NAME = x.COLUMN_NAME )
    Declare @SQL VarChar(1000)
    SELECT @SQL = 'ALTER TABLE B ADD ' + @ColumnVar + ' '+ @DatatypeVar
    Exec (@SQL)
    select * from B
    Please Mark This As Answer if it helps to solve the issue
    http://stackoverflow.com/questions/2614101/alter-table-my-table-add-column-int

  • Add a field in a form after creating a new column in a table

    Hi,
    I have searched extensively in the help menus and tutorials and maybe I have missed this, but after adding a new column to a table. How do I update the form so that when data is entered into the form it is populated in the table? Is there a tutorial or explanation of the process somewhere?
    Thanks,

    Hi
    That has to be done manually but it is simple. Create a new item of the desired type e.g. Text Item, Select List by Right clicking on the region and select Create Page Item. A wizard will start where you will select the desired type. Press next and enter the name of the item. e.g. P3_LAST_NAME. Press Next and Enter a label for the Item. Press next and choose Source Type as Database Column when asked. Press Create button.
    Hope it helps.
    Zulqarnain
    MaxApex Hosting
    http://www.maxapex.com

  • Can't add a new column to LCD table? Option there, just wont add it.

    I have a LCD form with a table in it. Im trying to simply add a new column to the table. The option is there but the column just wont appear after clicking add Column to Left. I selected a column, right clicked the space > Insert > Column to left. But wont intsert. The table object properties tab shows rows and colum numbers but they are grayed out.
    See screenshots:
    http://www.emermed.net/staging/forums...
    http://www.emermed.net/staging/forums...
    This is a dynamic table where a new row can be inserted using a button. Is that dynamic nature the issue? Id hate to undo all the dynamic flow and programming just to add a column then reapply everything.
    Thanks!

    Hi,
    You don't add columns in the Object > Table palette (Screenshot 2). I suspect that the problem is that there is not enough on the page (within the content area) to actually add the column. In Screenshot 1, if you look at the width of the highlighted column versus the space available to the right of the table, you will see that a column cannot be added due to space restrictions.
    Reduce the width of the highlighted column (temporarily), then add a column. Once added, you can resize the columns to match the page width.
    Hope that helps,
    Niall

  • Add a new column in item table control of va01 screen

    Hi All,
    i have requirement to add new column in item table control of va01 screen 4900 for the custome field of vbap table
    the required coloum is add with the help of access key
    however whem i am trying to save data, that custom field is not populate
    please let me know if any one had work on this

    I think i solved the problem . The single way to to that is to modify the SAP standard Screen.

  • How to add new column in partition table

    Hi,
    In Oracle 10g Database, I have one table (X) with list partition . I have added one new column to "X" by "Alter Table" command. Please advise whether any other command needs to be executed since it is a partition table .
    The "X" table is used for partition swapping with another table (Y). I have added the same column also in table "Y". Will there be any issue while swapping the partion with the following command
    alter table X exchange partition partition_name with table Y
    Version Details :
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 OS
    Solaris 5.10
    Thanks in advance

    you would have to explicitly put that into the create table as select - the partition details.
    ops$tkyte%ORA10GR2> create table t1
    2 PARTITION BY RANGE (dt)
    3 (
    4 PARTITION part1 VALUES LESS THAN (to_date('13-mar-2003','dd-mon-yyyy')) ,
    5 PARTITION part2 VALUES LESS THAN (to_date('14-mar-2003','dd-mon-yyyy')) ,
    6 PARTITION junk VALUES LESS THAN (MAXVALUE)
    7 )
    8 COMPRESS
    9 as
    10 select * from t;
    Table created.
    Source:http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:69076630635645
    Hth
    Girish Sharma

  • Adding new column to Webdynpro Table

    Hi
    How can I add a new column, already one of my friend has added a table to the view in webdynpro, there are 4 columns presently maped to BAPI
    I need to add 2 new columns to the webdypor table and map it to BAPI.
    please suggest me. basically I am enhancing the screen.
    regards
    kiran

    Hi,
    May be there is a constraint defied on the newly added column that it can not be null ?
    Thanks,
    Sutirtha

  • Best approach to publish new table or new column on existing table on MDW?

    Hi,
    I'm refering to Olite R3 without any patches. I don't use Java API, I use MDW.
    if I have a new table or a new column on a existing table, what's the best approach to publish it?
    I'm asking this because I've trying lots of approaches and the only solution was, step-by-step:
    1) On MDW, drop the publication item
    2) Add again the publication item
    3) Associate the publication item to the publication
    4) Save everything
    5) File / Deploy (if I don't do it, it does not work)
    6) Tools/Package... (that's where it's a problem: if I don't remove the app and create it again it does not work!)
    7) on the client side, I perform a msync with "force refresh"
    That's the only way I found to publish new items for sure. Any other action does not push the new table or new column to the client's embbeded DB.
    Any comments?
    Regards,
    Maurício Américo Vernaschi.

    I do not use MDW, rather a mix of java and the final publish step you use, but
    Adding new PIs should be easy, just add them and re-publish (no need to drop anything)
    for changes, if you just have new columns and the sql statement is 'select * from' then you should just need to make the changes in the base schema objects, and run the publish with no changes and the updates should be picked up. If selecting specific columns, then update and re-publish.
    When using MDW at the end you can save the application as a jar file, and then use this jar file to publish in the mobile manager - this is the best wayto publish.
    Have a look at this jar file in winzip, and you will find it contains a web.xml file. This is the xml definition of the publication items, and for simple changes it is possible to just edit this file and republish via the mobile manager

  • Question about creating and updating new columns in a table

    Hi, I have a couple of questions that would love some answers to
    Please bear in min that questions relate to datawarehouse / Just large tables with say about 50 million records
    1) How do you create new columns in a big table
    2) how do you update the new columns
    3) would you create an index on a column in a table with 200m rows when the only two possible values are stored in the column (e.g.Y, N) - give your resason
    my aswers to these would be
    1) simple alter table ...
    2) simple update statements
    3) No need to create an index
    I might be wrong on these in the context of datawarehouse
    cheers
    css_jay99

    If the number of Y vs. N is about 50/50, you only have to parse through 50% of the
    overall amount of columns.Fnord. If the ratio of Y to N was 1:20 then the index would be useful for searching for values of Y only. Or if the column is nullable and the bulk of the entries were null then it might be useful. But a 50/50 split? FTS is much more effective.
    So, it does depend on the data distribution, but in most cases such an index would never be used (or should never be used).
    Cheers, APC

  • Create a new column in a table that compares the value of one column with its previous value

    The DDL:
    DECLARE
    @T TABLE
    IDNO
    int,
    name
    varchar(40),
    [Date]
    datetime2,
    Price1
    float,
    Price2
    float
    DECLARE
    @K TABLE
    IDNO
    int,
    name
    varchar(40),
    [Date]
    datetime2,
    Price1
    float,
    Price2
    float
    INSERT
    INTO @T
    VALUES(22,'C_V_Harris','2014-01-02 10:23:49.0000000',
    23.335,      
    23.347)
    INSERT
    INTO @T
    VALUES(21,'C_V_Harris','2014-01-02 10:05:13.0000000',
    23.357,      
    23.369)
    INSERT
    INTO @T
    VALUES(20,'C_V_Harris','2014-01-02 09:56:15.0000000',
    23.364,      
    23.377)
    INSERT
    INTO @T
    VALUES(19,'C_V_Harris','2014-01-02 09:45:26.0000000',
    23.351,      
    23.367)
    INSERT
    INTO @T
    VALUES(18,'C_V_Harris','2014-01-02 09:43:20.0000000',
    23.380,      
    23.396)
    INSERT
    INTO @T
    VALUES(17,'C_V_Harris','2014-01-02 09:34:28.0000000',
    23.455,      
    23.468)
    INSERT
    INTO @T
    VALUES(16,'C_V_Harris','2014-01-02 09:30:37.0000000',
    23.474,      
    23.486)
    INSERT
    INTO @T
    VALUES(15,'C_V_Harris','2014-01-02 09:18:12.0000000',
    23.419,      
    23.431)
    INSERT
    INTO @T
    VALUES(14,'C_V_Harris','2014-01-02 09:16:06.0000000',
    23.360,      
    23.374)
    INSERT
    INTO @K
    SELECT
    ROW_NUMBER()
    OVER (ORDER
    by IDNO)
    AS RN,*
    FROM
    @T
    SELECT
    * FROM
    @K
    --not working:
    SELECT
    a.RN,a.Price2
    FROM
    @K a
    INNER
    JOIN @K
    b
    ON
    a.RN=b.RN-1
    WHERE
    a.Price2>b.Price2
    I need to create  a view with a column (say 'Comp' below) that compares the value of each row in Price2 with the previous Price2 row, and it is greater then +1, the
    same 0, and less -1.
    The processed table should be:
    IDNO
    name
    Date
    Price1
    Price2
    Comp
    22
    C_V_Harris
    1/2/2014 10:23:49
    23.335
    23.347
    0
    21
    C_V_Harris
    1/2/2014 10:05:13
    23.357
    23.369
    1
    20
    C_V_Harris
    1/2/2014 9:56:15
    23.364
    23.377
    1
    19
    C_V_Harris
    1/2/2014 9:45:26
    23.351
    23.367
    -1
    18
    C_V_Harris
    1/2/2014 9:43:20
    23.38
    23.396
    1
    17
    C_V_Harris
    1/2/2014 9:34:28
    23.455
    23.468
    1
    16
    C_V_Harris
    1/2/2014 9:30:37
    23.474
    23.486
    1
    15
    C_V_Harris
    1/2/2014 9:18:12
    23.419
    23.431
    -1
    14
    C_V_Harris
    1/2/2014 9:16:06
    23.36
    23.374
    -1
     How can I structure the statement to get (the most recent - order by date ) result for Comp?

    Satheesh Variath, I just had to make some corrections from your script to get the correct answer:
    CREATE
    VIEW vw_Comp
    AS
    SELECT
    TOP 1 t.IDNO,t.name,t.[Date],t.Price1,t.Price2,
    CASE
    WHEN t.Price2
    > LAG(Price2,1)
    OVER (PARTITION
    BY name
    ORDER BY IDNO) 
    THEN 1
    WHEN t.Price2
    < LAG(Price2,1)
    OVER (PARTITION
    BY name
    ORDER BY IDNo) 
    THEN -1
    ELSE 0
    END
    AS Comp
    FROM 
    @T t
    ORDER
    BY DATE
    DESC
    The adjustments: the selection of the most recent comparison (Top 1) and the use of the function LAG (instead of LEAD) to get the previous value of the column.

  • New columns in the table control do not appear

    Hi,
    We have a requirement to add two fields(columns) in a table control  for a transaction upon clicking Create button and those two fields should be editable. We have added the two fields in the table control. But, they do not appear in the transaction ( If I delete an existing column, then I am able see the new column).  Have checked everywhere, but not sure if I am missing something here. There is no hide statement used.
    Appreciate help on this.
    Thanks,
    Pavan

    Hi Pavan,
    What I understood is you are adding fields to the table control dynamically.\
    For that you have to use field-symbols to add fields to the work area dynamically.
    ( If this is not your actual requirement share your code with me I will try to solve it. )
    Regards,
    Swaroop

  • Append new column to internal table

    Hi all,
    i have an internal table that was generated based on an ddic structure - now i want to add a column to that table. how can i do that ?
    thank you!
    clemens

    Hi to all, thank you for your help! here is the code that i have:
    REPORT *************_4 .
    TYPE-POOLS : abap.
    FIELD-SYMBOLS: <dyn_table> TYPE STANDARD TABLE,
                   <dyn_wa>,
                   <dyn_field>.
    TYPE-POOLS: slis.
    TABLES: dd03l, dd04t.
    TYPES:
      BEGIN OF ty_table_struct,
        fieldname   TYPE dd03l-fieldname, " Tabellenname
        ddtext      TYPE dd04t-ddtext,    " Kurztext
        checkbox,
       END OF ty_table_struct.
    DATA:t_fieldcat TYPE slis_t_fieldcat_alv,
         w_fieldcat TYPE slis_fieldcat_main.
    DATA:
    gt_table_struct TYPE TABLE OF ty_table_struct.
    DATA: v_repid TYPE sy-repid.
    DATA:
          dy_table TYPE REF TO data,
          dy_line  TYPE REF TO data,
          xfc TYPE lvc_s_fcat,
          ifc TYPE lvc_t_fcat,
          l_tab_fields TYPE STANDARD TABLE OF ty_table_struct,
          w_tab_fields LIKE LINE OF l_tab_fields.
    SELECTION-SCREEN :
      SKIP, BEGIN OF LINE,COMMENT 5(28) v_1 FOR FIELD p_table.
    PARAMETERS p_table TYPE dd03l-tabname OBLIGATORY VALUE CHECK.
    SELECTION-SCREEN END OF LINE.
    INITIALIZATION.
      v_1 = 'Tabelle für Dublettenprüfung'.
      v_repid = sy-repid.
    START-OF-SELECTION.
      PERFORM f_read_data.
      PERFORM f_display_data.
      PERFORM get_structure.
      PERFORM create_dynamic_itab.
      PERFORM get_data.
      PERFORM write_out.
    *&      Form  get_structure
    FORM get_structure.
      DATA : idetails TYPE abap_compdescr_tab,
             xdetails TYPE abap_compdescr.
      DATA : ref_table_des TYPE REF TO cl_abap_structdescr.
    * Get the structure of the table.
      ref_table_des ?=
          cl_abap_typedescr=>describe_by_name( p_table ).
      idetails[] = ref_table_des->components[].
      LOOP AT idetails INTO xdetails.
        READ TABLE l_tab_fields INTO w_tab_fields
        WITH KEY fieldname = xdetails-name.
        IF sy-subrc = 0.
          CLEAR xfc.
          xfc-fieldname = xdetails-name.
          xfc-datatype = xdetails-type_kind.
          xfc-inttype = xdetails-type_kind.
          xfc-intlen = xdetails-length.
          xfc-decimals = xdetails-decimals.
          APPEND xfc TO ifc.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    "get_structure
    *&      Form  create_dynamic_itab
    *       text
    FORM create_dynamic_itab.
    * Create dynamic internal table and assign to FS
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = ifc
        IMPORTING
          ep_table        = dy_table.
      ASSIGN dy_table->* TO <dyn_table>.
    * Create dynamic work area and assign to FS
      CREATE DATA dy_line LIKE LINE OF <dyn_table>.
      ASSIGN dy_line->* TO <dyn_wa>.
    ENDFORM.                    "create_dynamic_itab
    *&      Form  get_data
    *       text
    FORM get_data.
    * Select Data from table.
      SELECT (l_tab_fields) INTO CORRESPONDING FIELDS OF TABLE <dyn_table>
                 FROM (p_table).
    ENDFORM.                    "get_data
    *&      Form  write_out
    *       text
    FORM write_out.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
           EXPORTING
                i_program_name         = v_repid
                i_structure_name       = p_table
           CHANGING
                ct_fieldcat            = t_fieldcat
           EXCEPTIONS
                inconsistent_interface = 1
                program_error          = 2
                OTHERS                 = 3.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    * Show only fields that are needed
      LOOP AT t_fieldcat INTO w_fieldcat.
        READ TABLE l_tab_fields INTO w_tab_fields
        WITH KEY fieldname = w_fieldcat-fieldname.
        IF sy-subrc <> 0.
               DELETE t_fieldcat.
        ENDIF.
      ENDLOOP.
      w_fieldcat-tabname = '<dyn_table>'.
      w_fieldcat-fieldname = 'NETPR'.
      w_fieldcat-seltext_m = 'Net Price'.
      w_fieldcat-outputlen = 15.
      w_fieldcat-col_pos = 10.
    *  w_fieldcat-do_sum = 'X'. "Display column total
      w_fieldcat-datatype = 'CURR'.
      append w_fieldcat to t_fieldcat.
    * Write out data from table.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                it_fieldcat   = t_fieldcat
                I_BYPASSING_BUFFER = 'X'
           TABLES
                t_outtab      = <dyn_table>
           EXCEPTIONS
                program_error = 1
                OTHERS        = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    "write_out
    *&      Form  f_read_data
    *       text
    FORM f_read_data.
      SELECT * FROM ( dd03l
                INNER JOIN dd04t
                ON  dd03l~rollname = dd04t~rollname
                AND dd04t~ddlanguage = syst-langu
                AND dd04t~as4local = 'A' ) INTO CORRESPONDING FIELDS OF
    TABLE
      gt_table_struct WHERE dd03l~tabname = p_table .
    ENDFORM.                               " F_READ_DATA
    *      Form  f_display_data
    FORM f_display_data.
    * Macro definition
      DEFINE m_fieldcat.
        add 1 to ls_fieldcat-col_pos.
        ls_fieldcat-fieldname   = &1.
        ls_fieldcat-ref_tabname = &2.
        ls_fieldcat-rollname = &3.
        append ls_fieldcat to lt_fieldcat.
      END-OF-DEFINITION.
      TYPE-POOLS: slis.                    " ALV Global types
      DATA:
        l_exit,
        ls_private  TYPE slis_data_caller_exit,
        ls_field    TYPE ty_table_struct,
        ls_fieldcat TYPE slis_fieldcat_alv,
        lt_fieldcat TYPE slis_t_fieldcat_alv.
    * Build the field catalog
      m_fieldcat 'FIELDNAME' 'ty_table_struct' 'FIELDNAME'.
      m_fieldcat 'DDTEXT'    'ty_table_struct' 'DDTEXT'.
    * Optimize column width
      ls_private-columnopt = 'X'.
    * Display data in a popup
      CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
           EXPORTING
                i_selection          = 'X'
                i_zebra              = 'X'
                it_fieldcat          = lt_fieldcat
                i_tabname            = 'gt_table_struct'
                i_checkbox_fieldname = 'CHECKBOX'
                is_private           = ls_private
           IMPORTING
                e_exit               = l_exit
           TABLES
                t_outtab             = gt_table_struct.
      CHECK l_exit = space.
    * write selected columns to the internal table for inclusion
    * into fieldcat
      LOOP AT gt_table_struct INTO ls_field WHERE checkbox = 'X'.
        APPEND ls_field-fieldname TO l_tab_fields.
      ENDLOOP.
    ENDFORM.
    What
    i want it to do is, have the alvgrid displaying the fields from t_fieldcat, plus some fields ( that should be appended to the internal table before, i think ? ). What went wrong ? 
    Clemens

  • Create new column in BI Admin Tool being HFM the OBIEE data source.

    Hi all,
    I am developing a BI project using OBIEE 11g 11.1.6.4 and HFM 11.1.2.1. HFM is the data source for OBIEE.
    Having the metadata imported in the physical and in the BMM layers, what I want to do is create a new column that will contain a float value. This float value depends on Account dimension, that is, if account name is 'XYZ', in a join of all dimensions, this new column´s value should be the same for all the other accounts in the same join.
    I have reached a point that the new column created shows the same number (value) as the logical column 'value' of the fact table, but I don´t know how or where specify which value (the one of the account name 'XYZ') should be for the rest of the new column (where account name is not equal to 'XYZ').
    I hope it is understandable, if something is not clear, please ask me.
    Thanks in advance.
    Best regards,
    Borja

    Hi,
    yeah when i put * in the set online filter i am able to see the users which i have created in weblogic. After all the users appear then i select Action-> close. Now again when i try to cross check it once again i again clicked on manage->indentity->now i dont see the users. what could be the issue?
    Thanks,
    RM

  • Need help in URL Service Data Control

    Hi Everyone,
    I'm working on JDev11gUp2, ADF-RC
    I am using URL Service Data Control to fetch data from CSV File and i got success but I need to know that is there any way to pass File Connection URL Dynamically at run time, As i know we have to provide URL string at design time, but i have multiple files to pass at run time , Then?
    And one more question that Once the data is uploaded into af:Table from my CSV file. then after Any data change in CSV file must reflect in af:table with that change like other iterator refresh functionality. but I'm not able to do that, Simple question is, How to Re fetch the data from CSV file at run time?
    Your answer would be really appreciated as it would really help me.
    Thanks
    Fizzz...

    Hi Fizz,
    Not sure of the answer to your specific question. A couple of thoughts, though:
    You could try putting some code in a backing bean action listener to get the data control from an iterator binding (where you have added an iterator binding to your page definition) and then using the debugger to inspect the runtime type of the data control returned - then look to see if that type has a setURL method.
    [url http://database.in2p3.fr/doc/oracle/Oracle_Application_Server_10_Release_3/web.1013/b25947/adv_data_controls005.htm]this link talks about creating your own data control type - where you could certainly expose a method to set a URL. More work, but you have complete control.
    Hope this at least gives you an idea or two.
    John

Maybe you are looking for