Getting Portal Version Dynamically
Hi All,
Is there a way by which i can get the version (6.2 ,6.4 ,7.0 etc.)of the portal my application is running on dynamically..i.e at run time...
I ll be highly obliged if u can provide any suggestions ..
Thanks in Advance
Regards
Sundeep
Hi Sudhir,
I did not get the class IClusterInformation.
But if you want to get the Portal version you could do the folloiwng
Try to get the following System property form the J2EE server.
System.getProperty("sys.global.dir");
Here you will get the path
/usr/sap/<SAPSID>/SYS/global.
Form here write Java code to do the followign
String sysGlobalDir = System.getProperty("sys.global.dir");
if (sysGlobalDir == null)
// aRequest.getLogger().warning(this, "getVersionRootDir(): system property sys.global.dir not set.");
System.out.println( "getVersionRootDir(): system property sys.global.dir not set.");
} else
versionRootDir = new File(sysGlobalDir, "portal_versions");
if (versionRootDir != null && versionRootDir.exists())
File versionTxtFile = new File(versionRootDir, "version_id.txt");
if (versionTxtFile.exists())
portalVersion = getVersionNumber(versionTxtFile);
} else
System.err.println("FILE DOES NOT EXIST");
implement the getVersionNumber() funmction to read the line form the file version_id.txt.
Hope this helps
Regards
Manoj
Similar Messages
-
Hi,
I wanted to write a java code that will fetch me the Portal Version.
I have installed the Portal 6.0 SP9
I came across this code in the jar
"com.sap.portal.runtime.system.clusterinformation_api.jar"
private File getVersionRootDir()
IClusterInformation clusterInfo = (IClusterInformation)PortalRuntime.getRuntimeResources().getService("com.sap.portal.runtime.system.clusterinformation.clusterinformation");
String serverRootDir = clusterInfo.getSAPJ2EEServerDirectory();
return new File(serverRootDir, "../../portal_misc/versions");
Now i went through the class IClusterInformation which is an interface.
Here it is an abstarct class
public abstract String getSAPJ2EEServerDirectory();
I wanted to get the implementation of this method.
Thank
ManojHi Sudhir,
I did not get the class IClusterInformation.
But if you want to get the Portal version you could do the folloiwng
Try to get the following System property form the J2EE server.
System.getProperty("sys.global.dir");
Here you will get the path
/usr/sap/<SAPSID>/SYS/global.
Form here write Java code to do the followign
String sysGlobalDir = System.getProperty("sys.global.dir");
if (sysGlobalDir == null)
// aRequest.getLogger().warning(this, "getVersionRootDir(): system property sys.global.dir not set.");
System.out.println( "getVersionRootDir(): system property sys.global.dir not set.");
} else
versionRootDir = new File(sysGlobalDir, "portal_versions");
if (versionRootDir != null && versionRootDir.exists())
File versionTxtFile = new File(versionRootDir, "version_id.txt");
if (versionTxtFile.exists())
portalVersion = getVersionNumber(versionTxtFile);
} else
System.err.println("FILE DOES NOT EXIST");
implement the getVersionNumber() funmction to read the line form the file version_id.txt.
Hope this helps
Regards
Manoj -
How to get active plan version dynamically
Hi all,
I am making some HR reports in which I am pulling up position long text from hrp1001 by giving condition - where plavr = '01' . Now if the active plan version is not 01, my condition becomes vague.
Please let me know how to determine the active plan version dynamically in my sample code below
SELECT APERNR AOTYPE B~STEXT INTO CORRESPONDING FIELDS OF TABLE ITAB_EMP_DEATILS3 FROM PA0001 AS A
INNER JOIN HRP1000 AS B ON BOTYPE = AOTYPE AND BOBJID = APLANS WHERE ( BOTYPE = 'S' AND BPLVAR = '01' AND AENDDA = '99991231' AND BENDDA = '99991231') AND A~PERNR IN PNPPERNR.
SORT ITAB_EMP_DEATILS3 BY PERNR.
DELETE ADJACENT DUPLICATES FROM ITAB_EMP_DEATILS3.Simply call FM RH_GET_PLVAR
-
Getting portal userid in VC iview
Hi all,
I want to get portal userid in my VC application. Can someone please guide me how to do that.
RegardsHi Siddharth,
In VC 6.0 it is not possible.
Actually, you have a "User Data" element (look at the "Compose" task pane).
This element can be used to retrieve all sorts of user specific data - anything provided by the portal runtime.
This data can then be used in dynamic expressions.
The user data functionality that is mentioned above is only available with the new version of VC which is currently in Pilot phase. this version is going on ramp up with SP7 of NW04s.
Hope this helps,
Deep. -
C# How to Get Windows Version
Hi guys,
Im on a Project in WPF!
Well however I wanna check the Windows OS by MessageBox.Show(Environment.OSVersion.ToString());
I tried that on Windows 8.1 and I got as result: 6.3.9600.0
Well, on the Windows Server 2012 R2 i get the same result. I informed a little bit and found out with wikipedia:
Wikipedia Link
that Windows 8.1 and the Windows Server 2012 R2 have the same OS Version.
the same is with Windows 8 and Windows Server 2012
Is there any way to defferentiate Windows 8.1 and the Windows Server 2012 R2 resp. Windows 8 and Windows Server 2012
It would be important.
Thanks Guys!How about this approach here:
http://stackoverflow.com/questions/6331826/get-os-version-friendly-name-in-c-sharp
public static string GetOSFriendlyName()
string result = string.Empty;
ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT Caption FROM Win32_OperatingSystem");
foreach (ManagementObject os in searcher.Get())
result = os["Caption"].ToString();
break;
return result;
https://msdn.microsoft.com/en-us/library/system.management.managementobjectsearcher%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396
Hope that helps.
Recent Technet articles: Property List Editing;
Dynamic XAML -
Has anyone managed to get a 3TB dynamic disk on Windows 2003 Server?
I just got a pair of new 3TB disks that I wanted to put on my Windows 2003 server enterprise x64 system, SP2, all updates installed.
When I first tried to convert to dynamic, I got the error "The operation did not complete" as described in this KB article
http://support.microsoft.com/kb/826823
It says there is a patch, but there is not one for x64, just x86 and ia64
I found another technet discussion here: https://social.technet.microsoft.com/Forums/en-US/winserverfiles/thread/cb62238c-b3d0-4989-b45a-ae6de6701a7b?stoAI=10
However its best suggestion is to use a product from AOMIE, but I tried that and it didn't even recognize the disk. It also suggests that one needs a better version of diskpart.exe and to try to the 32 bit version. Anyone have any experience
with that?
I also tried creating moving the disk to Windows 7 x64, making it dynamic there, but when I move the disk back to 2K3 it does not recognize it, and goes back to a 2TB partition. I also saw something about needing a 512 block size for 2K3, but W7 does
not allow anything smaller than 1K.Hi,
During my research, if found the following artcle which also mentioned a 3TB disk should be supported in Windows 2003 SP1:
Has anyone managed to get a 3TB dynamic disk on Windows 2003 Server?
http://social.technet.microsoft.com/Forums/en-US/winserverfiles/thread/a720ae72-0c04-44dd-94c0-2e6aecce530e
So I contact the author about this issue. He said it could be caused if your hard disk is a 512e drive as the 3TB drives on the market today are normally 512e drives.
However manufacturers stopping identifying this, and if the controller is old, FSUtil will not able to identify a 512 drive but recognized it as a normal 512n drive.
Thus please provide the drive model so we could search on manufacturer's website for exact information.
Also please paste the screenshot in your reply which Satish mentioned if available.
In addition, here is an article Robert provided:
http://www.windowsitpro.com/article/what-would-microsoft-support-do/support-advanced-format-hard-drives-141584 -
Ptlconfig error: Exception resolving Portal version : null/ JDBC connect st
Hi Folks,
i am getting the following error while running ptlconfig on portal 10.1.2.0.2. midtier home to configure portal dad. does anyone know what to do with it? i have tried on metalink and google extensively to see any description or help on this error but have not found anything.
will really appreciate if someone might drop a hint or two.
thanks
syed
-- specs:
win 2003 NT-cmd
AS version: 10.1.2.0.2
portal repos version: 10.1.4.0.0
portal dad = portal30
portal repository sits in a customer DB
D:\ORACLE\Midtier1012\portal\conf>ptlconfig -dad portal30
Portal Dependency Settings Tool
Processing Portal instance '/pls/portal30' (host:port:servicename)
Enter either the Portal schema or OID Admin password:
Problem processing Portal instance: ERROR: Exception resolving Portal version : null
Problem processing Portal instance: ERROR: Exception resolving Portal version : null
Problem processing Portal instance: ERROR: Exception resolving Portal version : null
Processing complete
-- in the ptlconfig.log file i get the following:
ERROR: Getting the Portal version raised exception.JDBC connect string used to access Portal is jdbc:oracle:oci:@ ( tnsanmes entry )
with kind regards,
SyedYes, we were able to resolve it.
Try first identifying if you are facing the same problem or not. So login into your portal schema on sqlplus, and see if you get any rows for the following:
select * from wwc_version$;
If you do not see any rows, then it means that the portal user is not granted Select on wwc_version$. if that is the case, then grant it. and then try to run ptlconfig again.
hope that helps.
AMN -
Enterprise Portals versions and patches release dates
Could some one let me know, where can I find the release dates of the enterprise portal versions and patches, as I am interesetd to know about them.
I am new to EP and I dont have access to SAP service market place.
Thank youHi Raj Reddy,
You should have SAP market place id to get the EP versions and patch release dates. These are all available in the form pdf documents. In some documents we have to convert the weeks to corresponding years and months to guessestimate the dates.
Product overview
Version Description Release Type Delivery Date Status Date Mainstream / Extended Maintenance until Printable Version
SAP WORKPLACE 2.11
SAP WORKPLACE 2.11 GA Release General Availability Available Since 30.11.2000 30.09.2005 / - Print...
Product overview
Version Description Release Type Delivery Date Status Date Mainstream / Extended Maintenance until Printable Version
SAP ENTERPRISE PORTAL 5.0
SAP Enterprise Portal 5.0 GA Release General Availability Available Since 28.12.2001 30.09.2005 / - Print...
SAP EP 6.0 ON WEB AS 6.20
SAP Enterprise Portal 6.0 on SAP Web AS 6.20 Standard Release to Customer Available Since 17.03.2003 31.12.2006 / - Print...
Product overview
Version Description Release Type Delivery Date Status Date Mainstream / Extended Maintenance until Printable Version
SAP NETWEAVER 04
SAP NETWEAVER 04 Standard Release to Customer Available Since 31.03.2004 31.03.2010 / 31.03.2013 Print...
SAP NETWEAVER 2004S
SAP NETWEAVER 2004 S Standard Release to Customer Planned from 31.10.2005 31.03.2011 / 31.03.2014 Print...
The dates are available from EP5.0 General availability. to Netweaver 04 2005-06-03.
Hope this helps.
Regards,
Rajesh Khanna Venkatesan. -
Java Code to egt Portal version
Hi All,
I want to know if ther is any Java API to get the Portal version.
My aim is to display the Potal and WAS version.
I am sucessful to display WAS version.
Is it possible to displayn portal version also.
REgards
ManojHi,
Sorry i did not get this.
The method getVersionOverview()
has the following code
====
if(versionRootDir != null && versionRootDir.exists())
File versionTxtFile = new File(versionRootDir, "version_id.txt");
portalVersion = getVersionNumber(aRequest, versionTxtFile);
=====
I checked the entire m/c but i could get the file version_id.txt.
How come the version is displayed correctly in the
System Administration-->Supoort->Portal version
b)Also i could not get the class "com.sap.portal.runtime.system.clusterinformation"
Pl let me know if u can find it on u r server.
c)you have mentioend about sharig reference .
I did not get about this
d)One more thing ,i am wrting a standalone java engine progarm to acess this particular service.
REgards
Manoj -
Getting Portal pages with utl_http (how-to)
I was so happy when I managed to fetch Portal pages using utl_http I thought I'd share my code.
The example function is supposed to be called through the browser (although probably not directlty),
logged in or not. The function will set the current cookies to support page access and/or
item level security.
My versions are
Oracle Portal Version: 9.0.2.2.22
Oracle9i Enterprise Edition Release 9.0.1.3.1 - Production
PL/SQL Release 9.0.1.3.1 - Production
CORE 9.0.1.2.0 Production
TNS for 32-bit Windows: Version 9.0.1.3.0 - Production
NLSRTL Version 9.0.1.3.0 - Production
Here's the code, hope someone has use of it:
CREATE OR REPLACE FUNCTION GetPortalPage ( psURL in varchar2 ) return varchar2 IS
arrCookies utl_http.cookie_table;
arrNames owa_cookie.vc_arr;
arrValues owa_cookie.vc_arr;
nCount integer;
req utl_http.req;
resp utl_http.resp;
data VARCHAR2(2048);
sHTML varchar2(32767);
BEGIN
utl_http.clear_cookies;
-- get the cookies set in the browser
owa_cookie.get_all(arrNames, arrValues, nCount);
for i in 1..nCount loop
arrCookies(i).name := arrNames(i);
arrCookies(i).value := arrValues(i);
arrCookies(i).domain := 'yourdomain.com';
arrCookies(i).expire := sysdate + 1;
arrCookies(i).path := '/';
arrCookies(i).secure := false;
arrCookies(i).version := 1;
arrCookies(i).comment := null;
end loop;
-- set the cookies so that utl_http uses them as well
utl_http.add_cookies( arrCookies );
req := utl_http.begin_request(psURL, 'GET');
-- without the next two lines Portal will assume you are a
-- mobile device or something :)
utl_http.set_header(req, 'Accept', 'text/plain, text/html');
utl_http.set_header(req, 'User-Agent', 'Mozilla/4.0');
resp := utl_http.get_response( req );
begin
loop
utl_http.read_text(resp, data, 2048);
sHTML := sHTML || data;
end loop;
exception
when utl_http.end_of_body then
-- this error is expected when the whole page is read
null;
end;
utl_http.end_response( resp );
return sHTML;
END GetPortalPage;I also need to fetch Portal pages using utl_http to manipulate the html code before returning to the browser. Even after applying the tricks from the sample above I'm still unable to forward the cookies returned from the browser to the utl_http request to make it effectively part of the original Portal session the browser uses.
Below is a piece of code from a test case I've prepared, that displays cookies:
CREATE OR REPLACE package http_test is
procedure proc1;
procedure proc2;
end http_test;
CREATE OR REPLACE package body http_test is
procedure show_cookies
is
t_names owa_cookie.vc_arr;
t_vals owa_cookie.vc_arr;
n_num_vals integer;
begin
owa_cookie.get_all(t_names,t_vals,n_num_vals);
htp.p('No of cookies: '||to_char(n_num_vals)||'<br>');
for i in 1..n_num_vals loop
htp.p(t_names(i)||' = '||t_vals(i)||'<br>');
end loop;
end show_cookies;
procedure forward_cookies
is
t_names owa_cookie.vc_arr;
t_vals owa_cookie.vc_arr;
n_num_vals integer;
t_cookies utl_http.cookie_table;
r_cookie utl_http.cookie;
begin
-- Get cookies sent from browser
owa_cookie.get_all(t_names,t_vals,n_num_vals);
-- Set cookies in utl_http
for i in 1..n_num_vals loop
r_cookie.name := t_names(i);
r_cookie.value := t_vals(i);
r_cookie.domain := 'mydomain.com';
r_cookie.expire := sysdate+1;
r_cookie.path := '/';
r_cookie.secure := false;
r_cookie.version := 1;
r_cookie.comment := null;
t_cookies(i) := r_cookie;
end loop;
end forward_cookies;
procedure proc1
is
req utl_http.req;
resp utl_http.resp;
data varchar2(2048);
begin
-- 1. Show cookies available in proc1
htp.p('<br>proc1<br>'
show_cookies;
-- 2. Show cookies available in proc2 when called directly
proc2;
-- 3. Show cookies available in proc2 when called using utl_http
-- Initialize cookies
utl_http.clear_cookies;
forward_cookies;
-- Send request
req := utl_http.begin_request
( 'http://host.mydomain.com:7778/pls/portal/schema.http_test.proc2'
, 'GET'
utl_http.set_header
( req
, 'Accept'
, 'text/plain
, text/html'
utl_http.set_header
( req
, 'User-Agent'
, 'Mozilla/4.0'
-- Fetch and process response
resp := utl_http.get_response( req );
begin
loop
utl_http.read_text(resp, data, 2048);
htp.p(data);
end loop;
exception
when utl_http.end_of_body then null;
end;
utl_http.end_response( resp );
end proc1;
procedure proc2
is
begin
htp.p('<br>proc2<br>'
show_cookies;
end proc2;
end http_test;
After granting this package to portal_public I call proc1 from the browser that returns two equal cookies appropriately for proc1 and proc2 but only portal cookie with a different value that changes with every new request. Sample response below:
proc1
No of cookies: 2
NLS_LANGUAGE = fi-fi%2Bsf%2BFINLAND
portal = 9.0.3+fi-fi+sf+FINLAND+E9DC359A80286AF5E03059C0C47764CA+89C0EE8BC55BAAC80E85148AF3C2000604C0EF4DAEEB15A5F09065ADA0F7D02F1B763785A750735CDC1BF58D1CBED7A6B66FA41DF2B120A014CF9632A2E1AB06CFAB78230700A28D4ED38071B7BAC929E1CC48653949D387
proc2
No of cookies: 2
NLS_LANGUAGE = fi-fi%2Bsf%2BFINLAND
portal = 9.0.3+fi-fi+sf+FINLAND+E9DC359A80286AF5E03059C0C47764CA+89C0EE8BC55BAAC80E85148AF3C2000604C0EF4DAEEB15A5F09065ADA0F7D02F1B763785A750735CDC1BF58D1CBED7A6B66FA41DF2B120A014CF9632A2E1AB06CFAB78230700A28D4ED38071B7BAC929E1CC48653949D387
proc2
No of cookies: 1
portal = 9.0.3+en-us+us+AMERICA+E9DC752B1ED397CAE03059C0C4772C4E+A802192F1D30ABC0790DBB45D30F1FB4E8B876148D14C9AB3BC6D99EF1F72D3E51503FEEDDB9F7ED2C1A7A99C60AFD0ED81945656D3C9AF3C1A926248DA6C00D03DEF6FEB5E869C338B41AAAB0BBD64C1C490DDFD8EE2DE9
Any ideas what's wrong or other ways how Portal page html code could be fetched for manipulation before returning to the browser. -
Is there a way to get a version of the Garage Band app that runs on version 5.1.1? I have an iPad 1 and can't get any higher iOS. The App store is telling me that Garage Band only runs on iOS 7.
Unfortunately the answer is still no.
-
How to get Portal User Context in Web Dynpro application
I have successfully integrate a web dynpro app into SAP Netweaver Portal.
Within my web dynpro app, how can I get portal user context information such as first name, last name, job title or some newly created ume attibutes.
Is there any programmatical approach to get portal user context in my web dynpro. I not sure whether I can use the following codes in web dynpro?
IUserContext userContext = request.getUser();
String firstName = userContext.getFirstName();
String lastName = userContext.getLastName();
If yes, can someone point me the name of the jar file I have to import.
Note : The SAP Netweaver installation that runs my web dynpro app is same with the SAP Portal.Hi ,
you can use the below code to get User details and add com.sap.security_2.0.0 > lib > com.sap.security.api.jar
try
IWDClientUser clientUser = WDClientUser.getCurrentUser();
String firstName = clientUser.getFirstName();
String lastname = clientUser.getLastName();
catch (WDUMException e) {
wdComponentAPI.getMessageManager().reportException("Error Retrieving User"+e.toString(),true);
Regards,
Sunitha Hari -
My Snow Leopard 10.6.3 has Safari 4.0.4 but this cannot be used for the new features of iTunes. I tried upgrading to Safari 5.1.7 but it needs Snow Leopard 10.6.8. Where can I get a version of Safari 5.1 that is compatible with Snow Leopard 10.6.3?
Hi..
here can I get a version of Safari 5.1 that is compatible with Snow Leopard 10.6.3?
Not possible. You need to update to v10.6.8
Click your Apple menu > Software Update
Or update using the this download > Mac OS X 10.6.8 Update Combo
Then restart your Mac. -
Do I not get full versions of the CC software when I buy a CC membership?
So I bought my CC membership back in January I think. And the first thing I did was install Premiere Pro CC. I needed it. Now about a month later, I need it again, and it says that I'm on a trial version. I signed into my CC, and tried again, but it still tells me I'm on a trial. The same thing happens with Speedgrade. Apparently after paying for 2 months of subcription, I can only use a 30 day trial version of the software I need. Is this a normal thing? Or should I call adobe, and get this fixed? I'd really really like to have working software on my computer, and I'm spending the money to have it. I'm in college, and on a pretty tight budget, so if I don't get actual versions of the software, I'm going to cancel my subscription. Nowhere on the literature on the CC does it say that you only get access to 30 day trials of most of the software. Please give me a hand here. I need to know if I should end my subscription or not.
Hi Spenserspratin,
Welcome to Adobe Forum.
I do understand your concern. Please refer to this article,
1.http://helpx.adobe.com/creative-suite/kb/trial--1-launch.html
2.http://forums.creativecow.net/thread/378/4723
If the issue still persists, please contact Adobe at http://www.adobe.com/in/company/contact.html
Regards,
Rajshree -
We are attempting to use patch plan to apply PSU and one-offs to a new 12.1.0.2 database oracle home. Our EM version is 12.1.0.4.
We are experiencing the same issue described in ''Bug 20271609 : Unable to get the version of OPatch". This bug is closed as 'duplicate bug to filer' but we do not appear to have visibility into what patch/bug fixes the issue.
Description from the above mentioned bug is our same issue. We do not have this issue when we use patch plans against an 11.2.x oracle_home target. It is unique to 12.1.0.2 oracle_home target.
Description from the bug:
The Plan failed in step "Run Prerequisite Checks" with the following errors:
PREREQ_NAME: Minimum Version of OPatch
PREREQ_DESC: Check if the required version of OPatch is present on the target
PREREQ_TYPE: PATCH_TOOL_CHECK
PREREQ_STATUS: FAILED
PREREQ_MESG: Unable to get the version of OPatch at
/u01/app/oracle/product/12.1.0/dbhome_2/Opatch
We have opened an SR to see if we can get more info on what was already identified as a bug. Has anyone else experienced this issue? If so, can you share any patches or workarounds (other than manually applying patches) that you found useful?
Thanks.You'll probably get the same info from Support, but the workaround is to use the Patch Database (however that doesn't work if there's no DB target associated to that home). If you were trying to do patchign out of place (clone home, patch, then move db's), EM can do this for you. If you're just installing a new DB Home and trying to patch, then i don' think there's another workaround. The base bug is marked fixed though, so a backport for the 12.1.0.6 plugin should be available very soon. I would ask the support analyst to request the backport for your plugin/patch level...
Maybe you are looking for
-
Did you know Firefox 4 does not support full frame option in iPlayer or similar?
Both at home & work - using Mac OS 10.5 & 10.6 Firefox 4 will not allow me to view full frame video stream such as BBC iPlayer, 4OD, ITV Player, TVCatchup ....etc, etc. I have now switched to using Safari & Chrome (which work perfectly) but in the in
-
How to fetch the logged in user?
Hi Friends, In my BSP application, I need to capture some data from the logged in user. For this I need to fetch the logged in user name, through my BSP application. Could you please let me know, whether there is any FM or API, which serve the purpos
-
Are the Wifi problems fixed yet?
Hey, Im from the UK and currently holidaying in the US. I really want an I-pad, and am thinking about getting one whilst im out here, but am very concerned about the wi-fi issues and having problems returning the Ipad to stores in the UK since it isn
-
Hello, I just rebooted 10.4. in Mail I keep getting the notice that the server at mail.comcast.net has rejected my password: yet when I log onto Comcast's site and enter my info I am able to retrieve and send everything. Any suggestions or ideas are
-
I'm having trouble understanding how the Address Book "works".
I like to have one card for each organization not each Person, if that is possible. For example, Thunderbirds Organization: Jeff Tracy, Lady Penelope, Mr hackenbaker. On the same card. Is it possible to have all 3 names on the same card? I am