cancel
Showing results for 
Search instead for 
Did you mean: 

how to capture the system alias details of portal in webdynpro java

Former Member
0 Kudos

Hi,

I have a scenario where i should capture the System alias details of portal to R/3

and used in webdynpro java.

can anyone help me plz,

regards,

santhosh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Here's the code:


//You will need these imports
import com.sap.portal.pcm.system.ISystem;
import com.sap.portal.pcm.system.ISystems;
import com.sap.security.api.umap.system.DummySystemLandscapeWrapperImpl;
import com.sap.tc.webdynpro.clientserver.portal.impl.PortalUtils;

//
DummySystemLandscapeWrapperImpl sysLandscapeImpl = null;
PortalUtils portalUtils = null;
ISystems sys = null;
ISystem system = null;

String[] allSystems;
Enumeration allAliases = null;
String systemName = null;
String systemAlias = null;

portalUtils = new PortalUtils();
sys = (ISystems)portalUtils.getServiceReference(ISystems.KEY);
allSystems = sys.getAliases();
for (i = 0; i < allSystems.length; i++)
{
sysLandscapeImpl = new DummySystemLandscapeWrapperImpl(allSystems<i>.toString());
//Get all declared aliases for this system
allAliases = sysLandscapeImpl.getAllAliases();

//Looping through all the aliases
while (allAliases.hasMoreElements())
{
systemAlias = allAliases.nextElement().toString();
//Do something...
}
}

Regards,

Satyajit.

Answers (0)