Xmltype.toObject() date attribute

Hi guys,
I use a 11g database and I am trying to convert an xml into an object
but I am having problems at oracle date fields
eg:<CREATED_DATE>2012-08-18T18:15:31.8673829+01:00</CREATED_DATE> cannot be inserted into CREATED_DATE DATE,
I tried the implicit oracle format yyyy-mm-ddThh24:mi:ss but it does not work, the only things that work is NLS_DATE_FORMAT (dd-mon-yy) .
Is there any way to do this?
CREATE OR REPLACE TYPE GROUP_STATEMENT_REC AS OBJECT(
GROUP_STATEMENT_ID           NUMBER(10), 
GROUP_ID                     VARCHAR2(5),
CUSTOMER_ID                  NUMBER(10), 
CREATED_DATE                 DATE,       
REPORT_GENERATED_DATE        DATE,       
EVENT_ID                     NUMBER(10), 
YEAR                         VARCHAR2(4),
MONTH                        VARCHAR2(2),
CURRENCY_CODE                VARCHAR2(3),
OPENING_BALANCE              NUMBER(17,2),
CLOSING_BALANCE              NUMBER(17,2),
CUSTOMER_COLLECTION_HOLD_IND VARCHAR2(1),
CUSTOMER_DISPUTE_IND         VARCHAR2(1)
) FINAL INSTANTIABLE;
CREATE OR REPLACE TYPE GROUP_STATEMENT_COL IS TABLE OF GROUP_STATEMENT_REC;
create or replace type gsbox is object (container GROUP_STATEMENT_COL);
declare
    lc_gs   GROUP_STATEMENT_COL := GROUP_STATEMENT_COL(GROUP_STATEMENT_REC(1,'40666',1000,sysdate,sysdate,11,'2004','10','EUR',123.23,32.23,'Y','N'),
                                                         GROUP_STATEMENT_REC(2,'40600',1001,sysdate-1,sysdate,12,'2004','10','EUR',123.23,32.23,'Y','N'));
    xmlgs         xmltype;
    l_box         gsbox;
    newgs         GROUP_STATEMENT_COL;
  begin
--dbms_output.put_line(lc_gs.count);
  -- select sys_xmlgen(gsbox(lc_gs)) into xmlgs from dual;
  xmlgs := new XMLType('<?xml version="1.0" encoding="utf-8"?>
<ROW xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <CONTAINER>
    <GROUP_STATEMENT_REC>
      <GROUP_STATEMENT_ID>0</GROUP_STATEMENT_ID>
      <GROUP_ID>30888</GROUP_ID>
      <CUSTOMER_ID>39</CUSTOMER_ID>
      <CREATED_DATE>2012-08-18T18:15:31.8673829+01:00</CREATED_DATE>
      <REPORT_GENERATED_DATE xsi:nil="true" />
      <EVENT_ID>0</EVENT_ID>
      <YEAR>2012</YEAR>
      <MONTH>7</MONTH>
      <CURRENCY_CODE>GBP</CURRENCY_CODE>
      <OPENING_BALANCE>4405.08</OPENING_BALANCE>
      <CLOSING_BALANCE>4405.08</CLOSING_BALANCE>
      <CUSTOMER_COLLECTION_HOLD_IND>N</CUSTOMER_COLLECTION_HOLD_IND>
      <CUSTOMER_DISPUTE_IND>N</CUSTOMER_DISPUTE_IND>
    </GROUP_STATEMENT_REC>
  </CONTAINER>
</ROW>');
   --dbms_output.put_line(xmlgs.getStringVal());
   xmlgs.toObject(l_box);
   newgs := l_box.container;
   for i in 1..newgs.count loop
    dbms_output.put_line(newgs(i).GROUP_STATEMENT_ID || ' : ' || newgs(i).GROUP_ID||newgs(i).REPORT_GENERATED_DATE||newgs(i).YEAR||'<<<');
   end loop;
  end;
 

Hi,
I am having problems at oracle date fields
eg:<CREATED_DATE>2012-08-18T18:15:31.8673829+01:00</CREATED_DATE> cannot be inserted into CREATED_DATE DATE,This format maps to the TIMESTAMP WITH TIME ZONE datatype in Oracle.
Change the CREATED_DATE attribute to :
CREATED_DATE                 TIMESTAMP WITH TIME ZONE, Then you should be able to do this :
SQL> alter session set nls_timestamp_tz_format = 'YYYY-MM-DD"T"HH24:MI:SS.FFTZH:TZM';
Session altered
SQL> declare
  2 
  3    xmlgs         xmltype;
  4    l_box         gsbox;
  5    newgs         GROUP_STATEMENT_COL;
  6 
  7  begin
  8 
  9    xmlgs := new XMLType('<?xml version="1.0" encoding="utf-8"?>
10  <ROW xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
11    <CONTAINER>
12      <GROUP_STATEMENT_REC>
13        <GROUP_STATEMENT_ID>0</GROUP_STATEMENT_ID>
14        <GROUP_ID>30888</GROUP_ID>
15        <CUSTOMER_ID>39</CUSTOMER_ID>
16        <CREATED_DATE>2012-08-18T18:15:31.8673829+01:00</CREATED_DATE>
17        <REPORT_GENERATED_DATE xsi:nil="true" />
18        <EVENT_ID>0</EVENT_ID>
19        <YEAR>2012</YEAR>
20        <MONTH>7</MONTH>
21        <CURRENCY_CODE>GBP</CURRENCY_CODE>
22        <OPENING_BALANCE>4405.08</OPENING_BALANCE>
23        <CLOSING_BALANCE>4405.08</CLOSING_BALANCE>
24        <CUSTOMER_COLLECTION_HOLD_IND>N</CUSTOMER_COLLECTION_HOLD_IND>
25        <CUSTOMER_DISPUTE_IND>N</CUSTOMER_DISPUTE_IND>
26 
27      </GROUP_STATEMENT_REC>
28    </CONTAINER>
29  </ROW>');
30 
31    xmlgs.toObject(l_box);
32    newgs := l_box.container;
33 
34    for i in 1..newgs.count loop
35      dbms_output.put_line(newgs(i).CREATED_DATE);
36    end loop;
37 
38  end;
39  /
2012-08-18T18:15:31.867383+01:00
PL/SQL procedure successfully completed

Similar Messages

  • XMLType.ToObject()

    Hi there,
    I am running into a problem when (in Oracle9i Enterprise Edition Release 9.2.0.6.0) trying to map an XML document contained in an XMLType variable to a corresponding object-type variable using the XMLType.ToObject() function.
    The problem occurs when the XML contains "repeating" fragments.
    I do not know how to define the corresponding object-type in such a way that XMLType.ToObject() does not run into error "ORA-19031: XML element or attribute ... does not match any in type ...".
    For example the following XML:
    ====================
    <MyObject>
    <ELEMENT01>VALUE01</ELEMENT01>
    <ELEMENT02>VALUE02</ELEMENT02>
    <MYGROUP>
    <GROUPELEMENT01>VALUEG01E01</GROUPELEMENT01>
    <GROUPELEMENT02>VALUEG01E02</GROUPELEMENT02>
    </MYGROUP>
    <MYGROUP>
    <GROUPELEMENT01>VALUEG02E01</GROUPELEMENT01>
    <GROUPELEMENT02>VALUEG02E02</GROUPELEMENT02>
    </MYGROUP>
    </MyObject>
    ====================
    The corresponding object-type that I defined is as follows:
    ====================
    create or replace type TP_MYGROUP_REC as object
    (GROUPELEMENT01 varchar2(50)
    ,GROUPELEMENT02 varchar2(50)
    create or replace type TP_MYGROUP_TAB as table of TP_MYGROUP_REC;
    create or replace type TP_MYOBJECT as object
    (ELEMENT01 varchar2(50)
    ,ELEMENT02 varchar2(50)
    ,MYGROUP TP_MYGROUP_TAB
    ====================
    I tested with the following script:
    ====================
    declare
    l_xmltype xmltype;
    l_myobject TP_MYOBJECT;
    begin
    l_xmltype := XMLTYPE
    ('<MyObject>
    <ELEMENT01>VALUE01</ELEMENT01>
    <ELEMENT02>VALUE02</ELEMENT02>
    <MYGROUP>
    <GROUPELEMENT01>VALUEG01E01</GROUPELEMENT01>
    <GROUPELEMENT02>VALUEG01E02</GROUPELEMENT02>
    </MYGROUP>
    <MYGROUP>
    <GROUPELEMENT01>VALUEG02E01</GROUPELEMENT01>
    <GROUPELEMENT02>VALUEG02E02</GROUPELEMENT02>
    </MYGROUP>
    </MyObject>');
    l_xmltype.ToObject(l_myobject);
    end;
    ====================
    This results in: ORA-19031: XML element or attribute GROUPELEMENT01 does not match any in type TP_MYGROUP_REC.
    Does anyone out there know how to define the object-type(s) in such a way that I can cast this type of XML to an object using XMLType.ToObject() ?
    Thanks a lot for your reaction,
    Jaap Kool

    In absence of an XML schema, Oracle uses a canonical mapping between SQL objects and XML.
    For instance, the XML structure corresponding to the object hierarchy defined in the first post is :
    <TP_MYOBJECT>
      <ELEMENT01>VALUE01</ELEMENT01>
      <ELEMENT02>VALUE02</ELEMENT02>
      <MYGROUP>
        <TP_MYGROUP_REC>
          <GROUPELEMENT01>VALUEG01E01</GROUPELEMENT01>
          <GROUPELEMENT02>VALUEG01E02</GROUPELEMENT02>
        </TP_MYGROUP_REC>
        <TP_MYGROUP_REC>
          <GROUPELEMENT01>VALUEG02E01</GROUPELEMENT01>
          <GROUPELEMENT02>VALUEG02E02</GROUPELEMENT02>
        </TP_MYGROUP_REC>
      </MYGROUP>
    </TP_MYOBJECT>Note the additional "TP_MYGROUP_REC" element that encloses the two leaf values.
    With that input, this works :
    SQL> declare
      2    l_xmltype  xmltype;
      3    l_myobject TP_MYOBJECT;
      4  begin
      5    l_xmltype := XMLTYPE(
      6  '<TP_MYOBJECT>
      7    <ELEMENT01>VALUE01</ELEMENT01>
      8    <ELEMENT02>VALUE02</ELEMENT02>
      9    <MYGROUP>
    10      <TP_MYGROUP_REC>
    11        <GROUPELEMENT01>VALUEG01E01</GROUPELEMENT01>
    12        <GROUPELEMENT02>VALUEG01E02</GROUPELEMENT02>
    13      </TP_MYGROUP_REC>
    14      <TP_MYGROUP_REC>
    15        <GROUPELEMENT01>VALUEG02E01</GROUPELEMENT01>
    16        <GROUPELEMENT02>VALUEG02E02</GROUPELEMENT02>
    17      </TP_MYGROUP_REC>
    18    </MYGROUP>
    19  </TP_MYOBJECT>');
    20 
    21    l_xmltype.ToObject(l_myobject);
    22 
    23    dbms_output.put_line(l_myobject.mygroup(1).groupelement01);
    24 
    25  end;
    26  /
    VALUEG01E01
    PL/SQL procedure successfully completed
    Here's the approach you can follow to achieve a "custom" mapping :
    {thread:id=2475819}
    and,
    {message:id=10712117}
    Edited by: odie_63 on 20 déc. 2012 09:54

  • About delta loading for master data attribute

    Hi all,
    We have a master data attribute loading failed which is a delta loading. I have to fix this problem but I have two questions:
    1. how can I find the those delta requests because I need to delete all these failed requests first, am I right ? Master data is not like cube or ods that we can find the requests in Manage, for master data how can we find them ?
    2. Could you please let me know the detailed procedures to perform this delta loading again ?
    Thanks a lot

    Hi...
    1. how can I find the those delta requests because I need to delete all these failed requests first, am I right ? Master data is not like cube or ods that we can find the requests in Manage, for master data how can we find them ?
    Look.....for master data.....no need to delete request from the target..........just make the status red.......and repeat the load.....But problem is that master data sometimes does'nt support Repeat delta..........if u repeat......then load will again fail with Update mode R.........in that case u hav to do re-init.......
    1) delete the init flag.......(In the IP scheduler >> in the top Scheduler tab >> Initialization option for source system)
    2) Init with data transfer(if failed load picks some records)..........otherwise .....init without data transfer.....if the last delta failed picking 0 records.......
    3) then Delta.......
    2. Could you please let me know the detailed procedures to perform this delta loading again ?
    1) Make the QM status red.........to set back the init pointer.......
    2) Repeat the load.....
    After that.........if again load failed with Update mode R.....
    1) delete the init flag.......
    2) Init with data transfer(if failed load picks some records)..........otherwise init without data transfer.....
    3) then Delta.......
    Regards,
    Debjani.....

  • Force read/refresh of master data attributes on query

    Hi there,
    We're having troubles with one input ready query that changes and attribute value (KYF) of one characteristic. That works fines and whe can save changed data on the infoprovider via DTP. Problem is when data is saved we need to refresh query as whe have both values on screen (original value as char attribute on rows) new value as input ready KYF, so after save we would like to see that both values are the same.
    Is there any way of force query no to read from caché as whe are changing master data attributes. I read something about IF_RSMD_RS_ACCESS class that can be implemented on Master Data access and force it there but sounds really hard so if this is the way can some of you guys give us some help.
    I hope I make myself clear on the explanation...
    Thanks in advance,
    Regards
    Carlos

    Dear All,
    The recent days that I tried working on changing master data attributes through BPS didn't work out.The Primary reasons was  that some of the attributes that I needed to change were not present in the transaction or planning cubes and the characteristics that are not part of your cube on which the planning area is based then you can not do changes on them.
    This is my undestanding .Please correct me if I am wrong.
    Besides , I was also thinking if we can do the same through portal.i.e retriving the master data infoobject ( based on the value seleceted for that infoobject by the user  )  and its attributes in the portal , edit them and save them back so that the updated values goes back to BW master data infoobject data base tables and updates the value.
    Eg . I have Natural Account master data infoobject in the BW with attributes fucntional area and expense center.Based on the user selection of any values for the Natural account lets say  01110 , then for 01110 natural account the portal should display the correspoding attributes values of fucntional area and expense center.Lets take this values as 10 , 20 respectively for fucntional area and expense center . What I want to do now is to change these attrbute values to 30 and 40  and I would like to save it back as the changed attribute values for that natural account for 01110 with new attribute values 30 & 40 respectively for fucntional area and expense center .
    Is this possible through portal and BW?
    Any idea on this would be appriciated.
    Regards,
    Ankit
    Edited by: Ankit Bhandari on Nov 21, 2008 12:21 PM
    Edited by: Ankit Bhandari on Nov 21, 2008 12:32 PM

  • Error while uploading master data attributes thru flat file

    while uploading master data attributes thru flat file i am facing the below errow. can nyone let me know plz.
    Error 8 when compiling the upload program: row 227, message: Data type /BIC/CCDEIO_MAT5_ATTR was found in a new

    This just means that you changed the transfer rules/transfer structure and have not refreshed the workbench yet.  The infopackage data hasn't been updated ... this is similar to a datasource update, where you need to replicate to make sure BW knows the latest version. 
    The best way to correct this error is to reload RSA1.  Every time I make a change to the tr/ts, I always run /nrsa1 to refresh the workbench. 
    Brian

  • Webi error for master data attributes if universe is on top of BI query

    Hi All,
    We are using BO XI R2 SP5 integrated with SAP BI 7.0.
    We have built a universe on top of a BI query and when we try to build a web intelligence report that includes master data attributes like Customer City,Customer Region etc BO throws the following error:
    Error 1:
    Database error: [SOFA Driver] : Error getting members for hierarchy (level=ZFI_I03/ZFI_I03_Q0003, member=[ZFI_I03___F172], opcode=[ZFI_I03___F172]) . System error in program CL_RSDM_READ_MASTER_DATA and form VALUEREAD-02- (see long text). Contact your Business Objects administrator or database supplier for more information. (Error: WIS 10901)
    For a universe built on a different BI query with master data attributes mentioned above,a different error occuring.
    Error 2:
    Your Web Intelligence session has timed out. Log out and log in again to InfoView. (Error: WIJ 77778)
    We have tried:
    1) We have executed the function module BAPI_MDPROVIDER_GET_DIMENSIONS with necessary inputs query/cube and we got correct output, like members, optional properties, selected properties and restrictions.But, still our problem remains same.
    2) Transaction u201CRSRTu201D and executed the query,transaction RSRV to check SID-tables and the related masterdata.
    Above steps we performed in response to SAP tickets 541052 / 2009,541131 / 2009 based on logs generated,but still the error persists.
    What is working:
    If a universe is built on top af an infocube directly, then there is no problem with master data attributes in webi report.
    Please let us know if you need more details to help us resolve this issue.

    Hi Naresh,
    based on the MDX you can identify that those are navigational attributes and thats why the issue is not happening when talking to the cube directly because when you connect to the cube directly the navigational attributes are not available.
    Take a look at note : 996197
    not sure if it will solve the problem because there are other notes when you search for the error message but this was most of the times the one that resolved the issue.
    the issue is in the BAPI functions
    Ingo

  • Error while loading to Master data attribute 0product

    Hi experts,
    While loading the data from 0material to 0product master data attribute i am getting a error ' 0MATERIAL : Data record 2421 (''300000072 '):Version '300000072 ' is not valid. I request u all to help me to solve this error.
    Diagnosis
        Data record 2421 & with the key '300000072 &' is invalid in value
        '300000072 &' of the attribute/characteristic 0MATERIAL &.
    System Response
        The system has recognized that the value mentioned above is invalid, and
        has processed this general error message. A subsequent message may give
        you more information on the error. This message refers to the same
        value, even though it does not state this explicitly.
    Procedure
        If this message appears during a data load, maintain the attribute in
        the PSA maintenance screens. If this message appears in the master data
        maintenance screens, leave the transaction and call it again. This
        allows you to maintain your master data.
    Please let me know what could be the problem....
    Regards,
    Prashanth
    Edited by: Prashanth Shetty on Jul 16, 2008 7:42 AM

    Hi,
       The issue is due to errorneous record.
    Delete the request in Master data and Try the following.
    1) Goto PSA --> filter the Status (Red or Green)
    Select the Red records and correct the data in which error is throwm.
    After correcting the data, save and Right click PSA and give Start update immediately.
    2) Load via Infopackage only to PSA and later update from PSA and check.
    Any one of the above 2 methods will solve the issue.
    Regards,
    Balaji V

  • Error when scheduling the infopackage for loading Master data attributes

    Hi,
    Iam getting the following error message when scheduling this Master data Attributes ZIP_0PLANT_ATTR_FULL..( Flexible update of Master data info objects)..
    In Data load monitor error i got this following error message.
    Error message when processing in the Business Warehouse
    Diagnosis
    An error occurred in the SAP BW when processing the data. The error is documented in an error message.
    System response
    A caller 01, 02 or equal to or greater than 20 contains an error meesage.
    Further analysis:
    The error message(s) was (were) sent by:
    Update rules
    Thanks

    HI,
    A caller 01, 02 or equal to or greater than 20 contains an error meesage This is an Idoc error. Please check the Idocs :
    1) SM37 job log (In source system if load is from R/3 or in BW if its a datamart load) (give request name) and it should give you the details about the request. If its active make sure that the job log is getting updated at frequent intervals.
    Also see if there is any 'sysfail' for any datapacket in SM37.
    2) SM66 get the job details (server name PID etc from SM37) and see in SM66 if the job is running or not. (In source system if load is from R/3 or in BW if its a datamart load). See if its accessing/updating some tables or is not doing anything at all.
    3) RSMO see what is available in details tab. It may be in update rules.
    4) ST22 check if any short dump has occured.(In source system if load is from R/3 or in BW if its a datamart load)
    5) Check in SM58 and BD87 for pending tRFCs and IDOCS.
    Once you identify you can rectify the error.
    If all the records are in PSA you can pull it from the PSA to target. Else you may have to pull it again from source infoprovider.
    If its running and if you are able to see it active in SM66 you can wait for some time to let it finish. You can also try SM50 / SM51 to see what is happening in the system level like reading/inserting tables etc.
    If you feel its active and running you can verify by checking if the number of records has increased in the data tables.
    SM21 - System log can also be helpful.
    Thanks,....
    Shambhu

  • Error while creating Data Source for master data attributes

    Hi BI Experts,
    Well its been some time for me that I have been part of Extraction in BI.I primarily handled reporting in my last assignments.
    I was trying extraction with flat files in SAP BI 7(new to sap bi 7 but very much familiar with BW3.5) but failed in the activity during master data attributes and text upload in infoobject (say IOSP_Mat).
    Here is the procedure that I did after creation of characteristic IOSP_Mat.I created a source system for flat file followed by data source for Master data attributes, i selected all the parameters correctly.i.e. csv file format, data seperator as   ,
    and other settings, now when i am trying to look at the proposed data in the next tab using Load example data.its not showing the desired result.The columns that I have maintained in Flat File is  MAT_NUMBER and MAT_NAME (with say 100 data in the file)
    same is the result when I am trying to load the text data too columns maintained are
    (LANGUAGE MAT_NUMBER Short Description)(same 100 data).
    now i used to rsa1old transaction  to upload the file using 3.5 version.i created info source for master data/text/hierarchies for  IOSP_Mat
    now when trying to upload it using info package for master and text data,I observe its(the data) not maintained in the characteristic IOSP_Mat.
    When I monitored ,I figured the data has not been even uploaded to the PSA level.
    Can you BI experts tell me the answer for this.
    Thanks,
    Srijith

    apologies to all of you for late response,
    was busy with some other activities.
    I don't remember the exact message,but I remember it was not loaded to even the PSA level.I will try it again and post the exact message.
    Thanks again for your quick response.
    Once again sorry to all of you for my late response
    Thanks,
    Sri

  • Where to set lock while loading master data attributes

    Hello Experts,
    I have two different datasources from ECC which loads into 0CUST_SALES attributes. I'm using two different DTP & transformation which are loading data in the this infoobject attributes.
    When i try to load data, the DTP fails with an error message at "Updating attributes for InfoObject 0CUST_SALES Processing Terminated" & the job log says: "Lock NOT set for: Loading master data attributes".
    Here what exactly  LOCK means?
    Thanks in advance.
    Zakir Khan.

    Hi,
    The lock means that some program is updating the master data (a table) and at the same time other program can not update that same master data. When the first program completes the updation it will release the lock so that the other program can update this.
    In your case you and schedule the DTP one after another.
    Thanks

  • Map My Update Rule from a Master Data Attribute

    Hello experts,
    I haven't tried this scenario yet, hope you can help me, the Issue is this
    I have 2 InfoObjects ZPSCHRCHY and 0PROFIT_CTR from InfoCube WBS cost and allocations I want both the InfoObjects to be mapped to 0PROFIT_CTR attribute of 0WBS_ELEMT master data object, I have tried the Master Data Attribute but only 0PROFIT_CTR is an attribute of the Master Data.how can I mapped ZPSCHRCHY and 0PROFIT_CTR to 0PROFIT_CTR?, Is creating a start routine for it must be used? Thank you very much
    Regards and Thanks
    Chris

    PROGRAM UPDATE_ROUTINE.
    $$ begin of global - insert your declaration only below this line  -
    TYPES:
    BEGIN OF r_MD_WBS_ELEMENT,
       WBS_ELEMT  like /BI0/PWBS_ELEMT-WBS_ELEMT,
       OBJVERS    like /BI0/PWBS_ELEMT-OBJVERS,
       PROFIT_CTR like /BI0/PWBS_ELEMT-PROFIT_CTR,
    END of r_MD_WBS_ELEMENT.
    DATA: t_MD_WBS_ELEMENT  TYPE STANDARD TABLE OF r_MD_WBS_ELEMENT,
           wa_MD_WBS_ELEMENT TYPE r_MD_WBS_ELEMENT.
    $$ end of global - insert your declaration only before this line   -
    The follow definition is new in the BW3.x
    TYPES:
      BEGIN OF DATA_PACKAGE_STRUCTURE.
         INCLUDE STRUCTURE /BIC/CS8ZPSG030.
    TYPES:
         RECNO   LIKE sy-tabix,
      END OF DATA_PACKAGE_STRUCTURE.
    DATA:
      DATA_PACKAGE TYPE STANDARD TABLE OF DATA_PACKAGE_STRUCTURE
           WITH HEADER LINE
           WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
    FORM startup
      TABLES   MONITOR STRUCTURE RSMONITOR "user defined monitoring
               MONITOR_RECNO STRUCTURE RSMONITORS " monitoring with record n
               DATA_PACKAGE STRUCTURE DATA_PACKAGE
      USING    RECORD_ALL LIKE SY-TABIX
               SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
      CHANGING ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
    $$ begin of routine - insert your code only below this line        -
    fill the internal tables "MONITOR" and/or "MONITOR_RECNO",
    to make monitor entries
      REFRESH: t_MD_WBS_ELEMENT.
          SELECT WBS_ELEMT
                 OBJVERS
                 PROFIT_CTR
          INTO TABLE t_MD_WBS_ELEMENT
          FROM /BI0/PWBS_ELEMT
       FOR ALL ENTRIES IN DATA_PACKAGE
         WHERE WBS_ELEMT   = DATA_PACKAGE-WBS_ELEMT.
        IF sy-subrc EQ 0.
        Do nothing
        ENDIF.
    if abort is not equal zero, the update process will be canceled
      ABORT = 0.
    $$ end of routine - insert your code only before this line         -
    ENDFORM.

  • Can routine replace "master data attribute of" update rule for performance?

    Hi all,
    We are working on CRM-BW data modeling, We have to look up agent master data for agent level and position for each transaction data. So now we are using "Master data attribute of" update rule. Can we use routine instead of "Master data Attribute of" ? Will it improve the loading performance? Since we have to load 1 lack transaction records , where as we have 20,000 agent details in agent master data.My understanding is, for each record in data package the system has to go to master data table and bring the agent details & store in cubes. Say one agent created 10 transactions, then this option "master data attribute of" will read the agent master data 10 times even though we are going to pull same details for all 10 transactions from master data. if we use routine, we can pull the agent details& storing in internal table removing all duplicates and in update routine we can read the internal table.
    Will this way improve performance?
    let me know if you need further info?
    Thanks in advance.
    Arun Thangaraj

    Hi,
    your thinking is absolutely right!
    I don't recommend to use the standard attribute derivation since it will perform a SELECT to the database for EACH record.
    Better implement a sorted table in your start routine; fill it with SELECT <fields> FROM <master_data_table> FOR ALL ENTRIES OF datapak WHERE OBJVERS = 'A' etc...
    In your routine perform a READ itab ... BINARY SEARCH.... I believe that you won't be able to go faster...
    hope this helps...
    Olivier.

  • Can´t create a date attribute for basic asset

    Hi
    I created a basic asset where I want to have a date attribute to pick up a date for calendar.
    My question is: How can I create a date attribute for a basic asset? For what I understand I have to create an element attribute in my descriptor file like this
    <PROPERTY NAME="imagedate" DESCRIPTION="Image date">
      <STORAGE TYPE="TIMESTAMP" LENGTH="8"/>
      <INPUTFORM TYPE="ELEMENT" WIDTH="24" MAXLENGTH="48" REQUIRED="NO" DEFAULT="" INSTRUCTION="Format: yyyy-mm-dd hh:mm"/>
      <SEARCHFORM DESCRIPTION="Image date" TYPE="ELEMENT" WIDTH="48" MAXLENGTH="128"/>
    </PROPERTY>
    Then, when I create a new instance of this asset, this attribute appears with this error:
    Date: Unable to find element OpenMarket/Xcelerate/AssetType/Oportunidade/ContentForm/imagedate
    But the element (imagedate.xml) is there!!
    I request help.

    It seems that the table does not have the entries, maybe b/c we are on R3 4.7.  Could you tell me what the entries are suppossed to be to allow the Asset and Cost Center lookup?  The search does work for WBS element though and I don't see anything specific to WBS element in that table.  In any case if you know the entries that would be great, also this table is not modifiable via SM30, here are the entries that I have in that table.
    AUF_NETNR     PLM_HELPVALUES_AUTHCHECK
    BU_PARTNER     BUPA_BAPI_F4_AUTHORITY
    DAENR     PLM_HELPVALUES_AUTHCHECK
    DOKNR     PLM_HELPVALUES_AUTHCHECK
    EQUNR     PLM_HELPVALUES_AUTHCHECK
    KUNNR     PARTNER_BAPI_F4_AUTHORITY
    LIFNR     PARTNER_BAPI_F4_AUTHORITY
    MATNR     PLM_HELPVALUES_AUTHCHECK
    NW_AUFNR     PLM_HELPVALUES_AUTHCHECK
    PARNR     PARTNER_BAPI_F4_AUTHORITY
    PS_POSID     PLM_HELPVALUES_AUTHCHECK
    PS_PSPID     PLM_HELPVALUES_AUTHCHECK
    QMNUM     PLM_HELPVALUES_AUTHCHECK
    S_AGNCYNUM     INT_FLBOOK_F4_AUTHORITY
    S_AIRPORT     INT_FLBOOK_F4_AUTHORITY
    S_BOOK_ID     INT_FLBOOK_F4_AUTHORITY
    S_CARR_ID     INT_FLBOOK_F4_AUTHORITY
    S_CITY     INT_FLBOOK_F4_AUTHORITY
    S_CONN_ID     INT_FLBOOK_F4_AUTHORITY
    S_COUNTNUM     INT_FLBOOK_F4_AUTHORITY
    S_COUNTR     INT_FLBOOK_F4_AUTHORITY
    S_CUSTOMER     INT_FLBOOK_F4_AUTHORITY
    S_FLCONN     INT_FLBOOK_F4_AUTHORITY
    S_FLCONN1     INT_FLBOOK_F4_AUTHORITY
    S_FLCONN2     INT_FLBOOK_F4_AUTHORITY
    S_PLANETYE     INT_FLBOOK_F4_AUTHORITY
    S_TRNUM     INT_FLBOOK_F4_AUTHORITY
    TPLNR     PLM_HELPVALUES_AUTHCHECK
    USCOMP     SUSR_BAPI_F4_AUTHORITY
    XUBNAME     SUSR_BAPI_F4_AUTHORITY

  • Data attributes in PO objects

    Hi Guruus,
    I'm trying to find in all the PO objects where the screen data are filled in the data attributes. For instance, the attribute PO_ITEM_HASH_TABLE from CL_PO_ITEM_HANDLE_MM seems to hold the data. But I'd like to find exactly where it's filled in, and I can(t find out. It's just used in methodes GET_DATA and SET_DATA, and the constructor seems not to explicitly fill it.
    Actually, my requirement is to get a custom Account Assigment element from stocked orders. That's mean that FI account assigment elements are not displayed, just FM's if you've set them in customizing. (the Account Assigment category in PO line is blank).
    Note that I have created a new account assignment element within structure CI_COBL using FI customizing.
    I've found a way to display my element somewhere near the display of the FM account assigment elements, but the value user enters is not sent to PAI. It looks like because it's not in the PO_ITEM_HASH_TABLE attribute.
    If anyone has a clue,
    N.H.

    Well, none answered, but I've solved my issue. Thanks to some Customer Structure Appends and some enhancements, now I have my new account assignment element in PO, without any standard modifications
    N H

  • How to update a Date attribute type?

    Hello!
    I have several Date attributes in some categories that I need to update with the Oracle Content API.
    I saw that OCDB returns a GregorianCalendar object to retrieve the date value, but I can't update it with the same object, I used this java code:
    day = token.nextToken();
    month = token.nextToken();
    year = token.nextToken();
    int iDay = Integer.parseInt(day);
    int iMonth = Integer.parseInt(month);
    int iYear = Integer.parseInt(year);
    GregorianCalendar cal = new GregorianCalendar(iYear, iMonth, iDay);               
    categoryDef2[temporal2] = ClientUtils.newNamedValue(oculto, cal);
    The date is in format dd/mm/yyyy so I parse it with StringTonekizer and passed to GregorianCalendar constructor, but I always receive AggregateError at updateDocument moment...
    Anyone can help me? Thank you

    Hi,
    Convert the Calendar to a Date object and return this to Content DB.
    e.g. Item doc = ...
    Object value = CommonUtils.getAttribute(doc, Attributes.CREATE_DATE);
    Date d = null;
    if (value instanceof java.util.Calendar)
    Calendar c = (Calendar) value;
    d = c.getTime();
    else if (value instance of java.util.Date)
    d = (Date) value;
    cheers
    Matt

Maybe you are looking for

  • My Pages documents are now all iridescent?

    I downloaded the new Pages and now all my previous documents and new documents come up iridescent? I looked all over Preferences and Help, but to no avail. How do I go back to the "normal" settings? HUGE thanks!

  • CS6 install on Mac OS X

    Hi there - new Mac user. Previously installed CS5.5 on PC with no problems. I get this error on install: Serial number you provided is valid, but a qualifying product could not be found on this computer. I selected the only available CS6 download fro

  • How to integrate two VIs (diffserv,​intserv)

    hi  i need help in the to make  integration of two vi (DiffServ,IntServ) attached with this  email  as my topic is integration of differentiated services and Integrated services .. how i can integrates these two VIs thanks Attachments: Diffserv.vi ‏5

  • KB925398 (32 bit one) is missing in SCCM

    Hello, I ran Microsoft Baseline Security Analyzer on one machines and it showed that I am missing KB925398 (32 bit one), I need to have it loaded but SCCM2012 is only showing me the 64 bit version of the same KB. The 32 bit version of this KB was lis

  • Random images flashing on screen

    Hey folks, I have a 1 month old powerbook G4. I have a recurring problem that is hard to describe. I have images that look like other windows that are open in the background that are open flashing up in the bottom third of my screen. They seem to go