on 07-17-2007 1:40 PM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.