Archive for the 'BASIS' Category

Step-by-Step Saprouter Certificate Renewal

1. You need to remove the old generated files(certreq, cred_v2, local.pse, srcert) from previous certificate request. To do this you can either rename these files or create a new folder and move these files into it.

2. Login to http://service.sap.com/saprouter-sncadd and click the “Apply now” button. From the list of SAProuters registered to your installation, choose the relevant “Distinguished Name”.

3. Generate the certificate Request. To do this go to your SAProuter server and run this command on the saprouter directory.

sapgenpse get_pse -v -r certreq -p local.pse “<Distinguished Name>”

Example:  sapgenpse get_pse -v -r certreq -p local.pse “CN=example, OU=0000123456, OU=SAProuter, O=SAP, C=DE”

You will be asked twice for a PIN here. Please choose a PIN and document it, you have to enter it identically both times. Then you will have to enter the same PIN every time you want to use this PSE.

4. Display the output file “certreq” and with copy&paste (including the BEGIN and END statement) insert the certificate request into the text area of the same form on the SAP Service Marketplace from which you copied the Distinguished Name.

5. In response you will receive the certificate signed by the CA in the Service Marketplace. Copy&paste the text to a new local file named “srcert”, which must be created in the same directory as the sapgenpse executable.

6. With this in turn you can install the certificate in your saprouter by calling: sapgenpse import_own_cert -c srcert -p local.pse

7. Now you will have to create the credentials for the SAProuter with the same program (if you omit -O <user_for_saprouter>, the credentials are created for the logged in user account).

sapgenpse seclogin -p local.pse -O <user_for _saprouter>

Note: The account of the service user should always be entered in full <domainname>\<username>

8. This will create a file called “cred_v2″ in the same directory as “local.pse”

9. To check if the certificate has been imported successfully, run the following command: sapgenpse get_my_name -v -n Issuer

The name of the Issuer should be: CN=SAProuter CA, OU=SAProuter, O=SAP, C=DE

Creative Commons License

SAP: How to activate SAP webgui

Below are the steps on how to activate webgui on SAP ECC 6.0:

1. Go to your Instance Profile parameter using tcode RZ10 and set the icm/server_port_0 parameter to PROT=HTTP,PORT=8000

2. Now go to transaction SICF and activate the following:
/sap/public/bc/its/mimes
/sap/bc/gui/sap/its/webgui

3. Run transaction SIAC_PUBLISH_ALL_INTERNAL to publish internet services.

4. Now browse to http://<servername>:<icmport>/sap/bc/gui/sap/its/webgui/

As simple as that, you can now use SAP webgui.

SAP: Customized Tcode for View Maintenance Screen

Instead of going to transaction code SM30 to maintain your table, why not create your own t-code for that specific table maintenance screen. To do this, here’s the step by step procedure I stumbled upon on some SAP technical forums:

1. Go to t-code SE93.
2. Type in your customized t-code on the transaction code field.
3. Click on Create button.
4. Give it a short description and tick on the “Transaction with Parameters” radio button.
2. On the next screen, type “SM30″ in the transaction field.
3. Check mark the skip initial screen.
4. type “0″ on screen field
5. Under the Classification area, check mark on Inherit GUI attributes
6. Tick all GUI support checkboxes.
7. On the default value section, give this:

Name of Screen Field: VIEWNAME
Value: Your table name

Name of Screen Field: UPDATE
Value: X X

Creative Commons License

SAP: Setting Up Logon Rules

Go to transaction code RSPFPAR_LOGIN. It will give you a complete list of parameters for Logon Rules. Just refer to the Comment field for the parameter definition.

These parameters can be maintain through Profile Maintenance (RZ10). When SAP startup process reads a profile parameter, it checks first on the Instance Profile. If the parameter cannot be found on the instance profile then it will look on the Default profile. If neither profile contains the parameter, the default value is taken out of the startup program coding. With that, I suggest you to create or maintain parameters in Default Profile. Just ensure that a particular parameter appears only in the default and not in the instance profile.

For the profile to take effect, you have to restart your application server.

Creative Commons License

SAP: Basic of Lock Objects

Data inconsistency occurs when two or more users are editing/changing the same record on the same table at exactly the same time. To avoid this, we use Lock Objects.

Lock Objects enables the user to request a lock on a specific record before accessing it. In this way, changing/editing of records is only possible one at a time, thus avoiding data inconsistency.

There are three different lock modes:

exclusive lock/Write Lock (Mode ‘E’)
allow you to prevent data from being changed while you are changing it yourself. An exclusive lock, as its name suggests, locks an application object for exclusive use by the program that sets it. No other program can then set either a shared lock or an exclusive lock for the same application object.

Shared Lock/Read Lock (Mode ‘S’)
allow you to prevent data from being changed while you are reading it. They prevent other programs from setting an exclusive lock (write lock) to change the object. It does not, however, prevent other programs from setting further read locks.

Enhanced write lock (Mode ‘X’)
works like a write lock but are not accumulated while a program is being executed. It protects from further accesses within the same transaction.

To create a Lock Object, got to transaction SE11, click on Lock Object radio button and enter any name that starts with EZ or EY. (Example EZSAMPLE_LOCK)

When you activate a lock object, the system generates an ENQUEUE_ and a DEQUEUE_ function module that you can use on your ABAP programs.

ENQUEUE_<lockobject name> - adds the requested object in a queue(lock)
DEQUEUE_<lockobject name> - remove the requested object from being queued(unlock).

The basic procedure on requesting a lock:
1. Enqueue and lock the object for editing.
2. Read/write the data from the database.
4. dequeue and release the object.

To implement Lock Objects in ABAP programs, please refer to this post.