What Is Batch Input Session In SAP

Explain what is batch input session in SAP.

Menu Path:

System > Services -> Batch Input -> Sessions
 

1) What should be the approach for writing a BDC program?

1. Analyzing data from local file.

2. Analyzing transaction

3. Declaring internal table

- First Internal table similar to structure like local file

- Declaring internal table like BDCDATA

4. Transferring data from local file to internal table

5. Population of BDCDATA.

From Internal table the data is transferred to database table by two ways. I.e. Session method or Call transaction.
 

2) What is a batch input session?

In this method you transfer data from internal table to database table through sessions.

In this method an ABAP/4 program reads the external data that is to be entered in the SAP system and stores the data in a session. A session stores the actions that are required to enter your data using normal SAP transactions. I.e. Data is transferred to session, which in turn transfer data to database table.

Session is intermediate step between internal table and database table. Data along with its action is stored in session i.e. Data for screen fields to which screen it is passed, the program name behind it, and how next screen is processed.

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 or have the session run in the background processing system.

Unless session is processed, the data is not transferred to database table.
 

3) What is the alternative to batch input session?

Call Transaction Method

 
4) A situation: An ABAP program creates a batch input session. We need to submit the program and the batch session in background. How to do it?

The transaction for background processing is SM36.

Defining background jobs.

It is two steps process

  • You first define the job and then you have to release it.
A Job in background processing is a series of steps that can be scheduled and step is a program for background processing. Step involves the following
  • Job Name
  • Job Class
  • Job Steps


5) What are the problems in processing batch input sessions? How is batch input process different from processing online?

If batch-input session is terminated with errors, it appears in the list of INCORRECT session and it can be processed again. To correct session, first you can analyze the session. The analysis function allows to determine which screen and value produced error. If you find small errors in the data, you can correct them interactively, otherwise you need to modify batch input program, which are generated the session or many times even the data file.

While batch input is a two-step procedure, call transaction does both steps online one right after the other. In this method, you call a transaction from your program.
 

6) What are the fields in a BDC_Tab Table?
    What is the structure of a BDC sessions?

BDCTAB is like BDCDATA. The fields are…

1. Program: Name of module pool program associated with the screen set this field only for the first record for the screen.

2. Dynpro: Number of the screen. Length(4). Set this field only in the first record for the screen.

3. Dynbegin: Indicates the first record for the screen. Length(1). Set this period to ‘X’ only for the first record for the screen. (Reset to ‘ ‘ blank for all other records).

4. Fnam: Name of a field in the screen. Length(35). The Fnam field is not case-sensitive.

5. Fval: Value for the field named in Fnam. Length(132). The fval field is case-sensitive. Values assigned to this field are always padded on the right if they are less than 132 characters. Values must be in character format.

 
7) What do you do with errors in BDC batch sessions?

If batch-input session is terminated with errors, it appears in the list of INCORRECT session and it can be processed again. To correct session, first you can analyze the session. The analysis function allows to determine which screen and value produced error. If you find small errors in the data, you can correct them interactively, otherwise you need to modify batch input program, which are generated the session or many times even the data file.

 
8) Setting up a BDC program where you find information?

BDC Data.

 
9) What has to be done to the packed fields before submitting to a BDC session?

You should use write to statement to a character field.
 

10) What is difference between Batch input Method and Call Transaction?

1. Tables get updated only when the session is processed.
   Tables get updated immediately incase of call transaction.

2. No sy-subrc is returned incase of session method
   Sy-sybrc is returned incase of call transaction

3. Errors log is created for error records.
   Errors need to be handled explicitly incase of call transaction.

4. Updation in database table is always synchronous in case of session method.
   Updation in database table can be synchronous or Asynchronous.

ABAP Tips

Related ABAP Topics:
Table CDHDR and CDPOS Usage

SAP Books
SAP Certification, Interview Questions, Functional, Basis Administration and ABAP Programming Reference Books

More ABAP Tips

Main Index
SAP ERP Modules, Basis, ABAP and Other IMG Stuff

All the site contents are Copyright © www.erpgreat.com and the content authors. All rights reserved.
All product names are trademarks of their respective companies.  The site www.erpgreat.com is in no way affiliated with SAP AG.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
 The content on this site may not be reproduced or redistributed without the express written permission of
www.erpgreat.com or the content authors.