Create Table/View with Validity Date Control?

Hi,
does anyone know the easiest way for me to create a custom view that uses validity dates to control records by time periods, similar to time constraint 1 infotypes in HR?
For instance, if I define a table to store entries like so
Client (Key): 100
PSubArea (Key): C001
Grouping (Key): 01
End Date (Key): 99991231
Begin Date: 18000101
and I want to ensure that there can only be one record active on any given date, how can I prevent someone from creating a record from 20061107 - 20071107 that overlaps the existing record?
Is there a setting I missed?
Add conditions to generated view coding? Is there a good example?
Thanks

K, so I found these
<a href="http://help.sap.com/saphelp_nw04s/helpdata/en/91/ca9fb3a9d111d1a5690000e82deaaa/content.htm">SAP Help - Time-Dependent Table/View</a>
<a href="http://help.sap.com/saphelp_nw04s/helpdata/en/c1/df5c3c3b067331e10000000a114084/content.htm">Generate Time-Dependence</a>
I'll give it a whirl now.

Similar Messages

  • How to create table view with reference table

    Hi experts,
    How to create table view with reference table in SE11, plz gve me stp by stp procedure.
    pints grnded for hlp.

    Hi
    Go to Tcode se11 choose view and enter the name and create a popup opens up choose database view option
    enter the description
    On the left hand side choose the table name.
    Click on view fields tab and choose your table fields.Here you can choose which fields you want in your view.
    Save and then activate.
    Hope this helps.
    Regards,
    Harish

  • Creating a View with "clipped" data

    Hi all,
    I'm wondering if someone might know if it's possible to have clipped data in a view without clipping the original data that the view is drawing from.
    The problem we have is that we have a full dataset that we need to keep in a complete state (as a table in Oracle). We want to be able to create a View that will display a subset of data from this table, however, some of the objects in the full dataset cross a boundary and for these objects, we want the View to only show the part of the object within that boundary.
    I know we can clip the original layer but we ideally need to keep that layer untouched and do the clipping on-the-fly in the View. Is this possible?
    Thanks for any help you can give,
    Cheers, Paul

    Do you want to:
    create view my_clip
    as
    select a.id,
    a.attribute,
    mdsys.sdo_intersection(a.geometry,b.geometry,0.005) as geometry
    from mycliparea b,
    mytable a
    where sdo_anyinteract(a.geometry,b.geometry) = 'TRUE'
    Now this will work but to get performance you will have to do one of two things:
    1. Create a function based index. See doco or other postings in this forum for examples
    of how to do this.
    2. Change the view from an ordinary view to a materialized view. And then create
    a normal spatial index on the computed shape. (I recommend the use of
    these as against ordinary views.)
    However, Bryan is right, the problem with SDO_INTERSECTION is that it can return:
    1. Polygons;
    2. Lines;
    3. Points;
    4. Compound objects containing one or more of the above.
    If you want polygons only, then you need to extract them.
    <selfpromtion>
    I have written a set of extraction functions that do this which are available for free.
    Contact me at "spatialdbadvisor at netspace dot net dot au" or "simon at spatialdbadvisor dot com"
    </selfpromotion>
    The correct view definition using one of my functions would be:
    create view my_clip
    as
    select a.id,
    a.attribute,
    geom.ExtractPolygon(
    mdsys.sdo_intersection(a.geometry,b.geometry,0.005))
    as geometry
    from mycliparea b,
    mytable a
    where sdo_anyinteract(a.geometry,b.geometry) = 'TRUE'
    regards
    S

  • How To Create Table View With Same Column name But Different Table?

    Hi All,
    I have the problem to create a tableview with same column name but in different table.
    The Table that i have:-
    Table - PAC051MPROFORMA
    Column - mrn,visitid
    Table - PAC051TPROFORMA
    Column - mrn,visitid
    Table - PAC052MTRANSBILL
    Column - mrn,visitid
    Then i want to create a table view to view that table. This is my SQL
    CREATE VIEW pacviewproforma (mrn,visitid,mrn,visitid,mrn,visitid)
    As Select PAC051MPROFORMA.mrn,PAC051MPROFORMA.visitid,PAC051TPROFORMA.mrn,PAC051TPROFORMA.visitid,PAC052MTRANSBILL.mrn,PAC052MTRANSBILL.visitid
    where
    *(a.PAC051MPROFORMA.mrn=PAC051TPROFORMA.mrn)*
    and
    *(a.PAC051TPROFORMA.mrn=PAC052TRANSBILL.mrn)*
    That SQL Return this error = ORA-00957: duplicate column name
    Then I modify that SQL to
    CREATE VIEW pacviewproforma (mrn,visitid)
    As Select PAC051MPROFORMA.mrn,PAC051MPROFORMA.visitid,PAC051TPROFORMA.mrn,PAC051TPROFORMA.visitid,PAC052MTRANSBILL.mrn,PAC052MTRANSBILL.visitid
    where
    *(a.PAC051MPROFORMA.mrn=PAC051TPROFORMA.mrn)*
    and
    *(a.PAC051TPROFORMA.mrn=PAC052TRANSBILL.mrn)*
    This time this error return = ORA-01730: invalid number of column names specified
    What should i do?
    Thanks...

    Hi,
    SQL> CREATE VIEW pacviewproforma (mrn,visitid,mrn,visitid,mrn,visitid)
      2  As Select
      3  PAC051MPROFORMA.mrn,
      4  PAC051MPROFORMA.visitid,
      5  PAC051TPROFORMA.mrn,
      6  PAC051TPROFORMA.visitid,
      7  PAC052MTRANSBILL.mrn,
      8  PAC052MTRANSBILL.visitid
      9  from PAC051MPROFORMA,PAC051TPROFORMA,PAC052MTRANSBILL
    10  where
    11  (PAC051MPROFORMA.mrn=PAC051TPROFORMA.mrn)
    12  and
    13  (PAC051TPROFORMA.mrn=PAC052MTRANSBILL.mrn);
    CREATE VIEW pacviewproforma (mrn,visitid,mrn,visitid,mrn,visitid)
    ERROR at line 1:
    ORA-00957: duplicate column namePlease give different names to each column.
    Something like this..
    SQL> CREATE OR REPLACE VIEW pacviewproforma (MPROFORMA_mrn,MPROFORMA_visitid,TPROFORMA_mrn,TPROFORMA
    _visitid,MTRANSBILL_mrn,MTRANSBILL_visitid)
      2  As Select
      3  PAC051MPROFORMA.mrn,
      4  PAC051MPROFORMA.visitid,
      5  PAC051TPROFORMA.mrn,
      6  PAC051TPROFORMA.visitid,
      7  PAC052MTRANSBILL.mrn,
      8  PAC052MTRANSBILL.visitid
      9  from PAC051MPROFORMA,PAC051TPROFORMA,PAC052MTRANSBILL
    10  where
    11  (PAC051MPROFORMA.mrn=PAC051TPROFORMA.mrn)
    12  and
    13  (PAC051TPROFORMA.mrn=PAC052MTRANSBILL.mrn);
    View created.
    SQL> DESC  pacviewproforma;
    Name                                      Null?    Type
    MPROFORMA_MRN                                      NUMBER
    MPROFORMA_VISITID                                  NUMBER
    TPROFORMA_MRN                                      NUMBER
    TPROFORMA_VISITID                                  NUMBER
    MTRANSBILL_MRN                                     NUMBER
    MTRANSBILL_VISITID                                 NUMBER
    ORA-01730: invalid number of column names specifiedThe list of column nmae you specified during the CREATE VIEW should match with the SELECT list of the view.
    Twinkle

  • Creating table view with text descriptions

    Hello everyone,
    I need to create a table view to a table ZMATERIAL (example) that needs to enter MATNR and MAKTX. But when i insert the material number and press enter, the view should automatically search the text description MAKTX of that material on it's respective table.
    How can i do this ?
                 Thank you,
                     Nuno

    Hello Nuno
    Most likely my variant works only for a single material number. In this case you have to use table maintenance events:
    <a href="http://help.sap.com/saphelp_47x200/helpdata/en/91/ca9f0ea9d111d1a5690000e82deaaa/content.htm">Extended Table Maintenance Events</a>
    Probably you have to use two or three events:
    <b>- Event AA: Instead of the Standard Data Read Routine</b> (Here you read to material texts for both possible materials per record)
    <b>- Event 05: When Creating a New Entry</b>
    <b>- Event 08: After Correcting the Contents of a Selected Field</b> (when the user changes the second material number)
    Regards
      Uwe

  • Creating Table View's with more than one table

    I have two custom tables. 
    Table A has 2 fields:  Code and Description
    Table B has 4 fields:  Code, Country, Emp Group and Personnel Area
    I would like to build a view which has:  Code, Description, County, Emp Group and Personnel Area.  This view should be able to pull in the Description from Table A when the user enters in the Code.
    I have created a view with SE11 and have put both Table A and B with joins as follows:  A Code = B Code.  Under the view fields I have put the fields B.Code, A. Description, B.Country, B.Emp Group and B.Personnel Area.
    When I generate this view (Utilities, Table Maintenance Generator) it only shows the Code and Description field.  It does pull in the Description automatically which is great.  The issue is 2 things 1) The Description can be changed and 2) The other fields I specified above are not included on the view (e.g., Country etc.)
    Any ideas?

    I have checked several times that it is against the view as it is so strange that not all of the fields are appearing.
    I go into SE11, Click on View, Type in the View Name and then Change.  I goto into Utilities, Table Maintenance Generator and select it as one Step and then click on the Create Button.  When I go into SM30 I only see the 2 fields?

  • Java.lang.NullPointerExecption error with ExecuteWithParam data control

    Hello,
    my application has a database connexion ; with the wizards, I made a Businness Components from Tables ; after that, I've changed the querry of my one and only View (btw, there are 4 entity objects). I put on a view criteria with a bind variable and the query in the xml file view is like this :
    SELECT CRAH.JOURINPUT,
    CRAH.CODEPROJET,
    CRAH.CODEANA,
    CRAH.DUREE,
    CRAH.DESCRIPTION,
    CRAH.IDUSER
    FROM CRAH CRAH
    WHERE Iduser=:VarIduser
    In my jsf page, I've dragged and dropped the ExecuteWithParams data control (in the same view as above) as an ADF Parameter form. I finally create an ADF table by dragging'n'dropping this very same view's datacontrol.
    The problem is when I run, it works!!! but after like 2 click on the execute with parameter button, I get a java.lang.NullPointerExecption for every attribute in the table.
    Could anybody gets me a piece of advice on this ? The thing is it works when I test with the Application Module. What's the problem here ?

    Hello.
    Well, even with a simple EO/VO for a single table, one view criteria and its bind variable, I get the same error. It still works in the AM test run. I get this error message in the embedded OC4J log :
    08/07/09 09:19:20 [757] **** refreshControl() for BindingContainer :oracle_jbo_uicli_binding_JUFormBinding_140
    08/07/09 09:19:20 [758] DCUtil, returning:oracle.adf.model.binding.DCParameter, for AMCADataControl
    08/07/09 09:19:20 [759] Reusing DC transform for AMCADataControl_sessiondef.view_pageDefs_view2PageDef_VOCA1_0_DynamicRegion
    08/07/09 09:19:20 [760] INFO: getDCKey for data.view_view2PageDef yielded view.DataBindings.cpx
    08/07/09 09:19:20 [761] variables variables passivated >>> ExecuteWithParams_CAVAR=FG
    08/07/09 09:19:20 [772] WARNING: data control: oracle_jbo_uicli_binding_JUFormBinding_140 is unknown in: view.DataBindings.cpx
    08/07/09 09:19:20 [773] INFO: getDCKey for data.view_view2PageDef yielded view.DataBindings.cpx
    So, do you think I did something wrong with the data control ? Because the problems core seems to be here. The thing is that they are automaticly created... so is there something else to do ?
    Frédéric

  • How to create table view

    Dear Experts,
    how to create table view for single table? and once I create table view I have to create Generic data source so plz provide me the step to create it.
    Please search the forum before posting a thread
    Edited by: Pravender on May 6, 2011 11:18 AM

    Hi,
                         There is big advantage of creating a view for single table rather than RSO2.
                My scenario is like this  : My table VBAK has 113 fields i want only 9 fields from them.
                         RSO2: By doing generic extraction with RSO2 it will fetch all 113 fields from the table VBAK.So,it'll definitely degrades the performance . For transferring 9 fields why we have to fetch all 113 fields.
                         VIEW: By using view we can specify some fields in view fields.So, only those 9 fields will be fetched from table.  In this extract structure contains 9 field transferring 9 fields.Then we can create generic extraction using this view.
    Regards
    satya.

  • Need help in creating a view with Encryption for hiding the code used by the multiple users

    Hi,
    Can anyone help me out in creating view with encryption data to hide the stored procedure logic with other users.
    I have create a stored procedure with encryted view but while running this manually temporary views are getting created, therefore the problem is if there are 500 entries then 500 temp views will get created.
    Any solution to aviod creating temporary views, please refer my code below
    USE [etl_validation]
    GO
    /****** Object:  StoredProcedure [dbo].[Pr_DBAccess_mod]    Script Date: 05/23/2014 12:53:22 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER PROCEDURE [dbo].[Pr_DBAccess_mod](@ETL_CONFIG_ID INT)
    AS
    BEGIN
    DECLARE @openquery NVARCHAR(MAX),
     @DATABASENAME NVARCHAR(100),
     @HIERNAME NVARCHAR(100),
     @TABLENAME NVARCHAR(100),
     @SERVERTYPE NVARCHAR(100),
     @SERVERNAME NVARCHAR(100),
     @USERNAME NVARCHAR(100),
     @PASSWORD NVARCHAR(100),
     @ETL_CONFIG_IDN NVARCHAR(100);
     SET @ETL_CONFIG_IDN=CAST(@ETL_CONFIG_ID AS NVARCHAR);
     SET @TABLENAME='Department';
     SET @SERVERTYPE='SQL';
     SET @SERVERNAME ='192.168.31.176';
     SET @DATABASENAME='AdventureWorks2008R2';
     SET @HIERNAME = 'HumanResources';
     IF @SERVERTYPE='SQL'
     BEGIN
    /*SET @openquery= 'SELECT * INTO ##TestTable
                     FROM OPENROWSET(''SQLNCLI'',''server=192.168.31.176;Trusted_Connection=yes;'','''+@query+''')'
    SET @openquery=  'CREATE VIEW '+@TABLENAME+@ETL_CONFIG_IDN+
                     ' WITH ENCRYPTION AS SELECT * FROM OPENROWSET(''SQLNCLI'',''SERVER='+@SERVERNAME+';TRUSTED_CONNECTION=YES;'',''SELECT * FROM '+@DATABASENAME+'.'+@HIERNAME+'.'+@TABLENAME+''')'
    SELECT @openquery
    END
    EXECUTE sp_executesql @openquery
    END

    Hi aa_rif,
    According to your description and code message, you execute the sp_executesql statement in your stored procedure, it indeed create many views with a tablename and ETL_CONFIG_ID named. If you need not to use these temporary views, you can delete them when
    it contains the tablename in one view name.  
    In addition, if you want to create view with encryption in SQL Server, you can use directly the ENCRYPTION option to encrypt the T-SQL of a view in create view commands, for more information, see:
    http://learnsqlserver.in/4/Create-View-With-Encryption.aspx. if not, you can descript more detail about requriements, so that more forum members can involve into the thread and help you
    out. 
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • ALE BOM. Updates ALL! items with validity date & change no.

    Hi All,
    We are having problems where ALE-BOM sent with change in validity date (with change no) to a particular item. What happens is that ALE-BOM will instead update ALL! items with the same validity date and change number.
    Next,when we process ALE again for the same BOM with a different validity date(with change no), then only that
    particular item is updated with validity date and change no.
    Would anyone know what could be the problem that when changes are sent for the first time all items are updated?
    [Version: SAP 4.6C/ SAPKH46C48]
    Regards,
    Neeth

    Dear:
                   The error itself telling you the correction. You profit center which is assigned to your cost center has a validity date less than the one you are now assigning.You can check in KE52 against the profit center assigned to your cost center master data. However the best thing is to go to KS01 and create this cost center with desired validity date.
    This will resolve your issue.
    Regards

  • How to create a view with a column of counts of the occurence of values

    If my table is:
    ID
    1
    2
    3
    3
    5
    5
    5
    I want to create a view with the following result:
    ID   COUNT
    1     1
    2     1
    3     2
    5     3
    How would I accomplish this?

    Sorry, my mistake. I was thinking about counting distinct events.
    I created a table with your example values:
    You should do a projection with a calculated column = 1:
    And then add this calculated column as an aggregated measure on the aggregation node:
    Result:
    Cheers,
    Fernando

  • How to create a view with parameters; read the documentation but nothing!

    Hello!
    I'm new to the Oracle world but together with my coworkers we need to very quickly study Oracle to figure out whether we'll add Oracle to our list of supported databases or not.
    Question: How do I create a view with parameters?
    I've read the documentation but I could not find this! I found the sql syntax to create a view but no parameters whatsoever...
    I have found on the web some very complicated way of doing this, but doesn't Oracle support Views with parameters?
    The goal here is to return a recordset, don't forget, so,please don't speak about stored procedures unless you are going to tell me how to get a recordset out of a stored procedure! ;)
    Thanks for all your help and attention!
    Jorge C.

    You can set up a parameterized view via context as follows:
    1. Set up a procedure to set your context values:
    create or replace procedure p_set_context (p_context IN VARCHAR2,p_param_name IN VARCHAR2,p_value IN VARCHAR2)
    as
    BEGIN
    sys.dbms_session.set_context(p_context,p_param_name,p_value);
    END;
    2. Create your context using the procedure you just created
    create or replace context my_ctx using p_set_context
    3. This is the test table I'll use
    create table my_table(col1 number)
    and populate it:
    begin
    for v_index in 1..10
    loop
    insert into my_table values(v_index);
    end loop;
    end;
    and the view that will be parameterised
    create or replace view v_my_table as select col1 from my_table where col1 between sys_context('my_ctx','start_range') and sys_context('my_ctx','end_range')
    4. Now set the parameters using the procedure above.
    begin
    p_set_context('my_ctx','start_range','1');
    p_set_context('my_ctx','end_range','5');
    end;
    5. Selecting from my_table will give you 1 to 10 (no surprise there :-) )
    selectng from v_my_table will give you 1 to 5
    You can use the context to set formats etc using the same principle. A common gotcha to watch for is trying to set the context directly using DBMS_SESSION.SET_CONTEXT instead of creating a procedure. This belongs to SYS and SYS won't have the privileges to set your context so you get an insufficient privileges result leading to much headscratching and unnecessary grants (at least that's my understanding of it).
    Sorry Jorge, as you're new to Oracle I should also have pointed out for completeness sake, that you can change the parameters at any time through recalling the p_set_context, for example, following on from above, after your "select * from v_my_table" and seeing 1 to 5, you could then do
    begin
    p_set_context('my_ctx','start_range','3');
    end;
    and when you requery 'Select * from v_my_table' you will now see rows 3 to 5.
    Bit of a simplistic example, but you can see how easy it is. :-)
    Message was edited by:
    ian512

  • Create a View with Aggregation Function (COUNT)

    I've been looking up and down for a way to create a view with a few basic fields and some other fields containing aggregation function.
    For instance:
    To display a view that contain all the Contract Agreement and the corresponding count of the PO releases.
    Agreement Nbr, Total PO releases
    I need this view so that I can create a search help with this view.
    I found something about the "CREATE VIEW" statement, but I don't have any idea how to use it.
    Any helps toward this matter is very much appreciated, thanks.

    Hello Aldern
    I guess you have read about the SQL statement "CREATE VIEW". When we create a view in the dictionary this SQL statement is finally called to create the view on the DB. Thus, since we do not have any aggregation options in views you cannot achieve what you want using views.
    The solution for your problem is to create a <b>search help</b> having a <b>search help exit</b>. Within the exit you can do your aggregation functions and add these values to the displayed search help data.
    Regards
      Uwe

  • Creating a view with a primary key

    I want to create a view with a defined primary key. I understand
    the view is created within a select statement, but do not
    understand how you would define a particular field as a primary
    key in the view. Also if your select statement attempts to build
    the view and has duplicate keys in the select result set, what
    would happen when the duplicate key is found? Would it just not
    include the duplicate key in the view?
    Thanks in advance for your help.
    -Pat

    I have a rather difficult problem with duplicate invoice numbers
    contained in unique records. In other words I have many records
    that appear as follows:
    3593, 0004009090, CUSTOMER, TAX, 20000117,014011976-01
    4411, 0004009090, CUSTOMER, TAX, 20000718,014011976-01
    The last field is invoice number '014011976-01' In my case I am
    building a flat file using UTL_FILE for loading into SAP
    Business Warehouse. In SAP I need to have Invoice number as a
    key in which case I can't have duplicate invoice numbers. All
    the SQL I have tried to date returns a large amount of records
    similar to the above records. I am selecting these records from
    4 different schemas which represent 4 different companies. I
    realize the data is the problem and that the vendor of the
    product I am working with should not allow records with
    duplicate invoice numbers, but I have to get the data loaded as
    that is what they want and are paying for. So back to my View. I
    was hoping to create a view and be able to work in the view to
    remove duplicate records prior to writing them to a file. Any
    suggestions are welcomed.
    Thanks
    -Pat

  • Table View with Multiple Context Nodes

    I want to create a table-view consisting of an object composition, e.g. multiple business objects. The chtml:configCellerator -tag supports just one context node which corresponds to just one business object.
    How do you create a table composed by different objects, i.e. BTAdminH and BTAdminI ?
    Edited by: romanglass on May 18, 2010 4:07 PM

    Hi,
    I would suggest to create a new component and not to disturb the standard ones. Because the super class of the header context node (BTAdminH in your case) must be inherited from CL_BSP_WD_CONTEXT_NODE_DTV - Deep table view.
    The dependent nodes must be passed to return parameter rt_result of method GET_SUB_CNODE_DEFINITIONS.
    This cant be done via wizard. I just tried to replicate your scenario. Below are the steps,
    1. create a view with context node BTADMINH as tableview. Then change the super class of the context node to   CL_BSP_WD_CONTEXT_NODE_DTV.
    2. Add another context node BTADMINI and mark it as dependent to BTADMINH.
    3. Now change the super class of context node BTADMINI to CL_BSP_WD_CONTEXT_NODE_TV  (Table View).
    4. Redefine method GET_SUB_CNODE_DEFINITIONS in context node BTADMINH.
    In the view layout you should use cellerator and pass an iterator with interface IF_THTMLB_CELLERATOR_ITERATOR. The interface has a method RENDER_DEPENDANT_OBJECTS which returns the table of dependant objects.
    Regards,
    Arun
    Edited by: Arun Kumar on May 19, 2010 1:01 PM

Maybe you are looking for

  • Display tree hierarchy in adobe print form scenario

    Hi Can someone suggest what is the best way to create a tree structure in adobe print scenario ? can we display icon also next to the text in the tree. For example I want to get folder and file icons also along with their names in hierarchial manner.

  • Display a web page in Keynote

    I have a keynote presentation that run automatically each day in my library. It would be great if a web site like Today in History could be displayed on a keynote page. I could paste it in, but that would require changing the paste each day. Is there

  • Problem in using quick and advanced search based on transient items

    Hi everybody I want to have an unbound string item in my form and allow users to use advanced search and quick search on that item. I read the following post About advanced search and added a transient item on view object and overrode the advance sea

  • Burning dvd of photos

    I made an iDVD using photos and tried to burn it to a DVD-R. For some reason I'm getting this error- There are no video tracks defined in the current project, error in product structure. Im new to using iDVD, can someone tell me what I need to do? Th

  • Video Tearing in Keynote 08

    As the title says I'm getting tearing when using such slide transitions as the cube. Anyone familiar with v-sync in games will know that this is the option that normally stops this happening. Anyone else getting this or know of a solution?