VIMp: Writing to Action Log
Hi gurus,o
I want to write en error message to action log based on someion in myy program condit.Please suggest FM to be used in my code.
I tried using code
g_protocol = cl_log_ppf=>create_log( ip_object = 'PPF' ).
MESSAGE s030(sppf_media) INTO g_dummy.
cl_log_ppf=>add_message( ip_problemclass = sppf_pclass_1
ip_handle = g_protocol ).
The above code didnt gernerate my message in action log.
Also i tried using FM BAL_LOG_MSG_ADD and 'CRM_MESSAGE_COLLECT.
Still no solution.I think some parameters are missing in the above FM.Can anyone of you who have worked on the same provide me a sample code.
Or is there any otehr FM to be used..
Please reply,
Points will be rewarded.
LGWR writes synchronously to the active mirrored group of redo log files.If one of the files in the group is damaged or unavailable, LGWR continues writing to other files in the group and logs an error in the LGWR trace file and in the system alert file.
See the follwoing fro more detail:
http://stanford.edu/dept/itss/docs/oracle/10g/server.101/b10743/process.htm
Similar Messages
-
Error in writing custom action
Hi
I wanted to create a new action, so I read "Writing Custom Actions" section in JHeadstart Developer's Guide.
As mentioned in the Developer's Guide, I chose JhsAction as super class and extended a new class called GenerateChart and overrode validateProperties and execute methods.
I wrote a new method in my action class called getData() to retrieve information from model to use in execute method.
here is its specification :
private void getData (SessionData sessionData, JhsActionMapping mapping)
Then as mentioned in the developer's guide (page 2-38) I got the sesion id and passed it to getHandler method.
// retrieve Session Id from SessionData
Object sessionId = sessionData.getSessionId();
// Get the DataObject handler
DataObjectHandler handler =
(DataObjectHandler)getHandler("myClass", sessionId);
Surprisingly, I received following compilation error :
Error(48,26): method getHandler(java.lang.String, java.lang.Object) not found in class com.behincara.controller.struts.action.GenerateChart
I read getDataObject and getDataObjectSet sources and realized that they use getHandler with sessionData instead of sessionId.
Is it a mistake in Developer's Guide?
Then I changed the code to the following
// retrieve Session Id from SessionData
Object sessionId = sessionData.getSessionId();
// Get the DataObject handler
DataObjectHandler handler =
(DataObjectHandler) getHandler("myClass", sessionData);
and I received another error
Error(48,36): unreported exception: java.lang.Exception; must be caught or declared to be thrown
Then I copied these lines to execute method and surprisingly I received no error.
Where is my mistake?
Could anybody help me?Hi Navid,
You wrote:
I read getDataObject and getDataObjectSet sources and
realized that they use getHandler with sessionData
instead of sessionId.
Is it a mistake in Developer's Guide? You are right, it is a mistake in the Developer's Guide. I have logged a doc bug for it, so we can correct it in a future version.
A more reliable source for this kind of information is the JHeadstart JavaDoc, which you can find at J:\jheadstart\doc\api\index.html (where J: is the JHeadstart home). If you look up JhsAction there, you will find detailed information about the methods you can use in your custom actions.
... I received another error
Error(48,36): unreported exception:
java.lang.Exception; must be caught or declared to be
thrown
Then I copied these lines to execute method and
surprisingly I received no error.
Where is my mistake?Your mistake is that your method getData does not throw an Exception, and the execute method does. If you change the signature of getData to be as follows:
private void getData (SessionData sessionData, JhsActionMapping mapping)
throws Exception
(add the last two words), then you can also put the getHandler lines in getData.
Hope this helps,
Sandra Muller
JHeadstart Team -
Reading and Writing to a Log file
Hello,
I'm writing a class that will write a user id to a log file every time they click on a particular button. However, I don't want a new line every time a user clicks on the button, I'd like to be able to find their id in the log, increment a counter and write that back to the log in place of the previous entry.
For example, User A clicks on the button for the first time so I write in the log:
User A 1
Next time they come along, I want to see if User A exists in the log - which they do - add 1 to the counter and replace User A 1 with User A 2. So the log will now say:
User A 2
I was thinking of writing to the log, reading the log back in to a HashMap and then writing the HashMap out every time. Seems like a rather inefficient solution. Is there anything else I can do?
Thanks!Hi,
counters are a standard topic. Many solutions are to be found in
textbooks. Here is one of them (Hunter & Crawford Java Servlet
Programming):
String activeUser = ... ;
try
FileReader fileReader = new FileReader( "mylog" );
BufferedReader bufferedReader = new BufferedReader(fileReader);
FileWriter fileWriter = new FileWriter("mylog.new");
BufferedWriter bufferedWriter = new BufferedWriter( fileWriter );
String line;
String user;
String count;
while((line = bufferedReader.readLine() != null )
StringTokenizer tokenizer = new StringTokenizer( line );
if( tokenizer.countTokens != 2 ) continue; // bogus line
user = tokenizer.nextToken;
if( activeUser.equals( user ) )
count = tokenizer.nextToken;
bufferedWriter.write(user+" "+(Integer.parseInt(count)+1)+"\n" );
else
bufferedWriter.write( line );
bufferedWriter.close();
fileWriter.close();
bufferedReader.close();
fileReader.close();
File oldLog = new File("mylog");
File newLog = new File("mylog.new");
newLog.renameTo(oldLog);
catch( Exception e )
// do whatever appropriate
}Have fun,
Klaus -
How to track operation number in action log
Hi,
When we make changes in any operation the change is captured in action log but in action log(or table JCDS) operation no is not captured.
is there any way by which we can track the operation no also with PM order no.
Thanks
Yogesh GuptaWell all the details of line item are stored in Line Item Table ( BSEG ) and all the details of the header are stored in BKPF.
Hope that helps.
Thanks,
Nandita -
Hi All,
I could not find action logs for online backup and archive log backup in DB12.
And no action log for checkdb also in db13, but job finished successfully.
Job log has
" External program terminated with exit code 1
BRCONNECT returned error status E".
When I checked in DB24 for db operations it shows all actions green and detail logs also available here.
But nothing available from DB12.
I checked and found that actions are not written to SDBAH table.
Kindly suggest what can be done to resolve this.
Thanks in advance.Hi,
permissions are as below.
drwxr-xr-x 2 orasid dba 17408 May 4 12:33 oraarch
drwxr-xr-x 3 orasid dba 96 Jul 15 2008 origlogA
drwxr-xr-x 3 orasid dba 96 Jul 15 2008 origlogB
drwxr-xr-x 2 orasid dba 296960 May 4 12:34 saparch
drwxr-xr-x 2 orasid dba 13312 May 1 21:50 sapbackup
drwxr-xr-x 2 orasid dba 14336 May 4 07:02 sapcheck
drwxr-xr-x 12 orasid dba 8192 Oct 20 2008 sapdata1
drwxr-xr-x 2 orasid dba 96 Sep 30 2008 sapreorg
drwxr-xr-x 4 orasid dba 96 Jul 14 2008 saptrace
And log files are written to sapbakcup/saparch/sapcheck directories but action logs are not displayed via db13/db12.
no entries in SDBAH table, please help me out here. -
Setting to Retain User Action Logs in GRC 10.0
Is there a setting to retain the User Action logs in SAP GRC 10 System for x number of Days. Is it dependent on the ST03N Log settings
Hi Selva,
For this you need to schedule the action usage job. Once you schedule this job you can view the logs in Reports and Analytica tab under Security Link->Action Usage by user,role and profile.
Hope this helps.
Regards,
Neeraj -
Notification Action Log missing fields
Hello,
We are working with Quality Notifications in SAP and have found the following issue:
Some of the changes made on a quality notification do not get recorded in the action log. Examples are: Additional batch field, Subject long text, adding or deleting attachments, deleting a task, creating a defect, etc.
How do I check which fields are relevant to be shown in the action log? can we add more fields to be relevant to the action log ? Have you found any workaround for this problem?
Any input will be appreciated...
Thanks,
JoseHi Jose,
Did you find the solution to your problem?
I'm also trying add some fields to check for the Action Log and unable to find it in the Config.
Thanks,
Arthi -
Appraisals having error "Unable to lock action log, Please try again"
Hi all,
We have some appraisal issues wherein most of the appraisal docs under certain appraisers cannot be opened. We are receiving error "Unable to lock action log, Please try again". Would anyone have an idea where to look in order for us to fix this problem?Hi Maria,
Are you able to resolve this issue ? If yes, can you share your findings and solution, please ? Thank you.
Regards
Kir Chern -
Hopefully a straight forward yes or no question.
Is it possible to add action logs to a report? either a report from a cube or a report from SQL Report Builder?
My understanding is that the action log information is not transferred to the database, therefore I presume you cannot get this into a cube report of SQL report - is my understnading correct?
tamrepHi,
Rob Ford made a contribution
here for a similar task.
Cheers,
Marat
Site: www.scutils.com Twitter:
LinkedIn:
Graveyard: -
Hi Guys,
Can anybody tell me how to see action logs for sales documents?Also i want to know how to change sales doc type...( i know we can mention in vov8...alt.sales doc types...how to get that(configure) list(in my system list is empty).What i am supposed to do from va01 side?
Points for sure
Thanks
RamaChandraChange logs
Go to the order in VA03 and in the menu
Environment----Changes
Here you can mention the line item and see the change logs.
You can sort the logs based on header, item, sch.line, date etc
It will also show you the old value and new value, changed by and the changed time.
Alternate sales doc type
In VOV8 you can mention the alternate sales docu type
Once this is done, come to VA01 and give hte original dcument number
Once you enter teh screen to enter the sold to party, at the header level, there will be radio button to select the other sales document also. If you want you can now select the other doc type.
That radio button enabling you to select the other doc type will be near to the Requested Delivery date field at the header level.
Here you can select the other document type.
Hope this helps.
Reward if this helps. -
Is it possible to remove an action log entry from a ticket?
Hello.
Is it possible to remove an actoin log entry from a ticket. We may run into a situation when confidential data has been pasted into the action log.
Thank you,
RichardYes, but not through the UI. the easiest way to do this would be with
SMLets.
Import-Module SMLets
$IRClass = Get-scsmclass Workitem.Incident$
$SRClass = Get-SCSMClass Workitem.ServiceRequest$
$ActLogRelationshipClass = get-scsmrelationshipclass System.WorkItem.TroubleTicketHasActionLog
$IR = Get-SCSMObject -Class $IRClass -Filter "Name -eq 'IR21'"
$ActionLogs = Get-SCSMRelatedObject -SMObject $IR -Relationship $ActLogRelationshipClass
Foreach ($ActionLog in $ActionLogs) {
if ( $ActionLog.Description -match "TEST") {
Remove-SCSMObject $ActionLog -Force -WhatIf
It should be noted that this will not remove the action log form the data warehouse. there isn't a supported method to edit data in the DW, so you're kinda on your own if you need to remove this data from the historical records -
Appraisal Document: Wrong entries in action log
Hi Gurus,
For some appraisal documents, the action log is getting wrong entries.
For example, it appears several entries. Those entries identify persons that have seen the document. I have an example that several employees have seen the same document at the same day the same time, which has not happened.
I am using standard implementation for action log.
I cannot find a pattern for that...
Have you faced the same situation? Can you help me, please?
Many thanks,
Vasco BrandãHi Vasco,
Another customer had some problems with the log and it was solved with note 1476829 (it corrected a different issue but it made changes on the log fucntionality as well).
Try this note and if you still have problem after that then I suggest you open a message for this as it might be a bug.
Cheers
Sarah -
No change documents exist in action log @ PM order
I have created Z order type copying PM01 , when I am testing this for action loge it is giving message No change documents exist
Am I missing some config ?Make sure you have activated change documents for the order type /plant combination under SPRO > PM > Maintenance and service processing > Orders > Settings for order type > Define change documents.
Regards
Narasimhan -
Hi all,
Is it possible for me to determine the fields, in the work order, that are relevant for the action log? I have noticed that not all changes are displayed in the action log even if the data element for the field is flagged for change documents.
Thanking you in advance for your assistance
MHi,
Check the various flags in customizing transaction OIOE based on plant and order type. If customizing is adjusted the changes are only effective for new orders.
-Paul
Moving to [Enterprise Asset Management (EAM)|Enterprise Asset Management (SAP EAM); forum -
Dear All,
Can anyone please tell in which table data of action logs for maintenance orders,purchase
requisition,maintenance plan with maintenance item stores? please note that in SPRO ,change
documents for maintenance plans is not flagged.Even though is it possible to view changes at
table level for maintenace plan & item.For other document type, the check box for change
document is flagged.
I need these tables name to pull both new & old value for any changes of a field for the
maintenance order,purchange requisiotion,maintenance plan or maintenace item.
Thanks in advance.
Rgds
RajibHi Sunil,
Thanks for your response.But in table CDPOS ,I am entering maintenace order no in field
OBJECTCLAS or in other field also OBJECTID,sytem is throughing message as no values found.
Even I have tried by entering the order no in field OBJECTID .But same result.While from front
screen in IW33 following menu path extras-action log , changes are reflecting.Can
you please tell where I am doing mistake?
Also what about change document in maintenace plan/item as in SPRO change documents check box
are not flagged.Is it possible to get the change document in CDPOS table even though in SPRO
it is not maintained.
Thanks in advance
Rgds
Rajib
Maybe you are looking for
-
DVD/CD-RW drive has occasional read errors even with good media
I have a Satellite P100 with the DVD/CD-RW (option SBAY0021 on the invoice) which is still under warranty. Recently I have been experiencing problems trying to do installs from a DVD where the install will experience an error and claim that a file is
-
Installing 10.1.0.5 on AIX 64 Power 5 machine
Hi, I need to install 10.1.0.5 on an AIX 64 Power 5 Machine running AIX 5.3 (64bit), i have the patch 10.1.0.5 but i need whatever the base install is ? 10.1.0.1 ? But i cant find it anywhere on any of oracles thousands of webpages. Can anyone help m
-
Vendor due date analysis and vendor aging wise analysis
Could u please explain vendor due date analysis and vendor aging wise analysis. what is the differnce between and with t code y specify
-
How to identify the date format?
Hi, While uploading data from flat file Formats I am expecting are:- dd.mm.yyyy yyyymmdd yyyy.mm.dd i need to convert this to ddmmyyyy. Please hep me how to do this??
-
Runtime Error '429': ActiveX component can't create object
Hi, I am using below code in vb6 application but this is throwing an "Runtime Error '429': ActiveX component can't create object" error. CreateObject("OracleInProcServer.XoraSession") is that due to any dll or reference error ? I have an Oracle clien