How to get the last update date
Hi Everyone,
I need to insert into a table the name of the package and date of the last updated version of the execution.
I was thinking in inserting from procedure into a table, the ID and system date into a table.
But I would like to know if there is another way, or better way of doing this.
I do appreciate your help and guidance.
Best regards.
J_ORCL
Edited by: J_ORCL on Apr 23, 2012 9:16 AM
Hey Atdi,
Thank you so much for your guidance and help.
What i do need is the following:
Once I am inserting/passing some data into a table from an excel file/Database to an Oracle Table in my environment, I do need now to get a record of the last update that has been inserted. And after that I will have to show that date on my screen, but that is something else.
So i have thought of inserting it with a store procedure over a new table that i will have to create or if ODI stores this information somewhere it will be really useful for me to retrieve from there.
In some cases I am passing data from one table to other using store procedures, because there is no link between them, but as this is a new scenario, which is why I am asking if ODI already does this for us, or if I will have to implement it myself.
Hope to be a bit clearer with this explanation.
Please do not hesitate to contact me if any further detail is required.
Best regards.
J_ORCL
Similar Messages
-
How to find the last update date time and user of record field peoplecode
how to find the last update date time record field peoplecode?
Thank you.One can check the last update date time using the following query
SELECT LASTUPDDTTM FROM PSPCMPROG WHERE OBJECTVALUE1 LIKE 'RECNAME' AND OBJECTVALUE2 LIKE 'FIELDNAME' -
How to get the last run date.
We intend to develop an incremental data load mapping using this strategy:
1) The mapping reads the date it was last run from an auxiliary table.
2) It selects from the source only those rows that were inserted or updated after said date.
3) Then, a post-mapping process updates the last run date in the auxiliary table, using SYSDATE.
The problem with this logic is that there is a gap: if the mapping starts running at 1:00 and ends at 2:00, the rows that are inserted in between will never be loaded.
Is there any way to get the value when the mapping started running? Is there a better way to do this?
Any help would be appreciated.
Juan AlgabaThere is always the possibility of some record updates slipping through the crack if you are depending on dates unless you are very carefull. All of the audit tasks that the OWB-generate code performes take time. Any pre- or post- process that needs to run takes time. So which date is the best cuttoff point to equate to "when the last run of the merge (or insert or update) statement completed"?
Plus, how do you handle reloads if the previous load failed and your mapping had incremental commits?
Is your source on another server? If so, are the dates in perfect synch? The audit tables populate with sysdate of your runtime schema. Is that the same as the sysdate on your source remote database?
I would qualify my query to look for all updates since the start of the last run that finished successfully - adjusted if neccesary for sysdate differences if it is on a remote schema. And make sure that your code handles any reloads gracefully in the event that this brings back data that you have already loaded once. .
Because we use Oracle Streams to load a local staging area, we also have custom code to dump the primary keys of all data changes to utility staging tables while streams is updating the local copy. So, our Person table has an st_Person_delta table that just holds the primary keys that have been updated by Streams since the last ETL run.
During datamart load we disable the streams apply to stabilize our environment, and join these lists of pk's to their source tables to drive our ETL. So we only select data where Streams has performed an update to the row since our last run. When we are done our ETL, we truncate the primary key staging tables, and then turn streams back on to start loading up our new delta into our staging tables again..
The ETL gets pretty complex though when many tables join together in one mapping and you need to check all possible source table deltas to see if any of them got updated to determine the delta for a given dimension or fact record, but it works great once you get it all done. -
How to get the last run date of an ISchedulerTask ?
Hello,
I have implemented an ISchedulerTask and inside the run method I would like to get a reference to the last timestamp/date that the task was running, any idea how to achieve that?
Rgds,
RoyHi
You can create a custom metadata property and set this property with the date when the Ischedlar task runs.
So, in your code you can read this property whenever you want to read the previous date.
Hope this works.
Thanks
Puneet -
How to get the last update time for a table ?
I want to know the last change of the table data , for example, a record has been changed, how can i get that time?
Regards,
LamentHello
check the tables CDHDR & CDPOS
But the condition when u r checking the these table.for a particular field the at data element level- futhur charactestictab level we have one check box called change document it as tick
Thank u,
santhosh -
How can I get the last updated email address of the customer ??
Dear All,
Please let me know, How can I get the last updated email address of the customer ??
Also, I am trying to read CDHDR table where OBJECTCLAS is ADRESSE, however what value should be passed into OBJECTID field, looks like it is ADRNR with a Suffix BP.
Please confirm me what value should be passed into OBJECTID field.
Thank you.
AnithaHi Anitha,
Check if this is something that helps you:
Change documents in BAS
CDHDR
address type 1
objectclass = ADRESSE
objectid = addrgroup + addrnumber (ADRC-ADDR_GROUP + ADDRNNUMBER) !!
'BP 000xxxxxx'
private address (address type 2)
objectclass = ADRESSE2
objectid = 'BP 000xxxxxx000yyyyyyy'
persnumber+adrnr private
address type 3
objectclass = ADRESSE3
objectid = 'BP 000xxxxxx000zzzzzzz'
persnumber +comp.address
The above details is from the link: http://wiki.sdn.sap.com/wiki/display/ERPLO/LO-MD-BP
Regards,
Swarna Munukoti -
How do I get the last changed date & time of a file in app server?
Hi Experts,
How do I get the last changed date & time of a file in app server?
Thanks!
- Anthony -Hi,
that's what I use...
CALL 'C_DIR_READ_FINISH'. " just to be sure
CALL 'C_DIR_READ_START' ID 'DIR' FIELD p_path.
IF sy-subrc <> 0.
EXIT. "Error
ENDIF.
DO.
CLEAR l_srvfil.
CALL 'C_DIR_READ_NEXT'
ID 'TYPE' FIELD l_srvfil-type
ID 'NAME' FIELD l_srvfil-file
ID 'LEN' FIELD l_srvfil-size
ID 'OWNER' FIELD l_srvfil-owner
ID 'MTIME' FIELD l_mtime
ID 'MODE' FIELD l_srvfil-attri.
* l_srvfil-dir = p_path .
IF sy-subrc = 1.
EXIT.
ENDIF." sy-subrc <> 0.
PERFORM p_to_date_time_tz
USING l_mtime
CHANGING l_srvfil-mod_time
l_srvfil-mod_date.
TRANSLATE l_srvfil-type TO UPPER CASE. "#EC TRANSLANG
PERFORM translate_attribute CHANGING l_srvfil-attri.
CHECK:
NOT l_srvfil-file = '.',
l_srvfil-type = 'D' OR
l_srvfil-type = 'F' .
APPEND l_srvfil TO lt_srvfil.
ENDDO.
CHECK NOT lt_srvfil IS INITIAL.
pt_srvfil = lt_srvfil.
FORM p_to_date_time_tz USING p_ptime TYPE p
CHANGING p_time TYPE syuzeit
p_date TYPE sydatum.
DATA:
l_abaptstamp TYPE timestamp,
l_time TYPE int4,
l_opcode TYPE x VALUE 3,
l_abstamp TYPE abstamp.
l_time = p_ptime.
CALL 'RstrDateConv'
ID 'OPCODE' FIELD l_opcode
ID 'TIMESTAMP' FIELD l_time
ID 'ABAPSTAMP' FIELD l_abstamp.
l_abaptstamp = l_abstamp.
CONVERT TIME STAMP l_abaptstamp TIME ZONE sy-zonlo INTO DATE p_date
TIME p_time.
ENDFORM. " p_to_date_time_tz
Regards,
Clemens -
How to find the Last modified date and time of a package
Hi,
We need a clarification on how to find the Last modified date and time of a package in Oracle. We used the example below to explain our scenario,
Lets consider the following example
Let A, B be two packages.
Package A calls the package B. So A is dependent on B.
When A is compiled the TIMESTAMP,LAST_DDL_TIME in USER_OBJECTS gets updated.
Now there a modification in package B so it is compiled. There is no modification in package A.
Now when the package A is executed the TIMESTAMP,LAST_DDL_TIME in USER_OBJECTS gets updated but we did not make any change in Package A. Now we need to find last modified date and time of the package A . So we can not rely on the TIMESTAMP,LAST_DDL_TIME in USER_OBJECTS . Can u please tell us any other solution to get last modified date and time of the package A .
Regards,
Vijayanand.CHere is an example:
SQL> SELECT OBJECT_NAME,CREATED,LAST_DDL_TIME,TIMESTAMP,STATUS FROM USER_OBJECTS
2 WHERE OBJECT_NAME = ANY('A','B');
OBJECT_NAM CREATED LAST_DDL_TIME TIMESTAMP STATUS
A 20-MAY-2004 10:57:32 20-MAY-2004 10:57:32 2004-05-20:10:57:32 VALID
B 20-MAY-2004 10:58:22 20-MAY-2004 10:59:04 2004-05-20:10:59:04 VALID
SQL> CREATE OR REPLACE PROCEDURE A AS
2 BEGIN
3 NULL;
4 NULL;
5 END;
6 /
Procedure created.
SQL> SELECT OBJECT_NAME,CREATED,LAST_DDL_TIME,TIMESTAMP,STATUS FROM USER_OBJECTS
2 WHERE OBJECT_NAME = ANY('A','B');
OBJECT_NAM CREATED LAST_DDL_TIME TIMESTAMP STATUS
A 20-MAY-2004 10:57:32 20-MAY-2004 11:01:28 2004-05-20:11:01:28 VALID
B 20-MAY-2004 10:58:22 20-MAY-2004 10:59:04 2004-05-20:10:59:04 INVALID
SQL> EXEC B
PL/SQL procedure successfully completed.
SQL> SELECT OBJECT_NAME,CREATED,LAST_DDL_TIME,TIMESTAMP,STATUS FROM USER_OBJECTS
2 WHERE OBJECT_NAME = ANY('A','B');
OBJECT_NAM CREATED LAST_DDL_TIME TIMESTAMP STATUS
A 20-MAY-2004 10:57:32 20-MAY-2004 11:01:28 2004-05-20:11:01:28 VALID
B 20-MAY-2004 10:58:22 20-MAY-2004 11:01:53 2004-05-20:11:01:53 VALID
Note that the date under the column 'created' only changes when you really create or replace the procedure.
Hence you can use the column 'created' of 'user_objects'. -
How to get the last day of the week?
Hii
i can get the calender week number for any given date using
SELECT to_char(to_date('04/04/2011','MM/DD/YYYY'),'WW') FROM dual
can any body tell me, how to get the last day of that week ?
and the answer should be 04/08/2011(8th april )
thanks
San
Edited by: sandeep9 on Apr 4, 2011 3:50 AMHi, San,
Here's one way:
WITH sample_data AS
SELECT DATE '2011-04-04' AS dt
FROM dual
SELECT dt
, TO_CHAR (dt, 'WW') AS week_num
, NEXT_DAY ( dt - 1
, TO_CHAR ( TRUNC (dt, 'YEAR') - 1
, 'Day'
) AS end_o_week
FROM sample_data;Another way is to use date arrithmetic:
WITH sample_data AS
SELECT DATE '2011-04-09' AS dt
FROM dual
SELECT dt
, TO_CHAR (dt, 'WW') AS week_num
, TRUNC (dt, 'YEAR')
+ (7 * CEIL ( (dt - (TRUNC (dt, 'YEAR') - 1))
/ 7
- 1 AS using_date_arithmetic
FROM sample_data; -
How to get the last day of a month?
HI,
I want to know how to get the last day of a month.
In my JClient form, I tried to get it by using oracle.sql.Date method, that is:
lastday=oracle.sql.Date anydate.lastDayOfMonth();
But it does not work. The result is lastday=anydate.
Why?
StephenYou can use the Calender class...
Calendar c = Calendar.getInstance();
and then something like...
c.add(c.MONTH, 1);
int dayOfMonth = c.get(Calender.MONTH);
c.add(c.DAY_OF_MONTH, - (dayOfMonth-1) );
other usefull functions are:
System.out.println(" YEAR : " + c.get(Calendar.YEAR));
System.out.println(" MONTH : " + c.get(Calendar.MONTH));
System.out.println(" DAY_OF_MONTH : " + c.get(Calendar.DAY_OF_MONTH));
System.out.println(" DAY_OF_WEEK : " + c.get(Calendar.DAY_OF_WEEK));
System.out.println(" DAY_OF_YEAR : " + c.get(Calendar.DAY_OF_YEAR));
System.out.println(" WEEK_OF_YEAR : " + c.get(Calendar.WEEK_OF_YEAR));
System.out.println(" WEEK_OF_MONTH : " + c.get(Calendar.WEEK_OF_MONTH));
System.out.println(" DAY_OF_WEEK_IN_MONTH : " + c.get(Calendar.DAY_OF_WEEK_IN_MONTH));
System.out.println(" HOUR : " + c.get(Calendar.HOUR));
System.out.println(" AM_PM : " + c.get(Calendar.AM_PM));
System.out.println(" HOUR_OF_DAY (24-hour): " + c.get(Calendar.HOUR_OF_DAY));
System.out.println(" MINUTE : " + c.get(Calendar.MINUTE));
System.out.println(" SECOND : " + c.get(Calendar.SECOND));
System.out.println();*/ -
How to get the last day according to fiscal period input in selection scree
Hello expert
how to get the last day of fiscal period input.
the fiscal period inculdes 1-16
when fiscal period is greater than 12, only calculate the last day of 12nd month
your solution will be apprecaited, FM existing?
thank you
KevinHi,
when you give a particular date in any month
the following fm will give you the last date of that month
here you can give
R_FDATE-HIGH as 01 and month as the period you wnat and year for current year
concatenates '01' month year into r_fdate-high separated by '.'.
then it will give g_ltdt for that month and year which wil be the last date of that month
CALL FUNCTION 'RP_LAST_DAY_OF_MONTHS'
EXPORTING
DAY_IN = R_FDATE-HIGH
IMPORTING
LAST_DAY_OF_MONTH = G_LTDT
EXCEPTIONS
DAY_IN_NO_DATE = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
thanks & regards,
Venkatesh -
How to get the "last changed by" for a set of function modules?
How to get the "last changed by" for a set of function modules?
is there any table to get it??See [this|Re: Date of creation of function module] I posted earlier.
>TFDIR will give you the name of the function group program and the include number.
>E.g. SAPLZFUNCGROUP Include 01.
>From this you can construct the include name: LZFUNCGROUPU01.
>You can look this up in TRDIR to find the creation date (CDAT) of the function module.
In your case, you need unam and udat.
matt -
Query on 0TCT_MC01 to get the last used date of a query
Dear All,
I tried to create a query on 0TCT_MC01 to get the last used date of a query.
Since we do not have readily available key figure for Last used date, could any one help me out to achieve this result?
I am interested to find the old queries which are not being used anymore.
Thanks in advance.You can get the info from the below tables
if you are working with BW 3.5 you can look in table RSDDSTAT in BI 7.0 it is RSDDSTAT_OLAP.
Make a selction on the infocube and the OLAP Statistic Object which is the query ID and execute. Then you should see how often the query was executed, by whom and which date/time.
in field Statistics Object Name Query ID you type in the tech name of the query
from the Counter for statistics event calls -- will give the count... no of times the query used least the count lesser the query is used.
Regards
KP
Edited by: Konduru Prashanth. on Dec 22, 2011 2:44 PM -
How to Query for last updated data in planning Cube?
Hi,
i want to see the last updated data with specific timestamp on one of our planning application Cube, IS it possible ?
I have gone through application log and essbase server log but didn't get much information
Can any one please let me know.
ThxHow was the data updated, if it was through planning then you can enabling data auditing and you should be able to then query the information.
If it is was a data load then in EAS go the database, edit properties, modications, it should display data load information.
Cheers
John
http://john-goodwin.blogspot.com/ -
How to find out last update date for business partner's marketing attribute
How to find out last update date for business partner's marketing attribute??
Im freshie for SAP Application and im assigned to find out last update date for marketing attribute changed
which table is involved??
Yours kindness will be appreciated
thanksYou can take a look at table AUSP as well as CRMD_AUSP_HIST.
The "changed by" and "changed at" are logged on attribute level, not on attribute value level. When you change one specific value, the system does a "re-insert" of all existing values of this attribute.
Take a look at the SAP notes 938426 and 966670 these may assit you in resolving the issue.
Regards,
William Laverde
Maybe you are looking for
-
Can not see the schema under the new connection -- Please help
The database is Oracle. Recently I requested our DBA to do a database refresh, and here was she did. 1. Drop the user (TDEV, schema owner) in Dev. 2. Recreate the user, TDEV, with the same password, roles and tablespaces. 3. Using Oracle export comm
-
I recently had some repairs done to my ATT U-verse connection, and now my Safari doesn't open in a full screen. How do I reset that to open in full screen?
-
Video Purchased is greyed out on iPhone 3GS
Greetings and Salutations, I recently purchased the Blueray Combo pack of Pirates of Caribbean "On Stranger Tides". I installed the Digital Version to iTunes successfully and was able to select it to be transfered to my iPhone. It transfered just
-
IPhone 6 Plus will not allow sync without erasing content
I recently upgraded from an iPhone 5 to an iPhone 6 Plus towards the end of 2014. My iPhone 5 had always been synced with my former Windows laptop, however I upgraded to a Macbook Pro in mid 2014. My iPhone 6 Plus has never been synced with or even p
-
I bought a used macbook air, it didn't come with the flash drive to do a factory reset. Can I download the info needed and save it to my own flash drive and then do a factory reset? If not what can I do?