Академический Документы
Профессиональный Документы
Культура Документы
on SAP Portal
Applies to:
SAP Portal. For more information, visit the Portal and Collaboration homepage.
Summary
This article explains about implementing digital clock on portal. Generally, we will be having requirement to
display world time with date on the portal Masthead. This time and date will be based on GMT time zone.
Author: Anup Kumar Bharti
Company: Yash Technologies Pvt. Ltd.
Created on: 8th September 2009
Author Bio
Anup Kumar Bharti is Associate Consultant for Yash Technologies Pvt. Ltd based in India. He
has more than 3 years of IT experience. He has experience in Java J2EE, Struts, Hibernate,
Web Dynpro Java and EP.
Table of Contents
Prerequisite: ........................................................................................................................................................ 3
Import Par File into NWDS ................................................................................................................................. 3
Code for Creating Digital World Clock ................................................................................................................ 8
Export and Deploying PAR file on Portal .......................................................................................................... 11
Run/Test newly deploy you PAR file. ............................................................................................................... 15
Out Put look like this ......................................................................................................................................... 16
Related Content ................................................................................................................................................ 17
Disclaimer and Liability Notice .......................................................................................................................... 18
Prerequisite:
1. Open you NWDS in Enterprise Portal Perspective Go towindowOpen Perspective
OthersEnterprise Perspective, you will get below screen select it and click ok button, now the EP
perspective will be visible to perspective area.
2. Java Developer role should be assigned to user in portal.
Click on import
Select PAR file and click next button now browse Archive file name and find the downloaded standard
masthead PAR file from the local system and enter the project name and Click on Finish button
The imported par file project hierarchy will appear as shown below:
</select>
</td>
<td width="25%" NOWRAP ><font size="12" face="Arial">
<script language="JavaScript">
if (document.all||document.getElementById)
document.write('<span id="worldclock" style="font:bold 12px Arial;"></span><br
/>')
zone=0;
isitlocal=true;
ampm='';
DstTimeZone=0;
function updateclock(z){
zone=z.options[z.selectedIndex].value;
isitlocal=(z.options[0].selected)?true:false;
hr2 = hr;
if (hr2 == 0) hr2=12;
(hr2 < 13)?hr2:hr2 %= 12;
if (hr2<10) hr2="0"+hr2
var finaltime=hr2+':'+((mins < 10)?"0"+mins:mins)+':'+((secs <
10)?"0"+secs:secs)+' '+statusampm;
if (document.all)
worldclock.innerHTML=finaltime
else if (document.getElementById)
document.getElementById("worldclock").innerHTML=finaltime
else if (document.layers){
document.worldclockns.document.worldclockns2.document.write(finaltime)
document.worldclockns.document.worldclockns2.document.close()
}
setTimeout('WorldClock()',1000);
}
window.onload=WorldClock
</script>
</td>
<td width="25%" NOWRAP>
<!--Place holder for NS4 only-->
<ilayer id="worldclockns" width=60% height=30><layer id="worldclockns2"
width=60% height=30 left=0 top=0 style="font:bold 12px Arial;"></layer></ilayer>
</td>
</font>
</form>
</font>
</tr>
</table>
Now include the newly created DigitalClok.jsp to HdeaderView.jsp.
<TD nowrap ti="0" tabIndex="0" class="prtlHdrWelcome" id="welcome_message2"
title="HRS">
<%= "[ HRS ]"%>
</TD>
<TD class="prtlHeaderFunctionsTable" nowrap><font size="12" face="Arial">
<%@ include file="digiclock.jsp" %>
</font>
</TD>
Select your PAR file, which you want to export it with that name and click next button.
Now click finish button, it will be get deploy to you portal. Incase your server is not configured then configure
it by passing following parameter given in screen shot below:
.
You can see the newly deployed par file, click on start to view it.
If you want to see different country time, just select country name from drop down box, the time and date will
be automatically gets updated.
Related Content
Digital Clock Support Link
For more information, visit the Portal and Collaboration homepage.