Creating a short date

This is what I'm doing currently
Date today = new Date();
String sDate = today.toGMTString();
System.out.println(sDate);How can I write a short date? Like 31/11/01? Can someone show me off the top of their head? I've looked at some examples on this website,but I can't understand where they are coming from, because they all use arrays and print 100 different styles. I just get lost....

Try this ...
        Date today = new Date();
        SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
        String shortDate = sdf.format(today);
        System.out.println("Short date = " + shortDate);

Similar Messages

  • How to Create Filter by date Query for access using Data base connectivity tool

    Hello,
    I had started my project by reading Access datas, by using an UDL connection,
    but now i want to create an access filter using a query that would permit to select two dates, and to obtain all corresponding datas, how to do it using the Parmetrized SQL query?
    Best regards,
    Remark: i dont know the SQL language
    ~~~~~~~~~~~~~~~~~~Looking for a LABVIEW JOB (In EUROPE)>~~~~~~~~~~~~~~~~~~
    **The Best Way To Predict**The**Future Is To Invent It**
    Solved!
    Go to Solution.

    Hi mike,
    I want to thank you for your help, i really appreciate it,
    i tried to make the code as ur picture, i had no problem to execute it, but i have no data's in the output
    i changed the date format, because i suppose that its a short date format in the database.
    can you just look at it, and tell me if you can find the problem,
    thank you again for your help
    Best regards,
    ~~~~~~~~~~~~~~~~~~Looking for a LABVIEW JOB (In EUROPE)>~~~~~~~~~~~~~~~~~~
    **The Best Way To Predict**The**Future Is To Invent It**
    Attachments:
    db.JPG ‏126 KB
    lav.JPG ‏82 KB

  • Create Material Master Data with BAPI

    Hi,
    I don't know using of BAPI. I want using BAPI_MATERIAL_SAVEDATA bapi for creating material master data for Basic Data1, Basic Data2, Purchasing and MRP views. Does anybody can help me ?
    Thank you
    Good night

    Hi,
    Please refer to the documentation below:
    BAPI_MATERIAL_SAVEDATA
    Short Text
    Create and Change Article Master Data
    Functionality
    You use this method to create new material master data or to change existing material master data. The data on a material can be transferred for each call.
    When creating material master data, you must transfer the material number, the material type, and the industry sector to the method. You must also enter a material description and its language.
    When changing material master data, you need enter only the material number.
    In the header data, you must select at least one view for which data is to be created. Depending on the view selected, you must maintain other required parameters. If you do not enter values for all of the required parameters, the method is ended with an error message.
    The corresponding fields in the tables (such as CLIENTDATA) must first be supplied with data by the calling program. An indicator must also be set for each of these fields so that the data is written to the database by the method. This requires the calling program to supply the corresponding field with the indicator in a checkbox table (for example, CLIENTDATAX). Checkbox tables exist for tables that do not contain any language-dependent texts (MAKT, MLTX), International Article Numbers (MEAN), or tax classifications (MLAN). Several data records for a material can be created in these tables.
    If a structure contains fields for units of measurement (such as structure CLIENTDATA, field BASE_UOM), language indicators (such as structure MATERIALDESCRIPTION, field LANGU), or country indicators (such as structure TAXCLASSIFICATIONS, field DEPCOUNTRY), there is always a field of the same name with the ending _ISO. This makes it possible to transfer either the internally used SAP code or a standardized ISO code for the units of measurement, language indicators, or country indicators. ISO codes are converted to an SAP code internally for further processing. The ISO code is used only if the SAP code is not transferred. If you use ISO codes, there must be a unique assignment of the ISO code to the SAP code in the following activities in Customizing for Global Parameters:
    Check Units of Measurement
    Define Countries
    If you want to maintain long texts (basic data texts, internal comments, purchase order texts, material memos, or sales texts) or customer-defined fields for a material, some special conditions have to be observed. They are described in the documentation for parameters MATERIALLONGTEXT and EXTENSIONIN.
    Parameters
    HEADDATA
    CLIENTDATA
    CLIENTDATAX
    PLANTDATA
    PLANTDATAX
    FORECASTPARAMETERS
    FORECASTPARAMETERSX
    PLANNINGDATA
    PLANNINGDATAX
    STORAGELOCATIONDATA
    STORAGELOCATIONDATAX
    VALUATIONDATA
    VALUATIONDATAX
    WAREHOUSENUMBERDATA
    WAREHOUSENUMBERDATAX
    SALESDATA
    SALESDATAX
    STORAGETYPEDATA
    STORAGETYPEDATAX
    FLAG_ONLINE
    FLAG_CAD_CALL
    NO_DEQUEUE
    NO_ROLLBACK_WORK
    RETURN
    MATERIALDESCRIPTION
    UNITSOFMEASURE
    UNITSOFMEASUREX
    INTERNATIONALARTNOS
    MATERIALLONGTEXT
    TAXCLASSIFICATIONS
    RETURNMESSAGES
    PRTDATA
    PRTDATAX
    EXTENSIONIN
    EXTENSIONINX
    Exceptions
    Function Group
    1001UEB
    Thanks,
    Sandeep.

  • Hide 1/1/0001 from Short Date in Workflow email

    All
    Using InfoPath and SharePoint 2010.
    I've various date fields on my InfoPath form which can be left blank. These date fields are published to SP successfully as blank (to the human eye).
    When I place the date field (short date) in a workflow created email, the date returns in the email as 1/1/1/0001 . This I understand is workflow default behaviour.
    Can this value (1/1/0001 be hidden or replaced with a "blank".
    I've 6 date fields in this email, any one of them could be blank. Is there an alternative to write multiple email combinations?
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/cd1f9ae5-9edb-4b66-b3fa-8fbdb1dc6cb9/email-from-workflow-contains-110001-120000-am-for-items-empty-date-field?forum=sharepointcustomizationprevious
    I'm trying to set a variable in place of a blank date fields yet all I get back is an alternative date 1/1/1900.
    Thanks
    W

    Hi Wilkies0105aw,
    I'm also having the same issue. Did you find any solution to hide date 1/1/0001 in the workflow email?
    Please let me know.

  • Procedure for creating transparent table, data element and domain

    Hi,
    Can anybody let me know the procedure for creating transparent table, data element and domain.
    Thanks,
    Mahathi

    Hi
    Database table and its components
    A database table is the central data structure of the ABAP/4 data dictionary.
    The structure of the objects of application development are mapped in tables on the underlying relational database.
    The attributes of these objects correspond to fields of the table.
    A table consists of columns (fields) and rows (entries). It has a name and different attributes, such as delivery class and maintenance authorization.
    A field has a unique name and attributes; for example it can be a key field.
    A table has one or more key fields, called the primary key.
    The values of these key fields uniquely identify a table entry.
    You must specify a reference table for fields containing a currency (data type CURR) or quantity (data type QUAN). It must contain a field (reference field) with the format for currency keys (data type CUKY) or the format for units (data type UNIT). The field is only assigned to the reference field at program runtime.
    The basic objects for defining data in the ABAP Dictionary are tables, data elements and domains. The domain is used for the technical definition of a table field (for example field type and length) and the data element is used for the semantic definition (for example short description).
    A domain describes the value range of a field. It is defined by its data type and length. The value range can be limited by specifying fixed values.
    A data element describes the meaning of a domain in a certain business context. It contains primarily the field help (F1 documentation) and the field labels in the screen.
    A field is not an independent object. It is table-dependent and can only be maintained within a table.
    You can enter the data type and number of places directly for a field. No data element is required in this case. Instead the data type and number of places is defined by specifying a direct type.
    The data type attributes of a data element can also be defined by specifying a built-in type, where the data type and number of places is entered directly.
    <b>Two Level Domain Example</b>
    A domain defines a field technically and therefore it may
    be used at different business levels.
    A data element describes the meaning of a domain in a certain business context.
    A domain, however, is used for the technical definition of a table field (for example field type and length).
    Therefore, although a take-off airport (data element S_FROMAIRP) would have a different business meaning from an airport where a plane lands (data element S_TOAIRP), they could still have the same domain(here S_AIRPID) because technically we could assign the same number of characters whether the airport is a take-off or a landing airport.
    <b>Definitions of Table in Database</b>
    In SAP R/3 tables are defined as
    A) Transparent tables: All of the fields of a dictionary table correspond to a field in the real database table.
    B) Pooled tables: Different tables which are not linked to each other with a common key are combined into a TABLE POOL. Several logical tables thus exist as a single real database table.
    C) Cluster tables: Several tables linked by a common key may sometimes be combined by the data dictionary and made to exist on the database schema as a single table.
    SAP is evolving R/3 tables in transparent tables.
    <b>Elaboration on each of the definitions</b>
    A transparent table is automatically created on the database when it is activated in the ABAP Dictionary. At this time the database-independent description of the table in the ABAP Dictionary is translated into the language of the database system used.
    The database table has the same name as the table in the ABAP Dictionary. The fields also have the same name in both the database and the ABAP Dictionary. The data types in the ABAP Dictionary are converted to the corresponding data types of the database system.
    The order of the fields in the ABAP Dictionary can differ from the order of the fields on the database. This permits you to insert new fields without having to convert the table. When a new field is added, the adjustment is made by changing the database catalog (ALTER TABLE). The new field is added to the database table, whatever the position of the new field in the ABAP Dictionary.
    Tables can also reside on the database as Pooled tables or cluster tables
    Pooled Tables: Different tables which are not linked to each other with a common key can be combined into a Table Pool. The tables contained within this pool are called Pooled Tables. A table pool is stored in the database a simple table. The table's data sets contain, in separate fields, the actual key for the data set to be stored, the name of the pooled table and the contents of the data set to be stored.
    Using this schema, several logical tables are combined into a single real database table. Although the data structure of each set is lost during the write to the table pool, it is restored during the read by the ABAP/4 Data Dictionary. The ABAP/4 Data Dictionary utilizes its meta-data to accomplish this.
    Since information must be prepared (defined) within the ABAP/4 Data Dictionary when it is read or written to (or accessed), this process itself defines these as not transparent tables
    Cluster Tables: Occasionally, several tables may be linked by a common key. The ABAP/4 Data Dictionary can also combine these tables into a single table. Each data set of the real table within the database contains a key and in a single data field, several data sets of the subsequent table for this key.
    As mentioned above, these table types require special data handling, therefore they are not transparent tables.
    <b>Technical Settings in Dictionary</b>
    The data class logically defines the physical area of the database (for ORACLE the table space) in which your table should be created. If you choose the data class correctly, the table will automatically be created in the appropriate area on the database when it is activated in the ABAP Dictionary.
    The most important data classes are master data, transaction data, organizational data and system data.
    Master data is data that is rarely modified. An example of master data is the data of an address file, for example the name, address and telephone number.
    Transaction data is data that is frequently modified. An example is the material stock of a warehouse, which can change after each purchase order.
    Organizational data is data that is defined during customizing when the system is installed and that is rarely modified thereafter. The country keys are an example.
    System data is data that the R/3 System itself needs. The program sources are an example.
    Further data classes, called customer data classes (USER, USER1), are provided for customers. These should be used for customer developments. Special storage areas must be allocated in the database.
    The size category describes the expected storage requirements for the table on the database.
    An initial extent is reserved when a table is created on the database. The size of the initial extent is identical for all size categories. If the table needs more space for data at a later time, extents are added. These additional extents have a fixed size that is determined by the size category specified in the ABAP Dictionary.
    You can choose a size category from 0 to 4. A fixed extent size, which depends on the database system used, is assigned to each category.
    Correctly assigning a size category therefore ensures that you do not create a large number of small extents. It also prevents storage space from being wasted when creating extents that are too large.
    Modifications to the entries of a table can be recorded and stored using logging.
    To activate logging, the corresponding field must be selected in the technical settings. Logging, however, only will take place if the R/3 System was started with a profile containing parameter 'rec/client'. Only selecting the flag in the ABAP Dictionary is not sufficient to trigger logging.
    Parameter 'rec/client' can have the following settings:
    rec/client = ALL All clients should be logged.
    rec/client = 000[...] Only the specified clients should be logged.
    rec/client = OFF Logging is not enabled on this system.
    The data modifications are logged independently of the update. The logs can be displayed with the Transaction Table History (SCU3).
    Logging creates a 'bottleneck' in the system:
    Additional write access for each modification to tables being logged.
    This can result in lock situations although the users are accessing different application tables!
    <b>Create transparent table</b>
    Go to transaction SE11. Enter name of table you want to create (beginning with Y or Z) and click on create pushbutton
    Enter the delivery class and the table maintenance criteria
    The delivery class controls the transport of table data when installing or upgrading, in a client copy and when transporting between customer systems .
    The display/maintenance indicator specifies whether it is possible to display/maintain a table/view using the maintenance tools Data Browser (transaction SE16) and table view maintenance (transactions SM30 and SM31).
    Enter the name of the table field and the data element. The
    System automatically populates the technical details for
    existing data elements.
    So far as possible it is advisable to use existing data elements which befit the business requirements.
    However, we may create data elements if need be. The same is shown in the next slide.
    To create a data element simply double click on it.
    Alternately create a data element by simply choosing the
    data type radio button on SE11 initial screen.
    <b>Create data element</b>
    The system prompts you to create a new data element.
    Choose the Yes pushbutton.
    Under the data type tab enter the domain name which
    determines the technical characteristics of the field.
    Further characteristics tab: Allows you to specify a search help assigned to the data element.
    It also allows you to specify a parameter id which helps you populate a field from SAP memory.
    Field label: Can be assigned as prefixed text to a screen field referring to the ABAP Dictionary. The text is displayed on the screen in the logon language of the user (if the text was translated into this language).
    <b>Create domain</b>
    If the domain does not exist in the data dictionary the
    system prompts you to create one.
    Give the technical characteristics under the definition
    tab. Value range allows you value restriction at domain
    level.
    Value range tab:
    As explained in the section Consistency through input checks one can restrict the possible values for a field at domain level itself by either entering fixed values or by specifying a value table under the tab Value range.
    <b>Currency/Quantity fields in a table</b>
    A currency or a quantity field must be assigned a reference field from a reference table containing applicable qty unit or currency unit.
    Field of the reference table, containing the applicable quantity unit or currency
    A field containing currency amounts (data type CURR) must be assigned a reference field including the currency key (data type CUKY).
    A field containing quantity specifications (data type QUAN) must be assigned a reference field including the associated quantity unit (data type UNIT).
    <b>Create transparent table continue</b>
    Maintain the technical settings of the table by clicking on the tab

  • Not able to edit the report created on different data source.....

    I have a query regarding Report in OBIEE - reports developed from BI Publisher are specific to data source on which they have been created ??
    i have a sample report that was created on different data source, i have the corresponding RPD also. I changed the data source according to my DB and when i try to update/edit the report,
    on Analytics for adding a new column, it is generating a seperate new Query from QueryBuilder for that additional cloumn rather than adding up the new query with the previous one(existing report query). Is it because of mismatch of data source on which report had been created and on which it is being update ?? if it is the case, where do i need to make changes related to JDBC connection or others ??
    when i try to create a new sample data set and try to update it, it adds up the extra edited things to original query and works perfectly fine. can ny 1 help me for the same ??

    Hi Denis,
    Normally,what we do is once we provide access to webi users group for each user from BO supervisor module, user(s) will able to refresh/edit the existing report from Full client BO.His colleagues have had no problem editing all his reports from their machines but he is not able to edit any report from his machine and BO is getting freeze.
    He also reinstalled BO and cleaned out everything on his Computer and re-built it but the issue is not yet resolved
    Can you please tell me how to resolve this issue
    Kind Regards,
    Srinivas

  • BEX Query Views - Reqd in PRD but need to create in Dev - Data Issues

    Hello Bw Gurus 
    BI 7.0 ECC 4.7
    We have a BEx Query in BI production which uses a work centre hierarchy. The user wants to create query views on this query to use in BI production.
    Our normal transport procedure of a new development object would be BI DEV - QA - PRD
    However the DEV environment does not have all the work centres and the data of PRD. So if the query view needs to be created in DEV then we could not set up the view correctly as there is not the workcenters or the data in DEV.
    Hopefully that makes sense?
    Apart from allowing Query Views to be created in BI PRD directly is there any solution?
    Best,
    Steve Jones

    If you need exact char values for workcenter to create your views you can quickly create the master data (just the values you want) in Dev and use them to create the views...

  • How to create a linked data source with document libraries based on the same template?

    I use SharePoint Foundation 2013, SP Designer and Visual Studio 2013 to my needs. But there are several things which i don't get.
    I have a number of libraries which use the same template. I want to create a linked data source, that would contain them all, and if I add a library based on this template, the library would be added to the data sorce. Is it possible?
    I tried creating linked data souces, but the view that it brings by default is limited(no sorting, etc.). How can it be modified?

    I am planning to do my project on Linux with J2EE,Oracle technologies.You don't need to set up a DSN. Just use a JDBC connect string such as jdbc:oracle:thin:@localhost:1521:xe
    ~Jer

  • Create a ReportingServices data source and upload to a data connection library

    I have installed reporting services 2012 in SharePoint 2013 integrated mode. I need to create a report data source and upload it to a data connection library using
    C#.
    As I know it uses the ReportingServices2010 class but I cannot explore a reporting server url.
    There is a ReportingServices2010.asmx file in the 15 hive though.
    Also it works fine when I manually set the data source.

    Hi,
    The following materials would be helpful:
    Inserting Data Connections into a SharePoint Library
    https://social.technet.microsoft.com/Forums/en-US/df79dce5-fd92-4506-af4e-11127cb0d655/inserting-data-connections-into-a-sharepoint-library?forum=sharepointdevelopment
    Programmatically exporting reports from SQL 2012 Reporting Services
    http://stackoverflow.com/questions/12199995/programmatically-exporting-reports-from-sql-2012-reporting-services
    Report Server Web Service Endpoints
    http://msdn.microsoft.com/en-us/library/ms155398(v=sql.110).aspx
    Best Regards
    Dennis Guo
    TechNet Community Support

  • I have created several short (3-5 minute) movies using iMovie 10.0.6 and Yosemite.  I want to create one movie that includes these short movies that I can then either burn to a DVD or show in iMovie's Theater.  How can I do it?

    I have created several short (3-5 minute) movies using iMovie 10.0.6 and Yosemite.  I want to combine those short movies into one movie that I can loop and burn on a DVD or show in iMovie Theater.  How can I do it?  The movies are now shared to iTunes.

    Another easy way to fix this.
    What I've noticed is that upon upgrading your projects and events to work with iMovie 10, initially it will work... Until you quit iMovie and reopen it again. Any events with hashtags will show up without the star next to the iMovie event. SO, if you happen to read this, after upgrading to iMovie 10 from its predecessor, immediately change the event name to NOT include a hashtag/pound symbol.
    Otherwise, if it's too late, you can either do the above or this...
    Hold down option and click on iMovie. This will prompt you Locate, Create a New Library, Cancel this window, or Choose a different library. What you want to do is create a new library, call it whatever you want to, this will only be temporary. After the program opens, it should be a blank Library. Then go to File > Open Library > iMovie Library (your original library) and proceed to change the name of your events. Quit the program. Go into your Movies folder in Finder, delete the library you temporarily created, and your back in business.

  • 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

  • It is necessary to create one header data for each file to be sent to CDFS.

    hi GUYS
    my sce anrio is FILE-XI-PROXY
    REQUIREMENT IS
    SOURCE FILE                      TARGET FILE WILL BE
    H1                                             H1                        H1                    H1
    I1                                               I1                         I2                      I3
    I2                                                F1                        F1                    F1
    I3                                           
    F1
    It is necessary to create one header data for each file to be sent to TARGET. Each file will be related to only one SAP Company Code.
    Thanks
    NAG

    aa

  • Can I create a short cut on the home screen to accessibility settings on an ipad

    Hi, have a partially sighted sister who uses an iPad, is there an easy way for her to switch between voice over on/off and white on black? without having to go into settings and then scroll down to the appropriate menu
    thanks

    Patrick Duncan wrote:
    Can I create a short cut on the home screen to accessibility settings on an ipad
    Patrick ~ Yes, see this post:
    Shortcut to Bluetooth Settings
    ...For quick access to Accessibility settings, set up the shortcut icon with this URL(Homepage) — case sensitive:
    prefs:root=General&path=ACCESSIBILITY

  • Is it possible to create a SHORT CUT key for a Workspace in CS 5.5 ?

    Is it possible to create a SHORT CUT key for a Workspace using In Design CS 5.5 ?

    Edit Menu > Keyboard Shortcuts > Product Area: Window Menu > Workspace Load 1st, 2nd, 3rd, etc. Create a new set and assign a shortcut

  • Error creating a new Data Source for Oracle connection

    I'm trying to create a new data source connection to our
    Oracle 10gR2 server using ColdFusion Administrator 6.1 Standard on
    a Windows 2003 server.
    I created a System DSN ODBC connection for Oracle. I can use
    the ODBC connection when connecting an Access db to Oracle but when
    I try to use it w/ ColdFusion Admin it generates the following
    error message:
    Connection verification failed for data source: sitest2
    []java.sql.SQLException: [Macromedia][SequeLink JDBC
    Driver][ODBC Socket]internal error:
    Driver's SQLAllocHandle on SQL_HANDLE_ENV failed
    The root cause was that: java.sql.SQLException:
    [Macromedia][SequeLink JDBC Driver][ODBC Socket]internal error:
    Driver's SQLAllocHandle on SQL_HANDLE_ENV failed
    Any help or recommendations would be greatly appreciated.
    Tina

    The schema/user is system and the password is alpha-numeric, upper/lower case, no special char ...
    As a workaround I was able to add the password to the entry in the datasources.xml file and restarted BI Pub.
    The JDBC is working ... I can test the connection successfully ... just wont save the entry
    Edited by: tread on Oct 17, 2011 11:55 AM

Maybe you are looking for