How to create a dynamic table region with dynamic VO in processFormRequest

Hi All,
I have a requirement to create a dynamic table region with a dynamic VO.
I need this because at runtime only the user will select the table name. So based on that table name, i have to create a table region to display the records.
I already created a dynamic VO. Could anyone share the code for dynamic table region creation.
Thanks in Advance.
Thanks and Regards,
Myvizhi
Edited by: Myvizhi Selvi on May 20, 2013 6:21 PM

Hi,
You can use following sample code to create advance table columns dynamically with colum groups as well.
It assumes that you have already created advance table with ID EmpTblRN.
Below code returns column heading dynamically and if you keep your VO column names and attributes
same in all the cases (COL1, COL2.....) then you can easily use a loop to create advance table columns.
It is attaching VO attributes to OAMessageStyledText bean in the last.
Hope it helps.
OAAdvancedTableBean advTable = (OAAdvancedTableBean)webBean.findChildRecursive("EmpTblRN");
Serializable [] param = {currentWindowSeq.toString()};
Datum[] colHeadingArray = (Datum[])am.invokeMethod("getColumnHeading", param);
String oldGrpName = null;
String newGrpName = null;
OAColumnGroupBean columnGroup = null;
DictionaryData columnFormat = new DictionaryData();
columnFormat.put(WIDTH_KEY, "4%");
for (int i = 0; i < colHeadingArray.length; i++)
try
oracle.sql.STRUCT os = (oracle.sql.STRUCT)colHeadingArray;
Object[] colHeadAttr = os.getAttributes();
newGrpName = (String)colHeadAttr[0];
if(newGrpName!=null)
if(!newGrpName.equals(oldGrpName))
// Create a column group, create the set the column header,
// and add the column group under the advanced table
columnGroup = (OAColumnGroupBean)createWebBean(pageContext, COLUMN_GROUP_BEAN, null, "ColGroup"+i);
OASortableHeaderBean columnGroupHeader = (OASortableHeaderBean)createWebBean(pageContext, SORTABLE_HEADER_BEAN, null, "ColGroupHeader"+i);
columnGroupHeader.setText(newGrpName);
// Retrieve from message dictionary
columnGroup.setColumnHeader(columnGroupHeader);
advTable.addIndexedChild(columnGroup);
oldGrpName = newGrpName;
// Create a column, create the set the column header, and add the column
// under the column group
OAColumnBean column1 = (OAColumnBean)createWebBean(pageContext, COLUMN_BEAN, null, "Column"+i);
OASortableHeaderBean column1Header = (OASortableHeaderBean)createWebBean(pageContext, SORTABLE_HEADER_BEAN, null, "Column1Header"+i);
column1Header.setText(colHeadAttr[1].toString());
column1.setColumnHeader(column1Header);
column1.setColumnFormat(columnFormat);
columnGroup.addIndexedChild(column1);
// Create the actual leaf item under the first column
OAMessageStyledTextBean leaf1 = (OAMessageStyledTextBean)createWebBean(pageContext, MESSAGE_STYLED_TEXT_BEAN, null, "Leaf"+i);
//OARawTextBean leaf1 = (OARawTextBean)createWebBean(pageContext, RAW_TEXT_BEAN, null, "Leaf"+i);
leaf1.setViewAttributeName("Week"+(i+1));
String destination = "OA.jsp?page=/xxqc/oracle/apps/per/leaveadvance/webui/EmployeeLeaveDetailPG&personId={@PersonId}";
destination = destination + "&startDate="+colHeadAttr[1].toString()+"-"+(String)colHeadAttr[0];
destination = destination + "&addBreadCrumb=Y&retainAM=Y";
leaf1.setDestination(destination);
OADataBoundValueViewObject cssjob = new OADataBoundValueViewObject(leaf1,"Color"+(i+1));
//leaf1.setAttributeValue(oracle.cabo.ui.UIConstants.STYLE_CLASS_ATTR, cssjob);
leaf1.setAttributeValue(UIConstants.RENDERED_ATTR, cssjob);
column1.addIndexedChild(leaf1);
catch(Exception e)
System.out.println("e"+e);

Similar Messages

  • How to create a dynamic table region with dynamic VO

    Hi All,
    I have a requirement to create a dynamic table region with a dynamic VO.
    I need this because at runtime only the user will select the table name. So based on that table name, i have to create a table region to display the records.
    I already created a dynamic VO. Could anyone share the code for dynamic table region creation.
    Thanks in Advance.
    Thanks and Regards,
    Myvizhi

    Hi All,
    I have a requirement to create a dynamic table region with a dynamic VO.
    I need this because at runtime only the user will select the table name. So based on that table name, i have to create a table region to display the records.
    I already created a dynamic VO. Could anyone share the code for dynamic table region creation.
    Thanks in Advance.
    Thanks and Regards,
    Myvizhi

  • How to create user editable Crystal Report with dynamic dataset

    What I would like to achieve:
    A program loads a report in runtime updates list of database fields (possibly includes sample data), open report in "Crystal Reports 2011" (or 2008) where user customizes report and saves it. Later on the program loads the report, fills actualized data and displays it in .net report viewer.
    What I do:
    CrReport = New CrystalDecisions.CrystalReports.Engine.ReportDocument
    CrReport.Load(TemplateFilename)
    Dim Results As DataTable
    DataTable is filled from a database
    CrReport.SetDataSource(mResults)
    CrReport.SaveAs(NewReportPath, True)
    The NewReportPath is opened in the default program.
    What are the problems
    The report is open in preview mode (not in design).
    When the field is added to the report the designer asks for XML datasource on preview.

    The short answer is that it is not possible. I broke the question to other two: How to save a report that it opens without preview? and How to create user editable Crystal Report with dynamic dataset, where it is possible to find details. Key answer is Re: How to create an editable previewable report?

  • How to create a Power Pivot Chart with Dynamic X-Axis (date time) similar to that in Performance monitor (Start-- Run-- Perfmon)?

    Hi,
    I want to create a Power Pivot Chart and a Power View chart in Power BI where the x-axis should be the current system date time axis and it's functionality should be similar to that in Perfmon.exe tool (Start-->Run-->Perfmon)?

    Hi Manjunath,
    Do you mean you want to programmatically create such a dynamic chart which has a X axis of time? If you just want to do this manually, please take a look at this document which is talking about how to create charts with Power BI:
    Charts and other visualizations in Power View
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to create a menu in flex with dynamic images?

    I am using mx.controls.Menu but can't seem to find a way to add dynamic images to it...is there a way fo doing this? should I me using another control?

    place the images path in the xml file
    when the swf is loaded pass the path of the xml file and
    bind the source of menu images with the loaded xml
    If this post answers your question or helps. please mark it as such

  • How to create an internal table with fields from different sources

    Hi.
    I need to create an internal table where some of the fields are from a database table, and the other fields are user specified. How do i do that?
    Example:
    DB table ZTAB with fields ZTAB-FIELD1, ZTAB-FIELD2.
    I want to create an internal table ITAB with the fields ZTAB-FIELD1, ZTAB-FIELD2 from ZTAB. In addition, I also want to have one more field RECORD_NO, which is not from ZTAB. How do I do it? Could I do something like below?
    DATA BEGIN OF ITAB.
            INCLUDE STRUCTURE ZTAB.
    DATA RECORD_NO TYPE I.
    DATA END OF UPLINE.
    Or, are there more efficient way of doing it? Thanks.

    hi KIan,
    go:
    general type
    TYPE : BEGIN OF ty_itab,
               field1 TYPE ztab-field1,
               field2 TYPE ztab-field2,
    *your own fields here:
               field TYPE i,
               field(30) TYPE c,
               END OF ty_itab.
    work area
    DATA : gw_itab TYPE ty_itab.
    internal table
    DATA : gt_itab TYPE TABLE OF ty_itab.
    hope this helps
    ec

  • How to create database and table with GUI?

    How to create database and table with GUI?
    for linux can do that?
    or have only way to create table by use sql*plus.
    everyone please help me.
    thanks

    go to www.orasoft.org
    here is a gui tool.
    null

  • How to create a transparent table(z table) dynamically

    Hi,
    Can anyone explain me how to create a transparent table(z table) dynamically in the program.
    Any function module or suggestions welcome.

    Hi Mithun
                 we will not create transparent table in the program . you could do it by using native SQL in the ABAP Program . the sample is show in below .
    This is a sample that show how to connect to Database directly and can use the native SQL to select , create or delete table.
    PARAMETERS dbs TYPE dbcon-con_name default 'SDB'.
    DATA carrid_wa TYPE scarr-carrid.
    DATA lv_int  TYPE i.
    *Types
    data: begin of ty_equi,
    equipment(25) type c,
    SERIALENERGY(25) type c,
    end of ty_equi.
    *Internal Tables
    data it_equi like table of ty_equi.
    data wa_equi like line of it_equi.
    DATA dbtype TYPE dbcon_dbms.
    SELECT SINGLE dbms
           FROM dbcon
           INTO dbtype
           WHERE con_name = dbs.
    IF dbtype = 'ORA'.
      TRY.
          EXEC SQL.
            CONNECT TO :dbs
          ENDEXEC.
          IF sy-subrc <> 0.
            RAISE EXCEPTION TYPE cx_sy_native_sql_error.
          ENDIF.
          EXEC SQL.
            OPEN dbcur FOR
              SELECT
                     EQUIPMENT,
                     SERIALENERGY
                     FROM emd.meter
          ENDEXEC.
          DO.
            EXEC SQL.
              FETCH NEXT dbcur INTO :wa_EQUI
            ENDEXEC.
            IF sy-subrc <> 0.
              EXIT.
            ELSE.
              WRITE: /
              wa_equi-equipment,
              wa_equi-SERIALENERGY.
            ENDIF.
          ENDDO.
          EXEC SQL.
            CLOSE dbcur
          ENDEXEC.
          EXEC SQL.
            DISCONNECT :dbs
          ENDEXEC.
        CATCH cx_sy_native_sql_error.
          MESSAGE `Error in Native SQL.` TYPE 'I'.
      ENDTRY.
    ENDIF.
    Regards
    Wiboon

  • [b]How to create this Custom Table on Custom Schema with foreign key [/b]

    This Custom Table is create in Custom Schema and Refers to Seeded Table in APPS schema
    1 create table test_dff (test_id number(15) primary key,
    2* invoice_id number(15) constraint ap_test_fk REFERENCES ap_invoices_all(invoice_id) ON DELETE CASCADE)
    SQL> /
    invoice_id number(15) constraint ap_test_fk REFERENCES ap_invoices_all(invoice_id) ON DELETE CASCADE
    ERROR at line 2:
    ORA-02270: no matching unique or primary key for this column-list
    How to create this Custom Table on Custom Schema
    thanks in advance

    hi prashant
    sorry for replying late, i have checked your query and it gives me no rows, but if i check for user_cons_columns it gives me no rows either in APPS Schema, but in AP schema it gives me
    SQL> SELECT * FROM user_cons_columns WHERE table_name = 'AP_INVOICES_ALL';
    OWNER CONSTRAINT_NAME TABLE_NAME
    COLUMN_NAME
    POSITION
    AP SYS_C008177 AP_INVOICES_ALL
    INVOICE_ID
    SQL> SELECT constraint_name, constraint_type FROM user_constraints WHERE table_name = 'AP_INVOICES_A
    LL';
    CONSTRAINT_NAME C
    SYS_C008177 C
    SYS_C008178 C
    SYS_C008179 C
    SYS_C008180 C
    SYS_C008181 C
    SYS_C008182 C
    SYS_C008183 C
    SYS_C008184 C
    SYS_C008185 C
    SYS_C008187 C
    SYS_C008189 C
    SYS_C008191 C
    and since this is a combination of Unique and Not Null Constraints , i am getting the same issue. do u have any solution to make the Detail table records to delete without using Alerts/DB Triggers?
    thanks for your time .
    abdul rahman

  • How to Create Event polling table

    hi,
    1)How to Create Event polling table
    2) wahts RPD stands for.
    3) when we are prefer Dynamic variables.
    thanks.
    raj

    1) http://obiee101.blogspot.com/2008/07/obiee-managing-cache-emptyingpurging.html
    2) Repository Project Design ?
    - More than likely the extension RPD was not used by anything else when Siebel Analytics first started using it, no doubt the 'RP' is repository, so use 'Definition' or 'Design' as you like. Im pretty sure there is nothing in the documentation but i've not checked, maybe you could check and let us know?
    3) Dynamic variables would be something like 'CURRENT_MONTH' where the same query does not need to fire per user (ie SESSION variable) but needs to be periodically refreshed. Another use of you dynamic variable might be 'LAST_ETL_DATE' or somethng similar which might implement with your event polling table. By including the Variable within a Business Model, all cache for the Business Model is purged whenever the Variable's value changes.

  • How to create variant for table/view ?

    Hi,
    When I go through SM30, I find a radio button called variant. I don't know the effect.
    Can anyone tell me how to create variant for table / view ?
    I want to know when we need to create variant for table/view.
    Best regards,
    Chris Gu

    hi ,
    Whenever you start a program in which selection screens are defined, the system displays a set of input fields for database-specific and program-specific selections. To select a certain set of data, you enter an appropriate range of values.
    For further information about selection screens, refer to Selection Screens in the ABAP User's Guide.
    If you often run the same program with the same set of selections (for example, to create a monthly statistical report), you can save the values in a selection set called a variant
    Procedure
    To create a new variant:
           1.      On the ABAP Editor initial screen, enter the name of the program for which you want to create a variant, select Variants, and choose Change.
           2.      On the variant maintenance initial screen, enter the name of the variant to be created.
    Note the naming convention for variants (see below).
           3.      Choose Create.
    If the program has more than one selection screen, a dialog box for screen assignment appears. The dialog box does not appear if the program only has one selection screen. The selection screen appears in this case.
           4.      If there is more than one selection screen, select the screens for which you want to create the variant
    5.      Choose Continue.
    The (first) selection screen for the report appears.
    If your program has more than one selection screen, use the scroll buttons in the left-hand corner of the application toolbar to navigate between them and to fill the fields with values. If you keep scrolling forwards, the Continue button appears on the last selection screen.
           6.      Enter the desired selection values, including multiple selection and dynamic selection.
           7.      Choose Continue.

  • How to embed  a advance table region in a seeded page

    Dear Friends
    I need to add a custom region in a seeded page { (po requisition page in worklist)--   /oracle/apps/fnd/wf/worklist/webui/NotifDetailsPG  }
    I want to create a advance table region as custom region. CAN IT BE DONE THROUGH PERSONALIZATION?
    how to import this region .
    does it need apache bounce.
    Can u plz guide me how to achieve this.
    let me know for any clarification, plz help.
    Thanks
    Aravinda

    Hi Jyothi
    Can u plz explain in little detail.Shall I start with custom workspace and jpr or with std. path.
    I created a workspace xxom.oracle.apps.fnd.wf.worklist.webui
    and created vo,am and co .and where i have to move all these classfiles , how the seeded page will take my custom region.
    and how to import .can u plz give details.
    Thanks

  • ADF -11g : Question on how to create a pivot table

    Hi,
    I am trying to create a dynamic pivot table (the number of column and row layers change for each request) and I cannot use a data base structure to back it up.
    I thought of doing it through a managed bean but in order to do it I need to know how to create the PivotTableModel.
    The pivot table model requires a data source object and I do not know how to create it to support multiple row and column layers.
    Is there a default data source object that I can extend, or better yet is there a written example on how to create a pivot table model using a managed bean.
    Thanks,
    Or
    Edited by: user638363 on Dec 18, 2008 7:02 AM

    Hi,
    beyond the documentation, the pivot table is described in
    http://technology.amis.nl/blog/2593/adf-faces-11g-reloading-the-matrix-using-the-pivot-table-component
    http://technology.amis.nl/blog/3786/creating-a-salary-heat-map-with-the-adf-11g-faces-pivottable-component
    http://technology.amis.nl/blog/3673/adf-11g-richfaces-a-closer-look-at-the-pivot-table-data-visualization-component
    I am not aware of any sample that directly meets your requirement
    Frank

  • How to create a custom function module with the records in SAP R/3?

    Hi All,
    How to create a custom function module with the records in SAP R/3? Using RFC Adapter I have to fetch the custom function module records.
    Regards
    Sara

    Hi
    goto se37...here u need to create a function group... then u need to create a function module. inside assign import/export parameters. assign tables/exceptions. activate the same. now write ur code within the function module
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/content.htm
    Look at the below SAP HELP links, These links will show you the way to create a Function Module
    http://help.sap.com/saphelp_nw04/helpdata/en/26/64f623fa8911d386e70000e82011b8/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/content.htm

  • How to create the custom table?

    Hi, how to create the custom table and how to integrate the table with defferent R/3?
    my requiremnt is i have to create the two tables and those i have to integrate with the existed R/3 and using those R/3 i have to update my custom tables .....can give me some idea?
    Tks
    DPk

    how to create the custom table
    There are two approach in creating a table.
    1. Bottom-up approach
    2. Top-down approach.
    Both are valid and you can choose which approach is suitable for you. I always use the bottom-up approach. Here are the steps to create the tables with this approach.
    1. SE11 will take you to the DDIC and enter the name of the new table to be created. Let us say Zname. Click create.
    2. Enter the short discription of the table and enter the field of the table. If it is primary key and you have to check the box.
    3. Enter the data element and double click it, you will be asked to save and will take you to data element discription page. Enter the short discription of the data element and enter the information of domain like the length of field and type of field.
    4. If you wanted to use the existing domain then its fine, or else, you have to create one. Enter the domain name in the data element page and double click it. Page will ask to save and jump to domain creation page.
    5. In the domain page, you have to save the information which you have already given in the data elements page and check it. Before going to data element page, you have to activate the domain.
    6. Go to data element page and save, check and activate.
    7. Go to main table page and save, check, and activate.
    8. Also, you have to save the technical settings of the table.
    The table is now ready for operation. You can use it in your program or you can use it to enter information.
    Check table: It is the table which will have all the information about the Foreign keys which are the primary keys in the check table.
    It can be created by creating the foreign key from the main table. Click foreign key in the main table and it will take you to a page which will ask for table name and field to which foreign key relation has to be associated. Enter the information and you can create the check table automatically.
    SM30 is used for maintenance of the table, that is to realease the errors occured during the creation of the table.
    how to integrate the table with defferent R/3
    Transport the Table to the another server/client/qas/prd
    Kanagaraja L

Maybe you are looking for

  • Batch document title from file name?

    Forgive the newb question on a fairly simple matter. I want to create File Info: Document Titles from file names, minus the extension, for about 400 images. Is this possible with Batch rename, if so what am I missing? Thanks,

  • Issue with multiple attachments in email program

    Hi All, i need one program which sends 3 excel sheets as an atatchments. in these attachments data should be separated by tab. i am not able to find suitable program for the requirement anybody can send me the code . thanks, maheedhar

  • Ejecting a Firewire DV camera daisy chained vis a External Firewire HD

    I have my firewire DV camera daisy chained via my firewire external Hard drive. When I unplug my firewire dv camera, after a little while I get a message on my mac that a device was removed incorrectly and the external firewire dirve dismounts. This

  • Dual Boot Permission errors

    I just made the huge leap from a Dell Laptop to the Mac Book Pro and I can't be more thrilled about it! With change, obviously comes with some challenges, not the least of which is my lack of knowledge on the new platform. Because I had some programs

  • Read and Write iDVD trouble with backed up iDVD project

    Hey guys, I need to open an iDVD project file within my time machine backups for a previously existing user on an external backup hard drive. When I click it to open I get this message: "An error occurred while loading the project. This project seems