" 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."
If you wish to transfer Purchase Order related Data to SAP, you can do so by using the following BAPI.
BAPI_PO_CREATE
Many a times there is a requirement to transfer purchase order data from a third party to SAP, it can be done by the following methods.
1) BAPI 3) BDC 3) EDI
This this tutorial we will see how to create a Purchase Order using the above mentioned BAPI.
Please note that if you wish to create Real Time Purchase Orders from an external system into SAP R/3 then you need to use either the JCO connector, .NET connector or XI. The example below shows creation of a single purchase order, if you have data required to create purchase orders then you first need to upload it into an internal table and then pass the table to the BAPI.
Please find the code below to create a Purchase order using the BAPI BAPI_PO_CREATE
REPORT ZEX_POCREATE .
Data: int_pohead like BAPIEKKOC, int_poitem like BAPIEKPOC occurs 0 with header line, int_posched like BAPIEKET occurs 0 with header line, int_ret like BAPIRETURN occurs 0 with header line. Data: d_purchord like BAPIEKKOC-PO_NUMBER.
Move: 'NB' to int_pohead-DOC_TYPE, '1000' to int_pohead-PURCH_ORG, '001' to int_pohead-PUR_GROUP, '0000001234' to int_pohead-vendor,
'00010' to int_poitem-po_item, 'Material' to int_poitem-material, 'Material' to int_poitem-pur_mat, '1000' to int_poitem-plant,
'00010' to int_posched-PO_ITEM, '20080531' to int_posched-DELIV_DATE, '2' to int_posched-QUANTITY.
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.
No comments:
Post a Comment