Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

regarding bdc

Former Member
0 Likes
454

hi,

experts.

can u tell me that in session method, <b>how many max. no of transactions at a time we can upload to database.</b>

regards.

subhasis.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
425

Hi Subhasis,

this will be usefull to u

Only one transaction code we can process at a time. There no way to run the parallel session method. It is possible to run the parallel Transaction in Call Transaction method.

Here i gave the details of the session method.

Steps for submitting data for Batch Processing

1. Analyze the transactions for which a BDC program.

The user has to determine the sequence of screens in the transactions and the information about all the fields in every screen. To do this the user must run the transaction .

Then select System ? Status. This will give the screen number and the module pool associated with this screen of the transaction. These two are the most important fields that the user would need in order to write the BDC program.

2. Use transaction SE38 to write the BDC program. This ABAP/4 program should 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 data using normal SAP transactions. This is done by basically using three functions:

BDC_OPEN_GROUP

BDC_INSERT

BDC_CLOSE_GROUP.

3. To create a batch input session, use the function BDC_OPEN_GROUP. This function has the following 5 parameters :

a. CLIENT which is by default set to SY_MANDT. It is the client in which the session is to be processed.

b. GROUP which is the name of the BDC session. This parameter is important because it is with this name that the user will recognize the BDC session in the batch input queue. Using this name process the BDC session.

c. USER which is usually set to SY-UNAME. It is the user name for starting the session in background.

d. KEEP indicates whether the session should be kept or deleted after processing. If ‘ ‘ then the session is deleted. If ‘X’ then the session is retained even after it is successfully processed without any errors.

e. HOLDDATE Lock date. The session is locked and may not be processed until after the date that is specified. Default: No lock date, session can be processed immediately. A lock date is optional.

4. Populate the bdcdata table .

The user may define the table as follows:

DATA: BEGIN OF BDCDATA OCCURS 0.

INCLUDE STRUCTURE BDCDATA.

DATA: END OF BDCDATA.

This bdcdata structure has the following fields:

• PROGRAM

Name of the program.

• DYNPRO

Number of the screen. 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 in the first record for the screen. (Reset to ' ' (blank) for all other records.)

• FNAM

Name of a field in the screen. The FNAM field is not case-sensitive.

• FVAL

Value for the field named in FNAM.

5. The next step is to submit the BDC session. Use the BDC_INSERT function module to add a transaction to a batch input session. Specify the transaction that is to be started in the call to BDC_INSERT.

BDC_INSERT takes the following parameters:

• TCODE

The code of the transaction that is to be run. TCODE is an EXPORTING parameter in the function module.

• DYNPROTAB

The BDCDATA structure that contains the data that is to be processed by the transaction. DYNPROTAB is a tables parameter in the function module.

6. The final step is to close the BDC session. Use the BDC_CLOSE_GROUP function module to close a session. Once a session is closed, it can be processed.

7. Running this program will create a batch input session by the name that is specified in the GROUP parameter in the BDC_CREATE_GROUP function call.

8. Transaction SM35 can be used to process the submitted session. This transaction can be used to check the status of all BDC sessions.

2.2. Summary: Creating Batch Input Session:

• Open Batch Input group

CALL FUNCTION 'BDC_OPEN_GROUP'

EXPORTING

CLIENT = SY-MANDT

GROUP = GROUP

USER = USER

KEEP = KEEP.

• Fill in the Data for Transaction in an internal table 'BDCDATA'

FORM INSERT_SCREEN USING PROGRAM DYNPRO.

CLEAR BDCDATA.

BDCDATA-PROGRAM = PROGRAM.

BDCDATA-DYNPRO = DYNPRO.

BDCDATA-DYNBEGIN = 'X'.

APPEND BDCDATA.

ENDFORM.

FORM INSERT_FIELD USING FNAM FVAL.

CLEAR BDCDATA.

BDCDATA-FNAM = FNAM.

BDCDATA-FVAL = FVAL.

APPEND BDCDATA.

ENDFORM.

• Insert Transacton

CALL FUNCTION 'BDC_INSERT'

EXPORTING

TCODE = 'ME21'

TABLES

DYNPROTAB = BDCDATA.

• Close Batch Input group

CALL FUNCTION 'BDC_CLOSE_GROUP'.

Finally to process Batch Input Session, first execute the BDC ABAP. This will create

a BDC session. Run transaction 'SM35' & processes the BDC session.

Some useful URLs

http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm

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

http://www.guidancetech.com/people/holland/sap/abap/zzsni001.htm

The difference between CallTransaction and Sessionmethod.

In ‘Call Transaction’, the transactions are triggered at the time of processing itself and so the ABAP program must do the error handling. It can also be used for real-time interfaces and custom error handling & logging features. Whereas in

Batch Input Sessions, the ABAP program creates a session with all the transactional data, and this session can be viewed, scheduled and processed (using Transaction SM35) at a later time. The latter technique has a built-in error processing mechanism too.

difference between batch input and call transaction in BDC

Session method.

1) synchronous processing.

2) can tranfer large amount of data.

3) processing is slower.

4) error log is created

5) data is not updated until session is processed.

Call transaction.

1) asynchronous processing

2) can transfer small amount of data

3) processing is faster.

4) errors need to be handled explicitly

5) data is updated automatically

                    • Rewards some points .

regards,

P.Naganjana Reddy

2 REPLIES 2
Read only

Former Member
0 Likes
426

Hi Subhasis,

this will be usefull to u

Only one transaction code we can process at a time. There no way to run the parallel session method. It is possible to run the parallel Transaction in Call Transaction method.

Here i gave the details of the session method.

Steps for submitting data for Batch Processing

1. Analyze the transactions for which a BDC program.

The user has to determine the sequence of screens in the transactions and the information about all the fields in every screen. To do this the user must run the transaction .

Then select System ? Status. This will give the screen number and the module pool associated with this screen of the transaction. These two are the most important fields that the user would need in order to write the BDC program.

2. Use transaction SE38 to write the BDC program. This ABAP/4 program should 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 data using normal SAP transactions. This is done by basically using three functions:

BDC_OPEN_GROUP

BDC_INSERT

BDC_CLOSE_GROUP.

3. To create a batch input session, use the function BDC_OPEN_GROUP. This function has the following 5 parameters :

a. CLIENT which is by default set to SY_MANDT. It is the client in which the session is to be processed.

b. GROUP which is the name of the BDC session. This parameter is important because it is with this name that the user will recognize the BDC session in the batch input queue. Using this name process the BDC session.

c. USER which is usually set to SY-UNAME. It is the user name for starting the session in background.

d. KEEP indicates whether the session should be kept or deleted after processing. If ‘ ‘ then the session is deleted. If ‘X’ then the session is retained even after it is successfully processed without any errors.

e. HOLDDATE Lock date. The session is locked and may not be processed until after the date that is specified. Default: No lock date, session can be processed immediately. A lock date is optional.

4. Populate the bdcdata table .

The user may define the table as follows:

DATA: BEGIN OF BDCDATA OCCURS 0.

INCLUDE STRUCTURE BDCDATA.

DATA: END OF BDCDATA.

This bdcdata structure has the following fields:

• PROGRAM

Name of the program.

• DYNPRO

Number of the screen. 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 in the first record for the screen. (Reset to ' ' (blank) for all other records.)

• FNAM

Name of a field in the screen. The FNAM field is not case-sensitive.

• FVAL

Value for the field named in FNAM.

5. The next step is to submit the BDC session. Use the BDC_INSERT function module to add a transaction to a batch input session. Specify the transaction that is to be started in the call to BDC_INSERT.

BDC_INSERT takes the following parameters:

• TCODE

The code of the transaction that is to be run. TCODE is an EXPORTING parameter in the function module.

• DYNPROTAB

The BDCDATA structure that contains the data that is to be processed by the transaction. DYNPROTAB is a tables parameter in the function module.

6. The final step is to close the BDC session. Use the BDC_CLOSE_GROUP function module to close a session. Once a session is closed, it can be processed.

7. Running this program will create a batch input session by the name that is specified in the GROUP parameter in the BDC_CREATE_GROUP function call.

8. Transaction SM35 can be used to process the submitted session. This transaction can be used to check the status of all BDC sessions.

2.2. Summary: Creating Batch Input Session:

• Open Batch Input group

CALL FUNCTION 'BDC_OPEN_GROUP'

EXPORTING

CLIENT = SY-MANDT

GROUP = GROUP

USER = USER

KEEP = KEEP.

• Fill in the Data for Transaction in an internal table 'BDCDATA'

FORM INSERT_SCREEN USING PROGRAM DYNPRO.

CLEAR BDCDATA.

BDCDATA-PROGRAM = PROGRAM.

BDCDATA-DYNPRO = DYNPRO.

BDCDATA-DYNBEGIN = 'X'.

APPEND BDCDATA.

ENDFORM.

FORM INSERT_FIELD USING FNAM FVAL.

CLEAR BDCDATA.

BDCDATA-FNAM = FNAM.

BDCDATA-FVAL = FVAL.

APPEND BDCDATA.

ENDFORM.

• Insert Transacton

CALL FUNCTION 'BDC_INSERT'

EXPORTING

TCODE = 'ME21'

TABLES

DYNPROTAB = BDCDATA.

• Close Batch Input group

CALL FUNCTION 'BDC_CLOSE_GROUP'.

Finally to process Batch Input Session, first execute the BDC ABAP. This will create

a BDC session. Run transaction 'SM35' & processes the BDC session.

Some useful URLs

http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm

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

http://www.guidancetech.com/people/holland/sap/abap/zzsni001.htm

The difference between CallTransaction and Sessionmethod.

In ‘Call Transaction’, the transactions are triggered at the time of processing itself and so the ABAP program must do the error handling. It can also be used for real-time interfaces and custom error handling & logging features. Whereas in

Batch Input Sessions, the ABAP program creates a session with all the transactional data, and this session can be viewed, scheduled and processed (using Transaction SM35) at a later time. The latter technique has a built-in error processing mechanism too.

difference between batch input and call transaction in BDC

Session method.

1) synchronous processing.

2) can tranfer large amount of data.

3) processing is slower.

4) error log is created

5) data is not updated until session is processed.

Call transaction.

1) asynchronous processing

2) can transfer small amount of data

3) processing is faster.

4) errors need to be handled explicitly

5) data is updated automatically

                    • Rewards some points .

regards,

P.Naganjana Reddy

Read only

Former Member
0 Likes
425

hi

good

only one.

thanks

mrutyun^