How to add attributes to a DATS type characteristic

I need to add some attiributes to a 0CALDAY type of characteristic.  I need to be able to do automatic time conversion in my transformations (e.g. from Cal Day to Cal Month or Cal Year).  I also need to have intelligent variable offsets in my queries too (e.g. the month of January-01 with a negative offset of 1 would be 12, not 00). 
However I need to add some attributes to this Calendar Day characteristic such as "day of the week", "Week Number", etc...
I need this as attributes and not as seperate InfoObjects such as 0CALDAY, 0CALMON, AND 0CALYEAR.  I need to be able to use the same date throughout my entire report, but then using the nav attributes, restrict based on what they selected in the variable screen.

Hi Adam,
It is not possible to define your own time characteristics or add attributes to any time characteristic.
Time characteristics form the time reference frame for many data analyses and evaluations. They are delivered with Business Content.
Examples:
-->Timecharacteristic with the largest granularity: Calendar Day
(0CALDAY)
-->Time characteristic with the smallest granularity: Calendar Year
(0CALYEAR) or Fiscal Year (0FISCYEAR).
-Vikram

Similar Messages

  • How to set default value to date type attribute.

    Hi,
    How to set default value to date type attribute.
    E.g I want to set u201C01/01/1999u201D to date attributes.
    First i want to set value and then i want to fetch the same & want to check equals.
    please suggest solution.
    Regards,
    Smita

    Hi,
    In wdinit() method u can set the date
    DateFormat df = new SimpleDateFormat("MM/dd/yyyy");
    Date today = Calendar.getInstance().getTime();
    String reportDate = df.format(today);
    wdContext.currentContextElement().setFromDate(reportDate);
    Another way you have set the this formate like that
    1. Create a Simple type under "Dictionaries->SimpleType" called DateFormat
    2. Select the type as "date"
    3. Go to the "Representation" tab and set the format as "dd/MM/yyyy" (or whatever u want, but month should be MM)
    4.Bind the context attribute to the type created now.
    Hope this helps u.
    Best Regards
    Vijay K

  • New Effective CAL essay: How do I create an abstract data type in CAL?

      <p><strong>How do I create an abstract data type in CAL?</strong></p>  <p> </p>  <p>An <em>abstract data type</em> is one whose internal representation can be changed without needing to modify the source code of client modules that make use of that type. For software maintainability, it is a good idea to make a type that is subject to change or enhancement into an abstract data type. Another reason to create an abstract data type is to enforce invariants for values of the type that can only be ensured by using <em>constructor functions</em> (i.e. functions that return values of that type).</p>  <p> </p>  <p>In principle it is simple to create an abstract data type in CAL. For an algebraic data type, make the type constructor public and all data constructors private. For a foreign data type, make the type constructor public and the implementation scope private. If a scope qualifier is omitted, the scope is taken to be private.</p>  <p> </p>  <p>For example, the Map algebraic data type has the public type constructor Map and the data constructors Tip and Bin are each private, so it is an abstract data type.</p>  <p> </p>  <p>/** A map from keys (of type {@code k@}) to values</p>  <p>   (of type {@code a@}). */</p>  <p><strong>data</strong> <strong>public</strong> Map k a <strong>=</strong></p>  <p>    <strong>private</strong> Tip <strong>|</strong></p>  <p>    <strong>private</strong> Bin</p>  <p>        size      <strong>::</strong> <strong>!</strong>Int</p>  <p>        key       <strong>::</strong> <strong>!</strong>k</p>  <p>        value     <strong>::</strong> a</p>  <p>        leftMap   <strong>::</strong> <strong>!(</strong>Map k a<strong>)</strong></p>  <p>        rightMap  <strong>::</strong> <strong>!(</strong>Map k a<strong>);</strong></p>  <p><strong> </strong></p>  <p><strong> </strong></p>  <p>There are a number of invariants of this type: the size field represents the number of elements in the map represented by its Bin value. The keys in leftMap are all less than key, which in turn is less than all the keys in rightMap.  In particular, non-empty Map values can only be created if the key parameter type is a member of the Ord type class.</p>  <p> </p>  <p>Values of the Map type can be created outside the Cal.Collections.Map module only by using constructor functions such as insert:</p>  <p> </p>  <p>insert <strong>::</strong> Ord k <strong>=></strong> k <strong>-></strong> a <strong>-></strong> Map k a <strong>-></strong> Map k a<strong>;</strong></p>  <p><strong>public</strong> insert <strong>!</strong>key value <strong>!</strong>map <strong>= ...</strong></p>  <p> </p>  <p>The owner of the Cal.Collections.Map module must ensure that all invariants of the Map type are satisfied, but if this is done, then it will automatically hold for clients using this function.</p>  <p> </p>  <p>Some examples of foreign abstract data types are Color, StringNoCase  and RelativeDate:</p>  <p> </p>  <p><strong>data</strong> <strong>foreign</strong> <strong>unsafe</strong> <strong>import</strong> <strong>jvm</strong> <strong>private</strong> "java.awt.Color"</p>  <p>    <strong>public</strong> Color<strong>;</strong></p>  <p><strong> </strong></p>  <p><strong>data</strong> <strong>foreign</strong> <strong>unsafe</strong> <strong>import</strong> <strong>jvm</strong> <strong>private</strong> "java.lang.String"</p>  <p>    <strong>public</strong> StringNoCase<strong>;</strong></p>  <p><strong> </strong></p>  <p><strong>data</strong> <strong>foreign</strong> <strong>unsafe</strong> <strong>import</strong> <strong>jvm</strong> <strong>private</strong> "int"</p>  <p>    <strong>public</strong> RelativeDate<strong>;</strong></p>  <p> </p>  <p>The private implementation scope for Color means that a foreign function whose type involves Color can only be declared in the Cal.Graphics.Color module where the Color type is defined. A foreign function declaration involving the Color type relies on the compiler knowing that the Color type corresponds to java.awt.Color to resolve the corresponding Java entity i.e. it must know about the implementation of the Color type. Having a private implementation scope means that the Color type can be changed to correspond to a different Java class, or indeed to be an algebraic type, without the risk of breaking client code.</p>  <p> </p>  <p>In all these three cases there are useful, and different, design reasons to adopt a private implementation scope:</p>  <p> </p>  <p>For RelativeDate, the Java implementation type int represents a coded Gregorian date value in the date scheme used by Crystal Reports. Not all int values correspond to valid dates, and the algorithm to map an int to a year/month/day equivalent is fairly complicated, taking into account things like Gregorian calendar reform. Thus, it is desirable to hide the implementation of this type.</p>  <p> </p>  <p>For StringNoCase, the implementation is more straightforward as a java.lang.String. The reason to adopt a private implementation scope is to ensure that all functions involving StringNoCase preserve the semantics of StringNoCase as representing a case-insensitive string value. Otherwise it is very easy for clients to declare a function such as:</p>  <p> </p>  <p><strong>foreign</strong> <strong>unsafe</strong> <strong>import</strong> <strong>jvm</strong> "method replace"</p>  <p>    replaceChar <strong>::</strong> StringNoCase <strong>-></strong> Char <strong>-></strong> Char <strong>-></strong> StringNoCase<strong>;</strong></p>  <p> </p>  <p>which does not handle case-insensitivity correctly, but is a perfectly valid declaration. This declaration results in a compilation error when it is placed outside the module in which StringNoCase is defined because of the private implementation scope of StringNoCase.</p>  <p> </p>  <p>For Color, the issue is somewhat more subtle. The java.awt.Color implementation type is semantically the same as the CAL Color type. The problem is that java.awt.Color is mutable (since it can be sub-classed to create a mutable type). It is preferable for a first-class CAL type to not be mutable, so we simply make the implementation scope private to ensure that this will be the case. </p>  <p> </p>  <p>A somewhat less encapsulated kind of abstract data type can be created using <em>friend modules </em>and <em>protected</em> scope. For example, if an algebraic type is public, and all its data constructors are protected, then the data constructors can be accessed in the friend modules of the module in which the type is defined. Effectively this means that the implementation of the semantics of the type stretches over the module in which the type is defined, and all of its friend modules. These must all be checked if the implementation of the type is modified. </p>  <p> </p>  <p>Given the merits of abstract data types discussed above, it is perhaps surprising that most of the core types defined in the Prelude module are not abstract data types. For example: Boolean, Char, Int, Double, String, List, Maybe, Either, Ordering, JObject, JList, and all record and tuple types are non-abstract types. </p>  <p> </p>  <p>There are different reasons for this, depending on the particular type involved. </p>  <p> </p>  <p>For example, Boolean, List, Maybe, Either and Ordering are all rather canonical algebraic data types with a long history in functional languages, with many standard functions using them. They are thus guaranteed never to change. In addition, their values have no particular design invariants that need to be enforced via constructor functions. Exposing the data constructors gives clients some additional syntactic flexibility in using values of the type. For example, they can pattern match on the values using case expressions or let patterns.</p>  <p> </p>  <p>Essentially the same explanation holds for record and tuple types. Although non-tuple record types are less canonical, they do correspond to the fundamental notion of an anonymous named-field product type. The "anonymous" here simply means that the programmer can create an entirely new record type simply by creating a value; the type does not have to be declared anywhere prior to use.</p>  <p> </p>  <p>Char, Int, Double, String, JObject and JList are foreign types where in fact part of the semantics of the type is that we want clients to know that the type is a foreign type. For example, we want clients to know that Prelude.Int is essentially the Java primitive unboxed int type, and has all the semantics you would expect of the Java int type i.e. this is quite different from RelativeDate which is using int as its implementation type in a very tactical way that we may choose to change. One can think of a public foreign type declaration with public implementation scope as simply introducing the Java type into the CAL namespace.</p>  <p> </p>  <p>One interesting point here is with CAL&#39;s naming convention for public foreign types. We prefix a type name by "J" (for "Java") for foreign types with public implementation type such that the underlying Java type is mutable. This is intended as mnemonic that the type is not a pure functional type and thus some caution needs to be taken when using it. For example, Prelude.JObject has public Java implementation type java.lang.Object.</p>  <p> </p>  <p>In the case where the underlying Java type is not mutable, we do not use the prefix, since even though the type is foreign; it is basically a first class functional type and can be freely used without concern. For example, Prelude.String has public Java implementation type java.lang.String.</p>  <p> </p>  <p>In the case where the implementation type is private, then the fact that the type is a foreign type, whether mutable or not, is an implementation detail and we do not hint at that detail via the name. Thus Color.Color has as its private Java implementation type the mutable Java type java.awt.Color. </p>  <p> </p>  <p>When creating abstract data types it is important to not inadvertently supply public API functions that conflict with the desired public semantics of the type. For example, if the type is publicly a pure-functional (i.e. immutable) type such as Color, it is important not to expose functions that mutate the internal Java representation.</p>  <p> </p>  <p>A more subtle case of inadvertently exposing the implementation of a type can occur with derived instances. For example, deriving the Prelude.Outputable and Prelude.Inputable type classes on a foreign type, whose implementation type is a mutable Java reference type, allows the client to gain access to the underlying Java value and mutate it
    (by calling Prelude.output, mutating, and then calling Prelude.input). The solution in this case is to not derive Inputable and Outputable instances, but rather to define a custom Inputable and Outputable instance that copies the underlying values.</p>

    Hi Pandra801,
    When you create a the external content type, please try to add a filter based on your select statement.
    http://arsalkhatri.wordpress.com/2012/01/07/external-list-with-bcs-search-filters-finders/
    Or, try to create a stored procedure based on your select statement, then create ECT using the SQL stored procedure.
    A step by step guide in designing BCS entities by using a SQL stored procedure
    http://blogs.msdn.com/b/sharepointdev/archive/2011/02/10/173-a-step-by-step-guide-in-designing-bcs-entities-by-using-a-sql-stored-procedure.aspx
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • RE: how to add attributes in graphical modulator in segment builder .

    Hi Gurus,
    can you please help me how to add attributes in graphical modulator in segment builder in sap CRM 7.0 WEB-UI.
    thanks and regards
    satyanarayana
    Edited by: koradasatya on Oct 27, 2011 8:14 PM

    Hi Gurus,
    thanks for your reply my requirement from client is given below if you could answer this it will be a great help for me.
    WKSC needs to be able to make selections (in segment builder) with the possibilities to use stored data on organizations. The information we are missing in Segment builder (SB) (and Account search for industrycode) are Industrycode (we want to see values not codes) and responsible salesrep (values not codes).
    These variables together with regions and other marketing attributes is crucial for us. Without it we cannot use the functionality built.
    We also need it so that we can extract smaller parts of our customers and prospects and update them with information from the thirdparty or adding new persons to them.
    Everyone using the SB should be able to use the fields for selections. i.e. Marketers, marketing managers and power users.
    Example
    We would like to make selections that could look like this.
    Region: A and B
    Organization in Industrycode C
    Sales rep: D, E, and F
    Turnover: above 50000
    CP on selected orgs
    CP has title G or H
    CP has Email not blank
    thanks and regards
    satya

  • How to add a day to Date() ( i.e 2002Oct10 to 2002Oct11 )

    Hi anyone, How to add a day to Date().
    <%
    String R, fulldate;
    java.util.Date Rdate = new java.util.Date();
    R = Rdate.toString();
    String DD=Rdate_string.substring(8,10);
    String MM=Rdate_string.substring(4,7);
    String YY=Rdate_string.substring(24,28);
    fulldate = YY+MM+DD;
    //ie. fulldate = 2002Oct10 but I want it to be 2002Oct11
    %>
    pls. help and thanks a lot.

    Hi,
    Please replace the following line in your program,
    String DD=Rdate_string.substring(8,10));
    with
    String DD=String.valueOf(Integer.parseInt(Rdate_string.substring(8,10)) + 1);
    This will work fine. Basically what this code is doing is that, it will get the Integer from the String, increment it by 1 and then change the integer to the String again.
    Hope this helps,
    Rajat,
    OTN Team

  • How to generate a set of date type records

    How to generate a set of date-type records, with a fixed interval, starting from a date like 2008-01-01.

    Some thing like this
    SQL> select to_char(to_date('2008-01-01','yyyy-mm-dd') + (level - 1),'DD-MON-YYYY') my_date
      2    from dual
      3  connect by level <= 10
      4  /
    MY_DATE
    01-JAN-2008
    02-JAN-2008
    03-JAN-2008
    04-JAN-2008
    05-JAN-2008
    06-JAN-2008
    07-JAN-2008
    08-JAN-2008
    09-JAN-2008
    10-JAN-2008
    10 rows selected.

  • How to use clob or blob data type in OWB

    how to use clob or blob data type in OWB?
    if OWB not surport these data type,how can i extract the large data type from data source

    The same question was asked just two days ago No Data Found: ORA-22992
    Nikolai Rochnik

  • How to replace content in text data type?

    How to replace content in text data type? 
    when we sending the mails we are taking content from the database.
    The data is maintained in text data type column. Now i have to replace some of content in mail content
    (text data type column) from database. 
    I tried by using REPLACE function but data is truncated

    The data is maintained in text data type column.
    Hello,
    See REPLACE (Transact-SQL) => "If
    string_expression is not of type varchar(max) or
    nvarchar(max), REPLACE
    truncates the return value at 8,000 Bytes"
    You may should consider to Change the data type from "Text" (deprecated) to NVarChar(max).
    Otherwise you have to use
    UPDATETEXT (Transact-SQL) for the text data type.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • How to add list of multiple file types to file type of file dialog box in LabVIEW

    How to add list of multiple file types to file type of file dialog box in LabVIEW?
    In file dialog box there is option to add only one file type,in the list,not by seperating commas,
    regards,
    Naresh.N

    Write the file types in pattern Input string, separated by a semicolon ;
    For example:  *.vi;*.doc;*.jpeg;*.xls
    This should return the set of files with matching extensions
    Message Edited by devchander on 09-10-2008 08:02 AM
    Message Edited by devchander on 09-10-2008 08:03 AM

  • How to store and retrieve blob data type in/from oracle database using JSP

    how to store and retrieve blob data type in/from oracle database using JSP and not using servlet
    thanks

    JSP? Why?
    start here: [http://java.sun.com/developer/onlineTraining/JSPIntro/contents.html]

  • Can we add a new custom data type to SIM(7.0)????

    hi can anybody tell me if we could add a custom new data type to SIM or not .If yes then how

    Yes. If you create your own custom java class and then place it in the "idm deployment directory"/WEB-INF/lib folder. You can then use the data type using <new class='your classpath'> and passing in the appropriate parameters.

  • How can i validate(compare) two date type attribute in EO.

    Hi All,
    jdev version 11.1.2.1.0
    i have created one EO where two date type attribute ToDate and FromDate now i want to add validation rule.
    which validate that difference b/w ToDate and FromDate not more than 3 month.
    How can i validate this?

    You can create script expression
    Something like
    if((toDate.getTime()-fromDate.getTime())/(1000 * 60 * 60 * 24)>30)
      return true;
    else
      return false;-Arun
    P.S : Above example calculates based on number of Days (30). If you want 3 months, you need to put a logic - Simply 90 days? What about the months with 31 days and 28/29 days? etc.

  • How can i add formula to waveform data type?

    I want to interpolate my acquired data in terms of voltage to temperature. For this i need to use polynomial equation, but i am not able to directly attach formula node to the waveform data type. I want to know how can i add formula node to waveform data, and then also have it real time.

    One additional thought that may be helpful. Once you get the Y component of the waveform graph you are going to attempt to wire this into a formula node. You can do one of two things with that array. Put a for loop around the formula node and index the array into and out of the for loop. This allows you to do scalar math on the data. It is also possible to index and array in a formula node. The following KnoledgeBase demonstrates how to do this: http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/9d72b6069346942386256a0d00604ed4?OpenDocument

  • How to add attributes in Cost Objects via Data Bridge?

    Hi everyone,
    I need your help. I want to know if is possible to add attributes via Data Bridge in Cost Objects tables like the country or address of a customer?
    Thanks for all.
    Sincerely,
    Pedro Sousa

    Hi,
    Jef is right you need to use the different values in the "Attribute Flag" field for creating attribute hierarchy using data bridge.
    For attribute Hierarchy you need to use option 12 & 15 depending on your requirement.
    12  - Attribute Assignment  - Used for assigning attribute to a member of the main hierarchy
    15  - Attribute Hierarchy only - used for creating hierarchy within attribute hierarchy.
    As mentioned by Jef for details you can refer the Data bridge user guide section 4.3.
    Regards,
    Niraj

  • In XML Gateway Responsibility How to add User defined Trading Partner type.

    Hi,
    We have a requirements to add user defind Trading Partner Type apart from the default trading partner type.
    How to do this? If any one know , kinldy let me explain it
    Thanks

    I looked it up in the mean time ...
    The docs state that you only can use simple data type or java.util.list or AttributeList (which is a wrapper for any viewRow). So I guess you have to somehow flatten your complex data type or create a custom VO which holds it.
    http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/bcextservices.htm#CJAEHFJD
    Scroll down to 11.2.3
    Timo

Maybe you are looking for