(1) BATCH INPUT CONCEPTS:
The SAP System offers two primary methods for transferring data into the System from other SAP Systems and non-SAP Systems. These two methods are collectively called "batch input" or "batch data communication."
basic technique for data transfer with batch input.
Both batch input methods work by carrying out normal SAP transactions, just as a user would. However, batch-input can execute the transactions automatically and is therefore suitable for entering large amounts of data that are already available in electronic form.
The batch input technique offers these advantages for transferring data:
No manual interaction is required during data transfer. If the data to be transferred is already available in electronic form (on a tape, for example), then you can enter the data automatically into the SAP System using batch input.
Batch input ensures data integrity. Batch input enters data into the SAP System using the same transactions that interactive users do. Batch input data is therefore submitted to all of the checks and controls that apply to data entered by normal interactive means.
The batch input methods.
There are several ways to process batch input data in the SAP System.
Batch input processing methods.
The first processing method could be called "classical batch input." In it, an ABAP/4 program reads the external data that is to be entered in the SAP System and stores the data in a "batch-input session." A session stores the actions that are required to enter your data using normal SAP transactions.
When the program has finished generating the session, you can run the session to execute the SAP transactions in it. You can either explicitly start and monitor a session with the batch-input management function (System --> Services --> Batch input) or have the session run in the background processing system.
This method uses the function modules BDC_OPEN, BDC_INSERT, and BDC_CLOSE to generate sessions.
In the second method, your program uses the ABAP/4 CALL TRANSACTION USING statement to run an SAP transaction. Batch-input data does not have to be deposited in a session for later processing. Instead, the entire batch-input process takes place inline in your program.
There is a third batch-input method using the ABAP/4 CALL DIALOG statement. However, SAP recommends against using this method unless necessary. The CALL DIALOG method is now outdated and is more complex and less comfortable to use than the other techniques.
All three batch-input methods use a common data structure for holding the instructions and data for SAP transactions. This structure is defined as structure BDCDATA in the ABAP/4 Dictionary.
For help in selecting the method to use, please see SELECTING A BATCH-INPUT METHOS (11).
Typical uses of batch input.
Uses of batch input include the following:
transferring data from another system when you install your SAP System
regularly transferring data that is captured by a non-SAP system in your company into the SAP System. Assume, for example, that data collection in some areas of your company is still performed by a non-SAP system. You can still consolidate all of your data in the SAP System by exporting the data from the other system and reading it into the SAP System with batch input.
You can also use batch input to transfer data between two R/3 Systems. However, there are more direct methods for doing this, such as RFC (remote function calls).
application support for batch-input.
The SAP applications provide pre-programmed support for batch input transfers for many of SAP's business objects.
To implement one of the supported data transfers, you must often write the program that exports the data from your non-SAP System. This program, known as a "data transfer" program must map the data from the external system into the data structure required by the SAP batch input program.
Should you wish to write a transfer program that executes outside the SAP System, then the SAP applications provide definitions of the required data formats for the exports. From these definitions, you can generate code for the data structures to include in your export program. You can also write such programs in ABAP/4, which lets you take advantage of the comfort and conveniences of the SAP Development Workbench.
Once you have exported the data, you can then use a standard, pre-programmed SAP report to import the data. This program uses one of the batch input methods to process the data and add it to the SAP System.
You can find information on pre-defined batch-input programs in the SAP Customizing System. Choose Tools --> Customizing. Then display either your Enterprise IMG (Implementation Guide) projects or the SAP standard IMG. In the project display, use the Expand function to display all nodes in the project. You can then search for relevant topics with the keywords batch input and transfer.
(2) TRANSFERING DATA : BATCH INPUT PROCEDURE IN OVERVIEW.
Transferring data with batch input requires the steps shown in the illustration and list below.
Note that SAP standard batch-input programs take care of several of these steps for you. For more information, please see BATCH INPUT CONCEPTS (1).
The procedure:
1. Analyze the data that is to be transferred to the SAP System.
Goal: Determine how your existing data should be mapped to the SAP data structure.
Method: You'll need to determine the structure of the data that is to be transferred into the system. Using the SAP data structure that you generate in step 2, you'll need to determine how the data to be transferred must be mapped to the SAP structure. You'll also need to determine whether any data type or data length conversions are required.
For more information, please see DATA CONVERSIONS(6).
2. Generate SAP data structures for incorporation into your data export program.
Method: Use the data structure generation function of the ABAP/4 dictionary to generate data structures for SAP tables in any of several programming languages.
If you are using one of SAP's standard batch input programs, then use of this function is required. The standard batch input programs generally require that you use a special pre-defined data structure.
For more information, please see GENERATING AN SAP DATA STRUCTURE(5).
If you're writing your own batch input procedure, then you will need to determine the data structure on your own. You'll need to analyze the SAP transactions to find the names of the fields that the transaction requires. For more information, please see ANALYSING SAP TRANSACTIONS(4).
3. Code your data transfer program. You can write the program in ABAP/4 or as an external program. You'll find more information in WRITING A DATA TRANSFER PROGRAM(3).
4. Export the data that is to be transferred to a sequential file.
Requirements:
The file must use the logical format required by the batch-input program that will import the file (step 6).
Reading and interpreting the file is much easier if you write it in ASCII or EBCDIC
(character) format rather than, for example, writing numeric data in hexadecimal format.
Character format is required by the pre-defined SAP batch input programs.
5. If necessary, code the ABAP/4 batch input program that will read in the data to be transferred from your file.
SAP supplies ready-to-run batch-input programs for most of the SAP applications.
For more information on writing your own program, see WRITING A BATCH INPUT PROGRAM : PROCEDURE IN OVERVIEW(10).
6. Process the data and add it to the SAP System. You can do this either by:
GENERATING A BATCH-INPUT SESSION(A) ; or
by processing data directly in your batch-input program with the ABAP/4 statement
CALL TRANSACTION USING (19).
7. Check that all data has been successfully processed.
Method: Analyze the batch input processing log. If you are using CALL TRANSACTION USING, then you will need to analyze the processing messages collected by your program.
You'll find more information on running and analyzing sessions and logs in MANAGING BATCH-INPUT SESSIONS(B).
8. Correct and re-process erroneous data.
Method: You can use the batch-input management function to process erroneous transactions interactively. You can correct data during this interactive processing.
A.GENERATING A BATCH-INPUT SESSION.
One of the two recommended ways to process batch input data is to store the data in a batch input session. This session can then be run in the SAP System to enter the batch input data into the system.
In general, preparing a session is the best and most comfortable way to process batch input data. However, you may wish to use the alternate method, CALL TRANSACTION USING, if your batch input sessions cannot be run quickly enough. For more information on choosing the best batch input method, see SELECTING A BATCH-INPUT METHOD(11).
Creating, Filling, and Closing a Batch Input Session
To create a session, program the following procedure using the following BDC_ function modules:
1. Open the batch input session using function module BDC_OPEN_GROUP (15) .
2. For each transaction in the session:
a. Fill the BDCDATA structure with values for all screens and fields that must be
processed in the transaction. For more information, please see USING THE
BATCH-INPUT DATA STRUCTURE (12).
b. Transfer the transaction to the session with BDC_INSERT (16) .
3. Close the batch input session with BDC_CLOSE_GROUP (17).
The following topics describe these function modules. See SAMPLE BATCH INPUT PROGRAM(22) for an example of how the function modules are used.
Tuesday, October 7, 2008
Subscribe to:
Post Comments (Atom)
Archives
-
▼
2008
(167)
-
▼
October
(145)
- SAP ALE ABAP DETIAL
- SAP ABAP ALE IDOC'S
- SAP - DIFFERENCE BETWEEN CONVERSION AND INTERFACE
- BAPI AND IDOC ALE
- SAP ABAP MESSAGE CONTORL
- SAP IDOC'S IN ABAP INTRODUCTION
- SAP ABAP IDOC'S OUTLOOK
- SAP ABAP IDOC PROCESSING
- SAP ABAP IDOC'S BASIC TOOLS I
- SAP ABAP IDOC'S BASIC TOOLS II
- SAP ABAP IDOC'S INBOUND BASIC TOOLS III
- SAP IDOC OUT BOUND TRIGGERS II
- SAP IDOCS OUTBOUND TRIGGER II
- SAP IDOC'S OUTBOUND TRIGGER III
- SAP Work flow based outbound Idoc's
- SAP ALE Change Pointers
- SAP Dispatching ALE IDocs for Change Pointers
- SAP IDOC design and Processing
- SAP Creation of the IDoc Data
- SAP Developing an Outbound IDoc Function
- SAP Converting Data into IDoc Segment Format
- SAP Partner Profiles and Ports
- SAP Defining the partner profile for ALE IDOC
- SAP Data Ports ( WE21 ) in idoc
- SAP RFC in R/3
- SAP Workflow from Change Documents
- SAP ALE Distribution Scenario
- SAP Useful ALE Transaction Codes
- BAPI Creating IDocs and ALE Interface
- R/3 RFC from MS Office Via Visual Basic
- SD WORK FLOW SCENARIOS I
- SD WORK FLOW SCENARIOS II
- SD WORK FLOW SCENARIOS III
- SD WORK FLOW SCENARIOS IV
- SD WORK FLOW SCENARIOS V
- SD WORK FLOW SCENARIOS VI
- SD WORK FLOW SCENARIOS VII
- MM WORK FLOW SCENORIOS I
- MM WORK FLOW SCENORIOS II
- MM WORK FLOW SCENORIOS III
- MM WORK FLOW SCENORIOS IV
- MM WORK FLOW SCENORIOS V
- MM WORK FLOW SCENORIOS VI
- MM WORK FLOW SCENARIOS VII
- MM WORK FLOW SCENARIOS VIII
- MM WORK FLOW SCENARIOS IX
- MM WORK FLOW SCENARIOS X
- MM WORK FLOW SCENARIOS XI
- WORK FLOW SCENARIOS in SAP ABAP
- SAP ABAP WORK FLOW I
- SAP ABAP WORK FLOW II
- SAP ABAP WORK FLOW III
- SAP ABAP Work Flow IV
- SAP ABAP Workflow Technology
- SAP OPTIMIZATION
- abap type key ward
- PERFORMENCE TIPS
- SAP ABAP INTERNAL TABLES IN BRIEF
- SAP ABAP RUN TIME ANALASIS
- MEMORY In SAP ABAP
- NAVIGATION In SAP ABAP
- WORK BENCH AND TOOLS In SAP ABAP
- DATA OBJECTS AND STATEMENTS In SAP ABAP
- INTERNAL PROGRAM MODULARIZATION In SAP ABAP
- SAP ABAP CONSITENCEY THROUGH INPUT CHECKS
- RUN TIME ENVIRONMENT In SAP ABAP
- SAP ABAP INTER TABLE OPERATIONS
- STATEMENTS In SAP ABAP
- SAP ABAP INTERNAL TABLES
- SAP ABAP SUB ROUTIENS
- SAP ABAP FUNCTION MODULES AND GROUPS
- SAP ABAP QUARY ADMINSTRATION
- SAP ABAP SAVING LISTS AND BACK GROUND PROCESSING
- SAP ABAP PROGRAM INTERFACE
- SAP ABAP LOCK CONCEPT
- SAP ABAP AUTHORISATION CHECKS
- SAP ABAP PERFORMENCE TIPS
- In SAP SYSTEM FIELDS
- SAP ABAP CONTROL BLOCKS
- SAP ABAP BUFFERING
- SAP ABAP MATCH CODE OBJECTS
- SAP ABAP LOCKS
- SAP SAMPLE CODE FOR OUTPUT TO EXCEL AND IN PUT FIL...
- SAP MULTIPLE INTERACTIVE REPORT SAMPLE CODE
- MULTIPLE INTERACTIVE REPORT SAMPLE CODE II
- CALLING PROGRAM AND PASSING DATA
- SAP TECHNIQUES FOR LIST CREATION AND SAP QUARY
- SAP SELECTION SCREENS ABAP REPORT
- SAP ABAP FAQ ON SCRIPTS I
- SAP ABAP FAQ ON SCRIPTS II
- SAP ABAP FAQ ON SCRIPTS III
- IN SAP ABAP TABLE TYPES
- SAP ABAP TYPES OF VIEWS
- SAP ABAP DATA BASE UPDATES COMPLETE
- SAP ABAP LOCK CONCEPT
- SAP ORGANIZING DATABASE UPDATES
- SAP ENHANCEMENTS TO DICTIONERY ELEMENTS
- DATA BASE DIALOG IN ABAP
- ABAP DICTIONARY I
- PERFORMANCE DURING TABLE ACCESS
-
▼
October
(145)
No comments:
Post a Comment