Conversion of Char database fields to Date Object view attributes

Hello,
I would like to transform all date values of data type CHAR(10) in an oracle database (formatted like this : "YYYY/MM/DD") to oracle.jbo.domain.Date fields.
For the moment the better idea I have found is :
- add transcient entity attributes (type oracle.jbo.domain.Date) for each persistent attributes (type oracle.jbo.domain.Char) representig a date field in each Entity object of my application.
- in the java code of the Getter and Setter method of those transcient attributes, I call a method which transform a value of type "oracle.jbo.domain.Char" to a
"oracle.jbo.domain.Date" (for the Getter), and an other method which transform a value of type "oracle.jbo.domain.Date" to a
"oracle.jbo.domain.Char" (for the Setter)
The aim of these transformations is to retrieve those transient attributes of oracle.jbo.domain.Date type in my web application in order to easily associate them to adf "input date" components : what I have undersand is that this "input date"component is waiting for a "Date" type in input to work properly.
But I find that it is a lot of work to do. I have maybe 100 database fields concerned by those conversions.
Does it exist something in the Adf framework between the database and the "adf entity objects", or between the "adf entity objects" and the "adf view objects", where I can declare to make these transformation for all my database pseudo date fields : something like a class-converter in the adf web framework where I can say, for example, to execute some methods in order to transforms the concerned data in two directions : "Char to Date" and "Date to Char".
Thanks for your help.

Hello,
I would like to transform all date values of data type CHAR(10) in an oracle database (formatted like this : "YYYY/MM/DD") to oracle.jbo.domain.Date fields.
For the moment the better idea I have found is :
- add transcient entity attributes (type oracle.jbo.domain.Date) for each persistent attributes (type oracle.jbo.domain.Char) representig a date field in each Entity object of my application.
- in the java code of the Getter and Setter method of those transcient attributes, I call a method which transform a value of type "oracle.jbo.domain.Char" to a
"oracle.jbo.domain.Date" (for the Getter), and an other method which transform a value of type "oracle.jbo.domain.Date" to a
"oracle.jbo.domain.Char" (for the Setter)
The aim of these transformations is to retrieve those transient attributes of oracle.jbo.domain.Date type in my web application in order to easily associate them to adf "input date" components : what I have undersand is that this "input date"component is waiting for a "Date" type in input to work properly.
But I find that it is a lot of work to do. I have maybe 100 database fields concerned by those conversions.
Does it exist something in the Adf framework between the database and the "adf entity objects", or between the "adf entity objects" and the "adf view objects", where I can declare to make these transformation for all my database pseudo date fields : something like a class-converter in the adf web framework where I can say, for example, to execute some methods in order to transforms the concerned data in two directions : "Char to Date" and "Date to Char".
Thanks for your help.

Similar Messages

  • Can't add database field or text object to a report (new and existing)

    We have Crystal Report 8.5 and when trying to modify an existing report or create a new report, I can't seem to add any database fields or text objects in my report.  I get a prohibition symbol (circle with a backslash inside it) when I hover over the report.  Has anyone encoutered something like this? Any suggestions?  Thank you.

    Do you have two monitors?
    I had this problem if I tried to open crystal in the second monitor, move it back to primary monitor and it should be OK.
    Ian

  • Returned data from database field having data type CLOB

    hi..
    i hv table having CLOB field type ... having 12000 char length ... data is present in the field... but when i do select on that field it only returns the limited data from that field for any given row...
    pls let me know wuts may b the problem...
    cheeerrss..

    Are you running the select from SQL*Plus? If so check out the [SET LONG|http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/ch12040.htm#sthref2800] parameter.
    HTH!

  • Unable to get database format for date object

    Hi,
    I am using UDT to build an universe against Oracle DB, We are using a view to get date object to filter the dates in our reports. Format for the date column in the view is "dd-MMM-yy". Desired format at the WebI layer is also "dd-MMM-yy"
    However, when I pull this object in WebI in filter pane, I am still getting Timestamp with date and the format is also coming as "mm/dd/yyy hh:mm:ss a"; and, if I pull the date column in results pane I am getting the correct format "dd-MMM-yy". I tried typing the value for prompt, using calender (this also gives default timestamp) none of them worked
    I tried using with and with out the TRUNC(date) function, changed object properties at universe level but, still I am getting the same result
    Can you please guide me on, how to get the date value in "dd-MMM-yy" when used in prompt and, is there a possibility to not show timestamp in calendar selection (screenshot: Date parameters2)
    Thanks in advance
    Sri

    Hi Jacq,
    Thanks for your reply. We are on BO4.0 SP04 FP03 with Oracle 11g as back end
    Object type is defined as Date in universe. In the report and the SQL generated are showing as per the backend column format 'dd-MMM-yy'
    However, same date object is showing with timestamp, as 'dd/mm/yyyy hh:mm:ss a' format when showing LOV's &  when selected using calender GUI in prompt screen
    I already tried the below options in various combinations, none of them worked
    1) TRUNC(date)
    2) Object Properties - Advanced
    3) Object Format - custom
    Thanks,
    Sri

  • Adding Customer-specific Fields: Master Data Objects

    Hi,
    Somebody already obtain to include new fields in SAP MIC( Management Internal Controls) version 2.0?
    Att.
    Anderson Almeida

    You need to study the PCUI (People Centric User Interface).
    MIC software use this engine to control the web interface.
    Very complete guide:
    https://websmp209.sap-ag.de/~sapidb/011000358700001093962006E/PCUIBook50_06.pdf
    a quick intro by weblog:
    /people/vijaya.kumar/blog/2005/06/10/people-centric-user-interface-pcui--getting-started
    Regards,
    Sergio

  • Lookup field in external data-object????

    Hi All.
    Is it possible to create lookup field in data object with external data-source?

    Hi ,
    yes you can create.look ups for any Data Objects.
    Regards
    Siva Sankar

  • Update of non-database fields mapped to database fields

    I have two columns start month and start year which
    are non-database columns and which map to one database
    field start date in the database.
    I have a post-query trigger on the start month and
    start year fields to derive the value from the
    database field start date when the form is queried.
    When I try to update the form, the update does not
    work - if I remove the post-query trigger then the
    update works but, the month and year non-database
    fields do not get queried.
    Any help will be greatly appreciated.
    Thanks,
    Suzanne

    since those 2 fields are not connected to the database field you need to code the update to the database.
    Use the pre-insert trigger and set the value of the date item according to the values of the 2 fields.

  • Store values of different data types into single database field

    Hi Friends,
      I  have to store values of different data types(character, numeric, date, time,  text, etc) into a single database field(Char 80). Then read the same values and display it into ABAP Webdynpro report. 
    Appreciate any ideas, examples, suggestions.
    Thanks
    JB

    Hi,
    Try like this:
    data: txt1 type string,
          var1(1) type c,
          var2(1) type n,
          var3 like sy-datum,
          var4 like sy-uzeit.
    parameters: a type c,
                b type n,
                c like sy-datum,
                d like sy-uzeit.
    concatenate a b c d into txt1.
    write txt1.
    var1 = txt1+0(1).
    var2 = txt1+1(1).
    var3 = txt1+2(8).
    var4 = txt1+8(8).
    write: / var1,
           / var2,
           / var3,
           / var4.
    Regards,
    Bhaskar

  • Calculation Field to be mapped to different data object's column name in Oracle BAM 12c

    Hi,
    I am having a challenge to enable drill down to 2nd level report by passing calculation field as parameter.
    As an alternative, I am thinking to point calculation field to another data object’s column name and generate report so that I would be able to pass that as parameter to drilling report view.
    Is there any way to map calculation field to different Data object’s column name? Thanks in advance.
    Regards
    Amik Basu

    1. Yes, you can.
    SQL> create table ÜÝÞ( ßàá number(10));
    Table created.
    SQL> insert into ÜÝÞ values (10);
    1 row created.1.1 and 1.2 and 2. You can choose UTF as your default character set. It allows the user of non-English characters in VARCHAR columns in your whole database. It is not per tablespace.
    SQL> create table ÜÝÞ( ßàá varchar2(100));
    Table created.
    SQL> insert into ÜÝÞ values ('âãäçìé');
    1 row created.

  • Database access code in objects constructor, or in data access object

    Given an object that is stored in a database, is it better to have the database access code in a constructor method, or a data access layer object? E.g. I have a Person class
    public class Person{
    int Id;
    String name;
    int age;
    }When I want to read a person's details from the database, I could use a constructor something like this:
    public Person(int id){
    Connection con = getDatabaseConnection();
    ResultSet rs = con.createStatement().executeQuery("Select name, age from person where person_id = " + id);
    rs.next();
    this.name = rs.getString(1);
    this.age=rs.getInt(2);
    }Or I could use a method in a data access object :
    public Person getPerson(int id){
    Person p = new Person();
    Connection con = getDatabaseConnection();
    ResultSet rs = con.createStatement().executeQuery("Select name, age from person where person_id = " + id);
    rs.next();
    p.setName(rs.getString(1));
    p.setAge(rs.getInt(2));
    return p;
    }It seems to me that the constructor approach has two advantages
    (1) the SQL code is kept in the relevant class (so if I want to add a field to Person, I only have to make changes to the Person class)
    (2) I don't have to have a setter method for each field
    Is one or other of these ways generally recognized as 'best practise'?

    malcolmmc wrote:
    But then, on the other hand, everytime a Person gains a new field that's two places you have to change it. if the persistence interface is written in terms of the object and uses ORM, I don't have to touch the implementation. all i have to do is update the object, the database, and the mapping - just like you and your home brew ORM.
    besides, so what? i'd fear the resource leak, bad layering, more difficult testing more.
    Actually lately I've used annotations to label setters with database field names and run a simple home brew ORM to convert rows into objects even when not using a more complex persistence manager.home brew ORM? why is that necessary when you can choose from hibernate, ibatis, jdo, jpa, etc.? that's just nuts.
    %

  • Conversion of a data object of type "C" to type "l" is not supported

    Experts:
    i have below code in my FM; defined as remote-enabled module.
    when i execute i get the error analysis as:
      You attempted to move one data object to another.
    This is not possible here because the conversion of a data object
      of type "C" to type "l" is not supported.
    This at the line    move <FS2> TO <wwa_mdm_name_value_pair>-VALUE .
    what are the steps to debug this?  Thanks!
      DATA: tt_mdm_name_value_pair_table TYPE mdm_name_value_pair_table.
      FIELD-SYMBOLS : <wwa_mdm_name_value_pair> LIKE LINE OF tt_mdm_name_value_pair_table.
      FIELD-SYMBOLS <FS1> TYPE ANY.
      FIELD-SYMBOLS <FS2> TYPE any.
      data:st_mdm_name_value_pair type mdm_name_value_pair.
      assign  st_mdm_name_value_pair to <wwa_mdm_name_value_pair>.
    assign st_mdm_name_value_pair-code to <FS1>.
    assign st_mdm_name_value_pair-value to <FS2>.
      clear wa_ZSTRESULT.
      loop at T_UPDATE into wa_ZSTRESULT.
        assign wa_ZSTRESULT-field to <FS1>.
        <wwa_mdm_name_value_pair>-CODE = <FS1>.
        assign wa_ZSTRESULT-VALUE to <FS2>.
        move <FS2> TO <wwa_mdm_name_value_pair>-VALUE .
        append <wwa_mdm_name_value_pair> to tt_mdm_name_value_pair_table.
      endloop.

    resolved using GET REFERENCE.. code looks as below:  Thanks!
      DATA: tt_mdm_name_value_pair_table TYPE mdm_name_value_pair_table.
      FIELD-SYMBOLS : <wwa_mdm_name_value_pair> TYPE LINE OF mdm_name_value_pair_table.
      FIELD-SYMBOLS <FS1> TYPE ANY.
      FIELD-SYMBOLS <FS2> TYPE DATA.
      TYPES t_dref TYPE REF TO DATA.
      DATA dref TYPE REF TO DATA.
      DATA: TT_UPDATE TYPE ZTYRESULT.
      FIELD-SYMBOLS : <WA_UPDATE> LIKE LINE OF TT_UPDATE.
      data:   st_mdm_name_value_pair type mdm_name_value_pair.
      assign  st_mdm_name_value_pair to <wwa_mdm_name_value_pair>.
    assign st_mdm_name_value_pair-code to <FS1>.
    assign st_mdm_name_value_pair-value to <FS2>.
      clear wa_ZSTRESULT.
      TT_UPDATE = T_UPDATE.
      loop at TT_UPDATE assigning <WA_UPDATE>.
        assign <WA_UPDATE>-FIELD to <FS1>.
        <wwa_mdm_name_value_pair>-CODE = <FS1>.
        assign <WA_UPDATE>-VALUE  to  <FS2>.
        GET REFERENCE OF <WA_UPDATE>-VALUE INTO dref.
    *    MOVE dref TO <wwa_mdm_name_value_pair>-VALUE.
        <wwa_mdm_name_value_pair>-VALUE = dref.
        append <wwa_mdm_name_value_pair> to tt_mdm_name_value_pair_table.
      endloop.

  • Saving Data Objects in INDX-Type Database

    Hi,
    I am using the EXPORT statement to store data in a table into INDx table.
    EXPORT gt_update TO DATABASE indx(tt) ID index.
    And then I am using IMPORT statement to get that data.
    IMPORT gt_update to tb_update FROM DATABASE indx(tt) ID 'TTUPDATE'.
    The 'TT' is put into INDX- RELID and 'TTUPDATE' into INDX-SRTFD.
    The Export statement was working fine and a record got created in INDX table, but the IMPORT is not working. Can anyone please let me know what could be the problem ?
    'gt_update' and 'tb_update' are of the same type in the IMPORT statement.
    Also please let me know what exactly is the significance of the field INDX-SRTF2.
    Thanks a lot in Advance.

    My reason for using data clusters is that there is huge amount to data to be retrieved from database, so we have decided to get that data and put it in data clusters for faster access of data in the program.
    INDX tables are ideal to store complex strcutures, inlcuding deep data objects. Don't really know if the access is faster, but definitely it takes less space (as data are compressed).
    But I have a doubt, Ideally we should be having another program with the SELECT statement on the table required which needs to be scheduled periodically as a background job to Update the data cluster right ? Otherwise how would the data cluster hold the latest data ?
    It really depends on where you initial data comes from. I mean how data you want to put/update in data cluster are produced. If this is the report, which generates some result and based on that you want to update data cluster, then what you say is true. You would need to run it either manually (periodically) or simply schedule the job, which does the task.
    But as for the update of data cluster itself, I don't think we should use OPEN SQL statements to achieve that.
    What I think you have to do is, each time do a select to know which cluster to extract, then import the result. Next you need to change gt_update locally and place it back (with export) on right data cluster place. Data with same name under same RELID and cluster key will be completely replaced with new (changed) table.
    This is the only way I think of in terms of data cluster update, but maybe there is some other.
    Regards
    Marcin

  • Can we change the lengh of a field in thestandard database tables using dat

    Hi Experts,
        I've a doubt in Data dictionary. can we modify the length of the field in data base tables using stanadrd table.
    My requirement is add customer data to business are field. but the lengh of business area field is 4 chars.and the customer field length is 10.So in sap note i've found a solution is there a table call replacement of business area(FLQGSBER_SUBST).in this first we've append the customer field to this table.then the structure of business area should be modified.
    can we modify the length of the standard table field?
    its an urjent issue
    reward points for helpful answers
    thanks in advance
    regards,
    Rekha

    Hi,
    Thank you for your reply.
    But there is solution i've found in SAP note is 'There is a standard table for business area called "FLQGSBER_SUBST" Replacement of business area.In this table we've to append the field.for ex here we've append the customer (kunnr) and
    the field business area field has no data. when we append the customer field then the data in customer field updated in business area field.when i've tried this
    and when execute this.in debugging the businee area updated with 4 chars only.
    it didnt take 10 chars(kunnr).
    is it possible...

  • How to make the fields of BPM object not saved in database.

    Is it possible to declare some attributes of BPM object not saved in database.
    For example: Order has attribute orderId and date, user (other attributes)... we only want OBPM save orderId. We want the other attributes could be saved and retrieved by external DAO classes.
    We still want to use the OOTB presentation from BPM object (not the customer jsp).
    Thanks

    When you say:
    Is it possible to declare some attributes of BPM object not saved in database.do you mean you do not want the information stored in the Oracle BPM Engine's database?
    If this is the case, create a BPM Object with just two attributes. One would store your orderId as a primitive data type. The other attribute would be a BPM Object that would store all the other data you are going to retrieve from the external database.
    At the beginning of the screenflow, read the database using the orderId attribute and populate the other attribute (the BPM Object). At the end of the screenflow just before it flows to the end activity, you could set the second attribute (again, the BPM Object attribute) to null. This would keep the BPM object with the two attributes from storing anything but the orderId in the Engine's database table for the work item instance.
    Dan

  • Problem in Saving Data Fields to an Object

    Hi,
    I have a form which includes the User Information when you insert the user Id on to a field. When you enter the user Id in the field and submit the results get inserted into a  UserInfoBean class in java. The UserInfoBean object is retrieved to the getUserDat() in flex. The first time I do this it assignes the data to the  "userInfo" and I include this into the fields as
                               <s:TextInput id="firstNameId" text="{userInfo.FirstName}"/>
    The issue I am having is IF I do move to another section and comeback and try to look for another user the "userInfo" becomes NULL but the results.getItemAt(0) has data object UserInfoBean. When I try to print inside the getUserData() the userInfo.FirstName I get Null since the userInfo is NULL and results.getItemAt(0).FirstName I get the values.
    The code is attached below.
    Is there a way to fix this issue? How should I get the result into the userInfo?
    Thank you,
    Hass
    CODE:
    MXML Code
    <<UserInfo.mxml>>
    <fx:Script source="UserScript.as"/>
    <fx:Declarations>
    <services:DepositInfo id="userData" fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)" showBusyCursor="true"/>
    <s:CallResponder id="getUserDataResult" result="getUserData (event)"/>
    </fx:Declarations>  
    <s:Label text="User Id:" id="userIdLb"/>  <s:TextInput id="userId" text=""/>
    <s:Button label="Show" id="showBtn" click="loadUser()"/>
    <s:TextInput id="firstNameId" text="{userInfo.FirstName}"/>
    <s:TextInput id="lastNameId" text="{userInfo.LastName}"/>
    <s:TextInput id="emailId" text="{userInfo.Email}"/>
    ActionScript Code
    <<<UserScript.as>>>
    [Bindable] public  var userInfo:UserInfoBean = new UserInfoBean();
    private function loadUser(){
    getUserDataResult.token = userData.getUserInfoData(userId.text.toString());
    private function getUserData (event:ResultEvent):void{
        var results :ArrayCollection;
        results=event.result as ArrayCollection;
        if(results.length != 0){
            userInfo=results.getItemAt(0) as UserInfoBean;

    Hi,
    all development and client independend customizing is visible at once at all clients of an SAP instance.
    You have create separate instances like YA1(100) = DEV; YA2(100) = TEST; and YA3(100) = PROD. As a customizing sandbox in DEV a separate cleient might be helpfull.
    All instances could be created at the same server in an early stage of the project. Later at least for production a separate server should be used.
    Some consultants with some experience could save costs in such a project.
    Kind regards,
    HP

Maybe you are looking for

  • Windows 8 and CSS problems (FF 16 & 17)

    I just got a brand spanking new Win 8 computer (intl English). The only things installed on it are Adobe Master's Collection, Steam, Office and Firefox. In addition I tried installing adblocker, because that's a must for me and if this problem is res

  • No sound output, video freezes?

      My daughter's original Macbook Air recently stopped outputting sound except thru USB speakers and strangely video will only play for a few seconds before freezing. Sound preference pane shows no output device unless you plug in USB speakers thru wh

  • Reading Data : LoadVars

    I want to read data from several files whose names are written in array then I want to get an array with names of those file whose content length is more than 1000. I have done looping and able to get data of files and check their length but not able

  • I have a late 2006 iMac upgraded to lion, Quicktime doesn't work anymore. Preview won't show images, any ideas anyone?

    I have a late 2006 iMac upgraded to lion, Quicktime doesn't work anymore. Preview won't show images, any ideas anyone?

  • Closing window by pressing ESC

    Hi All, I am using Object oriented ALV Grid.To validate user input inside the Grid i used the DATA_CHANGED event. Inside the Method handled_data_changed (Method for the event DATA_CHANGED) validating input and showing error by Using the method ADD_PR