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

bdc

What is meant by batch input.R session method and call transaction are the part of this batch input terms.Plz explain in brief.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

7 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jun 11, 2007 at 04:05 AM

    hi,

    BATCH DATA COMMUNICATION

    BDC is used to transfer data from SAP to SAP system or from a non-SAP system to SAP system.

    It uses the normal Transaction codes to transfer the data. This method is used to transfer large

    amount data that is available in electronic form.

    There are two types of methods offered by SAP for BDC:

    Session Method

    The first method uses a session to process the data. Data to be fed to the BDC program is read

    from a flat file and is stored in a batch-input session. Then the session is processed or executed

    to migrate the data to the SAP system. This can be done using the tcode SM35.

    This method uses the function module BDC_OPEN, BDC_INSERT and BDC_CLOSE to

    generate the sessions

    Call Transaction Method:

    In the second method, BDC uses the ABAP statement CALL TRANSACTION USING statement

    to run a transaction. Here the entire set of input data is processed immediately without creating

    any session.

    Advantage of Session Method:

    The primary advantage of Session Method is that once a session has been created, it can be

    processed at any convenient time by the user. It can also be scheduled to executed in

    background and then the statust of the session viewed once it gets completed.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 10, 2007 at 04:41 PM

    Hi,

    Batch Input Processing is the Process of transferring data to the SAP system from another SAP System or from external system.

    There are two ways in which this can be done

    1.Session Method.

    2.Call transaction Method.

    Mainly Session method will be used to handle bulk data transfer.

    Call transaction for the non-bulk transfer...

    More details Check http://help.sap.com

    Cheers,

    Hakim

    mark all useful answers

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 10, 2007 at 04:53 PM

    hi,

    batch input and session or same, where as call transaction is different from batch input.

    the batch input and call transaction are two different import techniques used to convert legacy data into sap system.

    <b>in session method</b>, we use these FM to convert data from legacy system to sap system

    bdc_open_group

    bdc_insert

    bdc_close_group

    call method 'bdc_open_group'

    exporting

    user = ' '

    group = 'session' "based on group value system creates session.

    client = ' '

    this FM provide basic information like user, client and name for session

    call method 'bdc_insert'

    exporting

    tr_code = ' ' "here we assign transaction code, which used for

    inserting data into data base table.

    table

    bynpro_table = ' ' passing table BDCDATA

    using this FM we can add TRANSACTION code and internal table it contains all the data required for procesing transaction.

    call function 'bdc_close_group'

    this is used to close the opened sessio. we must close the session before processing session.

    <b>CALL TRANSACTION</b>

    call transactio <trname> USING BDCDATA

    MODE <E/N/A>

    UPDATE <S/A/L>

    MESSAGES INTO <MSGCOLL>

    MODE means processing mode, call transaction doesn't support background.

    E---> error display mode

    N---> nodisplay mode

    A----> display all

    UPDATE means, updating the database, using call transaction we can update

    S-----> synchronous updation

    A-----> asynchronopus updation

    MESSAGES, move error records into internal table of type BDCMSGCOLL

    regards,

    Ashokreddy.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 10, 2007 at 04:38 PM

    Hi Manjula,

    You can have a lot of inforamation from below links and data:

    Check these Links out

    re-direct-input

    regarding-direct-input-methods-in-sap

    BDC does a CALL TRANSACTION. So each and every case (document, master data,...) is committed to the database on commit. The commit occurs after completion of the transaction.

    Direct input will commit the data to the database when the commit is requested explicitly.

    During BDC and direct input relevant DB tables are locked, they can not be updated by other processes. After commit they are unlocked.

    Thus a program using direct input must care for intermittent commits to avoid an overflow of the lock tables. For master data, a lock table overflow may occur for more than (roughly) 2000 cases.

    Although direct input does not do any screen input, the same routines are passed as BDC with (simulated) screen input

    There is no diff between Direct input and BDC because Direct input is one of the methods in BDC to transfer external data into SAP system.

    In BDC you can transfer data into SAP system using 3 methods,

    1.session

    2.call transaction.

    3.Direct input.

    Advantages offered by BATCH INPUT method:

    1. Can process large data volumes in batch.

    2. Can be planned and submitted in the background.

    3. No manual interaction is required when data is transferred.

    4. Data integrity is maintained as whatever data is transferred to the table is through transaction. Hence batch input data is submitted to all the checks and validations.

    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.

    The batch input program must build all of the input to execute the SAP transaction.

    Two main steps are required:

    • To build an internal table containing every screen and every field to be filled in during the execution of an SAP transaction.

    • To pass the table to SAP for processing.

    Prerequisite for Data Transfer Program

    Writing a Data Transfer Program involves following prerequisites:

    Analyzing data from local file

    Analyzing transaction

    Analyzing transaction involves following steps:

    • The transaction code, if you do not already know it.

    • Which fields require input i.e., mandatory.

    • Which fields can you allow to default to standard values.

    • The names, types, and lengths of the fields that are used by a transaction.

    • Screen number and Name of module pool program behind a particular transaction.

    To analyze a transaction::

    • Start the transaction by menu or by entering the transaction code in the command box.

    (You can determine the transaction name by choosing System – Status.)

    • Step through the transaction, entering the data will be required for processing your batch input data.

    • On each screen, note the program name and screen (dynpro) number.

    (dynpro = dyn + pro. Dyn = screen, pro = number)

    • Display these by choosing System – Status. The relevant fields are Program (dynpro) and Dynpro number. If pop-up windows occur during execution, you can get the program name and screen number by pressing F1 on any field or button on the screen.

    The technical info pop-up shows not only the field information but also the program and screen.

    • For each field, check box, and radio button on each screen, press F1 (help) and then choose Technical Info.

    Note the following information:

    - The field name for batch input, which you’ll find in its own box.

    - The length and data type of the field. You can display this information by double clicking on the Data Element field.

    • Find out the identification code for each function (button or menu) that you must execute to process the batch-input data (or to go to new screen).

    Place the cursor on the button or menu entry while holding down the left mouse button. Then press F1.

    In the pop-up window that follows, choose Technical info and note the code that is shown in the Function field.

    You can also run any function that is assigned to a function key by way of the function key number. To display the list of available function keys, click on the right mouse button. Note the key number that is assigned to the functions you want to run.

    Once you have program name, screen number, field name (screen field name), you can start writing DATA TRANSFER program.

    Declaring internal table

    First Integral Table similar to structure like local file.

    Declaring internal table like BDCDATA

    The data from internal table is not transferred directly to database table, it has to go through transaction. You need to pass data to particular screen and to particular screen-field. Data is passed to transaction in particular format, hence there is a need for batch input structure.

    The batch input structure stores the data that is to be entered into SAP system and the actions that are necessary to process the data. The batch input structure is used by all of the batch input methods. You can use the same structure for all types of batch input, regardless of whether you are creating a session in the batch input queue or using CALL TRANSACTION.

    This structure is BDCDATA, which can contain the batch input data for only a single run of a transaction. The typical processing loop in a program is as follows:

    • Create a BDCDATA structure

    • Write the structure out to a session or process it with CALL TRANSACTION USING; and then

    • Create a BDCDATA structure for the next transaction that is to be processed.

    Within a BDCDATA structure, organize the data of screens in a transaction. Each screen that is processed in the course of a transaction must be identified with a BDCDATA record. This record uses the Program, Dynpro, and Dynbegin fields of the structure.

    The screen identifier record is followed by a separate BDCDATA record for each value, to be entered into a field. These records use the FNAM and FVAL fields of the BDCDATA structure. Values to be entered in a field can be any of the following:

    • Data that is entered into screen fields.

    • Function codes that are entered into the command field. Such function codes execute functions in a transaction, such as Save or Enter.

    The BDCDATA structure contains the following fields:

    • PROGRAM: Name of module pool program associated with the screen. Set this field only for the first record for the screen.

    • DYNPRO: Screen Number. Set this field only in the first record for the screen.

    • DYNBEGIN: Indicates the first record for the screen. Set this field to X, only for the first record for the screen. (Reset to ‘ ‘ (blank) for all other records.)

    • FNAM: Field Name. The FNAM field is not case-sensitive.

    • FVAL: Value for the field named in FNAM. 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.

    Transferring data from local file to internal table

    Data is uploaded to internal table by UPLOAD of WS_UPLOAD function.

    Population of BDCDATA

    For each record of internal table, you need to populate Internal table, which is similar to BDCDATA structure.

    All these five initial steps are necessary for any type of BDC interface.

    DATA TRANSFER program can call SESSION METHOD or CALL TRANSACTION. The initial steps for both the methods are same.

    First step for both the methods is to upload the data to internal table. From Internal Table, the data is transferred to database table by two ways i.e., Session method and Call transaction.

    Reward if useful.

    Thanks

    Aneesh.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 11, 2007 at 04:11 AM

    hi

    good

    Batch input sessions enter data non-interactively into an R/3 System. Batch input is typically used to transfer data from non-R/3 Systems to R/3 Systems or to transfer data between R/3 Systems.

    This section describes how to manage batch input sessions.

    To reach the main menu of the batch input system, select System ® Services ® Batch input. Alternatively, enter transaction SM35.

    http://help.sap.com/saphelp_46c/helpdata/en/69/c2501a4ba111d189750000e8322d00/content.htm

    thanks

    mrutyun^

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 11, 2007 at 04:18 AM

    <b>What is BDC programming?-</b>

    Transferring of large/external/legacy data into SAP system using Batch Input programming. Batch input is a automatic procedure referred to as BDC(Batch Data Communications).The central component of the transfer is a queue file which receives the data vie a batch input programs and groups associated data into “sessions”.

    <b>What are the functional modules used in sequence in BDC?-</b>

    These are the 3 functional modules which are used in a sequence to perform a data transfer successfully using BDC programming: BDC_OPEN_GROUP - Parameters like Name of the client, sessions and user name are specified in this functional modules. BDC_INSERT - It is used to insert the data for one transaction into a session. BDC_CLOSE_GROUP - This is used to close the batch input session.

    [

    I am giving some links thier u can get more information on BDC.......

    http://myweb.dal.ca/hchinni/sap/bdc_home.htm

    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/bdc&

    http://www.sap-img.com/abap/learning-bdc-programming.htm

    http://www.sapdevelopment.co.uk/bdc/bdchome.htm

    http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm

    http://help.sap.com/saphelp_47x200/helpdata/en/69/c250684ba111d189750000e8322d00/frameset.htm

    http://www.sapbrain.com/TUTORIALS/TECHNICAL/BDC_tutorial.html

    Check these link:

    http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm

    http://www.sap-img.com/abap/question-about-bdc-program.htm

    http://www.itcserver.com/blog/2006/06/30/batch-input-vs-call-transaction/

    http://www.planetsap.com/bdc_main_page.htm

    call-transaction-or-session-method-

    http://www.sapbrain.com/FAQs/TECHNICAL/SAP_ABAP_DATADICTIONARY_FAQ.html

    http://www.saptechnical.com/InterviewQ/interviewQ.htm

    if this is helpfull for u , then don't forget to give points for this..................................................

    Regards'

    Raghunath.S

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 11, 2007 at 04:19 AM

    hi,

    Advantages offered by BATCH INPUT method:

    1. Can process large data volumes in batch.

    2. Can be planned and submitted in the background.

    3. No manual interaction is required when data is transferred.

    4. Data integrity is maintained as whatever data is transferred to the table is through transaction. Hence batch input data is submitted to all the checks and validations.

    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.

    The batch input program must build all of the input to execute the SAP transaction.

    Two main steps are required:

    • To build an internal table containing every screen and every field to be filled in during the execution of an SAP transaction.

    • To pass the table to SAP for processing.

    Prerequisite for Data Transfer Program

    Writing a Data Transfer Program involves following prerequisites:

    Analyzing data from local file

    Analyzing transaction

    Analyzing transaction involves following steps:

    • The transaction code, if you do not already know it.

    • Which fields require input i.e., mandatory.

    • Which fields can you allow to default to standard values.

    • The names, types, and lengths of the fields that are used by a transaction.

    • Screen number and Name of module pool program behind a particular transaction.

    To analyze a transaction::

    • Start the transaction by menu or by entering the transaction code in the command box.

    (You can determine the transaction name by choosing System – Status.)

    • Step through the transaction, entering the data will be required for processing your batch input data.

    • On each screen, note the program name and screen (dynpro) number.

    (dynpro = dyn + pro. Dyn = screen, pro = number)

    • Display these by choosing System – Status. The relevant fields are Program (dynpro) and Dynpro number. If pop-up windows occur during execution, you can get the program name and screen number by pressing F1 on any field or button on the screen.

    The technical info pop-up shows not only the field information but also the program and screen.

    • For each field, check box, and radio button on each screen, press F1 (help) and then choose Technical Info.

    Note the following information:

    - The field name for batch input, which you’ll find in its own box.

    - The length and data type of the field. You can display this information by double clicking on the Data Element field.

    • Find out the identification code for each function (button or menu) that you must execute to process the batch-input data (or to go to new screen).

    Place the cursor on the button or menu entry while holding down the left mouse button. Then press F1.

    In the pop-up window that follows, choose Technical info and note the code that is shown in the Function field.

    You can also run any function that is assigned to a function key by way of the function key number. To display the list of available function keys, click on the right mouse button. Note the key number that is assigned to the functions you want to run.

    Once you have program name, screen number, field name (screen field name), you can start writing.

    DATA TRANSFER program.

    Declaring internal table

    First Integral Table similar to structure like local file.

    Declaring internal table like BDCDATA

    The data from internal table is not transferred directly to database table, it has to go through transaction. You need to pass data to particular screen and to particular screen-field. Data is passed to transaction in particular format, hence there is a need for batch input structure.

    The batch input structure stores the data that is to be entered into SAP system and the actions that are necessary to process the data. The batch input structure is used by all of the batch input methods. You can use the same structure for all types of batch input, regardless of whether you are creating a session in the batch input queue or using CALL TRANSACTION.

    This structure is BDCDATA, which can contain the batch input data for only a single run of a transaction. The typical processing loop in a program is as follows:

    • Create a BDCDATA structure

    • Write the structure out to a session or process it with CALL TRANSACTION USING; and then

    • Create a BDCDATA structure for the next transaction that is to be processed.

    Within a BDCDATA structure, organize the data of screens in a transaction. Each screen that is processed in the course of a transaction must be identified with a BDCDATA record. This record uses the Program, Dynpro, and Dynbegin fields of the structure.

    The screen identifier record is followed by a separate BDCDATA record for each value, to be entered into a field. These records use the FNAM and FVAL fields of the BDCDATA structure. Values to be entered in a field can be any of the following:

    • Data that is entered into screen fields.

    • Function codes that are entered into the command field. Such function codes execute functions in a transaction, such as Save or Enter.

    The BDCDATA structure contains the following fields:

    • PROGRAM: Name of module pool program associated with the screen. Set this field only for the first record for the screen.

    • DYNPRO: Screen Number. Set this field only in the first record for the screen.

    • DYNBEGIN: Indicates the first record for the screen. Set this field to X, only for the first record for the screen. (Reset to ‘ ‘ (blank) for all other records.)

    • FNAM: Field Name. The FNAM field is not case-sensitive.

    • FVAL: Value for the field named in FNAM. 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.

    Transferring data from local file to internal table

    Data is uploaded to internal table by UPLOAD of WS_UPLOAD function.

    Population of BDCDATA

    For each record of internal table, you need to populate Internal table, which is similar to BDCDATA structure.

    All these five initial steps are necessary for any type of BDC interface.

    DATA TRANSFER program can call SESSION METHOD or CALL TRANSACTION. The initial steps for both the methods are same.

    First step for both the methods is to upload the data to internal table. From Internal Table, the data is transferred to database table by two ways i.e., Session method and Call transaction.

    <b>SESSION METHOD</b>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 session. A session stores the actions that are required to enter your data using normal SAP transaction i.e., Data is transferred to session which in turn transfers 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 the 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.

    BDC_OPEN_GROUP

    You create the session through program by BDC_OPEN_GROUP function.

    Parameters to this function are:

    • User Name: User name

    • Group: Name of the session

    • Lock Date: The date on which you want to process the session.

    • Keep: This parameter is passed as ‘X’ when you want to retain session after

    processing it or ‘ ‘ to delete it after processing.

    BDC_INSERT

    This function creates the session & data is transferred to Session.

    Parameters to this function are:

    • Tcode: Transaction Name

    • Dynprotab: BDC Data

    BDC_CLOSE_GROUP

    This function closes the BDC Group. No Parameters.

    Some additional information for session processing

    When the session is generated using the KEEP option within the BDC_OPEN_GROUP, the system always keeps the sessions in the queue, whether it has been processed successfully or not.

    However, if the session is processed, you have to delete it manually. When session processing is completed successfully while KEEP option was not set, it will be removed automatically from the session queue. Log is not removed for that session.

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

    <b>CALL TRANSACTION</b>

    A technique similar to SESSION method, while batch input is a two-step procedure, Call Transaction does both steps online, one after the other. In this method, you call a transaction from your program by

    Call transaction <tcode> using <BDCTAB>

    Mode <A/N/E>

    Update <S/A>

    Messages into <MSGTAB>.

    Parameter – 1 is transaction code.

    Parameter – 2 is name of BDCTAB table.

    Parameter – 3 here you are specifying mode in which you execute transaction

    A is all screen mode. All the screen of transaction are displayed.

    N is no screen mode. No screen is displayed when you execute the transaction.

    E is error screen. Only those screens are displayed wherein you have error record.

    Parameter – 4 here you are specifying update type by which database table is updated.

    S is for Synchronous update in which if you change data of one table then all the related Tables gets updated. And sy-subrc is returned i.e., sy-subrc is returned for once and all.

    A is for Asynchronous update. When you change data of one table, the sy-subrc is returned. And then updating of other affected tables takes place. So if system fails to update other tables, still sy-subrc returned is 0 (i.e., when first table gets updated).

    Parameter – 5 when you update database table, operation is either successful or unsuccessful or operation is successful with some warning. These messages are stored in internal table, which you specify along with MESSAGE statement. This internal table should be declared like BDCMSGCOLL, a structure available in ABAP/4. It contains the following fields:

    1. Tcode: Transaction code

    2. Dyname: Batch point module name

    3. Dynumb: Batch input Dyn number

    4. Msgtyp: Batch input message type (A/E/W/I/S)

    5. Msgspra: Batch input Lang, id of message

    6. Msgid: Message id

    7. MsgvN: Message variables (N = 1 - 4)

    For each entry, which is updated in database, table message is available in BDCMSGCOLL. As BDCMSGCOLL is structure, you need to declare a internal table which can contain multiple records (unlike structure).

    Steps for CALL TRANSACTION method

    1. Internal table for the data (structure similar to your local file)

    2. BDCTAB like BDCDATA

    3. UPLOAD or WS_UPLOAD function to upload the data from local file to itab. (Considering file is local file)

    4. Loop at itab.

    Populate BDCTAB table.

    Call transaction <tcode> using <BDCTAB>

    Mode <A/N/E>

    Update <S/A>.

    Refresh BDCTAB.

    Endloop.

    (To populate BDCTAB, You need to transfer each and every field)

    The major differences between Session method and Call transaction are as follows:

    SESSION METHOD CALL TRANSACTION

    1. Data is not updated in database table unless Session is processed. Immediate updation in database table.

    2. No sy-subrc is returned. Sy-subrc is returned.

    3. Error log is created for error records. Errors need to be handled explicitly

    4. Updation in database table is always synchronous Updation in database table can be synchronous Or Asynchronous.

    Error Handling in CALL TRANSACTION

    When Session Method updates the records in database table, error records are stored in the log file. In Call transaction there is no such log file available and error record is lost unless handled. Usually you need to give report of all the error records i.e., records which are not inserted or updated in the database table. This can be done by the following method:

    Steps for the error handling in CALL TRANSACTION

    1. Internal table for the data (structure similar to your local file)

    2. BDCTAB like BDCDATA

    3. Internal table BDCMSG like BDCMSGCOLL

    4. Internal table similar to Ist internal table

    (Third and fourth steps are for error handling)

    5. UPLOAD or WS_UPLOAD function to upload the data from the local file to itab. (Considering file is local file)

    6. Loop at itab.

    Populate BDCTAB table.

    Call transaction <tr.code> using <Bdctab>

    Mode <A/N/E>

    Update <S/A>

    Messages <BDCMSG>.

    Perform check.

    Refresh BDCTAB.

    Endloop.

    7 Form check.

    IF sy-subrc <> 0. (Call transaction returns the sy-subrc if updating is not successful).

    Call function Format_message.

    (This function is called to store the message given by system and to display it along with record)

    Append itab2.

    Display the record and message.

    For BDC:

    http://myweb.dal.ca/hchinni/sap/bdc_home.htm

    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/bdc&

    http://www.sap-img.com/abap/learning-bdc-programming.htm

    http://www.sapdevelopment.co.uk/bdc/bdchome.htm

    http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm

    http://help.sap.com/saphelp_47x200/helpdata/en/69/c250684ba111d189750000e8322d00/frameset.htm

    http://www.sapbrain.com/TUTORIALS/TECHNICAL/BDC_tutorial.html

    Check these link:

    http://www.sap-img.com/abap/question-about-bdc-program.htm

    http://www.itcserver.com/blog/2006/06/30/batch-input-vs-call-transaction/

    http://www.planetsap.com/bdc_main_page.htm

    call-transaction-or-session-method-

    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.