on 05-03-2011 3:36 PM
Hello, Our users would like to add some Javascript code to all of the eRecruiting pages that would allow them to capture statistics for eRecruiting usage. Is this possible? If so how can it be done.
Hi Mark,
an interesting problem - I have a couple of ideas. Let me say first off that I have no hands-on knowledge of the eRecruiting application so I can only speak about the BSP framework in general.
Idea 1. I am going to assume that the application you want to modify uses the HTMLB tag library. If you do a "view source" on the BSP page you will see plenty of stuff in the HEAD section of the document. These components are placed there using the class CL_HTMLB_DOCUMENTHEAD. The actual contents of these includes are built in the class CL_HTMLB_HEADINCLUDE.
So you could enhance either of these classes to insert some specific code (such as some Javascript or a tag that includes the JavaScript from another source). It appears to me that the best place for this would probably be in the CL_HTMLB_DOCUMENTHEAD->DO_AT_END method as it gets called by everything pretty much unconditionally. Note I did say "enhance" not modify.
Idea 2. You could build a HTTP handler and implement it in the ICF tree to catch all HTTP requests and log the details to the DB or the application log. In my view this is a more elegant solution as it catches all HTTP requests no matter what they are for. For example it could catch all WebDynpro calls, all mime requests, etc. and would not reply on the browser to execute the logging. Of course the logging and subsequent reporting would all be built in ABAP rather than JavaScript.
Idea 3. I am sure the ICF has its' own monitoring tools you could enable. I suspect this might be a bit of overkill for your needs though.
Cheers
Graham Robbo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
copy all these eRecruiting pages as Z-pages and then make your changes. It is not a good idea to change code in SAP objects.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.