Build a custom based view where rows are columns in view

Bit of an odd request but here goes.
We have a system whereby we want to give users the ability to add their own fields against our tables. Because we do not want to create columns in each table we had the thought of creating a table that contains rows that will act as custom fields without the need to create columns/tables.
For example the 3 types of fields they can have are DATE, VARCHAR2, NUMBER. All three of these are stored in one table as VARCHAR2 with the application validating the data is in correct format and a link to the other tables Primary Key. The user gives the custom field a name i.e. column name and type on setup.
This all works fine in the application but what i need to do is build up a view of what is held in the table and create a new column for the view based on column name, value based on example_Data and have the correct column_type in view.
For example this is an example of our table with only 3 rows in. It can have many more of the three mentioned types.
SELECT * FROM
          SELECT 'LINK_TO_OTHER_TABLE' LINKPK,'DATEEXAMPLE'column_name,'01-01-11 12:00'example_Data,'DATE' column_type FROM DUAL
          UNION
          SELECT 'LINK_TO_OTHER_TABLE' LINKPK, 'VARCHAREXAMPLE'column_name,'This is my data'example_Data,'VARCHAR2' column_type FROM DUAL
          UNION         
          SELECT 'LINK_TO_OTHER_TABLE' LINKPK, 'NUMBEREXAMPLE'column_name,'1234'example_Data,'NUMBER'column_type FROM DUAL         
          )What i want is to create a VIEW based on this table structure above that will give me a view structure of:
LINKPK VARCHAR2,
DATE_EXAMPLE DATE,
VARCHAREXAMPLE VARCHAR2,
NUMBEREXAMPLEThen when i so a select i get 1 row of
'LINK_TO_OTHER_TABLE','01-01-11 12:00','VARCHAREXAMPLE',1234Hope ive made sense. Thanks in advance of any comments.

Oh dear, that is a little scary!
Our application (built in forms) has a massive heirarchical database structure and althought we are only likely to see approximately 1-10 rows of data in this table I see this may still have a bearing on the speed etc.
We were trying to make it easier to add custom fields to our front end application (built in forms) rather than the standard method of adding another column to the DB and adding the the form itself.
I thought with the minimal rows being inserted (and forms handling the link to the PK via relationship) it wouldnt impact too much on the rest of the system.
Thanks for your input

Similar Messages

  • Using filters in custom library/viewer

    I'm building a custom library/viewer using the sample files from Derek Lu's article "Creating an HTML implementation of the DPS default library" as a base. It's a great way to get started! What I would like to do is add functionality to use the filter-functions present in the default library/viewer. Does anyone know if there is a way to get hold of the source-code for the default viewer or if anyone know of any documentation that could assist me in this? Has anyone in here experience in building a custom library/viewer with filter-functionality?
    Big thanks for all help I can get :-)
    / Johan

    I'm building a custom library/viewer using the sample files from Derek Lu's article "Creating an HTML implementation of the DPS default library" as a base. It's a great way to get started! What I would like to do is add functionality to use the filter-functions present in the default library/viewer. Does anyone know if there is a way to get hold of the source-code for the default viewer or if anyone know of any documentation that could assist me in this? Has anyone in here experience in building a custom library/viewer with filter-functionality?
    Big thanks for all help I can get :-)
    / Johan

  • Function module to find the Credit limit of a Customer based on Credit Area

    hi Experts,
                       Is there any function module to find the Credit limit of a Customer based on Credit Area.
    Regards,
    Dheepak

    hi
    try this:
      select single * from KNKK INTO zzKNKK
          where KUNNR = xkunnr and KKBER = xkkber.
    credit limit: zzKNKK-KLIMK...
    regards,darek

  • Can i view & analysis the customer report asper the sales area wise how?

    can i view & analysis the customer report asper the sales area wise how?

    Hi,
    If you are talking about FBL3N or any other FI customer subledger report, then Yes and No.  If you have customers extended to multiple sales area, then no, if there is a one to one relationship with the sales area then yes.
    Cheers.

  • Get only the rows where there are no matches in the tables

    To include in the results of a join with no matching rows, you can use a full outer join. In MS SQL Server provides the FULL OUTER JOIN operator, which allows you to include all rows from both tables, regardless of the presence or absence of values.
    You can add a WHERE clause in a FULL OUTER JOIN to get only the rows where there are no matches in the tables. The following query returns only those products for which there are no matches in the sales order.
    SELECT p1.Name, p2.SalesOrderID
    FROM  TAB1 p1
    FULL OUTER JOIN TAB2 p2
    ON p1.ProductID = p2.ProductID
    WHERE p1.ProductID IS NULL
    ORDER BY p.Name ;
    FULL OUTER JOIN is not supported in ABAP.  How can you solve this?
    Thanks in advance,
    Serena

    Similar problems can often be solved by using subqueries, please have a look here and try applying it.
    http://help.sap.com/abapdocu_702/en/abenwhere_logexp_subquery.htm
    Thomas

  • On tab pages, where tabs are children of home page ... how2insert rows?

    We show the key on the parent tab ... we navigate to child tabs, and proper child rows are all there.
    We click insert and it seems to allow entry. We click Submit, we get error that the parent key field is blank, so can't do insert.
    So ... how to make that parent key persist on each child tab?
    The tabs know the key is there, because they successfully show the children, and only the children. And when you click on a different parent on the row listing of the main home page, then go to child, only that new row's children show up (my intern did the links, I can't speak for precisely how he did this, but we're talking meat and potatoes, not wizardry).
    Any records entered on a child tab should be a child of the clicked home parent, and no other record (one must start with parent before going to child) ...
    Is there a way to get the parent key to persist?
    (child tabs typically have two columns making up the primary key, the parent key (as a foreign key) and something unique to that tab ... e.g., line number, or xref code, or id_link ... these tables / keys all work just fine at the SQLplus level and via Oracle Forms, so data model per se is fine.)
    Any / all clues / info / links to docs will be met with much gratitude.
    Suzanne

    Suzanne:
    It would make it easier for your problem to be understood/resolved if you could create a example of the issue you are encountering at the OTN APEX site.
    Given the information you have provided, and assuming that the 'DML' for child records is handled by the standard APEX Automatic DML processing page process, I'd suggest you take a look at the definition of this process and determine how the PK for the child record is obtained.
    Varad

  • Can I build report based on 2 subject areas?

    Hi,
    How can I build report or analytics basedon 2 subject areas.
    Example:
    I have opportunity-Products and Activities
    Thanks
    Pallavi

    1. I would suggest you create a Union Report. This could be little confusing
    2. Another way would be to create a dashboard report that would show both

  • How to populate a table based on a row selection from another table.

    Hi, i just started to use ADF BC and Faces. Could some one help me or point me a solution on the following scenario .
    By using a search component , a table is being displayed as a search result. If i select any row in the resulted table , i need to populate an another table at the bottom of the same page from another view. These two tables are related by primary key . May i know how to populate a table based on a row selection from another table. Thanks
    ganesh

    I understand your requirement and the tutorial doesn't talk about Association between the views so that you can create a Master-Detail or in DB parlance, a Parent-Child relationship.
    I will assume that we are dealing with two entities here: Department and Employees where a particular Department has many Employees and hence a Parent-Child relationship.
    Firstly, you need to create an Association between the two Entities - Department and Employees. You can do that by right clicking on the model's entity and then associating the two entities with the appropriate key say, DepartmentId.
    Once you have done that, you need to link the two entities in the View section with this Association that you created. Then go to AppModule and make sure that in the Available View Objects: 'EmployeesView' appears under 'DepartmentView' as "EmployeesView via <link you created>". Shuttle the 'DepartmentView' to the right, Data Model and then shuttle
    "EmployeesView via <link you created>" to the right, Data Model under 'DepartmentView'.
    This will then be reflected in your Data Controls. After that, you simply would have to drag this View into your page as a Master-Detail form...and then when you run this page, any row selected in the Master table, would display the data in the Detail table.
    Also, refer to this link: [Master-Detail|http://baigsorcl.blogspot.com/2010/03/creating-master-detail-form-in-adf.html]
    Hope this helps.

  • Infopath to design WYSIWYG Custom List Views on 2013

    We are migrating to SPO 2013.  Playing with InfoPath 2013.
    I know it's dieing, but InfoPath has always frustrated me.  Some much potential yet so out of touch with what users seem to need IMO.  Far from user friendly enough to let users maintain their own forms too IMO.
    But really my biggest gripe with SharePoint in general is that it misses the mark with Custom lists and Views.
    Why doesn't SharePoint and/or InfoPath address the need for more flexibility and Design options in the Custom List View. My users are constantly looking to build View pages that to reflect paper forms they use to have.  They always seem to
    have to settle for the way the list view looks.  InfoPath does not seem to address Read Only Views of List Data ??
    - No List Mode (View vs Edit)
    - No Label control
    - Field Names do not display unless you hover over the control. 
    - No WYSIWYG drag and drop designer - only grid cells.
    - No easy or clear way to get URL Query string values
    - No way to build complex expression fields, say I want to build a URL Link using some list field data and the ID from the URL query string on the form? Possible?
    - Better/easier way to join and bind in multiple Lists and multiple data sources?
    One other challenge we have is that SSRS can't be integrated into SPO and is being dropped from Azure.  The SSRS designer is leaps and bounds better than InfoPaths IMO.
    Considering SPO 2013, might there be another product or IDE coming in (maybe FoSL) that will address all of these? How about Visio, Excel, PDF
    Thank You.

    Thank You for your response.
    A little of both :)   ... But am very interested in hearing about practical development options.  But the catch is that we are waiting to see if something shows up that will enable users to build these views without development.
    I have been seeing new Apps show up on the o365 store that look promising, but none of them are quite there yet IMO ...  like Ninetex forms, Lightning Data Viewer, BlackCompass Data Viewer, List Designer, OData query Builder.  We've
    actually demoed every single one of them.
    We have also been playing with oData Connections from Excel and Visio web Access Web parts.  We can't get Data connections to refresh from Excel apparently unless we buy Power BI and we are still trying to figure out Visio on SPO.
    I know we can create a SharePoint 2013 App that binds in SPO List data and use .NET controls to arrange them on a page.  But that would put a developer and a deployment process in front of that View.  We can also use SSRS and create a one row report
    - but SPO does not support integrated SSRS and we would have to authenticate  on-Prem SSRS against  ADFS which we have not yet configured here.

  • Finding custom prices for customer based on district (abap-query).

    Hello.
    I can find in table A601-BZIRK the District-number, which i also can find on the customer in BP in CRM (we have both CRM and ERP).
    I want to make a query in SQ02, where i enter the customer-number, and gets the list of materials they have custom prices for, based on the district number.
    Sorry bad english. Tell me if there is something more you need to know
    Points will be awarded.
    Thanks.

    Hi,
    The answer to your query is 'Yes'. You need to design a 'UPDATE' metadata type custom integrator. The custom integrator shall use a parameter based view to first download data and then use a PL/SQL wrapper/API to re-upload it back. The brief steps are listed below:
    1. Create a 'UPDATE' metadata type custom integrator. Give a parameter list name, std/custom view for data download and a PL/SQL wrapper.
    2. Create a form function and associate the form function with the custom integrator created.
    3. Add the form function to the std WebADI menu for access.
    4. Define a layout for the custom integrator defined.
    4. To create a parameter use the standard integrator 'HR Standalone Query'. As a part of this integrator you can define the SQL WHERE clause (parameter based) that you will like to use with the custom/std view defined in the custom integrator definition.
    Note: You can use a max of 5 parameters only. For each parameter, one needs to define the datatype and also the HR standalone query has a size limitation of 2000 chars in 11i10. You increase this length you may apply patch - 3494588 to get 4000 chars.
    Hope this information helps.
    Thanks,
    Nitin jain

  • Inserted rows are not sorted in ascending order

    Hi,
    in my code when i click on a button (UpdateSchedule) certain rows are displayed in the result table. My problem is the displayed data is not in ascending order I know by keeping sort enable on a particular field we can sort the data as req. But the first time the result which is displayed is not an ascending order , i want to tackle this issue.
    As whatever rows are displayed are not yet committed in database so modifying the query using order by clause also wont solve the issue . This data gets committed on a click of another button(ok).Can this be tackle programmatically ?
    I hope i have given proper elaboration of the issue.
    Regards,
    Anant.

    Reading this from Javadoc and understanding your requirement makes me feel that achieving it would not be easy, or may not be possible at all unless FWK provides some override to these rules.
    Restrictions & limitations:
    Sorting is performed by requerying the database.
    May not work well with view objects (VOs) that contain custom 'expert-mode' SQL. Basically the VO.setOrderByClause() is invoked on the VO using the column name associated with this web bean. An alternative for 'expert-mode' SQL may involve overriding the view object setOrderByClause() and performing custom logic. Note: The orderByParameter will be the column name plus either " desc" or " asc".
    Will not work with view objects that contain the view attribute expression "See the SQL...". To sort on these view attributes, modify the VO XML directly and change the view atttribute expression to the SQL column name.
    Sorting is not allowed for tables that allow inserts.
    Sorting is not supported for tables containing updateable columns (unless the updateable columns are mapped to transient VO columns.) No exception is thrown if the table contains updateable columns, since there may be a rare case when it makes sense, for example a table where the contents fit on one page.
    Modified transient columns will be reset. This is normal and expected behavior.
    Sorting is not supported on the 'Select' column - this is the first column of a table when it contains a checkbox or radio button.
    The table bean will invoke the following two methods on the view object to perform sorting. Debugging can be performed by setting a break on these methods on the VO (or a superclass of the VO.)
    viewObject.setOrderByClause(orderByClause);
    viewObject.executeQuery();
    Thanks
    Tapash

  • How to create wizard for a custom mainenance view/view cluster

    Hi Experts,
    I have created 5 custom maintenance view and have maintained all the views sequencially and have made the first mainenance view as the start view & header entry and all other views are child or subview of the header view in a custom view cluster. But I want a wizard to help the user / end user successfully enter all the required values for all child views, it will help  the user to navigate  from the start view to all the child views where the fields of the wizard will be associated to the child maintenance views.
    Please suggest how to create wizard for view cluster.
    I'll give max reward point for the helpful answer.
    Thanks in advance
    koustav

    Hello Pasapula
    When you are in the View Cluster maintenance dialog (SE54) click on dialog "Events".
    Below the field for the view cluster you have an additional field <b>FORM routines main program</b>. There you have to add the main program containing the FORM routines called by the VC events.
    For example: I had defined a normal report containing an include with all the FORM routines. The report contains only the following lines of coding:
    report zus_0120_u1.
    * Common Data und access routines for user exits in VC maintenance
    include LSVCMCOD.
    include  zus_0120_f1. "FORM routines for VC events
    Now in the "Events" dialog of the view cluster maintenance you assign your FORM routines to the events.
    Regards
      Uwe

  • How to build sql query for view object at run time

    Hi,
    I have a LOV on my form that is created from a view object.
    View object is read-only and is created from a SQL query.
    SQL query consists of few input parameters and table joins.
    My scenario is such that if input parameters are passed, i have to join extra tables, otherwise, only one table can fetch the results I need.
    Can anyone please suggest, how I can solve this? I want to build the query for view object at run time based on the values passed to input parameters.
    Thanks
    Srikanth Addanki

    As I understand you want to change the query at run time.
    If this is what you want, you can use setQuery Method then use executeQuery.
    http://download.oracle.com/docs/cd/B14099_19/web.1012/b14022/oracle/jbo/server/ViewObjectImpl.html#setQuery_java_lang_String_

  • Custom secure views report is not restricting the data

    Hi,
    I have created few custom secure views reports and in which I have used the per_people_f , per_assignments_f secure views but when I am running this report from different responsibilities like (US Resp, UK Resp) it is producing the same number of records. From US resp it should produce the US employees and from UK it should produce the UK employees but this is not happening currently.it is a simple sql script which I registered as sql*plus executable.
    Can any one suggest if I am missing some thing? Urgent help would be appreciated.
    Thanks,
    Ashish

    Pl post details of OS, database and EBS versions. How have you implemented security ? What kind of concurrent program are you using ? Pl provide details. Also see these MOS Docs
    How To Enable Hr Security on Custom Reports?          (Doc ID 369345.1)
    Understanding and Using HRMS Security in Oracle HRMS          (Doc ID 394083.1)
    Need Custom Security Profile To Restrict Based On Employees Organization          (Doc ID 445142.1)
    HTH
    Srini

  • Do I need to use a custom controller & view set

    Good Day,
    Please excuse the long question.
    I am in the process of creating a new BSP application.  In a nut shell, my application is going to accept a bunch of data in the URL and pass the data to an external system.  Depending on what is returned from the external system, it will prompt the user to either supplement the data or to confirm what the external system has sent back. 
    I would like to have all of the business logic that communicates with the external system and decides what type of user interaction to be located in one central class.  I was thinking that I could have a custom controller that is resident for the life of the application.  It would call the external system and navigate to other views depending on what is required.  When the user responds, the response would go to the custom controller and be sent to the external system.  So, my first question is does this sound reasonable?  For my second question, is it possible to have a view associated with the custom controller.  If so, I can use it for the confirmation "screen".
    While looking at the Web IC cookbook, I ran accross the section on view sets.  Are there pros and cons to using a vew set for an application like this?  I expect the browser window to contain one view at a time and it kind of seems like view sets may intended more for where there are several views displayed within the browser and the view set allows you to change only one.  Is that true?
    Thank you very much for any insight you can offer.  I promise to award points for helpful responses.
    Thanks and kind regards,
    John

    Hi John,
    My suggestions would be to use a model class for the business logic and call to the external system.  The controller would only be for eventing and determining what view to call.  I would create a parameter called view_name on the controller and toogle this between your views depending on what returns from your model methods.  As a personal preference I would pass the 'bunch of data' in the form rather than the URL.  Validate it in a model method before sending it to the external system.  I tend to use URL querystrings for small stuff rather than large application data.  Also what would happen to the application if someone saves your URL as a favorite and launchs the app.
    Those are my thoughts hope it was helpful.
    Regards
    Matt

Maybe you are looking for