ABAP AND DATABASES

Hi Experts..
I would like to know how to create a databases in SQL and have access from ABAP.. to Modify, Consult and do the basic operations like insert information, drop and modify in the respective tables.
I'm ussing MiniSap Minigui 6.2 on Windows XP and the BCUSER
Thank you very much for your help
REGARDS

HI Araceli,
Database Access using Advanced Business Application Programming (ABAP)
Basics :
Accessing the Database in the R/3 System is performed through the interface provided by the SAP System, which in the SAP System is referred to as the Database Interface. A user can access the database from his/her program through Open SQL and Native SQL depending upon the circumstances.
About SQL
The Structured Query Language (SQL) is a largely standardized language, which is used for accessing relational databases. It can be divided as follows:
Data Manipulation Language (DML)
These statements are for reading and changing data in database tables.
Data Definition Language (DDL)
These statements are for creating and administering database tables.
Data Control Language (DCL)
These statements are used for authorization and consistency checks.
So  each database has a programming interface. This programming interface allows the user to access the database tables by using SQL statements. But, these SQL statements in the programming interfaces are not fully standardized. So, you must refer to the documentation of that system for a list of the SQL statements available and also their correct syntax in order to access a specific database system.
Interface thru data base
Each work process on an application server must have a database interface if you want to make the R/3 system independent of the database system, and also to use it correctly despite the differences in the SQL syntax between various databases. By means of this interface only, the R/3 system can communicate with the database. All of the database requests from the R/3 system are converted into the correct Standard SQL statements for the database system by the database interface. In order to perform this function, it has to use a database-specific component, which shields the differences between database systems from the rest of the database interface. You have to choose the appropriate layer when installing the R/3 system. A user can access a database from a program through Open SQL and Native SQL.
Open SQL
Open SQL are statements that make up a subset of Standard SQL which is fully integrated in ABAP. Open SQL consists of Data Manipulation Language (DML) which is a part of Standard SQL.
One of the ways to access the database from a program is Open SQL. These Open SQL statements are nothing but a subset of Standard SQL, which is fully integrated in ABAP. Irrespective of which database system the R/3 installation is using, they allow you to access data. When I said that, Open SQL consists of the Data Manipulation Language (DML). I meant that it allows you to read (i.e. to SELECT) and change (For example  to INSERT, UPDATE, DELETE) data.
Moreover, Open SQL also goes beyond Standard SQL. This is to provide statements that can simplify or speed up database access in conjunction with other ABAP constructions. Apart from that, it also gives you the freedom to buffer certain tables on the application server, thereby enabling you to save excessive database access. In this case, the database interface is responsible for comparing the buffer with the database. As far as buffer storage is concerned, they may be stored in two parts: the working memory of the current work process, and the shared memory for all work processes on an application server. The data in the various buffers is synchronized at set intervals by buffer management where an R/3 system is distributed across more than one application server. It should be noted that data in the buffer is not always up to date when you are buffering the database. That is why you should only use the buffer for data which does not change often. You can specify whether a table can be buffered in its definition in the ABAP Dictionary.
Open SQL consists of a set of ABAP statements. These statements perform operations on the central database in the R/3 system. The results of the operations and any error messages which come out of it are independent of the current database system. Thus, uniform syntax and semantics for all of the database systems supported by SAP is provided by Open SQL. Regardless of the current database system, the ABAP programs, which use Open SQL statements only, will work in any R/3 system. Moreover, Open SQL statements work only with database tables that have been created in the ABAP Dictionary.
You have the freedom to combine columns belonging to different database tables to a database view (or view for short) in the ABAP Dictionary. Views are also handled in exactly the same way as database tables in Open SQL statements.
Some Open SQL keywords are as follows:
SELECT - It reads data from database tables.
INSERT - It adds rows to database tables.
UPDATE - It changes the contents of rows of database tables.
MODIFY - It inserts rows into database tables or changes the content of existing rows.
DELETE - It deletes rows from database tables.
OPEN CURSOR, FETCH, CLOSE CURSOR - It reads rows of database tables using the cursor.
Return Codes
The following two system fields are filled with return codes by all Open SQL statements:
SY-SUBRC: The system field SY -SUBRC contains the value 0 after every Open SQL statement if the operation was successful. When a value is other than 0, then it is unsuccessful.
SY-DBCNT: The system field SY-DBCNT contains the number of database lines processed after an open SQL statement.
Native SQL
The other possible way to access the database from a program is Native SQL. It is only loosely integrated into ABAP. It allows access to all of the functions contained in the programming interface of the respective database system. Native SQL statements are not checked and converted as compared to Open SQL statements. Unlike Open SQL, these are sent directly to the database system. The function of the database-dependent layer remains minimal when you use Native SQL. The Programs which use Native SQL are written specifically for a database system. You should avoid using Native SQL wherever possible when writing R/3 applications. However, you can use it in some parts of the R/3 Basis System, for instance, for creating or changing table definitions in the ABAP Dictionary.
Regardless of the database platform that your R/3 system is using, Open SQL allows you to access database tables, which are declared in the ABAP Dictionary. Native SQL allows you to use database specific SQL statements in an ABAP program. This means that you can use database tables that are not administered by the ABAP Dictionary. Aside from that, you can also integrate data that is not part of the R/3 system.
As a rule, an ABAP program that contains database-specific SQL statements will not run under different database systems. You have to use Open SQL statements only, if your program is used on more than one database platform.
You must proceed with the EXEC SQL statement, and follow the ENDEXEC statement to use a: Native SQL statement. For example
Listing 1
EXEC SQL [PERFORMING
ENDEXEC.There is no period after Native SQL statements. Also, using quotation marks (") or an asterisk (*) at the beginning of a native SQL statement's line does not introduce a comment as it would in normal ABAP syntax. You need to know if the table and field names are case-sensitive in your chosen database.
The data is transported between the database table and the ABAP program using host variables in Native SQL statements. These are preceded in a Native SQL statement by a colon ( and are declared in the ABAP program. The elementary structures can be used as host variables. The structures of an INTO clause are treated exceptionally, as though all of their fields are listed individually. If the selection in a Native SQL SELECT statement is a table, then you can pass it to ABAP line by line using the PERFORMING addition. For each line read, the program calls a subroutine
. Further, you can process the data within the subroutine. 
After the ENDEXEC statement, SY-DBCNT contains the number of lines processed as it does in Open SQL. In almost all cases, SY-SUBRC contains the value a after the ENDEXEC statement. Cursor operations form an exception: after FETCH, SY-SUBRC is 4 if no more records could be read. This is also applied when you read a result set using EXEC SQL PERFORMING.
Native SQL Scope 
Native SQL is very important as it allows you to execute nearly all available statements through the SQL programming interface (usually known as SQL Call Interface or similar) for directly executing SQL program code (using EXEC IMMEDIATE or a similar command). The statements that are not supported are listed in the following section:
·         Native SQL and the Database Interface,
·         Native SQL and Transactions
·         Native SQL and the Database Interface
Native SQL statements bypass the R/3 database interface. With the database buffer on the application server, there is no table logging, and no synchronization. Therefore, you should use Open SQL to change database tables declare in the ABAP dictionary wherever possible. Since the columns contain extra database specific length information for the column tables declared in the ABAP dictionary, containing long columns with the type LCHAR or LRAW should only be addressed using Open SQL. Native SQL may not produce the correct result, as it does not take this information into account. Native SQL does not support automatic client handling. Instead, you must treat a client field like any other field
Native SQL and Transactions
One should not use any transaction control statement such as COMMIT, ROLLBACK WORK, or any statements that set transaction parameters using Native SQL to ensure that transaction in the R/3 System are consistent.
ABAP Dictionary
The ABAP Dictionary is nothing but a part of the ABAP Workbench. It allows you to create and administer database tables. There are no statements from the DDL part of Standard SQL in Open SQL. It should be noted that normal application programs should not create or change their own database tables.
To create and change database tables, the ABAP Dictionary has to use the DDL part of Open SQL. Besides this, it also administers the ABAP Dictionary in the database. In addition, the ABAP Dictionary contains meta-descriptions of all database tables in the R/3 system. Here, only database tables appears in the Dictionary, which you have created using the ABAP Dictionary. Open SQL statements can only access tables, which exists in the ABAP Dictionary.
Authorization and Consistency Checks
With regard to authorization and consistency checks, the DCL part of Standard SQL is not used in R/3 programs. Whereas, the work processes which are within the R/3 system are logged into the database system as users with full rights. By using the R/3 authorization concept, the authorizations of programs or users to read or change database tables is administered within the R/3 system. In addition, transactions must equally ensure their own data consistency using the R/3 locking concept.
The R/3 lock concept allows you to monitor your system with regards to lock logics. The R/3 lock concept works closely together with the R/3 updates.
As an example, say that a travel agent wants to book a flight for a customer who wants to fly to a particular city with a certain airline on a certain day. If there are still available seats on the flight, then the booking will be possible, otherwise it will lead to overbooking. Hence, the database entry corresponding to the flight must be locked against access from other transactions to avoid the possibility of overbooking. This is because two agents might both be doing this same thing at the same time, and we need to make sure that we don't overbook.
Lock Mechanisms 
When the database system receives change statements (INSERT, UPDATE, MODIFY, DELETE) from a program, it automatically sets database locks. Database locks are locks on the database entries affected by statements to prevent problems. Since the lock mechanism uses a, lock flag in the entry, you can only set a lock for an existing database entry. After each database commit, these flags are automatically deleted. This means that database locks can never be set for longer than a single database LUW, a single dialog step in an R/3 application program.
Therefore, physical locks in the database system are insufficient for the requirements of an R/3 transaction. Locks in the R/3 system must remain set for the duration of a whole SAP LUW, that is, over several dialog steps. They must also be capable of being handled by different work processes and application servers. As a result, each lock must apply on all servers in that R/3 system.
Database Accesses of the NetWeaver AS ABAP
The NetWeaver AS ABAP stores long-term data in a central relational database table. In a relational database model, the real world is represented by tables. A table is a two-dimensional matrix, consisting of lines and columns (fields). The smallest possible combination of fields that can uniquely identify each line of the table is called the key. Each table must have at least one key, and each table has one key that is defined as its primary key. Relationships between tables are represented by foreign keys.
Standard SQL
SQL (Structured Query Language) is a largely standardized language for accessing relational databases. It can be divided into three areas:
·        Data Manipulation Language (DML)
Statements for reading and changing data in database tables.
·        Data Definition Language (DDL)
Statements for creating and administering database tables.
·        Data Control Language (DCL)
Statements for authorization and consistency checks.
Each database has a programming interface that allows you to access the database tables using SQL statements. The SQL statements in these programming interfaces are not fully standardized. To access a specific database system, you must refer to the documentation of that system for a list of the SQL statements available and their correct syntax.
The Database Interface
To avoid incompatible situations between different database tables and to make the NetWeaver AS ABAP system independent of the database system in use, each work process on an ABAP application server contains a database interface. The NW AS communicates with the database solely through the database interface. The database interface converts all of the database requests from the NW AS into the correct Standard SQL statements for the database system in use. To do this, it uses a database-specific component that shields the differences between database systems from the rest of the database interface. You choose the this component when you install NetWeaver AS ABAP in accordance with the database in use.
ABAP programs have two options for accessing the database interface: Open SQL and Native SQL.
Open SQL
Open SQL statements are a fully integrated subset of Standard SQL within ABAP. They enable the ABAP programs to access data irrespective of the database system installed. Open SQL consists of the Data Manipulation Language (DML) part of Standard SQL; in other words, it allows you to read (SELECT) and change (INSERT, UPDATE, DELETE) data.
Open SQL also goes beyond Standard SQL to provide statements that, in conjunction with other ABAP constructions, can simplify or speed up database access. It also allows you to buffer certain tables on the application server, saving excessive database access. In this case, the database interface is responsible for comparing the buffer with the database. Buffers are partly stored in the working memory of the current work process, and partly in the shared memory for all work processes on an application server. In SAP systems that are distributed across more than one application server, the data in the various buffers is synchronized at set intervals by buffer management. When buffering the database, you must remember that data in the buffer is not always up to date. For this reason, you should only use the buffer for data which does not often change. You specify whether a table can be buffered in its definition in the ABAP Dictionary.
Native SQL
Native SQL is only loosely integrated into ABAP, and allows access to all of the functions contained in the programming interface of the respective database system. Unlike Open SQL statements, Native SQL statements are not checked and converted, but instead are sent directly to the database system. When you use Native SQL, the function of the database-dependent layer is minimal. Programs that use Native SQL are specific to the database system for which they were written. When developing generally valid ABAP applications, you should – as far as possible – avoid using Native SQL. In some components of the SAP System, Native SQL is used – for example, in the ABAP Dictionary for creating or changing tables.
The ABAP Dictionary
The ABAP Dictionary, part of the ABAP Workbench, allows you to create and administer database tables. Open SQL contains no statements from the DDL part of Standard SQL. Normal application programs should not create or change their own database tables.
The ABAP Dictionary uses the DDL part of Open SQL to create and change database tables. It also administers the ABAP Dictionary in the database. The ABAP Dictionary contains meta descriptions of all database tables in the NetWeaver AS ABAP system. Only database tables that you create using the ABAP Dictionary appear in the Dictionary. Open SQL statements can only access tables that exist in the ABAP Dictionary.
Authorization and Consistency Checks
The DCL part of Standard SQL is not important in ABAP programs. The work processes within the ABAP application server are logged on to the database system as users with full authorization. The authorizations of programs or program users to read or change database tables is managed by the authorization concept. Equally, transactions must ensure their own data consistency in the database using the SAP locking concept. For more information, refer to the chapter Data Consistency.
Work Processes
Work processes execute the individual dialog steps of ABAP application programs. They are components of ABAP application servers. The next two sections describe firstly the structure of a work process, and secondly the different types of work process in NetWeaver AS ABAP.
Structure of a Work Process
The following diagram shows the components of a work process:
Screen Processor
In ABAP application programming, there is a difference between user interaction and processing logic. From a programming point of view, user interaction is controlled by screens. As well as the actual input mask, a screen also consists of flow logic, which controls a large part of the user interaction. NetWeaver AS ABAP contains a special language for programming screen flow logic. The screen processor executes the screen flow logic. Via the dispatcher, it takes over the responsibility for communication between the work process and the SAPgui, calls modules in the flow logic, and ensures that the field contents are transferred from the screen to the flow logic.
ABAP Processor
The actual processing logic of an application program is written in ABAP - SAP’s own programming language. The ABAP processor executes the processing logic of the application program, and communicates with the database interface. The screen processor tells the ABAP processor which module of the screen flow logic should be processed next. The following screen illustrates the interaction between the screen and the ABAP processors when an application program is running.
Database Interface
The database interface provides the following services:
·        Establishing and terminating connections between the work process and the database.
·        Access to database tables
·        Access to Repository objects (ABAP programs, screens and so on)
·        Access to catalog information (ABAP Dictionary)
·        Controlling transactions (commit and rollback handling)
·        Table buffer administration on the ABAP application server.
The following diagram shows the individual components of the database interface:
The diagram shows that there are two different ways of accessing databases: Open SQL and Native SQL.
Open SQL statements are a subset of Standard SQL that is fully integrated in ABAP. They allow you to access data irrespective of the database system that your installation is using. Open SQL consists of the Data Manipulation Language (DML) part of Standard SQL; in other words, it allows you to read (SELECT) and change (INSERT, UPDATE, DELETE) data. The tasks of the Data Definition Language (DDL) and Data Control Language (DCL) parts of Standard SQL are performed in NetWeaver AS ABAP by the ABAP Dictionary and the authorization system. These provide a unified range of functions, irrespective of database, and also contain functions beyond those offered by the various database systems.
Open SQL also goes beyond Standard SQL to provide statements that, in conjunction with other ABAP constructions, can simplify or speed up database access. It also allows you to buffer certain tables on the ABAP application server, saving excessive database access. In this case, the database interface is responsible for comparing the buffer with the database. Buffers are partly stored in the working memory of the current work process, and partly in the shared memory for all work processes on an ABAP application server. Where NetWeaver AS ABAP is distributed across more than one ABAP application server, the data in the various buffers is synchronized at set intervals by the buffer management. When buffering the database, you must remember that data in the buffer is not always up to date. For this reason, you should only use the buffer for data which does not often change.
Native SQL is only loosely integrated into ABAP, and allows access to all of the functions contained in the programming interface of the respective database system. In Native SQL, you can primarily use database-specific SQL statements. The Native SQL interface sends them as is to the database system where they are executed. You can use the full SQL language scope of the respective database which makes all programs using Native SQL specific for the database system installed. In addition, there is a small set of SAP-specific Native SQL statements which are handled in a special way by the Native SQL interface. ABAP applications contain as little Native SQL as possible. In fact, it is only used in a few components (for example, to create or change table definitions in the ABAP Dictionary).
The database-dependent layer in the diagram serves to hide the differences between database systems from the rest of the database interface. You choose the appropriate layer when you install NetWeaver AS ABAP. Thanks to the standardization of SQL, the differences in the syntax of statements are very slight. However, the semantics and behavior of the statements have not been fully standardized, and the differences in these areas can be greater. When you use Native SQL, the function of the database-dependent layer is minimal.
Types of Work Process
Before you start NetWeaver AS ABAP, you determine how many work processes each ABAP application server will have, and what their types will be. Since all work processes have the same structure (see preceding section), the type of work process does not determine the technical attrributes of the ABAP application server but the type of tasks to be performed on it. The dispatcher starts the work processes and only assigns them tasks that correspond to their type. This means that you can distribute work process types to optimize the use of the resources on your ABAP application servers.
The following diagram shows again the structure of an ABAP application server, but this time, includes the various possible work process types:
Dialog Work Process
Dialog work processes deal with requests from an active user to execute dialog steps (see also Dialog Programming).
Update Work Process
Update work processes execute database update requests. Update requests are part of an SAP LUW that bundle the database operations resulting from the dialog in a database LUW for processing in the background.
Background Work Process
Background work processes process programs that can be executed without user interaction (background jobs).
Enqueue Work Process
The enqueue work process administers a lock table in the shared memory area. The lock table contains the logical database locks for NetWeaver AS ABAP and is an important part of the SAP LUW concept. In NW AS, you may only have one lock table. You may therefore also only have one ABAP application server with enqueue work processes. Normally, a single enqueue work process is sufficient to perform the required tasks.
Spool Work Process
The spool work process passes sequential datasets to a printer or to optical archiving. Each ABAP application server may contain only one spool work process.
Role of Work Processes
The types of its work processes determine the services that an ABAP application server offers. The application server may, of course, have more than one function. For example, it may be both a dialog server and the enqueue server, if it has several dialog work processes and an enqueue work process.
You can use the system administration functions to switch a work process between dialog and background modes while the system is still running. This allows you, for example, to switch an SAP System between day and night operation, where you have more dialog than background work processes during the day, and the other way around during the night.
thanks
karthik
reward me points if usefull

Similar Messages

  • % of load on abap and database in se30

    Hi,
      I have created a report for vendor balance, it is working fine and also i am getting data in very short time  i want to know about performance analysis with SE30
      When i am running report of only one month then on abap  it is taking   85 %  and on database  12% and on system 3 %
    ans same report when i am running for 6 to 8 months  it is taking   65 %  and on database  33% and on system 2 %, i sit ok ,    can you give some tips how to do it and how to reduce load from particular like abap or database or system  or whatever i am getting is right.
    regards,
      zafar

    Hi Zafar,
    First of all, the relative usages of the three components depends on the amount of data; for different loads on the system and the DB, the output will be different.
    Now, if you check the output of SE30 carefully (the graph screen), you will see two buttons on top, one of them is the List Display button. Click that button to see a list of statements / code blocks.
    Here, if you sort by the "Gross %" or the "Net %" columns, you'll get to know which statement is consuming maximum system resources. If you double-click on any line, the system takes you directly to that code block (there is also another button on this screen to show you the actual code). Try to optimise these code segments for better performance.
    Typically, there will be entries like "Fetch <DBTable>" which will show a high system usage. These are your SELECT statements which access the database. Optimise your SELECT queries as far as possible.
    Hope this is useful! Please revert if you need anything else.
    Cheers,
    Shailesh.
    Always provide feedback for useful answers

  • Performance Check - ABAP and Database color bars

    Hello everyone,
    When i go for the performance check of my object, i see Database in red bar and ABAP in green bar.
    The smaller the difference between these two bars, the better.
    But what does the color mean ? ( Somethimes the smaller bar is Red )
    Thanks

    Here is the explanation (depends % of total) in [sap library - SE30|http://help.sap.com/saphelp_nw2004s/helpdata/en/c6/617d2ae68c11d2b2ab080009b43351/frameset.htm]
    >
    shalaxy s wrote:
    > The smaller the difference between these two bars, the better.
    NO, it depends completely of what does your program!

  • ARCHITECTURE OF SAP R/3 AND APPLICATION SERVER AND DATABASE SERVER IN ABAP

    ARCHITECTURE OF SAP R/3 AND APPLICATION SERVER AND DATABASE SERVER IN ABAP?
    PLEASE EXPLAIN

    hi
    <b>Presentation Server</b>
    It is actually a program named sapgui.exe.
    It usually installed in user’s workstation.
    The interface accepts the input from the user in the form of keystrokes, mouse-clicks, and function keys, and sends these requests to the application server.
    It receives and displays the result from the application server.
    <b>Application Server</b>
    An application server is a set of executables that collectively interpret the the ABAP/4 programs.
    Each application server has a profile called application server profile, that specifies its characteristics when it starts up and while it is running. It specifies:     
    1. Number of processes and its types.          
    2.Amount of memory each process may use.
    3. Length of time a user is inactive before being automatically logged off.
    If your ABAP/4 program requests information from the database, the application server will format the request and send it to the database server
    <b>Database Server</b>
    The database server is a set of executables that accepts database requests from the application server.
    These requests are passed on to the RDBMS (Relation Database Management System).
    The RDBMS sends the data back to the application server.
    The RDBMS  may run on database server’s computer or may be installed on its own computer.
    The components of application server are dispatcher, dispatcher queue, work process.
    All requests that come in from presentation servers are directed first to the dispatcher.
    The dispatcher writes them to the dispatcher queue.
    The dispatcher pulls the requests from the queue on a first-in, first-out basis.
    Each request is then allocated to the first available work process.
    A work process handles one request at a time.
    The work process needs two memory areas, the user context and the roll area.
    The user context is a memory area that contains the information about the user.
    The roll area is a memory area that contains about the program execution.
    <b>User Context</b>
    User context is a memory area that contains the characteristics of a user that is logged on the R/3 system.
    1)It holds,     user’s current settings.               
    2. The users authorizations.          
    3. The names of the programs the user is currently running.
    When a user logs on, the user context is allocated for that logon. When logs off, it is freed.
    <b>Roll Area     </b>
    A roll area is a memory that is allocated by a work process for an instance of a program.
    It holds the information needed by R/3 about the program execution, such as:     1. The values of the variables               
    2. The dynamic memory allocations          
    3. The current program pointer.
    Each time a user starts a program, a roll area is created for that instance of the program.
    If two users are using the same program at the same time, two roll areas will exist-one for each user.
    The roll area is freed when the program ends.
    Both roll area and the user context play an important roll in dialog processing
    <b>pls reward points dor useful ans</b>
    <i>regards
    vivek</i>
    Message was edited by:
            Vivek Saxena

  • Re: what is difference between sap locking and database locking

    hi,
        what is difference between sap locking and database locking. Iam locked the table mara by using lock objects.
    But iam unable to unlock the mara table. I give u the coding. Please check it.
    REPORT zlock .
    CALL FUNCTION 'ENQUEUE_EZTEST3'
    EXPORTING
       MODE_MARA            = 'S'
       MANDT                = SY-MANDT
       MATNR                = 'SOU-1'.
    call transaction 'MM02'.
    CALL FUNCTION 'DEQUEUE_EZTEST3'
         EXPORTING
              mode_mara = 'E'
              mandt     = sy-mandt
              matnr     = 'SOU-1'.
    IF sy-subrc = 0.
      WRITE: 'IT IS unlocked'.
    ENDIF.

    Hi Paluri
    Here is the difference between SAP locks and Database locks, i will try to find the solution to your code.
    Regards
    Ashish
    Database Locks: The database system automatically sets database locks when it receives change statements (INSERT, UPDATE, MODIFY, DELETE) from a program. Database locks are physical locks on the database entries affected by these statements. You can only set a lock for an existing database entry, since the lock mechanism uses a lock flag in the entry. These flags are automatically deleted in each database commit. This means that database locks can never be set for longer than a single database LUW; in other words, a single dialog step in an R/3 application program.
    Physical locks in the database system are therefore insufficient for the requirements of an R/3 transaction. Locks in the R/3 System must remain set for the duration of a whole SAP LUW, that is, over several dialog steps. They must also be capable of being handled by different work processes and even different application servers. Consequently, each lock must apply on all servers in that R/3 System.
    SAP Locks:
    To complement the SAP LUW concept, in which bundled database changes are made in a single database LUW, the R/3 System also contains a lock mechanism, fully independent of database locks, that allows you to set a lock that spans several dialog steps. These locks are known as SAP locks.
    The SAP lock concept is based on lock objects. Lock objects allow you to set an SAP lock for an entire application object. An application object consists of one or more entries in a database table, or entries from more than one database table that are linked using foreign key relationships.
    Before you can set an SAP lock in an ABAP program, you must first create a lock object in the ABAP Dictionary.

  • Drop Down in ALV  ABAP and NOT in OO - ABAP

    Hello Everyone....
    I m workin on an ALV which is in simple ABAP and not in OO-ABAP. There is some selection criteria on the first screen , as soon as the user fulfills the requirement an ALV GRID is displayed in which the last column is editable.
      But the Problem is that i wanna make that editable field in ALV as drop down which would contain values from the database table.
      Suggest me some method , so that i dont have to do much changes in my code .
      A Sample code will be very benificial .
    Thanx n Regards,
    Harpreet.

    Hi Harpreet,
    [compiled from sap online help - always a good chice]
    To make an input/output field into a list box, you must set the value L or LISTBOX in the Dropdown attribute in the Screen Painter. The visLg attribute determines the output width of the list box and the field. You can assign a function code to a list box field. In this case, the PAI event is triggered as soon as the user chooses a value from the list, and the function code is placed in the SY-UCOMM and OK_CODE fields. If you do not assign a function code, the PAI event must be triggered in the usual way – that is, when the user chooses a pushbutton or an element from the GUI status.
    If you have assigned a list box to an input/output field, you can use the Value list attribute of the screen element to determine how the value list should be compiled. There are two options:
    Value list from input help (recommended)
    If you do not enter anything in the value list attribute, the text field uses the first column displayed in the input help assigned to the screen field. The input help can be defined in the ABAP Dictionary, the screen, or a POV dialog module. It should be laid out in two columns. The key is automatically filled.
    Value list from PBO modules (not recommended).
    If you enter A in the value list attribute, you must fill the value list yourself before the screen is sent (for example, in the PBO event) using the function module VRM_SET_VALUES. When you do this, you must pass an internal table with the type VRM_VALUES to the import parameter VALUES of the function module. VRM_VALUES belongs to the type group VRM. The line type is a structure consisting of the two text fields KEY (length 40) and TEXT (length 80). In the table, you can combine possible user entries from the KEY field with any texts from the TEXT component. You specify the corresponding input/output field in the import parameter ID.
    Examples
    Example
    Dropdown box with a value list from input help (recommended)
    *& Report DEMO_DROPDOWN_LIST_BOX                                 *
    REPORT demo_dropdown_list_box.
    *& Global Declarations                                           *
    * Screen Interfaces
    TABLES sdyn_conn.
    DATA   ok_code TYPE sy-ucomm.
    * Global data
    TYPES: BEGIN OF type_carrid,
             carrid type spfli-carrid,
             carrname type scarr-carrname,
           END OF type_carrid.
    DATA itab_carrid TYPE STANDARD TABLE
         OF type_carrid WITH HEADER LINE.
    *& Processing Blocks called by the Runtime Environment           *
    * Event Block START-OF-SELECTION
    START-OF-SELECTION.
    CALL SCREEN 100.
    * Dialog Module PBO
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'SCREEN_100'.
    ENDMODULE.
    * Dialog Modules PAI
    MODULE cancel INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE user_command_0100 INPUT.
      CASE ok_code.
        WHEN 'SELECTED'.
          MESSAGE i888(sabapdocu) WITH sdyn_conn-carrid.
    ENDCASE.
    ENDMODULE.
    * Dialog Module POV
    MODULE create_dropdown_box INPUT.
      SELECT carrid carrname
                    FROM scarr
                    INTO CORRESPONDING FIELDS OF TABLE itab_carrid.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                retfield        = 'CARRID'
                value_org       = 'S'
           TABLES
                value_tab       = itab_carrid
           EXCEPTIONS
                parameter_error = 1
                no_values_found = 2
                OTHERS          = 3.
      IF sy-subrc <> 0.
    ENDIF.
    ENDMODULE.
    The next screen (statically defined) for screen 100 is 100. The only input field on the screen is the component SDYN_CONN-CARRID. Its Dropdown attribute is set to L, and it has the output length 20. The Value list attribute is empty, and it has the function code SELECTED. The function codes of the buttons EXECUTE and CANCEL. CANCEL are defined in the GUI status as having the function type E.
    The screen flow logic is as follows:
    PROCESS BEFORE OUTPUT.
      MODULE status_0100.
    PROCESS AFTER INPUT.
      MODULE cancel AT EXIT-COMMAND.
      MODULE user_command_0100.
    PROCESS ON VALUE-REQUEST.
      FIELD sdyn_conn-carrid MODULE create_dropdown_box.
    Users cannot enter any values into the screen fields. When they choose the input field on screen 100, the system displays a list box. The Value list attribute is empty, so the system launches the input mechanism. In this case, the event block PROCESS ON VALUE-REQUEST is created in the screen flow logic. This event block controls all other mechanisms. A two-column internal table is filled in the appropriate dialog module and passed to the input help using the F4IF_INT_TABLE_VALUE_REQUEST function module. The system inserts the two columns of the table into the list box.
    When the user chooses a line in the list box, the PAI event is triggered using the function code SELECTED and the value in the first column of the internal table is copied to the input field.
    Regards,
    Clemens

  • Error during VM container communication between ABAP and JAVA

    Hello,
    While creation of SC, I am getting error "Error during VM container communication between ABAP and JAVA"
    Based on earlier responses in this forum, I checked following activity.
    1. T Code - BBP_CND_CHECK_CUST
    Result - IPC Pricing is Active and IPC is now running in VMC
    2. Run Report - RSVMCRT_HEALTH_CHECK
    Result - The Java component is deactivated
    3. As per OSS note 854170, Profile parameters were existed as below
    a) vmcj/enable - on
    b) vmcj/option/maxJavaHeap = 200M
    So, How to get Java component activated?
    Thanks,
    Rahul Mandale

    Thanks Markus,
    For SM53, I am getting resulets as " Java is not active on this application server - Message no. SVMCRT011"
    Can you suggest, what I need to do for it? I can't use SRM Shopping cart because of it. thanks in advance, Rahul
    and dev_w0 trace ....
    trc file: "dev_w0", trc level: 1, release: "700"
    ACTIVE TRACE LEVEL           1
    ACTIVE TRACE COMPONENTS      all, MJ

    B Wed Aug 31 15:45:40 2011
    B  create_con (con_name=R/3)
    B  Loading DB library 'D:\usr\sap\CUS\DVEBMGS04\exe\dboraslib.dll' ...
    B  Library 'D:\usr\sap\CUS\DVEBMGS04\exe\dboraslib.dll' loaded
    B  Version of 'D:\usr\sap\CUS\DVEBMGS04\exe\dboraslib.dll' is "700.08", patchlevel (0.46)
    B  New connection 0 created
    M sysno      04
    M sid        CUS
    M systemid   560 (PC with Windows NT)
    M relno      7000
    M patchlevel 0
    M patchno    52
    M intno      20050900
    M make:      multithreaded, Unicode, optimized
    M pid        456
    M
    M  kernel runs with dp version 210000(ext=109000) (@(#) DPLIB-INT-VERSION-210000-UC)
    M  length of sys_adm_ext is 572 bytes
    M  ***LOG Q0Q=> tskh_init, WPStart (Workproc 0 456) [dpxxdisp.c   1293]
    I  MtxInit: 30000 0 0
    M  DpSysAdmExtCreate: ABAP is active
    M  DpSysAdmExtCreate: VMC (JAVA VM in WP) is not active
    M  DpShMCreate: sizeof(wp_adm)          18304     (1408)
    M  DpShMCreate: sizeof(tm_adm)          3954072     (19672)
    M  DpShMCreate: sizeof(wp_ca_adm)          24000     (80)
    M  DpShMCreate: sizeof(appc_ca_adm)     8000     (80)
    M  DpCommTableSize: max/headSize/ftSize/tableSize=500/8/528056/528064
    M  DpShMCreate: sizeof(comm_adm)          528064     (1048)
    M  DpFileTableSize: max/headSize/ftSize/tableSize=0/0/0/0
    M  DpShMCreate: sizeof(file_adm)          0     (72)
    M  DpShMCreate: sizeof(vmc_adm)          0     (1452)
    M  DpShMCreate: sizeof(wall_adm)          (38456/34360/64/184)
    M  DpShMCreate: sizeof(gw_adm)     48
    M  DpShMCreate: SHM_DP_ADM_KEY          (addr: 05C00040, size: 4613144)
    M  DpShMCreate: allocated sys_adm at 05C00040
    M  DpShMCreate: allocated wp_adm at 05C01E28
    M  DpShMCreate: allocated tm_adm_list at 05C065A8
    M  DpShMCreate: allocated tm_adm at 05C065D8
    M  DpShMCreate: allocated wp_ca_adm at 05FCBB70
    M  DpShMCreate: allocated appc_ca_adm at 05FD1930
    M  DpShMCreate: allocated comm_adm at 05FD3870
    M  DpShMCreate: system runs without file table
    M  DpShMCreate: allocated vmc_adm_list at 06054730
    M  DpShMCreate: allocated gw_adm at 06054770
    M  DpShMCreate: system runs without vmc_adm
    M  DpShMCreate: allocated ca_info at 060547A0
    M  DpShMCreate: allocated wall_adm at 060547A8
    X  EmInit: MmSetImplementation( 2 ).
    X  MM diagnostic options set: 0
    X  <ES> client 0 initializing ....
    X  Using implementation flat
    M  <EsNT> Memory Reset disabled as NT default
    X  ES initialized.

    M Wed Aug 31 15:45:41 2011
    M  ThInit: running on host crmsys

    M Wed Aug 31 15:45:42 2011
    M  calling db_connect ...
    C  Prepending D:\usr\sap\CUS\DVEBMGS04\exe to Path.

    C Wed Aug 31 15:45:47 2011
    C  Client NLS settings: AMERICAN_AMERICA.UTF8
    C  Logon as OPS$-user to get SAPSR3's password
    C  Connecting as /@CRM on connection 0 (nls_hdl 0) ... (dbsl 700 240106)
    C  Nls CharacterSet                 NationalCharSet              C      EnvHp      ErrHp ErrHpBatch
    C    0 UTF8                                                      1   0619F158   061A46F4   061A3F7C
    C  Attaching to DB Server CRM (con_hdl=0,svchp=061A3EC8,svrhp=061B5794)
    C  Starting user session (con_hdl=0,svchp=061A3EC8,srvhp=061B5794,usrhp=061CA558)

    C Wed Aug 31 15:45:48 2011
    C  Now '/@CRM' is connected (con_hdl 0, nls_hdl 0).
    C  Got SAPSR3's password from OPS$-user
    C  Disconnecting from connection 0 ...
    C  Closing user session (con_hdl=0,svchp=061A3EC8,usrhp=061CA558)
    C  Now I'm disconnected from ORACLE
    C  Connecting as SAPSR3/<pwd>@CRM on connection 0 (nls_hdl 0) ... (dbsl 700 240106)
    C  Nls CharacterSet                 NationalCharSet              C      EnvHp      ErrHp ErrHpBatch
    C    0 UTF8                                                      1   0619F158   061A46F4   061A3F7C
    C  Starting user session (con_hdl=0,svchp=061A3EC8,srvhp=061B5794,usrhp=061CA558)
    C  Now 'SAPSR3/<pwd>@CRM' is connected (con_hdl 0, nls_hdl 0).
    C  Database NLS settings: AMERICAN_AMERICA.UTF8
    C  Database instance CRM is running on CRMSYS with ORACLE version 10.2.0.1.0 since 20110831

    B Wed Aug 31 15:45:49 2011
    B  Connection 0 opened (DBSL handle 0)
    B  Wp  Hdl ConName          ConId     ConState     TX  PRM RCT TIM MAX OPT Date     Time   DBHost         
    B  000 000 R/3              000000000 ACTIVE       NO  YES NO  000 255 255 20110831 154542 CRMSYS         
    M  db_connect o.k.
    M  ICT: exclude compression: .zip,.cs,.rar,.arj,.z,.gz,.tar,.lzh,.cab,.hqx,.ace,.jar,.ear,.war,.css,.pdf,.js,.gzip,.uue,.bz2,.iso,.sda,.sar,.gif

    I Wed Aug 31 15:46:12 2011
    I  MtxInit: 0 0 0
    M  SHM_PRES_BUF               (addr: 0A7C0040, size: 4400000)
    M  SHM_ROLL_AREA          (addr: 788A0040, size: 61440000)
    M  SHM_PAGING_AREA          (addr: 0AC00040, size: 32768000)
    M  SHM_ROLL_ADM               (addr: 0CB50040, size: 615040)
    M  SHM_PAGING_ADM          (addr: 0CBF0040, size: 525344)
    M  ThCreateNoBuffer          allocated 544152 bytes for 1000 entries at 0CC80040
    M  ThCreateNoBuffer          index size: 3000 elems
    M  ThCreateVBAdm          allocated 12160 bytes (50 server) at 0CD10040
    X  EmInit: MmSetImplementation( 2 ).
    X  MM diagnostic options set: 0
    X  <ES> client 0 initializing ....
    X  Using implementation flat
    X  ES initialized.
    B  db_con_shm_ini:  WP_ID = 0, WP_CNT = 13, CON_ID = -1
    B  dbtbxbuf: Buffer TABL  (addr: 10E700C8, size: 30000000, end: 12B0C448)
    B  dbtbxbuf: Buffer TABLP (addr: 12B100C8, size: 10240000, end: 134D40C8)
    B  dbexpbuf: Buffer EIBUF (addr: 0FBA00D0, size: 4194304, end: 0FFA00D0)
    B  dbexpbuf: Buffer ESM   (addr: 134E00D0, size: 4194304, end: 138E00D0)
    B  dbexpbuf: Buffer CUA   (addr: 138F00D0, size: 3072000, end: 13BDE0D0)
    B  dbexpbuf: Buffer OTR   (addr: 13BE00D0, size: 4194304, end: 13FE00D0)
    M  rdisp/reinitialize_code_page -> 0
    M  icm/accept_remote_trace_level -> 0
    M  rdisp/no_hooks_for_sqlbreak -> 0
    M  CCMS: AlInitGlobals : alert/use_sema_lock = TRUE.

    S Wed Aug 31 15:46:15 2011
    S  *** init spool environment
    S  initialize debug system
    T  Stack direction is downwards.
    T  debug control: prepare exclude for printer trace
    T  new memory block 1946AA80

    S Wed Aug 31 15:46:16 2011
    S  spool kernel/ddic check: Ok
    S  using table TSP02FX for frontend printing
    S  1 spool work process(es) found
    S  frontend print via spool service enabled
    S  printer list size is 150
    S  printer type list size is 50
    S  queue size (profile)   = 300
    S  hostspool list size = 3000
    S  option list size is 30
    S      found processing queue enabled
    S  found spool memory service RSPO-RCLOCKS at 1D6D00A8
    S  doing lock recovery
    S  setting server cache root
    S  found spool memory service RSPO-SERVERCACHE at 1D6D0430
    S    using messages for server info
    S  size of spec char cache entry: 297028 bytes (timeout 100 sec)
    S  size of open spool request entry: 2132 bytes
    S  immediate print option for implicitely closed spool requests is disabled

    A Wed Aug 31 15:46:18 2011

    A  -PXA--
    A  PXA INITIALIZATION
    A  PXA: Fragment Size too small: 73 MB, reducing # of fragments
    A  System page size: 4kb, total admin_size: 5132kb, dir_size: 5076kb.
    A  Attached to PXA (address 688A0040, size 150000K)
    A  abap/pxa = shared protect gen_remote
    A  PXA INITIALIZATION FINISHED
    A  -PXA--


    A Wed Aug 31 15:46:20 2011
    A  ABAP ShmAdm attached (addr=57A40000 leng=20955136 end=58E3C000)
    A  >> Shm MMADM area (addr=57EB5E58 leng=126176 end=57ED4B38)
    A  >> Shm MMDAT area (addr=57ED5000 leng=16150528 end=58E3C000)
    A  RFC Destination> destination crmsys_CUS_04 host crmsys system CUS systnr 4 (crmsys_CUS_04)

    A Wed Aug 31 15:46:21 2011
    A  RFC Options> H=crmsys,S=04,d=2,
    A  RFC FRFC> fallback activ but this is not a central instance.
    A   
    A  RFC rfc/signon_error_log = -1
    A  RFC rfc/dump_connection_info = 0
    A  RFC rfc/dump_client_info = 0
    A  RFC rfc/cp_convert/ignore_error = 1
    A  RFC rfc/cp_convert/conversion_char = 23
    A  RFC rfc/wan_compress/threshold = 251
    A  RFC rfc/recorder_pcs not set, use defaule value: 2
    A  RFC rfc/delta_trc_level not set, use default value: 0
    A  RFC rfc/no_uuid_check not set, use default value: 0
    A  RFC rfc/bc_ignore_thcmaccp_retcode not set, use default value: 0
    A  RFC Method> initialize RemObjDriver for ABAP Objects
    M  ThrCreateShObjects          allocated 13730 bytes at 0FFB0040

    N Wed Aug 31 15:46:22 2011
    N  SsfSapSecin: putenv(SECUDIR=D:\usr\sap\CUS\DVEBMGS04\sec): ok

    N  =================================================
    N  === SSF INITIALIZATION:
    N  ===...SSF Security Toolkit name SAPSECULIB .
    N  ===...SSF trace level is 0 .
    N  ===...SSF library is D:\usr\sap\CUS\DVEBMGS04\exe\sapsecu.dll .
    N  ===...SSF hash algorithm is SHA1 .
    N  ===...SSF symmetric encryption algorithm is DES-CBC .
    N  ===...sucessfully completed.
    N  =================================================

    N Wed Aug 31 15:46:23 2011
    N  MskiInitLogonTicketCacheHandle: Logon Ticket cache pointer retrieved from shared memory.
    N  MskiInitLogonTicketCacheHandle: Workprocess runs with Logon Ticket cache.
    M  JrfcVmcRegisterNativesDriver o.k.
    W  =================================================
    W  === ipl_Init() called
    B    dbtran INFO (init_connection '<DEFAULT>' [ORACLE:700.08]):
    B     max_blocking_factor =  15,  max_in_blocking_factor      =   5,
    B     min_blocking_factor =  10,  min_in_blocking_factor      =   5,
    B     prefer_union_all    =   0,  prefer_join                 =   0,
    B     prefer_fix_blocking =   0,  prefer_in_itab_opt          =   1,
    B     convert AVG         =   0,  alias table FUPD            =   0,
    B     escape_as_literal   =   1,  opt GE LE to BETWEEN        =   0,
    B     select *            =0x0f,  character encoding          = STD / <none>:-,
    B     use_hints           = abap->1, dbif->0x1, upto->2147483647, rule_in->0,
    B                           rule_fae->0, concat_fae->0, concat_fae_or->0

    W Wed Aug 31 15:46:24 2011
    W    ITS Plugin: Path dw_gui
    W    ITS Plugin: Description ITS Plugin - ITS rendering DLL
    W    ITS Plugin: sizeof(SAP_UC) 2
    W    ITS Plugin: Release: 700, [7000.0.52.20050900]
    W    ITS Plugin: Int.version, [32]
    W    ITS Plugin: Feature set: [10]
    W    ===... Calling itsp_Init in external dll ===>
    W  === ipl_Init() returns 0, ITSPE_OK: OK
    W  =================================================
    E  Enqueue Info: rdisp/wp_no_enq=1, rdisp/enqname=<empty>, assume crmsys_CUS_04
    E  Replication is disabled
    E  EnqCcInitialize: local lock table initialization o.k.
    E  EnqId_SuppressIpc: local EnqId initialization o.k.
    E  EnqCcInitialize: local enqueue client init o.k.

    B Wed Aug 31 15:46:48 2011
    B  table logging switched off for all clients

    M Wed Aug 31 15:47:55 2011
    M  SecAudit(RsauShmInit): WP attached to existing shared memory.
    M  SecAudit(RsauShmInit): addr of SCSA........... = 05BD0040
    M  SecAudit(RsauShmInit): addr of RSAUSHM........ = 05BD07A8
    M  SecAudit(RsauShmInit): addr of RSAUSLOTINFO... = 05BD07E0
    M  SecAudit(RsauShmInit): addr of RSAUSLOTS...... = 05BD07EC

    A Wed Aug 31 15:48:44 2011
    A  RFC FRFC> fallback on the central gateway crmsys sapgw04 activ

    B Wed Aug 31 15:49:47 2011
    B  dbmyclu : info : my major identification is 3232288873, minor one 4.
    B  dbmyclu : info : Time Reference is 1.12.2001 00:00:00h GMT.
    B  dbmyclu : info : my initial uuid is D98FA690E8AA314D9B69930868792664.
    B  dbmyclu : info : current optimistic cluster level: 0
    B  dbmyclu : info : pessimistic reads set to 2.

  • SHARED MEMORY AND DATABASE MEMORY giving problem.

    Hello Friends,
    I am facing problem with EXPORT MEMORY and IMPORT MEMORY.
    I have developed one program which will EXPORT the internal table and some variables to the memory.This program will call another program via background job. IMPORT memory used in another program to get the first program data.
    This IMPORT command is working perfect in foreground. But  it is not working in background.
    So, I have reviewed couple of forums and I tried both SHARED MEMORY AND DATABASE MEMORY.  But no use. Still background is giving problem.
    When I remove VIA JOB  parameter in the SUBMIT statement it is working. But i need to execute this program in background via background job. Please help me . what should I do?
    pls find the below code of mine.
    option1
    EXPORT TAB = ITAB
           TO DATABASE indx(Z1)
                FROM   w_indx
                CLIENT sy-mandt
                ID     'XYZ'.
    option2
    EXPORT ITAB   FROM ITAB
      TO SHARED MEMORY indx(Z1)
      FROM w_indx
      CLIENT sy-mandt
      ID 'XYZ'.
       SUBMIT   ZPROG2   TO SAP-SPOOL
                      SPOOL PARAMETERS print_parameters
                       WITHOUT SPOOL DYNPRO
          *_VIA JOB name NUMBER number*_
                       AND RETURN.
    ===
    Hope every bidy understood the problem.
    my sincere request is ... pls post only relavent answer. do not post dummy answer for points.
    Thanks
    Raghu

    Hi.
    You can not exchange data between your programs using ABAP memory, because this memory is shared between objects within the same internal session.
    When you call your report using VIA JOB, a new session is created.
    Instead of using EXPORT and IMPORT to memory, put both programs into the same Function Group, and use global data objects of the _TOP include to exchange data.
    Another option, is to use SPA/GPA parameters (SET PARAMETER ID / GET PARAMETER ID), because SAP memory it is available between all open sessions. Of course, it depends on wich type of data you want to export.
    Hope it was helpful,
    Kind regards.
    F.S.A.

  • Are calls available to get CPU and database cost

    Hi,
    We are trying to get performance information for each ABAP call made through a web service. The call goes like this: web method calls ABAP method and returns back to web method.  We are interested in the CPU and database cost within the ABAP method and we want to be able to get the cost via a performance call, not through SE30 or SE12.  We want to return that information back to the web method so that we have full round trip metrics, i.e. ABAP costs and web method costs tied together.  I looked at some function modules starting with TH_* and SAPWL*, but it is not obvious whether any or these would work or which to use.
    Thanks,
    Andy

    Andy Goerdel wrote:
    Hi,
    > We are trying to get performance information for each ABAP call made through a web service. The call goes like this: web method calls ABAP method and returns back to web method.  We are interested in the CPU and database cost within the ABAP method and we want to be able to get the cost via a performance call, not through SE30 or SE12.  We want to return that information back to the web method so that we have full round trip metrics, i.e. ABAP costs and web method costs tied together.  I looked at some function modules starting with TH_* and SAPWL*, but it is not obvious whether any or these would work or which to use.
    >
    > Thanks,
    > Andy
    Hello Andy,
    if I understand you right, you want to collect this information at the very end of the ABAP method and store it somewhere or deliver back with the results?
    Please check if the function TH_WP_DETAIL_INFO helps you. You just need to know the work process number. And look at the DIAREC structure of the function module.
    Regards,
      Yuri

  • What is the difference between  ABAP and HR-ABAP?

    Hi people,
    Could u just tel me abt what is the difference between ABAP and HR-ABAP?
    Thanks in advance,
    Sanjeev K.V

    Hi Sir ,
    Please have a look below .Hope it is suitable and simpler solution for your question.
    Please do reward if useful.
    Thankx.
    HR deals with the INFOTYPES which are similar to Tables in General ABAP.
    There are different ways of fetching data from these infotypes.
    There are different areas in HR LIKE Personal Admn, Orgn Management, Benefits, Time amangement, Event Management, Payroll etc
    Infotypes for these areas are different from one another area.
    storing of records data in each type of area is different
    LDBS like PNP are used in HR programing.
    Instead of Select.. we use some ROUTINES and PROVIDE..ENDPROVIDE.. etc
    and in the case of Pay roll we use Clusters and we Import and Export them for data fetching.
    On the whole Normal ABAP is different from HR abap.
    Also,
    HR:
    HR deals with the INFOTYPES which are similar to Tables in General ABAP.
    There are different ways of fetching data from these infotypes.
    There are different areas in HR LIKE Personal Admn, Orgn Management, Benefits, Time amangement, Event Management, Payroll etc
    Infotypes for these areas are different from one another area.
    storing of records data in each type of area is different
    LDBS like PNP are used in HR programing.
    Instead of Select.. we use some ROUTINES and PROVIDE..ENDPROVIDE.. etc
    and in the case of Pay roll we use Clusters and we Import and Export them for data fetching.
    On the whole Normal ABAP is different from HR abap.
    For Personal Admn the Infotypes start with PA0000 to PA1999
    Time Related Infotypes start with PA2000 to PA2999.
    Orgn related Infotypes start with HRP1000 to HRP1999.
    All custom developed infotypes stsrat with PA9000 onwards.
    In payroll processing we use Clusters like PCL1,2,3 and 4.
    Instead of Select query we use PROVIDE and ENDPROVIDE..
    You have to assign a Logical Database in the attributes PNP.
    Go through the SAp doc for HR programming and start doing.
    http://www.sapdevelopment.co.uk/hr/hrhome.htm
    See:
    http://help.sap.com/saphelp_46c/helpdata/en/4f/d5268a575e11d189270000e8322f96/content.htm
    sites regarding hr-abap:
    http://www.sapdevelopment.co.uk/hr/hrhome.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPA/PAPA.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPD/PAPD.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PYINT/PYINT_BASICS.pdf
    http://www.atomhr.com/training/Technical_Topics_in_HR.htm
    http://www.planetsap.com/hr_abap_main_page.htm
    You can see some Standard Program examples in this one ...
    http://www.sapdevelopment.co.uk/programs/programshr.htm
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci1030179,00.html?Offer=SAlgwn12604#Certification
    http://www.erpgenie.com/faq/hr.htm.
    http://www.planetsap.com/hr_abap_main_page.htm
    http://www.sapbrain.com/TUTORIALS/FUNCTIONAL/HR_tutorial.html
    These are the FAQ's that might helps you as well.
    http://www.sap-img.com/human/hr-faq.htm
    http://www.sapgenie.com/faq/hr.htm
    http://www.planetsap.com/hr_abap_main_page.htm
    http://www.atomhr.com/library_full.htm
    HR Long texts Upload
    Look at the below link
    And finally,
    Few notes are below:
    InfoSets in the HR Application
    You can use SAP Query in HR to report on HR data. Queries are maintained as described in Creating Queries. The special features of queries created for HR are described in Maintaining Queries in the Human Resources Application. The maintenance procedure for HR InfoSets differs from the described procedure inasmuch as HR data fields are grouped together in infotypes.
    InfoSet management in SAP Query is also used for InfoSet Query. For further information, see Functions for Managing InfoSets.
    If you want to create InfoSets for HR, you can use logical databases PNP, PNPCE, PAP, and PCH (see HR Logical Databases). The database you must use to create your InfoSet depends on the component in which the data you want to report on is stored.
    The reports you can execute using InfoSets based on logical databases PNP (or PNPCE) or PCH are similar, but differ in that they can select different objects. The following table describes the connection between the logical database, and the infotypes you can include in an InfoSet. It also provides you with one or two examples of reports that you can execute using the appropriate InfoSets.
    Logical database PNP/PNPCE* PCH PAP
    Selection of Persons Objects from Personnel Planning Applicants
    Infotypes that can be included in the InfoSet Infotypes for· Personnel Administration (0000-0999) · Time Management (2000-2999) · Payroll infotypes · Infotypes for Personnel Planning objects that can be related to persons If the object type is specified:· Infotypes for the object type · Infotypes for objects that can be related to the specified object typeIf the object type is not specified:· All infotypes · Infotypes for Recruitment (4000-4999)· Some infotypes for Personnel Administration (such as 0001 and 0002)
    · Customer infotypes
    Reporting examples · Selection of all persons who participated in a specific business event, output of prices for reserved business events · Selection of all persons assigned to a specific personnel area, output of qualifications held by these persons · Selection of all business events held in London in March, output of all persons who participated in these business events · Selection of all positions assigned to a specific organizational unit, output of all persons assigned to the positions · Selection of all applicants hired last year to work on special projects, output of addresses for the applicants selected
    Logical database PNPCE (PNP Concurrent Employment) functions just like logical database PNP. The procedure for creating InfoSets is also the same. It only becomes significant if you work with Concurrent Employment.
    Creating InfoSets
    The maintenance procedure for HR InfoSets differs from the procedure described so far in this section inasmuch as HR data fields are grouped together in infotypes. To set up an InfoSet for the HR application, proceed as follows:
    1. On the initial screen for maintaining InfoSets, enter a name for the InfoSet and choose Create.
    2. On the next screen, enter a name for the InfoSet and select one of the HR logical databases in accordance with your reporting requirements.
    Customer infotypes can be created on all HR logical databases. In each individual case, therefore, you must decide which database to select so that you can report on customer infotypes.
    This screen enables you to enter an authorization group. All of the queries that are subsequently created using this InfoSet can only be executed by persons who have this authorization group.
    3. Choose .
    This takes you to the Infotype Selection for InfoSet  screen. You now have the option of creating field groups and assigning fields as required for non-HR InfoSets. Field groups that correspond to infotypes and already contain fields, however, are always created for HR InfoSets. The field groups are displayed in an overview tree in the top right section of the screen.
    The infotypes that you included in the InfoSet are displayed in an overview tree on the left of the screen. The infotype fields that are already included in field groups are displayed in a different color, and the corresponding field group ID is displayed.
    In the standard system, a field group is created automatically for each infotype that you included in the InfoSet (a field group corresponds to an infotype).
    In the standard system, each field group contains the infotype-specific fields. To ensure that working with the InfoSet is as easy as possible, you are advised to restrict your use of fields in each field group to those you really require. This means you should remove fields that are not required.
    An infotype's fields must only be assigned to the pertinent field group. Make sure this assignment is correct. If the assignment is incorrect, the InfoSet could be rendered unusable.
    When an InfoSet is created, the following fields are transferred automatically to the first field group:
    § Logical database PNPCE or PNP Personnel number
    § Logical database PAP Applicant number
    § Logical database PCH Object ID, plan version, and object type
    6. Determine the fields that must be included in the field groups of your InfoSet. If you require further information, see Assigning Fields to a Field Group.
    If you want, you can change the default sequence of field groups and fields as required using Drag&Drop.
    7. To save the InfoSet, choose .
    8. To generate the InfoSet, choose .
    On the Change InfoSet (InfoSet name) screen, you can choose Edit ® Change infotype selection to add more infotypes to the InfoSet, or to remove infotypes from the InfoSet. Remember to regenerate the InfoSet afterwards.
    This screen also enables you to update InfoSets if, for example, the system contains new additional fields for specific key values. To do so, choose InfoSet ® Additional functions ® Update additional HR fields.
    9. Go back to the initial screen for InfoSet maintenance.
    10. Choose User group assignment.
    11. Select a user group, and save your entry.
    sample code
    START-OF-SELECTION.
    GET pernr.
    rp_provide_from_frst p0000 space pn-begda pn-endda.
    if pnp-sw-found EQ '1'.
    READ TABLE p0001 WITH KEY pernr = p0000-pernr.
    if sy-subrc = 0.
    write : p0001-plans. " earliest.
    endif.
    endif.
    rp_provide_from_last p0014 space pn-begda pn-endda.
    if pnp-sw-found EQ '1'.
    READ TABLE p0014 WITH KEY pernr = p0000-pernr.
    if sy-subrc = 0.
    write : p0014-LGART. .
    endif.
    endif.

  • DB-API in ABAP and J2EE

    Hello!
    I have two questions regarding the communication mechanisms between ABAP- and J2EE-Stack.
    1)Is Jco the only one solution to communicate between ABAP- and J2EE, or exist other possibilities (if Yes, is there some comparison papers: performance, advantages/disadvantages).
    2) Which similarities/differences are in the DB-communication in both Server? (e.g. each Workprocess in ABAP/Serverprocess in J2EE<--> DB-Process)
    Which DB-API is used in both stacks?
    Thank You!
    Regards

    Hi, Peter!
    For both languages - ABAP and Java - SAP offers a Dictionary (for definition of database objects) and Open SQL (for database independency), you may also in both languages embed static SQL scripts into you code (via SQL/J in Java).
    For Java there' s the Persistence-Framework offering three support levels, Vendor-JDBC, Native and Open SQL the last one guaranteeing the maximum support. You may in Java access data - via JDBC and SQLJ - in a relational or - via EJB/CMP or JDO - in a object-relational way.
    Performance-Features like Table-Buffering exist also in both stacks.
    Please have a look at <a href="http://help.sap.com/saphelp_nw2004s/helpdata/de/61/fdbc3d16f39e33e10000000a11405a/frameset.htm">Developing Java Persistence</a> for more information regarding the Java-Part.
    Regards,
    Thomas

  • MDM with separated ABAP and Java Instance

    We installed SAP ERP system with SRM server and Portal as Java instance.
    We use Oracle and have 2 oracle schemas/instances: ABAP and Java.
    After mounting of MDM server and DBMS configuraiton (to Java instance) we have the following oracle objects:
    Oracle Schema A2I_XCAT_DBS
    2 oracle users: A2I_XCAT_DBS (owner of the schema) and MDMADMIN
    2 tablespaces A2I_A2I_XCAT_DBS.DBF and A2I_A2I_XCAT_DBS_IX.DBF within the main dbs directory E:\oracle\<sid>\102\database
    The used tablespace was set to PSAPTEMP
    Questions:
    1) How can the DBMS configuration will be removed, because the oralce path  E:\oracle\<sid>\102\database was wrong
    Unfortunately we would like to avoid merge MDM and Portal data in one and the same tablespace PSAPTEMP
    2) Where can we find the oracle configuration for MDM with Java Schema, but using their own tablespace?

    Are you basically trying to put a new User Interface (UI) on top of MDM because you do not want to use the standard MDM UI?  If so, then yes you could write a custom WebDynpro and use the MDM API.  We evaluated WebDynpro as an option, but instead we built a new Adobe Flex based UI that sits on top of the MDM Catalog and it totally awesome!  There is a sample on our website (www.simplifying-it.net), but we are making some changes to the look/feel... however, the sample demo on the website should give you an idea.
    If you have any questions, please let me know.
    Thanks,
    Mark

  • Diff bet Abap and HR ABAP

    HI..
    The question would be siliy, but i would like to know abt the diff between ABAP and HR abap... Any one can clear it.......
    Thanks

    Hi Aruna,
    The following concepts are defined in HR which differs this module with other modules
    1. Use of  Infotypes
    2. The use of Logical Database
    3. Use of Macros
    4. Storage and Access of data
    5  Authorization checks
    Go through the links,
    hr-abap
    ABAP-HR
    HR ABAP
    ABAP-HR Interview questions.
    Re: ABAP_HR
    Regards,
    Azaz Ali.

  • Upgrade of CRM 5.0 abap and java

    Hi,
    I have to upgrade CRM 5.0 to CRM 7.0 with EhP1. In my system landscape, CRM 5.0 ABAP (CRA) and CRM 5.0 Java (CRJ) are installed on different servers. CRJ is a portal available for end user for which CRA is acting as backend server and database. I have experienced that when we install CRM 7.0, installer automatically creates 2 seperate instances each for abap and java. I am not able to presume what exactly will happen in this kind of upgrade. My doubts are:
    1. Will this upgrade CRA (abap) and CRJ (java) seperately on different server? and i connect them as i am doing currently (CRA being the UME for CRJ)?
    2. While upgrading CRA, upgrade tool will ask the path of CRJ and both the instance will be upgraded simultaneously. And CRJ will behave as web ui instance after upgrade.
    3. CRA will be upgraded and a new instance for WebUI will be created (let us call it CRW) and i will connect CRW with CRJ for all practical purposes? where CRJ will act as portal for CRW.
    Kindly help.
    Thanks.
    - gaurav

    Hi,
    > 1. Will this upgrade CRA (abap) and CRJ (java) seperately on different server? and i connect them as i am doing currently (CRA being the UME for CRJ)?
    Yes.  You need to upgrade both the servers separately. You need not to reconnect it as both the systems are already connected with each other.
    > 2. While upgrading CRA, upgrade tool will ask the path of CRJ and both the instance will be upgraded simultaneously. And CRJ will behave as web ui instance after upgrade.
    > 3. CRA will be upgraded and a new instance for WebUI will be created (let us call it CRW) and i will connect CRW with CRJ for all practical purposes? where CRJ will act as portal for CRW.
    >
    No, new instance will be created. You need to upgrade CRA and CRJ separately. WEBUI will be automatically upgraded.
    Thanks
    Sunny

  • ABAP and JRE

    Hi,
    Pls explain how ABAP and JRE works  in XI environment ?
    Thx,
    Sofia

    1.
    SAP was developed by ABAP, in which SAP AG developed ABAP and it was and is still is use ABAP to build componentes of SAP. Years to come ABAP will still move on and become more important tool to maintain SAP.
    2.
    ABAP itself is a 4th generation language in which, if you are asking for its compilers, has an interpreter and a processor. There are called ABAP Interpreters and ABAP processors. To understand how both of these mechanism works, you need to understand how does the screen gets it data flow from forms to underlying coding. So ABAP interpreters functions as a means to interprets dialogs and ABAP processor to process syntaxes and others related ABAP objects. That is why we can enable the '/h' to debug screens and abap code. The underlying coding of SAP is a gargantuan piece of artwork.
    So you have it, ABAP has (known as) ABAP interpreters and ABAP processors by ABAP.
    Note : To Anyone to rebutt... Some parts of SAP kernel are written by C++
    3.
    Database is indenpendent in SAP. You can have Oracle, DB2 or SQL Enterprise Server to support SAP's massive or gargantuan data.... but.... SAP still have their own DBMS ... known as SAP DB.
    I hope this helps you...
    Thanks
    William Wilstroth

Maybe you are looking for

  • How can I move music from an iPod classic to my computer?

    I need to know how to transfer my 1800 songs in my iTunes on my iPod classic to my computer.

  • IDOC creation issue at XI side - File to IDOC

    Hi Everybody, I am working on a File to IDOC scenario (XI 3.0). We have to create Orders in the R/3 System using this Interface. Mapping used is Java. I am using 2 Classes : Group and SendIdoc one below the other in the Interface Mapping: Firstly by

  • Application not visible in PDA  after server deployment

    Hi All, I developed an Mi 7.1 application.Deployed  all the sdas in the Mi server using sdoe_upload_archive.I created a device.Assigned all the mobile components to the device .I synchronized the device and it is successful. I can see the service and

  • Asprise OCR Install

    Okay...I've literally spent 4 hours learning java, but am getting along nicely. However, (and I'm sure this is a stupid question) I just cannot get my head around how you intergrate the Asprise OCR SDK into my app. I have followed the instructions as

  • About iTunes -- need help!

    since ive moved, i dont have my coputer i set my phone up on. can i update my iphone on any computer as long as im logged into my apple acount????? thanks!