cancel
Showing results for 
Search instead for 
Did you mean: 

How to download and change AFP Masthead on SAP Portal 7.3

former_member6345
Participant
0 Kudos

Hello @ll,

i have some simple questions about Ajax Framework Page and i hope somebody can help me.

I have already search in "Wiki for Ajax Framework Page", SAP Help Portal 7.3 and in this forum part without results of my questions.

1. Question (Download):

How can i download the AFP Masthead (com.sap.portal.AFPMasthead)from my SAP Portal 7.3.

My intention is to move "Welcome <User Fistname. User Lastname>" message from the Menu Bar row

into the Masthead (On the Top beside of Log On/Log Off) and i'm sure to change this in source code.

The same intention in this thread: http://scn.sap.com/thread/3251956

2. Question (Change):

If I have understood correctly, i get after downloading a *.war file?

Afterwards import into SAP NWDS? And which perspective?

3. Question (Deploy/Import):

How can i import/deploy my change File (AFP Masthead) into my SAP Portal?


I think that are simple questions but i need little approach.

Thanks in advance.

Best regards from germany

Armin

Accepted Solutions (1)

Accepted Solutions (1)

former_member6345
Participant
0 Kudos

Here we go - my solution and it works

The steps for AFP Masthead modification on SAP NetWeaver 7.3 EHP1 (SAP NW 7.31) with SP05. I should be work on SAP NW 7.3, too.

The steps:

  1. Download  from your SAP NW 7.31 Server this WAR File: com.sap.portal.navigation.afp.masthead.war
    Path: C:\usr\sap\<SID>\<Instance>\j2ee\cluster\apps\sap.com\com.sap.portal.navigation.afp.masthead\servlet_jsp\ com.sap.portal.navigation.afp.masthead
  2. Download from your SAP NW 7.31 Server these  JAR Files:
    common.jar
    com.sap.portal.useragent_api.jar
    com.sap.portal.search.service_api.jar
    com.sap.portal.search.provider_api_api.jar
    com.sap.portal.runtime.system.favorites_api.jar
    com.sap.portal.productivity.resolverservice_api.jar
    com.sap.portal.pcd.glservice_api.jar
    com.sap.portal.navigation.service_api.jar
    com.sap.portal.navigation.helperservice_api.jar
    com.sap.portal.navigation.api_service_api.jar
    com.sap.portal.core.utils_api.jar
    com.sap.portal.contenttaggingservice_api.jar
    com.sap.portal.common.commonservices_api.jar
    Notice:
    Most of them you will find in following path:
    C:\usr\sap\<SID>\<Instance>\j2ee\cluster\apps\sap.com
  3. Open your NetWeaver Developer Studio (NWDS)
  4. Import the WAR File com.sap.portal.navigation.afp.masthead.war
    In NWDS
    : File -> Import and choose your WAR File
  5. Open in NWDS the Enterprise Portal perspective.
  6. At first you find errors in masthead.jsp file.
    To fix these errors you have to config your build path and import the JAR Files
    Right click on your import WAR file and choose Build Path -> Configure Build Path in context menu.
  7. Choose tab/register libraries and click button Add Jars…
    First of all choose the private JAR File com.sap.portal.navigation.afp.masthead_core
    Path:
    WebContent/WEB-INF/private/lib
    Switch tab/register Order and Export and set a flag on JAR File.
    Next import your JAR Files into your web module.
    Select all JAR Files on your file system and paste the files into the lib folder.
    Right click on your import WAR file and choose Build Path -> Configure Build Path in context menu. click button Add Jars…and add all JAR Files from lib.
  8. Make your changes on your Masthead.jsp file. Save your file. Ready for Deployment?
  9. For deployment we export our web module as WAR File.
    Right click on your web module and choose Export. Export as WAR File.
  10. Switch to Deployment Perspective and import your new WAR File for deployment.
    Click on button Import, choose File System and select your WAR File.
    At last start your deployment and have fun.

Screenshots for each step:

Regards

Armin

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

I found all .jar files, but not the common.jar.

Can you tell me, where i Can found it?

0 Kudos

Hello


You can find it in

usr\sap\JXX\JC00\j2ee\cluster\server0\bin\ext\com.sap.portal.common\common.jar

At least there it was in my portal

HTH

Best Regards

Maciej

Former Member
0 Kudos

Hi,

1. Get the com.sap.portal.navigation.afp.masthead.war file from Basis. Hope that shouldn't be an issue.

Import that war file as SAP war file into your NWDS.(Recommendable 7.3 ver).

In the scripts folder, you'll find afpmasthead.js file. Make the following value MastHeadBean.isShowLoggedAsMessage() == true.

In jsp folder, you'll find MastHead.jsp.

All the elements such as Logo, Logged in User name, Logoff, Collabation Link etc., are present in containers.

Include this welcome_message_container in between the Logo and Logoff or where ever you need.

2. You can make the changes very well in EP perspective only.

3. Once you build without any errors, export as an SAP war file. Go to deployment perspective and deploy the war file.

Regards,

Jay.

sambaran
Explorer
0 Kudos

Hi Jay,

Can you please tell me where the logoff code is written for AFP Masthead. I can't find it in MastHead.jsp.

Actually we need to implement auto logoff scenario for inactive user. 

Any kind of help is highly appreciated.

Regards,

Sambaran Chakraborty

former_member6345
Participant
0 Kudos

The place holder for Logoff you will on line 64 in masthead.jsp, see screenshot 1

The Logoff coding you will find in Javascript file afpmasthead.js, see screenshot 2.

Use http://jsbeautifier.org/

for nice coding views for Javascript.

Check this variables:

var ay = JSUtils.getBooleanValue(LSAPI.AFPPlugin.configuration.getClientSideAttributeValue(W, "showLogInLogOffValue"));


var aH = JSUtils.getBooleanValue(LSAPI.AFPPlugin.configuration.getClientSideAttributeValue(W, "isShowLoggedAsMessage"))

But for your scenario i think reduce your timeout for user sessions.

regards

armin

sambaran
Explorer
0 Kudos

Thanks Armin.

I want to implement same logoff functionality in AjaxFrame work form Ep 7.3 in my custom code.

I just want to know how this logoff is working in 7.3 AFPmasthead.

Can you give me some idea if I need to implement this logoff functionality in custom code how can I achieve that .

Any kind of input will help me to go forward.

The block of code you mentioned is to create logoff link and message box with Yes an No button.

But I need to know which method or function doing the session killing task.

I tried below line of code , but it doesn't work; it is not ending the portal session .

EPCM.subscribeEventReliable('urn:com.sapportals:navigation',
  'AFPisLoaded',
  function _afpLoaded() {

alert('Into the EPCM event');

//Script writen here.

EPCM.getSAPTop().LSAPI.getSessionPlugin.logoff();

}
)

Thanks and Regards,

Sambaran Chakraborty

former_member6345
Participant
0 Kudos

Hello @ll,

i have still a problem.

Below my procedure:

  1. I downloaded the WAR file "com.sap.portal.navigation.afp.masthead.war".
  2. I started SAP NWDS 7.3 and created a new "Portal Application Project".
  3. I extracted the WAR file and copy the content from web-inf to my portal-inf folder in
    my Portal Application Project ( I don't copied web.xml and the web-j2ee-engine.xml).
  4. I changed/customized the masthead.jsp file.
  5. I created an EAR file for my Portal Application Project and "Save" my Project.
  6. I opened the Deployment Perspective and choose my EAR file for deployment
  7. Deployment was successful without errors.
  8. My Portal Application is now available in SAP Portal.
  9. I copied my Portal Application and added that as new PCD Object.
  10. Opened my Ajax Framework and putted my PCD Object in there.
  11. Opened a new session and all masthead button (LogIn / LogOff , Help, Colloboration) not more availabe?!

I think there are a problem with JAR files or dependencies. I don't know which and how
JAR files i have to put in my portal application.

In the original Portal Application  "com.sap.portal.navigation.afp.masthead" there are dependence, see screenshot.

In my own Portal Application there is no dependence. How can i put this dependence in my
own portal application?

Please could somebody help me how can i solve this issue?!

Thanks a lot.

Save SAP.

fabianl
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Armin,

can you try to convert your loacl application in a DC.

After this was done, have a look at this doc:

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/006a6229-b1ed-2e10-0c8c-cc5673cf2...

Create a new DC and put the external Jar´s in it.

check also this link:

http://scn.sap.com/community/netweaver-portal/blog/2012/05/25/how-to-add-reference-to-sap-provided-j...

br,

fabian

former_member6345
Participant
0 Kudos

Hi Fabian,

i already done my portal application convert as DC and add there Dependence. After deployment in "Deployment Perspective" there no entries dependence and additional i don't find all dependence in SAP NWDS 7.3 SP04 from the original portal application "com.sap.portal.navigation.afp.masthead".

Dependence from com.sap.portal.navigation.afp.masthead

For example:

  • com.sap.portal.contenttaggingservice
  • com.sap.portal.navigation.helperservice
  • com.sap.portal.search.service
  • ...and so on.

And i don't understand why i don't get a build error in NWDS. I'm confused. Never ending story. And the big problem, which JAR Files i needed for AFP Masthead.

We work with SAP Portal 7.3 SP04.

br

armin

fabianl
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Armin,

so fisrt have a look at this note 1166135 and the related notes.

I´am currenty not 100% sure, but it´s not possible that u can set the dependencies at the dc to the  "

"com.sap.portal.navigation.afp.masthead" application. so that u can use the referenced jars of it?

br,

fabian

fabianl
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Armin,

what is the status here?

Futhermore have a look at this nice blog about the jar locator function 7.3 sp08 from today: http://scn.sap.com/community/netweaver-portal/blog/2012/11/20/nw-730-sp08--adding-class-jar-locator-...

br,

fabian

fabianl
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Armin,

1 > The *.war file  should you fin in the following folder "com.sap.portal.navigation.afp.masthead" located at you server e.g. E:\usr\sap\EPL\J00\j2ee\cluster\apps\sap.com.

2 > The right NWDS perspective should be the "Java EE Perspective"

3 > You can "deploy" the changed *.war at the "Deployview"

http://help.sap.com/saphelp_nw73ehp1/helpdata/de/4a/f03bbb1e4268c5e10000000a421937/content.htm

Please check also the following links:

http://help.sap.com/saphelp_nw73ehp1/helpdata/de/49/cd195031f22221e10000000a42189d/content.htm?frame...

http://scn.sap.com/thread/1978620

http://scn.sap.com/docs/DOC-23058

best regards,

fabian

former_member6345
Participant
0 Kudos

Thanks Fabian for your reply. I will check this and give a feedback maybe tommorrow.

I hope it will works.

regards

armin