Get old and new values from DBTABLOG table
Hi,
I am developing a report to display all changes to some fields of PKHD table over a date range. CDHDR & CDPOS do not capture the changes while DBTABLOG does. But the variable key field (LOGDATA) in DBTABLOG does hold encrypted values which need to be decrypted. Is there any FM or a way out to get them ?
Please let me know. Thanks a lot.
Regards
Neeraj
Use DBLOG_READ and then work with the data like in the following sample
* Constants (cf. SAP RSVTPTOP)
CONSTANTS: type_i4 LIKE x031l-fieldtype VALUE 'AC', "UF160698B
type_i2 LIKE x031l-fieldtype VALUE 'A8',
type_f LIKE x031l-fieldtype VALUE '88'. "UF160698E
* First - informations from directory
REFRESH fld_list.
CALL FUNCTION 'GET_FIELDTAB'
EXPORTING
langu = sy-langu
only = ' '
tabname = 'TEVEN'
withtext = 'X'
* IMPORTING
* HEADER =
* RC =
TABLES
fieldtab = fld_list
EXCEPTIONS
internal_error = 1
no_texts_found = 2
table_has_no_fields = 3
table_not_activ = 4
OTHERS = 5.
LOOP AT fld_list INTO fld WHERE keyflag = 'X'.
ADD fld-intlen TO keylen.
ENDLOOP.
* Then extract data log
REFRESH obj_list.
obj-tab = 'TEVEN'.
INSERT obj INTO TABLE obj_list.
CALL FUNCTION 'DBLOG_READ'
EXPORTING
from_day = s-aedtm-low
* FROM_TIME = '000000'
to_day = s-aedtm-high
* TO_TIME = '235959'
obj_list = obj_list
* ACCESS_DATABASE = 'X'
* ACCESS_ARCHIVES = ' '
* AUTO_ARCH_SEL = ' '
* USER_LIST =
CHANGING
log_list = log_list
EXCEPTIONS
archive_access_error = 1
no_archives_found = 2
OTHERS = 3.
* Extract data from returned tables
LOOP AT log_list INTO log.
LOOP AT fld_list INTO fld.
IF fld-keyflag = 'X'.
ASSIGN log-logkey+fld-offset(fld-intlen)
TO <hexa> TYPE 'X'.
ELSE.
fld-offset = fld-offset - keylen.
ASSIGN log-logdata+fld-offset(fld-intlen)
TO <hexa> TYPE 'X'.
fld-offset = fld-offset + keylen.
ENDIF.
CASE fld-inttype.
WHEN 's'.
f_type = type_i2.
WHEN 'I'.
f_type = type_i4.
WHEN 'F'.
f_type = type_f.
ENDCASE.
IF 'sIF' CS fld-inttype.
feld = <hexa>.
CALL FUNCTION 'DB_CONVERT_FIELD_TO_HOST'
EXPORTING
type = f_type
CHANGING
field = feld
EXCEPTIONS
wrong_param = 1
OTHERS = 2.
ASSIGN feld TO <hexa> TYPE 'X'.
ENDIF.
ASSIGN <hexa> TO <char> TYPE 'C'.
teven+fld-offset(fld-intlen) = <char>.
ENDLOOP.
* Here structure teven is filled
ENDLOOP.
Regards
Similar Messages
-
How to fetch old and new value from of a field(non-key) from LOGDATA
Hello SDNers,
i m fecthing LOgdata from dbtlog table[in our case the log is not getting Updated in CDHDR and CDPOS table]
i m using the same logic as it is used in RSVTPROT
but the problem is
" IT is fetching OLD and NEW VALUE after Update from same field LOGDATA of dbtlog table BUT when i used same logic it is FEtching only OLD VALUEs,
CAN U GUYS PLS TELL ME HOW TO FECTH OLD VALUE and NEW VALUE of a PArticular field(non-key field, fecthing key field is not an issue) From LOGDATA field of DBTLOG.
thx a lot in advance
Regards
KuldeepHi,
May be this link is useful to you.
a® -
OIM 11g API to retrieve old and new values
Hi
In Self Service profile, when I modify user data, OIM is triggering an approval workflow. Our requirement is to use API which should retrieve old value and new value of the attribute when the request has been raised.
We tried to use getTargetEntities() but it is retrieving only new values. Is there any other API which can do the needful?
ThanksUse this :
HashMap<String , Serializable> eventDataMap = new HashMap<String , Serializable>();
eventDataMap.putAll(orchestration.getInterEventData());
HashMap currentUserState = new HashMap(); //HashMap that contains old values
HashMap newUserState = new HashMap(); //HashMap that contains new values
currentUserState.putAll(((User) eventDataMap.get(CURRENT_USER)).getAttributes());
newUserState.putAll(((User) eventDataMap.get(NEW_USER_STATE)).getAttributes()); -
How to make validation in Bean and select value from another table
I want to know how to select data from table in backing bean according to primary key i have
the problem is that
i have a table Employee_Salary contains Employee ids and their salary
Empoloyee_Salary table
Employee_ID Number
Employee_salary Number
And Another table Called Employees
Employees table
Employee_ID Number
IsManager Varchar2 its value is [*Yes or NO*]
and other columns that i don't care about this table
i have on a jsff page an <af:table> this table is editable this is the Empoloyee_Salary table
*i want to check before save or after insert if this employee is Manager [from Employees tabke(yes or no)] the salary*
cannot be less that 100
i want to know how to make this how to select the value from employees table according to the id i have in the employee_salary table how to make this and make this validation
i have to select IsManager from Employees Table to see if this manager or no
i want to know how to make this in a bean
i use jdeveloper 11g
and my project is ADF Fusion project
and the page that have the Emplpyee_Salary table is JSFF
thanks in advanceYou might want to write this code in a validator on the entity object if it should apply from every screen.
If you want to access view objects from a backing bean the basics are here: http://download.oracle.com/docs/cd/E15523_01/web.1111/b31974/bcservices.htm#sthref918 -
TS1389 I am trying to authorize my new computer to download all old and new songs From my library
How do I authorize my new computer so I can download my old and new songs off my library
Authorization and Deauthorization
See iTunes Store- About authorization and deauthorization for Macs.
See How to Authorize or Deauthorize iTunes | PCWorld for Windows.
In iTunes you use the Authorize This Computer or De-authorize This Computer option under the Store menu in iTunes' menubar. For Windows use the ALT-S keys to access it.
More On De-authorizing Computers (contributed by user John Galt)
You can de-authorize individual computers, but only by using those computers. The only other option is to "de-authorize all" from your iTunes account.
1. Open iTunes on a computer
2. From the Store menu, select "View my Account..."
3. Sign in with your Apple ID and password.
4. Under "Computer Authorizations" select "De-authorize All".
5. Authorize each computer you still have, as you may require.
You may only do this once per year.
After you "de-authorize all" your authorized computers, re-authorize each one as required.
If you have de-authorized all computers and need to do it again, but your year has not elapsed, then contact: Apple - Support - iTunes - Contact Us. -
Min and Max values from entire table
Hi,
i have requirement in which i need to find the min and max values from the entire table.
See the sample data
create table test
Sal1 int,
Sal2 int,
Sal3 int
insert into test values (100,700,5700)
insert into test values (200,3300,5300)
insert into test values (4400,1200,3500)
insert into test values (5400,5600,3100)
i want the output as 100 and 5700.. how can i achieve this in a single query. Please through some light on this topic..!
Thanking you in advance
Regards,
Balaji Prasad B
Balaji - BI DeveloperBelow is an example with a subquery for each of the queries Mohammad posted in order to return both min and max in a single result set.
SELECT ( SELECT MAX(Maxx) AS Maxx
FROM test UNPIVOT
( Maxx FOR E IN ( Sal1, Sal2, Sal3 ) ) AS unpvt
) AS Maxx
, ( SELECT MIN(Minn) Minn
FROM test UNPIVOT
( Minn FOR E IN ( Sal1, Sal2, Sal3 ) ) AS unpvt
) AS Minxx;
Dan Guzman, SQL Server MVP, http://www.dbdelta.com -
How to check old and new value for a text item attached to a lov?
Hi,
I am new to Forms.
I need your help in following.
I have a form which has a text item which is attached to a LOV. I want to track what changes are being done using that form. So i want to know what was old value and what is new value.
I can get the new value as it is there in form field. how can i know what was the old value.
Thanks
Prashant PathakThis is wrong:
name_in(':' ||l_audit_block.field_name)
this is right and will get you the current value of the the item:
name_in('l_audit_block.field_name');
Assuming the name of you block is "l_audit_block" and the name of your item is "field_name".
Please note name_in() returns your current value for an item. In your case this may or may not be the "old" value. I define "old" value as the value it was when it was queried. If that is what you are looking for you need to use the get_item_property() call that Steve described above.
--pat -
Get old and new text of a VIEW at DDL trigger
Is it possible to get the old and the new text of a view at the DDL triggers
Hi,
Don't know regarding later Oracle versions but with 8.1.7.3.0 you cannot base system triggers on tables or views: Ora-30506.
Regards,
Andrew Velitchko
BrainBench MVP for Developer/2000
http://www.brainbench.com -
How to get Essential and additional qualifications ,From which table
Hi all,
In one of my requirement, the report should show the Qualifications and Essential qualifications columns in the output.
Requirement is :
1. I have brought qualifications of Applicant from PB0024 table.
2. I need to compare these with the Qualifications maintained in Job for the pernr.
3. There are two types of Qualifications namely essential Qualifications and additional Qualifications.
4.
How do we get the Qualifications maintained for a job/Position?
How can we distinguish between Qualifications and essential Qualifications maintained for a job at the database table level ?
Please reply ASAP.
Regards,
Rama.PHi Dilek Ersoz Adak,
How can we get the jobs assigned to a position ,from which table ?
Actually i am doing a custom recruitment report which displayes several fields along with the qualificaions and additional qualifications.
For the two fileds: in the spec it is given as:
14. Qualification (This is maintained in HRPE_PROFQ_TBJID-infotype 0024 of the employee. Thus, check Position maintained for the employee in P4002_OBJID, against this position check for Essential Qualification, related object type u2018Qu2019 HRPE_PROFQ_ESSENTIAL, compare this with the qualifications maintained for the employee in Infotype 0024, and display wherever these maintained.)
15. Additional Qualification (This is maintained in HRPE_PROFQ_TBJID-infotype 0024 of the employee. Thus, check Position maintained for the employee in P4002_OBJID, against this position check for Essential Qualification, related object type u2018Qu2019, compare this with the qualifications maintained for the employee in Infotype 0024, and display all qualifications for which HRPE_PROFQ_ESSENTIAL is not maintained.)
16. Proficiency (HRPE_PROFQ_PROFC_TEXT)
in clear :
1. Positions (Object Type S) are linked to Job through relationship A 007
2. In APDISCOM scenario, Qualifications (Object Type Q) are attached to Object u2018Jobu2019 (Object Type C) through Transaction Code PPPM
3. Now, for a Job there can two types of qualifications maintained Essential Qualifications (ii) Additional Qualifications
4. For essential qualifications: Against a Qualification we can maintain u201Cessential check boxu201D HRPE_PROFQ
5. For additional qualifications: Those qualifications for which HRPE_PROFQ is not maintained
6. Now, for an applicant, Qualifications are maintained in Infotype 0024, wherein the necessary qualifications would be selected.
7. In the report for field of u201Cessential qualificationu201D, check for qualifications maintained in Infotype 0024 and compare it with qualifications maintained in Job (through Position assigned to the applicant in P4002_OBJID)
8. Check for essential qualification HRPE_PROFQ maintained in Job and check whether the same Q is maintained in Infotype 0024 for the applicant, if yes, then generated Text of the Q
9. If there are any additional qualifications which are maintained in the job and not maintained in Infotype 0024, DONu2019T GENERATE ANYTHING IN FIELD
10. If there are any additional qualifications which are maintained in the job and if same are maintained in Infotype 0024, generate Q text under field of u201CAdditional Qualificationsu201D in the report
11. If there are any extra qualifications in infotype 0024, which are not maintained in Job, then generate Q text under field of u201CAdditional Qualificationsu201D in the report
Please provide the procedure.(For clarity copy and paste the text in a MS-word)
Please reply ASAP.
Regards,
Rama.P
Edited by: Rama Chary on Dec 9, 2009 1:28 AM -
Get max and min values from waveform chart
Hi all
Ive got a waveform chart and want to display the max and min value for the graph. How do i get the respective values?? Im using LabView 8.2
holla
Attachments:
Untitled 231_LV80.vi 23 KBThanks Mike
-
How to get all the column values from a table source
Hi,
I have created one table source on a employee table and some customized attributes using global settings>search attributes.
Now these customized attributes mapped with the table columns through attribute mapping from the sorce tab.
Using doOracleSearch method i passed last parameter i.e. Integer array of customized attributes.
After execution of doOracleSearch method i am getting the results but customized attributes are not coming.
getCustomAttributes method returns null instead of some values.
Please refer following code for more info:
Integer[] fetchAttr=new Integer[2];
fetchAttr[0]=new Integer(137);
fetchAttr[1]=new Integer(138);
result =
stub.doOracleSearch("BTM",
new Integer(1),
new Integer(10),
Boolean.TRUE,
Boolean.TRUE,
group,
"en",
"en",
Boolean.TRUE,
null,
null,
fetchAttr);
ResultElement[] resElements = result.getResultElements();
for(int i = 0; i < resElements.length; i++)
System.out.println("Title : " + resElements[0].getTitle());
System.out.println("Snippet : " + resElements[0].getSnippet());
System.out.println("URL : " + resElements[0].getUrl());
System.out.println("non default : " + resElements[0].getCustomAttributes()); // it returns null here
}Confirm the attributes you are asking SES for match those on the data source being searched. One thing to try is to simply tell SES to return all custom attributes for your search. Here is a snippet to build a list of all attribute IDs and pass them to your search...
// Create and set SOAP URL
OracleSearchService searchService = new OracleSearchService();
searchService.setSoapURL("http://myserver:7777/search/query/OracleSearch");
// Set attributes to fetch (all)
Attribute[] attributesAll = searchService.getAllAttributes("en");
ArrayList<Integer> attributeIds = new ArrayList<Integer>();
for(Attribute a: attributesAll)
attributeIds.add(a.getId());
Integer attributeIdArrayAll[] = new Integer[attributeIds.size()];
attributeIdArrayAll = attributeIds.toArray(attributeIdArrayAll);
// Query
OracleSearchResult result = searchService.doOracleSearch("some text", ..........[other params], attributeIdArrayAll);
// Print out results
ResultElement[] resElements = result.getResultElements();
for(int i = 0; i < resElements.length; i++)
// Get document
ResultElement doc = resElements;
// Print Title
System.out.println("Title: " + doc.getTitle());
// Print custom attributes
CustomAttribute[] attributes = doc.getCustomAttributes();
for(int j = 0; j < attributes.length; j++)
CustomAttribute attr = attributes[j];
System.out.println("[Custom Attribute] " + attr.getName() + ": " + attr.getValue());
Hope this helps. -
How to get multipe data set values from Decision Table.
Hi All,
I need to use SAP BRM for one of the scenario where based one some Code Group I need to get a set of questions and for each question a set of possible answers.
The structure of Decision Table will be like below :
Table 1 : To get set of questions based on Project Code
Input Output Output
Project Code
Question Id
Question Description
Table 2 : To get set of answers based on question
Input Output Output
Question ID
Answer Id
Answer Description
I already searched in forum to get the multiple values based on some input and that works fine for a single field with multiple outcome.
Handling Selective Multiple Actions in SAP Business Rules Management System
In my scenario I need to get a set of Id and description as multiple outcome.
Can anyone please let me know how this can be achieved in BRM.
Thanks in advance
RavindraCreate an XSD in the BRM project with the desired data structure and import the XSD alias in the 'Project Resources'. Add this XSD alias as input/output of the decision table.
Refer this:
Creating a Simple BRM Ruleset in 30 Easy Steps using NWDS 7.3 (Flow Ruleset with a Decision Table) -
Review Page old and new values
Hello everyone,
In the review page of my custom page, along with the existing details, i also want to display the old values(default values when the page opened). I know we can do this by saving the existing values in the session variables but i was just wondering if there is any other way to do that as we have this wonderful feature of ViewObject in OAFramework.
Thanks in advance for your help.
PKHi,
Try the following, it might help,
Create two ViewObject Instances(like VO1, VO2)
When you load the page, execute both the VOs and get the existing values,
But associate your page items to only VO2,
After updating the values, check the values in VO1,
This should be your existing values.
Thanks.
With Regards,
Kali. -
Transfer old and new music from iphone to new computer account?
So my account on my family Mac desktop was malfuntioning -- meaning the apps open would not close, and the loading screen and rainbow cursor would not go away (its been days) therefore i decided to delete my account and create a new one.
My account had everything of mine personal on it and noone elses. I thought that since all of my music was on my phone, i could just transfer all the music back to the computer, once i set up the new account that has nothing on it.
Its not working.
All the music I have is on my phone and only my phone. It is a mix between computer purchases, phone purchases, and CD's. All on various accounts from the past 7 years ever since i got my first ipod shuffle.
Im really really hoping i can transfer everything back to my computer, because so far its only transferred the songs ive purchased on my phone, nothing else.
And it hasnt asked me for verification or authorization for other accounts or anything.
Help? Im desperate.Most Windows users don't.
Purchase an external hard drive and use the backup software that comes with it to backup files from your computer.
Buy TouchCopy and install it on your new computer, connect your old iPod and transfer your songs to your computer. -
How can i get first four highest values from a table
suppose we have salary table and we need first 4 highest salaries in one query or attemp
Or use an analytic:
SQL> select ename, sal from emp;
ENAME SAL
SMITH 800
ALLEN 1600
WARD 1250
JONES 2975
MARTIN 1250
BLAKE 2850
CLARK 2450
SCOTT 3000
KING 5000
TURNER 1500
ADAMS 1100
JAMES 950
FORD 3000
MILLER 1300
14 rows selected.
SQL> select ename, sal
2 from
3 (
4 select ename
5 ,sal
6 ,dense_rank() over (order by sal desc) dr
7 from emp
8 )
9 where dr <= 4;
ENAME SAL
KING 5000
SCOTT 3000
FORD 3000
JONES 2975
BLAKE 2850
Maybe you are looking for
-
Windows 8 32-bit driver update
Recently, I've use BootCamp for 2 years. Might be I should explain from beginning but sorry for the long explaination. I used OS X Snow Leopard 10.6.8. on 2011 then I started to use Windows using BootCamp. So I installed Windows XP. After several mon
-
Using Adobe Acrobat Pro XI and Excel 14.3.8 on a mac. Saved PDF as "optimized PDF" then "save as other" > spreadsheet > Microsoft Excel Workbook. Problem: numbers in some random dates are transposed so that month and day are reversed. No particula
-
ITunes only imports part of a song
I've tried uploading two cd's today and it begins to import all songs fine. Then when approx. half the songs are imported, iTunes only imports a few seconds of each remaining song. I can end up with anything from1 second of a song to 2 minutes of a s
-
Create Document (Customer Invoice) in FI per Interface (Webservice, BAPI)
I try to post a accouting document in SAP FI per BAPI respeticly webserivce from outside of the system. The idea is to manage this service in the context of SAP BPM - a invoice for a customer should be entered in the system without manuell using the
-
RVS 4000 Email responses that need addressing
I have been bounced around between Cisco and Linksys for months-. I have two simple questions- One I know the answer on- the second, I haven't a clue- I have corresponded with 12-15 people at Linksys, and Cisco- Their last answer is I should contact