Pages

Friday, 15 November 2013

How to delete transactional RFCs ?

This article answers following queries:

  • How to delete transaction rfc’s in SAP?
  • Explain the process of deleting struck or old transactional rfcs in SAP
  • How to delete trfc’s in SAP?
---------------------------------------------------------------------------------------

Sometimes, you may face transactional rfc issues in SM58 (like connection error/SQL errors/Application error/System error etc). In those cases, you want to delete those problematic rfc entries. So, please proceed as follows for deleting those entries.


Login to SAP system ABAP stack and navigate to SM58 transaction as shown below. Select the display period and username as per your requirement and execute by clicking on highlighted icon below.




For example, there are 2 transactional rfc errors (similar to below screen) 




If you want to delete them permanently from the above list, you have to proceed as shown below.

Navigate to Log file -> Reorganize as shown below

















It will result in below screen. 


























Please provide the relevant dates/destination/username and select status as applicable to your scenario and execute the same by clicking on highlighted icon.


Based on the above criteria, whatever rfc’s that is matching will be deleted and a confirmation message similar to below will be displayed on the status bar.







Monday, 14 October 2013

Logon group configuration in SAP



This article answers following questions:

  • How to configure/setup logon groups in SAP?
  • What are logon groups in SAP?
  • What transaction code is used for logon group configuration?
  • How to perform work load distribution in SAP system?
  • Explain the benefits of logon groups in SAP?
  • What are the advantages of creating logon groups?
  • What are the guidelines for creating logon groups in SAP?
  • What is the default logon group in SAP?
  • How to delete logon group in SAP?
  • How to check logon load distribution in SAP?
--------------------------------------------------------------------------


Logon Groups:

Logon groups (or work groups) are configured to dynamically distribute the load being processed by the dialog work processes.

In many cases, SAP systems will have 2 or more sap abap instances. In these cases, logon groups can be configured to achieve dynamic distribution of dialog users on the ABAP instances.

Setting up logon groups helps in uniform distribution of the work load across the available instances. While logging on using a logon group, the ABAP message server is contacted to identify the instance with best performance statistics within the selected logon group. A report runs in SAP every 5minutes which determines the load across each server and updates in the memory area of the message server. This information will be used by SAP GUI to determine the best instance to distribute the next user.

SPACE is the default logon group. By default, every instance of an SAP system (including central instance) is assigned to the logon group SPACE. This performs uniform distribution of the dialog workload.
However, if you want to distribute users on some other criteria as following, you can create additional logon groups using SMLG transaction code.

Other criteria:

Logon groups according to SAP application / module:  Separate logon groups can be setup for applications/modules such as HR, FI/CO, SD, MM etc. It means HR module users will be restricted to logon to identified instances, similarly other module users are allowed to login to their respective identified instances.  The advantages of this method, is only the programs of the respective module are loaded into the program buffer of the particular instances of that logon group. Due to this, program buffer requires less memory and this helps to avoid buffer displacements thus improving system performance.

Logon groups according to language, country or company division: 

 If your SAP system is operating across multiple countries or languages, in that case it is good idea to create logon groups specific to a country or language. By this way the data and text related to specific country or language will be loaded into the buffers of the respective instances

This minimizes buffer displacements and improves system performance. Also less memory is required for the table buffer.

         Logon groups for certain user groups:

i)             We can setup separate logon groups for some department like sales whose work is performance critical. For that logon groups we assign  instances which operates with high level of performance (e.g: high speed processors, less users per server, no background or update workprocesses configured or a dedicated network etc)
ii)            Some department users may take time-consuming reports in dialog mode. For these type of users, you may have to create separate logon group and assign an sap instance where profile parameter rdisp/max_wprun_time is set to very high
In this way we can separate performance critical/resource intensive applications from others.


Logon groups for the SAP Web Dispatcher:

 For direct ABAP web service requests, we can setup logon groups that the SAP Web Dispatcher can use. If logon groups are not configured for web dispatcher, the load is distributed to all ABAP instances on which ICM is configured.  Also, based on URLs we can distribute certain group of requests to dedicated logon groups.

Logon groups for ALE/RFC:

Asynchronous RFCs are used to process in parallel. However if the parallel processes are not limited properly, they can occupy all the available processes which impacts dialog users and can bring down the application. So, it is good idea to create separate logon groups for incoming RFC calls so that RFCs are kept separate from workprocesses of online users and thus avoids impact to dialog users.

Guide lines:

After assigning instances to logon groups
     
  •  We need to verify whether the instances of logon groups are evenly distributed or not
  • If an instance hangs or temporarily got disconnected, you should be able to redistribute the users. So, you need to setup at least 2 sap instances for each logon group.
  • Setting up logon groups involves extra administration and monitoring. So, unnecessarily large number of logon groups shouldn’t be setup

How to setup logon groups?

SMLG transaction code is used for creating logon groups.

Logon to SAP system and goto SMLG transaction as shown below:

















In the above example there are 2 instances (00 and 09) in this SAP system. These are not yet assigned to any logon group.

We can create a new logon group by clicking on highlighted create icon on the above screen. It results in below screen.



























In the above screen, either select logon group from dropdown or provide its name if you are newly creating. After that assign instance for that logon group and click on copy to save the assignment.

In this example iam creating two logon groups hr and fico and assigning instances 00 and 09 respectively. Please find below screenshots which explains the same.























































Repeat the same step and create logon group fico and assign instance 09 for it as shown above.

After doing this, you can see following logon groups in SMLG















Once you are done with logon group setup, please log off from SAP system and goto SAPGUI of the respective SAP system.











Click on properties of the respective GUI entry and goto to connection tab as shown below.


































Please select Group/Server selection option from the drop down of Connection Type as shown above and maintain description and system id of the instance as shown above.

Now, you should be able to view the newly created logon groups as shown in below figure:


































Also, please note you are able to view logon group SPACE also which gets created by default

Now, you can configure any desired logon group to the users as shown below:

































For example in the above screen fico group is assigned to the end users in his GUI so that now onwards, he will login into instance number 09 only.

How to delete logon group or assignment?

If you no longer require any logon group, you can delete by proceeding as shown below:

i)Goto SMLG transaction

ii) Select the respective row and click on delete assignment which deletes the assignment of an instance to a logon group (highlighted in green color in below screen)














































Click on delete icon above which confirms deletion of assignment

iii)If you wish to delete logon group itself, then select the respective logon group and click on “delete group” in the above screen highlighted in red color (please refer screen 1 of point ii above). This deletes the logon group itself and removes all assignments related to this group.

How to check logon load distribution in SAP?

Goto transaction code SMLG as shown below and click on highlighted icon below to view the load distribution across instances














Alternatively, you can view this by navigating to Goto -> Load Distribution or  by pressing F5 key in the above screen





Tuesday, 16 July 2013

Explain Java Virtual Memory in SAP

This article answers following queries :

Explain memory management of Java Virtual Machine(JVM) in SAP
Explain JVM memory areas in SAP
Explain Young generation, Tenured generation and Permanent Generations
How to maintain JVM parameters  in SAP?
Which tool is used to configure Java VM settings in SAP?
How JVM automatically takes care of memory allocation?
Explain Used memory, Allocated memory, Virtual memory

----------------------------------------------------------------------------------


The JVM automatically takes care of allocation of memory space for java applications.

A “generation” reserves space in the address area of the host.

While starting sap system, the java virtual machine allocates operating system memory for each of the generations. This initially allocated memory is termed as “initial” or “initial size”. After complete usage of initial size, the java virtual machine further allocates memory in stages upto a maximum defined value termed as “max size”.

The memory space that is available is called the available memory or allocated memory. Since this space is reserved by the operating system, it is also called as “reserved space”. The space that is not reserved is called as “virtual memory”. 

The “ reserved space”  is available to the JVM. However, not all the memory is used always. It will be used based on the requirement. The memory that is actually used by the java applications is termed as “used memory”. If less space is required by the java application, the memory is returned to the operating system in stages. 

The memory area of JVM is mainly divided into 3 areas as listed below
Young generation
Tenured generation
Permanent generation

The 3 memory areas Young, Tenured and Permanent differ based on the data stored in them. Each of these generations has an initial and maximum size.

Young Generation : The objects that have been newly created by the applications are stored in the younger generation.

For younger generation, we can define initial size and maximum size with the parameters  -XX:NewSize and –XX:MaxNewSize respectively

 Tenured Generation: The objects that have been required for a longer period of time by an application are automatically moved to the tenured generation
For tenured generation, we cannot directly set initial size and maximum size directly. These are calculated from the parameters of the younger generation and the parameters  –Xms and  –Xmx.

The parameter –Xms is the “start heap size” or “initial heap size” and it defines the total initial size of the young and tenured generations.

The parameter  -Xmx is the “max heap size” and it defines the total size of the young and tenured generations.

So indirectly, it means that 
Initial size of tenured generation =  (-Xms)  -  (-XX:NewSize)
Maximum size of tenured generation = (-Xmx) – (–XX:MaxNewSize)

Permanent Generation : The objects that are permanently required by the JVM such as classes and objects are stored in the Permanent Generation.

For permanent generation, we can define initial size and maximum size with the parameters –XX:PermSize and  –XX:MaxPermSize respectively

Config Tool is the only tool used to set JVM parameters in an SAP java system.






Thursday, 2 May 2013

How to restart any java application in SAP netweaver AS Java?


This article answers the following queries:

§      How to restart any application in SAP netweaver AS Java?
§      Which tools can be used to restart any java application in SAP netweaver AS Java?

----------------------------------------------------------------------------------------

There will be many applications in SAP Netweaver As java. These java applications can be stopped, started or restarted using NWA tool and Visual administrator tools.

In this article, am covering the process to be followed to restart java application through NWA


Login  to SAP NWA tool through java link similar to below one providing hostname, port following by nwa quick link



i)              System prompts you to enter user id and password as shown below





















Authenticate yourself by providing administrator/j2ee_admin user id and password

ii)              Once logged in, you will see screen similar to below



















iii)              Navigate to System Management -> Administration -> Applications as shown in below figure.









iv)              In the above screen, from the dropdown box of show, select “ALL applications” and in the Get dropdown box, select Application name as shown in below screen which displays all the applications and their status. 















v)  Select the application on which you want to perform start/stop. 

Once you select the service respective operation is highlighted. i.e. if application is currently stopped, it provides option for you to start it and viceversa.

If you would like to restart a service, first of all stop it and then start it.