Skip to Content
author's profile photo Former Member
Former Member

Batch input session

What are the function modules that are used when creating the batch input session?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 21, 2008 at 08:07 AM

    The three SAP function modules used for creating batch input sessions are:

    1. BDC_OPEN_GROUP - is used to create the batch input session and will contain general data that is used for the entire session.

    2. BDC_INSERT - is used to actually insert all of the data into a session that is required for a transaction.

    3. BDC_CLOSE_GROUP - is used to close the batch input session after all of the data has been inserted and session is ready for processing.

    Thanks & Best Regards,

    Shakti Barath

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 21, 2008 at 05:01 PM

    Hi Ankur,


    Use the BDC_OPEN_GROUP function module to do the following create a new session. Once you have created a session, then you can insert batch input data into it with BDC_INSERT.

    You cannot re-open a session that already exists and has been closed. If you call BDC_OPEN_GROUP with the name of an existing session, then an additional session with the same name is created.

    A batch input program may have only one session open at a time. Before opening a session, make sure that any sessions that the program closes any sessions that it previously had opened.

    BDC_OPEN_GROUP takes the following EXPORTING parameters:


    Client in which the session is to be processed.

    Default: If you don't provide a value for this parameter, the default is the client under which the batch input program runs when the session is created.


    Name of the session that is to be created. May be up to 12 characters long.

    Default: None. You must specify a session name.


    Lock date. The session is locked and may not be processed until after the date that you specify.Only a system administrator with the LOCK authorization for the authorization object Batch Input Authorizations can unlock and run a session before this date.

    Format: YYYYMMDD (8 digits).

    Default: No lock date, session can be processed immediately. A lock date is optional.


    Retain session after successful processing. Set this option to the value X to have a session kept after it has been successfully processed. A session that is kept remains in the input/output queue until an administrator deletes it.

    Sessions that contain errors in transactions are kept even if KEEP is not set.

    Default: If not set, then sessions that are successfully processed are deleted. Only the batch input log is kept.


    Authorizations user for background processing. This is the user name that is used for checking authorizations if a session is started in background processing. The user must be authorized for all of the transactions and functions that are to be executed in a session.Otherwise, transactions will be terminated with "no authorization" errors.

    The user can be of type dialog or background. Dialog users are normal interactive users in the SAP System. Background users are user master records that are specially defined for providing authorizations for background processing jobs.


    Use the BDC_INSERT function module to add a transaction to a batch input session. You specify the transaction that is to be started in the call to BDC_INSERT. You must provide a BDCDATA structure that contains all of the data required to process the transaction completely.

    BDC_INSERT takes the following parameters:


    The code of the transaction that is to be run.

    For help in finding the transaction code of a function, see Analyzing SAP Transactions(4) .

    TCODE is an EXPORTING parameter in the function module.


    Parameter to update data locally. If POST_LOCAL = 'X', data will be updated locally.(refer to the keyword documentation of SET UPDATE TASK LOCAL for more information)


    The BDCDATA structure that contains the data that is to be processed by the transaction.

    DYNPROTAB is a tables parameter in the function module.


    Use the BDC_CLOSE_GROUP function module to close a session after you have inserted all of your batch input data into it. Once a session is closed, it can be processed.

    BDC_CLOSE_GROUP needs no parameters. It automatically closes the session that is currently open in your program.

    You must close a session before you can open another session from the same program.

    However, you may to use the alternate method, CALL TRANSACTION USING, if your batch input sessions cannot run quickly.


    Rakesh Kumar

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.