Creating a Session with BDC_OPEN_GROUP

Use

Use the BDC_OPEN_GROUP function module to 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.

Function module BDC_OPEN_GROUP

Import Parameter

Parameter

Function

CLIENT

Client

DEST

Internal use

GROUP

Session name

HOLDDATE:

The session is locked and may not be processed until after the date that you specify.

KEEP

Flag for retaining processed folders

USER

Batch input user

RECORD

Flag B-I Recording

Export Parameter

Parameter

Function

QID:

Internal use

Exception parameters

Parameter

Function

CLIENT_INVALID

Invalid client

DESTINATION_INVALID

Internal use

GROUP_IS_LOCKED

Session is protected

HOLDDATE_INVALID

Invalid hold data

INTERNAL_ERROR

Internal batch input error

QUEUE_ERROR

Error when reading/writing in queue file

RUNNING

Session already executed

SYSTEM_LOCK_ERROR

System error when locking session

USER_INVALID

Batch unput user is invalid

Description of most important parameter for BDC_OPEN_GROUP :

  • CLIENT

    Client in which the session will be processed.

    Default:

    If you do not enter a value, the client where the batch input program is running is entered automatically when the session is created.

  • GROUP

    Name of the session that is to be created. The maximum length is 12 characters.

    Default:

    No name. You must specify a session name.

  • HOLDDATE:

    Lock date. The session is locked and only be processed after the specified date. However, a system monitor with the LOCK authorization for authorization object Batch Input Authorizations can unlock and process the session before the specified date.

    Format YYYYMMDD (8 characters).

    Default:

    No lock date: The session can be processed immediately. The lock date be entered.

  • KEEP

    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.

  • USER

    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.