" The role of the update work process is very important since it is responsible for recording the changes in the database. The process performs its functions when the ABAP applications are programmed with the statements in the UPDATE TASK. This type of updating is asynchronously performed, ie. The programs leave update records in a queue to be processed and then continue to the update process. Normally, it runs without any intervention from the SAP R/3 management, still R/3 includes utilities to monitor check and perform management operations on the updation processes. In case any updating error takes place, the system places a message to the user regarding the error and an alert is triggered in the CCMS monitor. For the update functions go to Administration menu bar option --> Monitor option ---> Update option. An initial update screen showing various functions appears. The initial update screen is used to display the system update records with error status or the records which have not yet been processed, activate and deactivate the updating in the whole SAP system. It is also useful to display the update statistics, to display the data on the erroneous update records and reprocess them, either in real or in test mode and to send waiting update records for processing after a deactivation/activations of the updating and delete update records. Many work processes of the type R/3 system update the database. A database interface is included by the dialog and background work processes, which can directly update the database. However, the update work processes ca also be used for updating the physical database in asynchronous way. If it is asynchronous updating, according to which the transactions are programmed in the ABAP business applications, then in the database commit phase, the transactions pass the update records to the update work processes."
"A subset of Standard SQL that is fully integrated in ABAP is Open SQL statements. Their role is to help you by giving permission to access data irrespective of the database system, which the R/3 installation is using. The Data Manipulation Language (DML) part of the Standard SQL is present in the Open SQL. In other words, it gives you the permission to read (SELECT) and change (INSERT, UPDATE, DELETE) data. In the R/3 system, the tasks of the Data Definition Language (DDL) and Data Control Language (DCL) parts of the Standard SQL are performed by the ABAP dictionary and the authorization system."
Tuesday, January 22, 2008
Program to display sales order header data
If your job is to write ABAP programs/ reports you need to familiarize yourself with various functionalities of SAP. The SAP Sales and Distribution module (SD) allows you to create a Sales order. As an ABAPer you need to know at least the basics of Sales order creation. The transaction for creating a sales order is VA01, to Edit Sales order is VA02 and just to display a sales order is VA03. In case you are unable to create a sales order you can play around with an existing one in the development server. First open the sales order in the display mode and understand the fields that need to be extracted. Make a note of the tables.
In this program we will display the sales order header data.
Following fields will be displayed
Sales Order number
Sold to party number
Ship to party
Buyer
Net Value
Payment Terms
Focus
1) Retrieve the data from the SAP database using the SELECT statement and the WHERE clause 2) Selecting SINGLE rows 3) Using SELECT-OPTIONS 4) Displaying data from tables using SE11 5) Using TEXT ELEMENTS 6) Data Declaration 7) Table Declaration 8) Using the WRITE statement 9) Using the debugger 10) Using double click to display the table
Tables used
VBAK Sales Document Header Data VBPA Sales Document Partner VBKD Sales Document Business Data
To get help on any of the statements in SAP, move the cursor on the statement and press F1
Fully Functional Sample Code for the Program.
**************************************************************************************************** *ABAP Report to display Sales Order Data ****************************************************************************************************
REPORT ZEXERCISE_1 .
Tables: VBAK, " Sales Document: Header Data VBPA, " Sales Document: Partner VBKD. " Sales Document: Business Data
Select vbeln netwr waerk into (vbak-vbeln, vbak-netwr, vbak-waerk) from vbak where vbeln in s_VBELN.
endselect.
select single kunnr into d_buyer from vbpa where parvw = 'BU' or parvw = 'RE' and vbeln = S_VBELN-LOW. select single kunnr into d_billto from vbpa where parvw = 'BP' or parvw = 'WE' and vbeln = S_VBELN-low. select single kunnr into d_soldto from vbpa where parvw = 'SP' or parvw = 'AG' and vbeln = S_VBELN-low . select single kunnr into d_shipto from vbpa where parvw = 'SH' and vbeln = S_VBELN-low .
Always specify your conditions in the Where-clause instead of checking
them yourself with check statements. The database system can then use an index
(if possible) and the network load is considerably less.
Always use Pretty Printer and Extended Program Check before releasing the code.
Do not leave unused code in the program. Comment the code thoroughly. Align the comments and the Code. Follow the SAP Standards and SAP Best Practices guidelines. It’s a good practice to take a dump of the code on your local drive.
1 comment:
Wonderful ..I really appreciate the time you have put in to create this blog..Just what I was looking for.
Post a Comment