cancel
Showing results for 
Search instead for 
Did you mean: 

Getting the Portal and WAS Version

Former Member
0 Kudos

Hello all,

Is is possible to get the Netweaver and WAS Version programatically.

Which api's should i use.

Regards

Manoj

Accepted Solutions (1)

Accepted Solutions (1)

former_member182372
Active Contributor
0 Kudos

Hi Manoj,

See my post

And in your case code is like this:


import com.sap.sl.util.components.api.ComponentElementIF;
import com.sap.sl.util.cvers.api.CVersFactoryIF;
import com.sap.sl.util.cvers.api.CVersManagerIF;
 
...
CVersManagerIF cversManager = CVersFactoryIF.getInstance().createCVersManager();

ComponentElementIF component = cversManager.readCVers("sap.com", "SAP-JEE", "SC", "NO_SUBSYS");

if (component!=null) {
  vendor = component.getVendor();
  name = component.getName();
  release = component.getRelease();
  serviceLevel = component.getServiceLevel();
  counter = component.getCounter();
  applyTime = component.getApplyTime();
}

String sapJ2eeComponent = release + " SP" + serviceLevel + " (" + counter + ")"




// Same for this guy - cversManager.readCVers("sap.com", "SAP-JEECOR", "SC", "NO_SUBSYS");

Best regards, Maksim Rashchynski.

Former Member
0 Kudos

Hi Maxim,

Thanks for the response.

You have mentioned about the code

CVersManagerIF cversManager = CVersFactoryIF.getInstance().createCVersManager();

ComponentElementIF component = cversManager.readCVers("sap.com", "SAP-JEE", "SC", "NO_SUBSYS");

I went through the java docs from

https://www.sdn.sap.com/irj/sdn/javadocs site

i choosed the "SAP Netweaver 2004 ==>SPS 9"

I could not find the API's there.

Can you please let me know how can i get the documentation of this API'

s.

And in whihc netwaever jar are this api's present.

Thanks A Lot

Manoj

michael_voss2
Participant
0 Kudos

Hi Maksim!

Is there any documentation on CVersFactoryIF available, especially on readCVers and it's overloads ? I'd like to get the version info on a specific DC, especially it's counter and/or updateVersion, and this seems to be the only way to retrieve any of this information...

Thanks

Michael

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks,

Can you please tell me in which properties file this information is stored.

REgards

Manoj

roberto_tagliento
Active Contributor
0 Kudos

this are system information.

Exist "System" variable, try the code.

Doesn´t exist e file, it is a runtime propoerties variable.

roberto_tagliento
Active Contributor
0 Kudos

try:

String TEXT = new String("");

//java.lang.System.getProperties().

// Get all system properties

Properties props = System.getProperties();

// Enumerate all system properties

Enumeration enum = props.propertyNames();

for (; enum.hasMoreElements(); ) {

// Get property name

String propName = (String)enum.nextElement();

// Get property value

String propValue = (String)props.get(propName);

TEXT += propName + ": " + propValue + "\n";

}

wdContext.currentContextElement().setText(TEXT);

SAP_J2EE_Engine_Version: 6.40 PatchLevel 102141.313

Message was edited by:

Roberto Tagliento