This Space has blogs on various topics in the field of SAP. These blogs point out solutions to various technical and functional issues that consultants face during implementation or support of SAP Projects. Readers/followers are welcome to contribute to this space by emailing your content at bohra.mohammadi@gmail.com. You will be rewarded according to the topic/number of words/complexity of the topic/issue which are you addressing in your blog.
Sunday, June 26
Instant start to Netweaver portal administration
This post will provide you a basic and instant start to Netweaver portal administration. Definitions of the most important things that you much know for portal administration are covered in this post.
Usage Types
Before I tell you what are usage types, I must tell you that usage types made a SAP Portal administrator's life easy. Usage types were introduced when SAP Came up with SAP Netweaver Portal 7.0.
Usage types of SAP NetWeaver are software units to be installed. The usage types Application Server ABAP and Application Server Java are used as a foundation for other units. You can select one or more usage types during NetWeaver installation.
SLD
If you are a portal administrator you must know how to configure SLD. This can be done manually also and there is an automated way of doing this. You can chose one depending on your situation and requirements.
The SLD configuration is included in the AS Java installation. In some cases, the SLD configuration has to be changed. Below are main steps to be followed while changing the SLD Configuration.
- Specify the Groups and Users That Can Operate in the SLD
- Specify Where to Persist the SLD Information and Who Can Alter It
- Fine Tuning the SLD Server
- Initial Import of the SAP CIM model or the CR Content
- Configuring the Channel for Receiving SLD Reports
JCO
JCO or the Java Connectors connect SAP EP applications to SAP R/3 systems. So basically they fetch data and functionality from the SAP systems to be used and displayed in SAP EP or in applications which are used by SAP EP. For example, SAP Web Dynpro Java applications can talk with the SAP systems using JCO. As a portal administrator, you must know how to created, edit, check and activate a JCO. How to delete a JCO, how to troubleshoot a JCO in case of errors in connection.
Properties of Iview, workset and roles
Various properties of Iviews, worksets, roles are a must to know. This is important when administrator is asked to create/modify these PCD objects. Based on various business requirements, portal administrator may have to change the properties at runtime or design time and achieve what is needed.
Admin Tools
Various tools like Visual admin, Config tool and offline config editor are must.
SSO and System Configurations
Single Sign On means that portal user will have to punch in his/her username and passord only once and after that he/she will not be asked for login credentials no matter which system he/she tries to access through portal. This feature of SAP Netweaver portal helps you a lot by providing you the freedom to forget passwords. SAP EP connects to various backend SAP systems on your behalf. It is very important topic to be known by a portal administrator. Frequently asked in interview questions. How to create a SSO. How to change SSO settings etc etc...
Labels:
admin tools,
default sap roles,
iviews,
Jco,
portal administrator,
portal solutions,
sap enterprise portal tutorial,
sap enterptise portal,
single sign on,
SLD,
Usage Types,
worksets
Monday, June 13
Connecting SAP EP to a SQL database
This post will explain the procedure of connecting SAP EP to a SQL database.
Create a portal project. Create a portal component of type abstractportalComponent in the project. Add few external Jar files in the portal project. These external jar files will be needed while writing some code for the connection. The Jar Files to be added in the project build path are :
j2eeclient/activation.jar
j2eeclient/connector.jar
portalapps/com.sap.portal.ivs.connectorserviceapi.jar
other/genericConnector.jar
j2eeclient/jta.jar
The Code to open a connection is written below
public class JDBC extends AbstractPortalComponent {
public void doContent(
IPortalComponentRequest request,
IPortalComponentResponse response) {
// Open a connection
IConnectorGatewayService cgService =
(IConnectorGatewayService) PortalRuntime
.getRuntimeResources()
.getService(
IConnectorService.KEY);
ConnectionProperties prop =
new ConnectionProperties(request.getLocale(), request.getUser());
IConnection client = null;
try {
client = cgService.getConnection("myDB", prop);
} catch (Exception e) {
response.write(e.toString());
return;
}
try {
// Issue SQL Query statement
INativeQuery query = client.newNativeQuery();
String queryStr =
"SELECT name, address, zip FROM hotel.hotel";
Object result = query.execute(queryStr);
// Iterate returned result
ResultSetMetaData recordMetaData =
((ResultSet) result).getMetaData();
int colNum = recordMetaData.getColumnCount();
//result.beforeFirst();
response.write("<table border=1>");
while (((ResultSet) result).next()) {
response.write("<tr>");
for (int i = 1; i <= colNum; i++) {
response.write("<td>" + ((ResultSet) result).getString(i)+ "</td
}
}
// Close the connection
client.close();
} catch (QueryExecutionException e) {
response.write(e.toString());
} catch (CapabilityNotSupportedException e) {
response.write(e.toString());
} catch (ConnectorException e) {
response.write(e.toString());
} catch (InvalidQueryStringException e) {
response.write(e.toString());
} catch (ResourceException e) {
response.write(e.toString());
} catch (SQLException e) {
response.write(e.toString());
} catch (Exception e) {
response.write(e.toString());
}
}
}
After writing this code, if error occur, right click in the editor and say organize imports. Make sure that you have service reference in the <application-config> tag.
<application-config> <property name="ServicesReference" value="com.sap.portal.ivs.connectorservice"/> </application-config>
Then upload the PAR file.
Thats it. The portal application you created above is ready to be tested. Now by merely changing the query you wrote i nthe above code to fetch data from the hotel table can be changed to fetch data from any other database table as well.
Create a portal project. Create a portal component of type abstractportalComponent in the project. Add few external Jar files in the portal project. These external jar files will be needed while writing some code for the connection. The Jar Files to be added in the project build path are :
j2eeclient/activation.jar
j2eeclient/connector.jar
portalapps/com.sap.portal.ivs.connectorserviceapi.jar
other/genericConnector.jar
j2eeclient/jta.jar
The Code to open a connection is written below
public class JDBC extends AbstractPortalComponent {
public void doContent(
IPortalComponentRequest request,
IPortalComponentResponse response) {
// Open a connection
IConnectorGatewayService cgService =
(IConnectorGatewayService) PortalRuntime
.getRuntimeResources()
.getService(
IConnectorService.KEY);
ConnectionProperties prop =
new ConnectionProperties(request.getLocale(), request.getUser());
IConnection client = null;
try {
client = cgService.getConnection("myDB", prop);
} catch (Exception e) {
response.write(e.toString());
return;
}
try {
// Issue SQL Query statement
INativeQuery query = client.newNativeQuery();
String queryStr =
"SELECT name, address, zip FROM hotel.hotel";
Object result = query.execute(queryStr);
// Iterate returned result
ResultSetMetaData recordMetaData =
((ResultSet) result).getMetaData();
int colNum = recordMetaData.getColumnCount();
//result.beforeFirst();
response.write("<table border=1>");
while (((ResultSet) result).next()) {
response.write("<tr>");
for (int i = 1; i <= colNum; i++) {
response.write("<td>" + ((ResultSet) result).getString(i)+ "</td
}
}
// Close the connection
client.close();
} catch (QueryExecutionException e) {
response.write(e.toString());
} catch (CapabilityNotSupportedException e) {
response.write(e.toString());
} catch (ConnectorException e) {
response.write(e.toString());
} catch (InvalidQueryStringException e) {
response.write(e.toString());
} catch (ResourceException e) {
response.write(e.toString());
} catch (SQLException e) {
response.write(e.toString());
} catch (Exception e) {
response.write(e.toString());
}
}
}
After writing this code, if error occur, right click in the editor and say organize imports. Make sure that you have service reference in the <application-config> tag.
<application-config> <property name="ServicesReference" value="com.sap.portal.ivs.connectorservice"/> </application-config>
Then upload the PAR file.
Thats it. The portal application you created above is ready to be tested. Now by merely changing the query you wrote i nthe above code to fetch data from the hotel table can be changed to fetch data from any other database table as well.
Labels:
connnector framework,
learn sap ep online,
portal connector framework,
sap jobs,
SQL database
Sunday, June 12
Methods of IUserFactory API and Iuser API
There are various tasks which can be perfomed by using the IUSERFACTORY API of the UME(user management engine).
Instantiate user objects
Create New Users
Delete existing users
search users
and perform mass commit/rollback operations on a set of users
Access to the users factory is possible by using the following lines of code
import com.sap.security.api.*
IUserfactory userfact = Umfactory.getUserfactory();
You can obtain a user object by using the userfactory provided you know the logon ID or the Unique ID of the user.
getUserFactory.getUser(String UniqueID);
getUserFactory.getUserbyLogonID(String LogonID);
If you want to get user and prepopulate specific attributes, use the following method
getUserFactory.getUser(String UniqueID, AttributeList AttrList);
Most of the information needed for processing in a web dynpro java application is present in the IUser Object. Information about the name of the user, their unique ID, LDAP attributes, display name, role membership, etc are available from the IUser object.It is also possible to edit the corresponding profile data with the interface IUserMaint.
Obtaining information about the current User
The user associated with current portal request can be obtained by using getUser() methos in the IPortalComponentRequest Object.
IPortalComponentRequest request = .... ;
IUser user = request.getUser();
String Username = user.getDisplayName();
String depname = user.getDepartment();
Obtaining Information about another User
You can access any user by using the getuserbyLogonID() provided you have the logon ID of the desired user
An Exception would occur if the user does not exist
String uid = "demouser";
try
{
Iuser user = UmFactory.getuserFactory().getUserbyLogonID(uid);
String username = user.getDisplayName();
}
cartch(UME Exception e)
{
wdComponentAPI.getMessagemanager.reportexception(e.getlocalizedmessage, false);
}
The above lines of code also are applicable if you know the unique ID of the user whose information is required. Instead of method getUserbyLogonID(), use getUserbyUniqueID().
Searching for Users
steps are :
create a search filter from the userfactory.
set the search attributes for the search.
invoke the search
iterate thourgh the results
The result of the search is of type ISearchResult and returns an iterator containing the UniqueIDs of the principals returned.
The SearchReult also contain the state of the search.
Search_Result_Incomplete
Search_Result_OK
Search_Result_UNDEFINED
Search_Result_EXCEEDED
TIME_LIMIT_EXCEEDED
IUserFActory userfact = UMFactory.getUserFactory();
IUserSearchFilter userfilt = userfact.getUserSearchFilter();
userfilt.setLastName("bohra*");
ISearchResult result = userfact.SearchUsers(userfilt);
if (result.getState() == ISearchResult.SEARCH_RESULT_OK)
{
while(result.hasNext())
{
String uniqID = (string) result.next();
IUser thisuser = userfact.getuser(uniqID);
}
}
else
{
// print error or warning.
}
}
Instantiate user objects
Create New Users
Delete existing users
search users
and perform mass commit/rollback operations on a set of users
Access to the users factory is possible by using the following lines of code
import com.sap.security.api.*
IUserfactory userfact = Umfactory.getUserfactory();
You can obtain a user object by using the userfactory provided you know the logon ID or the Unique ID of the user.
getUserFactory.getUser(String UniqueID);
getUserFactory.getUserbyLogonID(String LogonID);
If you want to get user and prepopulate specific attributes, use the following method
getUserFactory.getUser(String UniqueID, AttributeList AttrList);
Most of the information needed for processing in a web dynpro java application is present in the IUser Object. Information about the name of the user, their unique ID, LDAP attributes, display name, role membership, etc are available from the IUser object.It is also possible to edit the corresponding profile data with the interface IUserMaint.
Obtaining information about the current User
The user associated with current portal request can be obtained by using getUser() methos in the IPortalComponentRequest Object.
IPortalComponentRequest request = .... ;
IUser user = request.getUser();
String Username = user.getDisplayName();
String depname = user.getDepartment();
Obtaining Information about another User
You can access any user by using the getuserbyLogonID() provided you have the logon ID of the desired user
An Exception would occur if the user does not exist
String uid = "demouser";
try
{
Iuser user = UmFactory.getuserFactory().getUserbyLogonID(uid);
String username = user.getDisplayName();
}
cartch(UME Exception e)
{
wdComponentAPI.getMessagemanager.reportexception(e.getlocalizedmessage, false);
}
The above lines of code also are applicable if you know the unique ID of the user whose information is required. Instead of method getUserbyLogonID(), use getUserbyUniqueID().
Searching for Users
steps are :
create a search filter from the userfactory.
set the search attributes for the search.
invoke the search
iterate thourgh the results
The result of the search is of type ISearchResult and returns an iterator containing the UniqueIDs of the principals returned.
The SearchReult also contain the state of the search.
Search_Result_Incomplete
Search_Result_OK
Search_Result_UNDEFINED
Search_Result_EXCEEDED
TIME_LIMIT_EXCEEDED
IUserFActory userfact = UMFactory.getUserFactory();
IUserSearchFilter userfilt = userfact.getUserSearchFilter();
userfilt.setLastName("bohra*");
ISearchResult result = userfact.SearchUsers(userfilt);
if (result.getState() == ISearchResult.SEARCH_RESULT_OK)
{
while(result.hasNext())
{
String uniqID = (string) result.next();
IUser thisuser = userfact.getuser(uniqID);
}
}
else
{
// print error or warning.
}
}
Labels:
Iuserfactory,
sap iusersearchfilter,
sap userfactory,
userfactory,
userfactory api,
userfactory getuser,
userfactory sap
Saturday, June 4
Portal Look and Feel - Branding the Portal
After portal installation, user want to change the look and feel and the appearance of portal for his organization, for customers, partners etc. This process is called Branding. During Branding, we create various portal desktop.
One particular type of appearance of portal is called a portal desktop. Portal desktop is a combination of
portalframework pages and portal theme. How things are arranaged on the portal screen is determined by portal framework pages and the feel of portal screen is determined by the portal theme. Once portal desktops are created, they have to be assigned to user or group of users. This can be done by using portal display rules. So in other words, you use portal display rules to assign portal desktops to various users or group of uers. These portal display rules are accumulated in a Master Rule Collection (main_rule).
Portal feamework page determines the navigational structure, layout and content of the portal desktop. Portal
Theme determines the colour, size, font and other visual aspects of various UI elements. So the following steps can be performed to create portal desktops
- create navigation iviews
- build navigation pages using iviews created above
- create page layout
- create framework page using page layout and navigation page
- create theme
- create portal desktop using theme and framework page
- create rule in master rule collection (main_ruke)
- assign portal desktop to the newly created rule.
After doing this, log off from the portal and login again, changes the new portal desktop your created
will be visible to you. Errors can occur like 'Error occurred while trying to access desktop'. This may
be because you have not assiged logged in user ID to the display rule created for newly created portla desktop or the portal desktop is deleted etc.Troubleshotting for such type of errors can be done in System Administration Portal Display. Go to Portal Content Portal Users Standard Portal Users Default Portal Desktop.
Below are few SAP notes which are useful if you face problems in accessing newly created portal desktops
- Changes to Default Framework Page have no effect--------687485
- NW’04 upgrade to >=SP11 Theme Editor missing themes-----861452
- Error occurred while trying to access desktop-----------869690
- Error occurred while trying to access framework page----856865
- Full-Control permissions required to edit Rule Collection--823210
- Cannot log in: “No portal desktop defined for this user”---715307
Related Articles :
SAP EP - Standard Portal Services
Portal Eventing and Navigation
How to Develop Portal Applications
SAP EP-Developing portal content and assigning permissions
SAP EP-Role maintenance
SAP EP-How to make Enterprise Portal highly available
SAP Material Management Introduction
SAP EP-J2EE architechture
SAP EP - J2EE architechture
Introduction
This article will discuss about the important components of portal technical infrastructure.
I will talk mainly about the SAP WAS, ABAP and TREX. I will also dicuss about the minimal WAS java installation and a large cluster installation in which we use load balancer. Once you have a complete understanding of the J2EE infrastructure, you are in a position to design a optimal portal infrastructure which will have all the important features : high availability, scalability, performance, security, and so on.
Components of a Portal Infrastructure
Various systems and devices comprise or come together to form the technical infrastructure : operating systems, network systems, firewalls, high availability solutions, load-balancing devices, and storage devices etc…
Major components of a portal technical infrastructure are :
• Web clients
• Load balancer
• Web servers
• Web dispatchers
• Proxy servers
• Portal server
• Web AS database
• User Management Engine (UME)
• TREX components
In this post I shall discuss mainly about the J2EE architecture and the TREX components.
Web AS Java Architecture
We will have a look at components in a Web AS Java installation. A typical installation has
a central instance, a central services instance, a Java instance, and a database instance.
What does the central instance consist of ? it consists of a dispatcher, a server, and a Software Delivery Manager (SDM).
The central services instance contains the message service and the enqueue service
installed together on one machine.
The Java instance does not contain an SDM. The Java instance can contain a dispatcher and one or more J2EE server processes.
These various instances can be installed on separate physical machines and if they are installed in this way, scalability and availability of the system can be enhanced.
When we form a java cluster, more than one java instances can be there but only one central service instance. If there are more than one java instances then there has to be a load balancer such as a sap web dispatcher to distribute the load or the incoming requests to various java instances in the cluster.
A java instance has n number of server processes. The number of server processes available in a java instance depends upon RAM of the host on which that Java instance is installed.
Apart from server processes, a Java instance has something called java dispatcher.
It is a kind of load balancer that receives the client request and forwards it to the server process. Message service tells the java dispatcher as to which is the most suitable server process to which the request should be routed.
Server process will process the request and will store the user session.
The java instance in the cluster which has a SDM installed on it is called the central java instance.
There is something called Java Startup and Control Framework which is used for starting and stopping the Java instance. So it can be controlled and monitored using the SCF.
Related Articles :
This article will discuss about the important components of portal technical infrastructure.
I will talk mainly about the SAP WAS, ABAP and TREX. I will also dicuss about the minimal WAS java installation and a large cluster installation in which we use load balancer. Once you have a complete understanding of the J2EE infrastructure, you are in a position to design a optimal portal infrastructure which will have all the important features : high availability, scalability, performance, security, and so on.
Components of a Portal Infrastructure
Various systems and devices comprise or come together to form the technical infrastructure : operating systems, network systems, firewalls, high availability solutions, load-balancing devices, and storage devices etc…
Major components of a portal technical infrastructure are :
• Web clients
• Internet browsers
• PDAs
• Mobile solutions
• Web infrastructure• Load balancer
• Web servers
• Web dispatchers
• Proxy servers
• Portal server
• Portal platform
• Knowledge management
• Content management
• Collaboration platform
• J2EE engine• Web AS database
• User Management Engine (UME)
• TREX components
• Web server
• Retrieval and Classification Engine
• Retrieval and Classification Index
In this post I shall discuss mainly about the J2EE architecture and the TREX components.
Web AS Java Architecture
We will have a look at components in a Web AS Java installation. A typical installation has
a central instance, a central services instance, a Java instance, and a database instance.
What does the central instance consist of ? it consists of a dispatcher, a server, and a Software Delivery Manager (SDM).
The central services instance contains the message service and the enqueue service
installed together on one machine.
The Java instance does not contain an SDM. The Java instance can contain a dispatcher and one or more J2EE server processes.
These various instances can be installed on separate physical machines and if they are installed in this way, scalability and availability of the system can be enhanced.
When we form a java cluster, more than one java instances can be there but only one central service instance. If there are more than one java instances then there has to be a load balancer such as a sap web dispatcher to distribute the load or the incoming requests to various java instances in the cluster.
A java instance has n number of server processes. The number of server processes available in a java instance depends upon RAM of the host on which that Java instance is installed.
Apart from server processes, a Java instance has something called java dispatcher.
It is a kind of load balancer that receives the client request and forwards it to the server process. Message service tells the java dispatcher as to which is the most suitable server process to which the request should be routed.
Server process will process the request and will store the user session.
The java instance in the cluster which has a SDM installed on it is called the central java instance.
There is something called Java Startup and Control Framework which is used for starting and stopping the Java instance. So it can be controlled and monitored using the SCF.
Related Articles :
SAP EP - Standard Portal Services
Portal Eventing and Navigation
Portal Look and Feel - Branding the Portal
How to Develop Portal Applications
SAP EP-Developing portal content and assigning permissions
SAP EP-Role maintenance
SAP EP-How to make Enterprise Portal highly available
SAP Material Management Introduction
Portal Eventing and Navigation
Portal Look and Feel - Branding the Portal
How to Develop Portal Applications
SAP EP-Developing portal content and assigning permissions
SAP EP-Role maintenance
SAP EP-How to make Enterprise Portal highly available
SAP Material Management Introduction
Labels:
learn sap ep online,
sap ep,
sap j2ee architecture
Subscribe to:
Posts (Atom)