Batch Data Communication (BDC) in SAP R/3
 
Published: 08 Feb 2007
Abstract
In this article Arindam discusses the concept of Batch Data Communication in detail.
by Arindam Ghosh
Feedback
Average Rating: 
Views (Total / Last 10 Days): 109557/ 77

Introduction

The early versions of R/3, SAP has been providing batch interfacing techniques. Among these techniques, Batch Data Communication (BDC) is the oldest one. BDC is not bi-directional; it is an integration tool in its typical form. It can only be used for uploading data into RJ3. BDC works through an ABAP program and works on the principle of simulating user input for transactional screen.

The purpose of the Batch Data Communication is to transfer data. The BDC can transfer data from one SAP System to another SAP System or can transfer data from non-SAP System to SAP System too. To transfer data BDC uses normal transaction codes. Two methods are provided to BDC to do this work.

SAP has provided two different types of methods for BDC to do its work. Among these, the first one is called the classical method or session method. Through this method the data can be read by the BDC program from a sequential dataset file. This sequential dataset file is stored in batch-input session. In order to .run the transaction in this session, what one needs is to execute the session. For this, follow these few steps: you can start and subsequently monitor the session firstly from – System à Services à Batch Input or have the session run in the background. In this method to generate the required session, you have to use the function module BDC _ NSERT and BDC _CLOSE.

In the second method the BDC has to use the ABAP statement CALL TRANSACTION USING statement to run a transaction. In the second method, unlike in the first type, you do not need BDC to create a session.

Data Transfer

During the process of data transfer, data is transferred into the SAP R/3 System. This transfer is from an external system to SAP R/3 system. Whenever you transfer data from an external system into an R/3 System, you can use data transfer because it is installed and regularly transfers data from an external system into an R/3 System.

As discussed, with the help of BDC, you can transfer the required data from a non-SAP system to an SAP system. For this kind of data transfer you are required to write an ABAP program. This ABAP program would help to export the concerned data to a sequential dataset file. The data in this file has to be stored. This should be stored in a format, which is acceptable to SAP batch input program. But, to transfer data from a SAP system to another SAP system, you can take the aid of RFC or CPI-C.

SAP application supports the data transfer of numerous SAP business objects. The said data transfer program specifies the data format definition, which is necessary to import the data into the R/3 System. There are three methods available for transferring data:

Direct Input: In this method the SAP function modules execute the consistency checks. However, there are other means of checking with the help of screens. The Direct Input Method has considerable performance advantages.

Call Transaction: In this method you can check the data consistency with the help of screen logic.

Batch Input Session: In this method data consistency is checked with the help of screen logic.

Direct Input Method

Among the methods of data transfer through BDC, direct input method is the one that is used, especially in case of transferring large amount of data. In order to enhance the batch input procedure, the system offers you with the direct input technique.

There is a distinction between the batch input technique and this technique. Unlike batch input technique, this technique does not create sessions. Instead, it stores the data directly. Moreover, it does not process screens. The data has to be entered directly into the corresponding database tables. The system calls a number of function modules which execute necessary checks, if any required. In the case of errors, the direct input technique has a facility to restart the entire mechanism. However, if you want to restart the entire mechanism in case you faced an error, then direct input programs must be executed in the background only. One has to use program RBMVSHOW or Transaction BMV0 to maintain and start these programs.

Call Transaction Method

Call Transaction method is another method used for Data Transfer. In this type of method your program will use the ABAP statement CALL TRANSACTION USING in order to run a SAP transaction. In this type external data need not be deposited in a session for being processed later on. Instead, the entire batch input process takes place inline in your program.

Here, the data transfer program must convert the data that has to be transferred into the SAP system. This is as per requirement by the SAP data structure or the transaction which is using it. It is to be remembered that a conversion of the data types may be necessary at different times during the process.

Suppose there is a data type mismatch then you have to convert the data types to type C. In this regard the data transfer program should be capable of exporting the data in SAP format to the sequential file. At the time of uploading the data into the SAP system, the BDC program reads the data from the above­mentioned sequential file.

Batch Input Session Method

This is the third method for data transfer. If you use the batch input method to transfer data, then you should remember that an ABAP program has to read the external data which is to be entered in the R/3 System. Subsequently, it stores the concerned data a "batch input session." The batch Input session records the actions which are required in the process of transferring data into the system. This can be done by using normal SAP transactions.

As soon as the program generates the said session, you will be able to run the session in order to execute the SAP transactions in it. Moreover, you can start the session, and at the same time, can monitor a session with the help of batch input management function. For this you have to choose:

System à Services à Batch input. Moreover, you can have the session run in the background processing.

Writing a Data Transfer Program

If you want to write a data transfer program, you have to follow the steps mentioned below.

Firstly, you will analyze the structure of the existing data. Subsequently, your job is to specify the conversions, which are essential to fill the SAP data structures.

Secondly, you have to generate the SAP data structure. In case the program is written in ABAP, you will require only the required tables in the concerned program with the help of TABLES statement.

Thirdly, you will have to initialize the SAP data structure.

Fourthly, fill the structure with data, performing any conversions and error checking that are required.

Finally, you will write the sequential file. In the SAP system this sequential file is typically required for making the data available to the batch input program.

Batch Input Method

Batch input method is a type of data transfer method. It is used for bulk data transfer; it is one of the primary ways by which data can transferred into the R/3 System. This method is not for near real-time data transfers.

There are various typical uses of batch input. One of the ways includes the one-time import of data. This import of data is from a legacy system into a newly installed R/3 System. In addition to it, another typical use is for periodic (i.e. hourly, daily..., and so on) transfers of data. These transfers are from external systems or legacy systems which are still in use into R/3 system where all enterprise data is consolidated.

The R/3 applications deliver different programs for batch input, which are ready to be used. However, in some cases a customer has to write his or her own batch input program. This is required in order to convert the concerned data from a legacy System or from a proprietary format into an R/3 data format.

The process flows for a batch input are discussed below.

Data Transfer Decision-Making: It is with a decision to transfer data from an external source into R/3 that the process of batch input begins. It is probable that the external source may be a legacy system that is being replaced. A one-time bulk data transfer is foreseen in this regard. Alternatively, the external source may be an external system that is to remain in use. In this case, a regularly recurring bulk data transfer is foreseen.

Setting up Batch-Input for Data Transfers: If R/3 standard one-time or regular data transfers are required, then by means of customizing settings in the R/3 Customizing System in SAP ASAP set up will occur. You must set up custom batch input procedures by hand, which means the system administrator must schedule the data conversion program that creates the batch input session. The system administrator and the batch input programmer must determine the following: how frequently data is made available from the external system, how frequently the conversion program should run, and whether the conversion program runs in R/3 (ABAP program) or in a host system (external program).

Processing Batch Input Sessions: When a batch input session is processed, then the actual transfer of data into R/3 takes place. Little attention is required in processing of batch input sessions by the system administrator. Usually, the starting of batch input sessions is automated by the system administrator. If necessary, the administrators can also start batch input session explicitly from transaction SM35.

Checking Batch Input Sessions: For a system administrator the routine activity is to check daily or more frequently in transaction SM35 whether all batch input sessions have been completed successfully. It is the schedule for running batch input sessions on which the schedule for checking sessions depends upon. For doing this check the R/3 System provides easy-to-use batch input management tools.

Analyzing Errors: It is the duty of the system administrator to analyze the problem if one or more transactions in a session end in errors. Usually, the assistance of the affected data entry specialist or department for this analysis will be needed by the system administrator. In the situation where the problem was caused by incorrect data conversion or incorrect generation of the batch input session then the programmer who wrote the data conversion program may also need­ to be involved.

Error Handling in Batch Input Method

It is found that most problems usually fall into one of the following two categories discussed below.

In this case either required data is missing from the batch-input session or invalid data has been included in the session. Errors in the data conversion program or the presence of unexpected types of data or incorrect data in the legacy database are the possible external causes of this type of problem. Within R/3, the causes for this type of problem include incorrect or incomplete customizing in an application. For example, a legacy data type may not have been foreseen in the check table entries made in application customizing.

This case mainly includes technical/programming problems. The data is entered by a batch input session by running R/3 transactions non-­interactively. Therefore, a typical technical or programming problem is the incorrect identification of one of the data fields in a transaction. Thus, the conversion program may not fill a required data field or may have provided invalid values.

Conclusion

I have gone through the details of batch data communication and various methods used to transfer data. One can make use of BDC to transfer data from a SAP to SAP system. In addition, it can transfer data from a non SAP system to SAP system too. I have discussed the various methods of BDC and the error handling in the respective methods.



User Comments

Title: nice work   
Name: anant dan
Date: 2012-12-12 5:42:29 AM
Comment:
Really nice info here ,. helps in understandin the basic concepts ;)
Title: feedback and information   
Name: pranshu
Date: 2012-10-25 5:22:46 AM
Comment:
its fyn
Title: feedback   
Name: kiran reddy
Date: 2012-09-04 9:06:28 AM
Comment:
it good to read
Title: Feedback and Information   
Name: Ursula
Date: 2012-08-30 11:17:09 AM
Comment:
Interesting document.

Question:
In ECC6 the BDC session doesn't provide certain master data information when executing transaction IP30 periodically, eg maintenance plan number. I require a report that provides such information... Please help
Title: Feedback   
Name: Bharath
Date: 2012-07-23 1:41:28 AM
Comment:
thanks , its a very good article :)
Title: Article Feedback   
Name: Ankit Bansal
Date: 2012-01-19 12:32:52 AM
Comment:
It is good. Good Content, Simple Language really useful.
Please add up some examples and screen shots.
Title: Nice   
Name: Ahila
Date: 2012-01-12 2:26:53 AM
Comment:
Really it is very nice.I can able to understand the concepts without moving to the sap screen.
i am sure it will verymuch helpful for the beginners.
Title: Good one   
Name: gejo
Date: 2011-02-21 5:04:23 AM
Comment:
this is really a good article.......
Title: Feed back   
Name: Srujana
Date: 2011-01-18 11:59:20 PM
Comment:
Hi This article is very helpfull to me but can you provide me total call transaction in screen shots along with SE38 coding its very urgent to me kindly provide me the same at the earliest my dear frineds


Regards
Srujana
Title: Feedback   
Name: Karunakar
Date: 2010-11-23 5:11:19 AM
Comment:
Thanks and help full
Title: feedback   
Name: ashish
Date: 2010-11-08 5:01:56 AM
Comment:
thanks. it was help full.
Title: FB   
Name: praveen
Date: 2010-09-10 4:25:36 AM
Comment:
good
Title: Good Article   
Name: Bill
Date: 2010-06-10 3:31:36 AM
Comment:
Hi,Arindam Ghosh.This article is very good.
It make me know BDC clearly.
Thank you.
Title: FEEDBACK   
Name: MOHANGANDHI
Date: 2010-04-20 6:52:55 AM
Comment:
THIS IS USEFUL
Title: bdc programming   
Name: S.NARASINGARAO
Date: 2010-04-03 6:57:21 AM
Comment:
PL. WRITE SOME SIMPLE SAMPLE BDC PROGRAM OF OWN TABLE CREATION AND INSERTING THE DATA FROM ANY FAT FORMAT FILE . SO THAT NEW ONE CAN LEARN THE METHOD. pL. CREATE YOUR OWN TABLE AND DO INSERTING THE DATA FROM FILE THROUGH BDC PROGRAM.
Title: VERY GOOD   
Name: ANIL SINGH
Date: 2010-03-19 6:47:22 AM
Comment:
Thanks for sharing data
Title: BDC   
Name: Bharat
Date: 2009-10-23 2:17:29 AM
Comment:
Thankyou for the sharing the data of BDC.
it is very imp for me.
Title: BDC introduction   
Name: Rajesh
Date: 2009-06-30 1:42:24 AM
Comment:
Thanks for sharing knowledge of BDC.It is more helpful.
Title: Good   
Name: Izaz
Date: 2009-05-14 3:01:06 AM
Comment:
Good and Thanks for your contribution.
also Check out this
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCDWBLIB/BCDWBLIB.pdf
may be helps u all
Title: thanks   
Name: eddai
Date: 2009-04-08 1:28:22 PM
Comment:
thanks..very useful article..for those look for more BDC materials check http://www.wuala.com/sapdocs.info/SAPDocs.info_TAGS/BDC
Title: BDC   
Name: ABHI
Date: 2009-04-02 5:10:18 PM
Comment:
Thanks , the info was very useful and crystal clear for beginners like me.
Title: BDC   
Name: Rohit Sinha
Date: 2009-01-08 3:48:00 AM
Comment:
Thanx a tonne dude!!
But it would be a lot better if U include the screen shots to display the mechanism, of how BDC works!
Title: BDC   
Name: JESSIE
Date: 2009-01-05 2:28:24 AM
Comment:
VERY GOOD ONE
Title: bdc   
Name: GEETHA
Date: 2008-12-22 11:19:19 PM
Comment:
HI,
I AM NEW TO BDC CONCEPTS.PLZ, TELL ME THE STEPS OF BDC FROM INITIAL PART.
Title: bdc introduction   
Name: Ashwini
Date: 2008-12-01 4:49:19 AM
Comment:
can u let me know some
exercises those may be handled for initial steps in BDC,CALL TRANSACTION OR SESSION METHOD?
Title: BDC   
Name: MOORTHI
Date: 2008-11-23 11:41:17 AM
Comment:
MANY THANKS A VERY GOOD USEFUL URL
Title: bdc doubt   
Name: balamurugan
Date: 2008-10-03 6:37:08 AM
Comment:
after implemention...we have use bdc in support project...
Title: Miss.   
Name: Jolly
Date: 2008-09-29 9:53:26 AM
Comment:
THank you so much. Your article does help me to get the whole pictur of how the SM35 works.
Title: VERY GOOD   
Name: ABHIMANAYU
Date: 2008-09-19 2:23:46 AM
Comment:
good article thanks a lot...
Title: GOOD   
Name: ASOK
Date: 2008-08-26 12:28:40 AM
Comment:
HI YOU HAVE GAVE SOME TIPS FOR BDC...IT IS REALY SUPER...
THANKS....
Title: BDC Steps   
Name: ABHILASHA GUPTA
Date: 2008-08-25 12:30:18 AM
Comment:
Very informative and good article wrt BDC.
Thanks
Title: Steps of BDC to upload   
Name: arif raza khan
Date: 2008-07-19 6:55:16 AM
Comment:
very good
Title: Steps of BDC to upload data Pls provide this with screen shot   
Name: Mateen
Date: 2008-07-03 6:11:11 AM
Comment:
Steps of BDC to upload data Pls provide this with screen shot
Title: Feedback   
Name: Yuvi
Date: 2008-06-08 7:34:52 AM
Comment:
A very useful input.

Cheers,
Yuvi.
Title: Thanks   
Name: Sarfraj AHmed
Date: 2008-06-06 1:17:41 AM
Comment:
if some example code wud have been provided then it wud have been much better... however, nice article....
Title: Feed back   
Name: Amit Nagaich
Date: 2008-05-24 7:30:26 AM
Comment:
Ok but not complete ....
Some information are missing
Title: Thanks   
Name: Jay
Date: 2008-04-09 9:36:03 AM
Comment:
Thanks 2 U for such data
plz give some details abt. it

Thanks n regards
Jayashil
Title: Mr   
Name: Rishikesh Nalapur
Date: 2008-03-20 6:58:31 AM
Comment:
Very abstract!!! insufficient details.
Title: Mr.   
Name: Srinivasa Sastry
Date: 2008-03-06 5:18:05 AM
Comment:
Good Article
Title: bdc introduction   
Name: manish
Date: 2008-02-26 12:39:55 AM
Comment:
hi ,
thnaks for sharing the deatils for bdc..
Title: basu   
Name: bulan
Date: 2008-02-25 3:09:07 PM
Comment:
thanks lot its a really good one to know... can u let me know some multiple table bdc (using 3-4 tables)
Title: Mr   
Name: Nagesh
Date: 2008-02-19 9:07:35 AM
Comment:
thanks alot.....if u can show the navigation part all these methods, it would be of great help
Title: exercises on bdc   
Name: tirthankar bhadury
Date: 2008-02-15 2:18:04 AM
Comment:
hi

its a good one really to know... can u let me know some
exercises those may be handled for BDC,CALL TRANSACTION OR SESSION METHOD??
Title: Introduction   
Name: Aditya
Date: 2008-01-03 6:20:08 AM
Comment:
Its excellent
Title: BDC   
Name: Nick Mishra
Date: 2007-11-19 3:41:02 PM
Comment:
Hi Guys the above statement shows how BC works. I have a scenario where i have 12 fields to update my data. From which i need to send some data to two transctions that is XD01 and XD02. How fo you solve the query. State with an example. Hardcode it so that it might be easier to understand.
Title: Thank you for a very well explained documentation on BDC!:)   
Name: Miriam K
Date: 2007-11-07 3:00:34 PM
Comment:
I must say that this is a very well laid out guideline! Thank you for taking the pains!:)
Title: Really Help full   
Name: Sudhakarrao Nalagarla
Date: 2007-10-03 5:47:59 AM
Comment:
It is very help ful to the both functional and technical consultants in sap but it should have some more Detaild And should be very easy way to undersatand anybody

Thanks
Sudha
Title: REALLY HELPFUL,GOOD   
Name: RAHUL KAKADE
Date: 2007-10-01 7:10:46 AM
Comment:
FOR ME AS FRESHER IN SAP IT RALLY HELP TO UNDERSTAND CONCEPT OFBDC
Title: REALLY GOOD,EXCELLENT   
Name: SOUMYA KANTA DASGUPTA
Date: 2007-09-26 10:44:17 AM
Comment:
IT'S GOOD . BUT PLS. INSERT SOME SAMPLE CODE.
Title: EXCELLENT   
Name: RAJEEV KUMAR PATHAK
Date: 2007-09-15 8:26:39 AM
Comment:
WELL EXPLAINED!!
IT REALY HELPED ME. ALOTS OF THANKS FOR THIS ARTICLE.
Title: Excellent   
Name: Jayakumar C
Date: 2007-08-21 4:19:01 AM
Comment:
Very well explained !!
Expecting more such articles.

Thanks
Jay
Title: excellent   
Name: arthi
Date: 2007-08-17 4:05:05 AM
Comment:
good article thanks a lot...but need examples for better understanding
Title: Good Job!   
Name: Teju
Date: 2007-08-16 3:43:32 AM
Comment:
Great compilation... would like to see more such articles comming up with the kind of errors.. and their resolution. Keep up the good work.

Appreciated!
Title: Thanks..   
Name: Sathar
Date: 2007-07-25 1:37:10 AM
Comment:
Thanks a lot.. It really helped me.. Can u pls add one example with the steps..
Title: was good!!   
Name: niti dua
Date: 2007-07-10 5:39:29 AM
Comment:
Hello,
This article was very helpful but it would be much better if you include screen shots.
Title: YES... IT WORKS   
Name: TULIKA KAMAT
Date: 2007-06-29 8:09:21 AM
Comment:
Hello, i learnt lot from this article. I wish to inform the author plz add an example and screen shots it would be good.

if incase author did not able to provide example and screen shots and if author permits me i am ready to add screen shots and examples.
Title: Great Information   
Name: Neeraj Joshi
Date: 2007-06-22 8:06:11 AM
Comment:
Very good information Arindam.

Thanks for sharing.
Title: Was Great!!   
Name: Amrita Mitra
Date: 2007-05-23 12:11:51 PM
Comment:
Hello,
Ur articel as such was of great help but I need a bit more understanding of this topic which i think will be possible only if there are some code samples with the scenarios described. Anyways...was of great help. Thanks.
Title: Thank You   
Name: Kieulan Nguyen
Date: 2007-05-02 10:39:24 PM
Comment:
I have users who ran physical inventory cycle count using MICN. So when there are errors, my users indicated that they must delete BDC sessions before they can rerun the inventory cycle count. I don't really think they have to delete. What they need to do is analyze the error and fix them or delete all the inventory document numbers that were created using MI02 and restart the cycle count. Is it true that my users have to delete their BDC sessions before they can restart their jobs? Please advice.
Title: thanks   
Name: anubhav
Date: 2007-04-18 6:42:37 AM
Comment:
it's good.please elaborate briefly.
Title: imp   
Name: santosh
Date: 2007-04-04 5:56:42 AM
Comment:
hi,

its good material but without code seems to be not so useful,so plz include code..
Title: Thanks   
Name: satheesh
Date: 2007-03-30 8:04:47 AM
Comment:
Hi,
the material is good, but plz include some sampple programs for each sections.It will be more benifit to understand.....
Title: Thanks   
Name: Aths
Date: 2007-03-23 12:31:54 AM
Comment:
Hi,
thanks a lot,this materials gives an overall view of BDC,but plz include code snippet and screens then it will be much better.......
Title: Thanks a lot   
Name: santhoshi
Date: 2007-03-19 4:19:11 AM
Comment:
Hi,

thanks a lot.whatever your supplied material is excellent.plz add some more material how to upload the data,how can we process the session etc.if you'll be supply some more material thats help full for us.
Title: Thanks   
Name: Kumar
Date: 2007-03-15 12:49:44 PM
Comment:
Hi,
Thanks for the meterials. please update with a sample senerio, with screen shots...that would be very help ful.
Title: Thanks a lot.   
Name: Kumar Bhagat
Date: 2007-03-13 1:23:48 AM
Comment:
Your supplied material is excellent.
Adding the screen sots will definately help everyone...
Title: thanks   
Name: jyotsna
Date: 2007-02-27 12:45:16 PM
Comment:
thanks for u r material..plz add the steps with screens how to do them

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-05-07 11:31:53 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search