Sunday, 23 December 2018

What is Client in SAP

Client
Introduction
 
A client is a self-contained business entity or unit within each SAP system with independent information and data. The main objective of the client is to keep the business data isolated so that other clients cannot access or change them.

The SAP client concept allows an organization to split a system into logical subunits. Clients may operate as separate business units, where all data is stored in a common database. Client specific data includes User Master Records (including authorizations and user groups), data customization and application/business data

• Client-specific data is data affecting only one client, such as user master and application data.
• Cross-client data is data affecting the whole system environment, such as cross-client Customizing data and all Repository objects.

SAP supports up to 1000 clients starting from 000 to 999.

SAP Standard Clients 

SAP R3 comes with 3 inbuilt standard clients,

000 – Master Client aka Reference Client

Client 000 contains a simple organizational structure of a test company and includes parameters for all applications, standard settings, and configurations for the control of standard transactions and
examples to be used in many different profiles of the business applications. It contains clien independent settings.
 

001 – Copy of Client 000
This client is a copy of the 000 client including the test company. This client's settings are  clientindependent if it is configured or customized. People normally use 001 client to create a new client.

066 – EarlyWatch Client (SAP Support)
The SAP EarlyWatch Alert is a diagnosis service, for solution monitoring of SAP and non-SAP systems in the SAP Solution Manager. Alert may contain Performance issue, average response time, current system load, Database administration etc.

Golden Client
Golden Client is the client where all the developments i.e. changes and modifications like configuration settings and cross-client customizations are made and tested, which are later transported to the Quality and Production clients.

A Golden client is configured to automatically record all changes and store in change requests.

SAP Work Process and Types


Work Processes

The SAP work process is a component of the application server that executes an ABAP application.
SAP work processes are started as operating system processes, each with its own process ID (PID).
The majority of the processing of the application is performed by the SAP work processes.

D – Dialog
V – Update
E – Enqueue
B – Background
M – Message Server
S – Spool
G – Gateway Server


Dialogue

It is the only work process which communicates interactively with the users.
There should be at least 2 Dialogue work process per instance. Dialogue work process initiates Update, Background and Spool.The dialog work processes are in charge of the interactive tasks of the R/3 system. A dialog work process performs the dispatcher in the request queues after user input are assigned to the next free work process. The dialog work processes execute just one single dialog step at a time and become immediately free for the next user request (dialog step), which is assigned by the dispatcher. This is called work process multiplexing. This means that the dialog work processes can be constantly switching between different user sessions. This type of processing allows a great deal of resource distribution; otherwise the system would need as many dialog work processes as the number of expected interactive users.  It works exactly the same as multiuser operating systems. Depending on the type of business transactions the users are working on, a dialog work process can support from 5 to more than 10 simultaneous users each. This means that 10 dialog work processescould theoretically support approximately 100 users. However, this is just a rule of thumb. Tuning this parameter means that if users have to wait long to get a free work process, you should increase the parameter.

Update

It is used to update the transactions in the database. It is initiated by Dialogue process. There should be at least 1 Update work process in the entire system. It is also recommended to have an update process for every 5 Dialogue.

Enqueue

It is used to provide locks for the records that are going to be updated. It ensures consistency for updates. There will be only 1 Enqueue configured in the system during the installation. It is possible to have more than one enqueue provided they are installed or configured on the central instance.

Background

The tasks which are expensive or time consuming are scheduled to run in the background mode noninteractively. There should be at least 2 background work process in the system

Message


There should be only 1 message server in me entire R/3 system. It is used to manage all the dispatchers. It is used to load balance the requests to identity the least loaded dispatcher. It is also used to provide locks to the request that are coming from Dialogue instances.
Gateway

It is used to provide a means of communication with SAP and NON-SAP systems. There will be only 1 gateway for each instance.

Spool

It is used to print the documents to a printer or output to a fax machine etc. There should be at least 1 Spool process in the entire system. It is also possible to configure more spool process depending on the print/spool volume.

Tuesday, 4 December 2018

Sybase sybctrl: connect to DB fails error


Symptom

On Linux / Unix sybctrl cannot connect to database.
The error message is similar to:
Could not load SYB library libsybdrvodb.so. No database connection possible.
Other Terms

sybctrl sybxctrl

 
Reason and Prerequisites

If sybctrl has the s-bit set and runs as a setuid program, LD_LIBRARY_PATH will be ignored by operation system for security reasons.
Shared libraries will not to be found and load of odbc driver will fail.
 
Solution

Use sybxctrl which is a copy of sybctrl without the s-bit set.

sybxctrl will be created if the database is stopped using stopsap script or stopdb script.

Otherwise create sybxctrl by executing as user adm:
 
cd /usr/sap//SYS/exe/run
 

cp sybctrl sybxctrl




More details refere Snote : 2719763

Saturday, 24 November 2018

Apache Web server Configuration for SAP Content Server(DMS).


Symptom

To operate the SAP Content Server for UNIX platforms, you require Apache Web Server 1.3.xx (where xx is Version 22 or higher). This note describes the compiler settings for the relevant ANSI C compilers of the different supported platforms and special situations that may occur when you generate the Apache Web server. To understand this note, you must be familiar with the commands of the UNIX operating system and of the development tools.

Reason and Prerequisites

To generate the Apache Web server, you require the following software components:

    a source distribution of the Apache Web Server Release 1.3.xx or 2.0.xx or 2.2.xx

    a correctly installed ANSI C compiler for the relevant platform, including the relevant tools such as make, ld, ar and so on


In particular, you must ensure that the compiler can create executable 64-bit code. The only exception applies to Linux (IA32) platforms.

The compiler switches listed below are relevant for the compiler of the relevant operating system vendor. GNU compilers are supported only for Linux distributions. Please set the C/C++ compilers accordingly via the variables CC and CXX.

The following steps were tested using a Bourne shell.

You must unpack the source distribution in a temporary directory. If not specified otherwise, all commands are executed in the root directory of the source distribution, even if the scripts are located in subdirectories of the source distribution. Do not use administrator rights to execute any part of the generation. This prevents unintended installations in system directories.

In addition to this note, you must read the notes and installation guidelines contained in the distribution.

Every HP-UX system has pre-installed a compilation tool-chain, however, this tool-chain is not usable for usual programs, it is rather used _only_ for building the HP-UX kernel when the HP-UX system is updated. If you check the version output of cc, it will list a (bundled) compiler. So a HP full complilation suite should be used to build the apache. For e.g: HP Compiler suite version:aCC A.06.16.01.


Solution

    1. Overview:

              The Apache Web server is generated in three steps. Furthermore, you can generate a binary distribution in one step. The binary distribution has the advantage that you must specify the installation directory only at the time of the installation. Furthermore, you can install the exact same software level on several hosts after you created such a distribution once.

    2. Detailed description of the generation in three steps

        a) Generating the make environment (configure step)

                       With the script "Configure", you create the make files for the individual server components. You can use call parameters and environment variables to control the generation of the make files.

                       For information about the variables that you must set BEFORE executing the configure script, see the section "Compiler switches and linker switches for the different platforms".

                       To enable the content server or the cache server module to run on the Web server, you MUST activate Dynamic Shared Object (DSO) support (using the parameter "--enable-shared=max").

                       The configure call is identical for all platforms except hpia64:

                       For Apache 1.3:

                       configure --prefix= --enable-module=most --enable-shared=max
                       For Apache 2.0/2.2 on hpia64:

                       configure --prefix= --enable-mods-shared=most
          --with-mpm=prefork


                      For Apache 2.0/2.2 on all other platforms:

                     configure --prefix= --enable-mods-shared=most
          --with-mpm=prefork --with-expat=builtin

                       You can use the switch "--prefix" to set the absolute installation directory. The system copies all files that are required at runtime to this directory in the subsequent installation step. If you want to use a variable installation directory, you must create a binary distribution.

                       With "--with-mpm=prefork" we recommend configuring apache in prefork mode
as Unix inherently supports multiprocessing. You can also use the
setting "--with-mpm=worker" if you wish to run apache in multithreaded mode



        b) Generating the binary files (compile step)

                       You can use the call "make" to start the translation run of the source code. This step may take some minutes.

        c) Installing the binary files (install step)

                       You can use the command "make install" to copy all binary files, the default Web site, the online documentation and so on to the installation directory that you have specified in the configure step.

    3. Creating a binary distribution

              For the binary distribution, you must also set the required compiler parameters and linker parameters as environment variables before you call the generation commands.

              The script "./src/helpers/binbuild. sh" (Apache 1.3)

                          "./build/binbuild.sh" (Apache 2.0/2.2)
              executes the three phases configure, make and install.  In the step install, the binary distribution is created as a tape archive (tar). The script outputs the name and storage location of the archive. The binary distribution created using "binbuild.sh" supports Dynamic Shared Objects (DSO).

              After you unpacked the tar archive in the target host, perform the final installation using the following script:

              ./install-bindist.sh

                If you do not specify < InstDir>, the system installs the Web server in the directory /usr/local. Especially when you use the user root to execute this script, the Web server may easily be installed in an unrequired location and it may be difficult to remove the Web server again from this location. Therefore, we recommend that you perform the installation using the user ID under which the Web server is to run in the future. In this way, all group rights and owner rights are correctly assigned from the beginning.

    4. Compiler switches and linker switches for the different platforms:

              All additional compiler switchers and linker switches are set using the environment variables CFLAGS (compiler), LDFLAGS (linker) and EXTRA_LDFLAGS_SHLIB (linker indicators for shared libraries).

              These variables must be exported.

        a) Linux 32-bit (iA32)

                       For both Apache 1.3 and Apache 2.0/2.2

                       Additional switches are not required.

        b) Linux IA64 (64-bit)

                       For both Apache 1.3 and Apache 2.0/2.2

                       LDFLAGS="-L/lib64"

        c) Linux PPC64 (64-bit)

                       For both Apache 1.3 and Apache 2.0/2.2

                       CFLAGS="-m64", LDFLAGS="-m64 -L/lib64"

        d) Linux x86_64 (64-bit)

                       For both Apache 1.3 and Apache 2.0/2.2

                       LDFLAGS="-L/lib64"

        e) HP-UX ('PA-RISC' 64-bit)
                       For both Apache 1.3 and Apache 2.0/2.2

                       CFLAGS="+DA2.0W", LDFLAGS="+DA2.0W -lcl"

        f) HP-UX (IA64 64-bit)

                       For both Apache 1.3 and Apache 2.0/2.2

                       CFLAGS="+DD64 +DSitanium2", LDFLAGS="+DD64 +DSitanium2"

                       PLEASE ALSO REFER THE ATTACHED NOTE 940584 ON THIS PLATFORM

        g) SUN Solaris_64

                       For both Apache 1.3 and Apache 2.0/2.2

                       CFLAGS="-m64"

                h) SUN SolarisX64

                       CFLAGS="-m64"

        i) IBM AIX 5.1 and 5.2 (64-bit)
                       For Apache 1.3 only

                       CFLAGS="-q64", LDFLAGS="-q64", EXTRA_LDFLAGS_SHLIB="-b64"
                       For IBM, you must adjust the make file templates to correctly call the program "ar". Use the following command

            find . -name *.tmpl -print

                       to display all the make file templates.  The archiving program "ar" requires the switch "-Xany" to correctly create 64-bit archive files.

                       In the templates, search the command "ar cr" and replace it with "ar -Xany cr". Save your changes. Alternatively, you can also create the following shell script that automatically implements the changes in all templates:

x=`find . -name *.tmpl -print`
for i in $x
do
   cat $i | sed -e 's@ar cr@ar -Xany cr@g' > $i.sav
   mv $i.sav $i
done


                       Due to an inaccuracy in the configure script, AFTER you called "Configure", you must manually change the command "ar cr" to "ar -Xany cr" in the file ./src/modules/standard/Makefile.



                       For Apache 2.0/2.2 only

                       CFLAGS="-q64", LDFLAGS="-q64", EXTRA_LDFLAGS_SHLIB="-b64", OBJECT_MODE=64





More details refer snote : 664384 


Friday, 5 October 2018

SQL failed with error "column ambiguously defined" in HANA Database



Symptom
Execution of SQL statement failed with error:

SAP DBTech JDBC: [268]: column ambiguously defined: $rowid$: line col (at pos xxxx)

Environment

    HANA 1.0
    HANA 2.0

Reproducing the Issue

Execute the SQL statement via HANA studio SQL console or hdbsql
Cause

When internal columns such as $rowid$ is used, table name needs to be defined, otherwise, error message "column ambiguously defined" will occure
 
Resolution

If your SQL statement contains

ORDER BY "$rowid$"
And the execution failed with error "column ambiguously defined", you need to modify the statement to include the table name, for example:

ORDER BY ."$rowid$"

More details Refer Snote : 2695943

How to install HANA license by OS commands

Symptom

You need to use OS commands to access the HANA Database and manage the license.

Because there's no HANA Studio or HANA Cockpit available to manage the license for some reason.

Environment

    HANA Platform 1.0
    HANA Platform 2.0

Resolution

1. Logon as sidadm user, connect to the Database via hdbsql.

    If it is a single container system, please try below command:

> hdbsql -n :315 -i -u -p

    If it is a MDC system, please try connecting to the system DB by below command:

> hdbsql -n :313 -i -u -p

2. Enable multiline mode in hdbsql

hdbsql => \mu

3. You need a new license key, which you can download from Support Portal.

4. Enter statement  SET SYSTEM LICENSE ''.

Please note to add quotation mark outside the content of the license file you just downloaded.

5. Execute the statement by command: \g

hdbsql => \g


Remarks:
Install the new license via hdbsql cannot replace the old license. Please consider to delete the old license key before installing the new one.

You can also delete license keys by executing the SQL statement UNSET SYSTEM LICENSE ALL. 

More Details refer Snote :2690863