Thursday, August 16, 2007

BDC (Batch Data Communication) Tutorial for Data Transfer

What is BDC
BDC ( Batch Data Communication ) is used for uploading mass data into SAP system. In SAP system BDC also referred to batch input or data tranfer.

Typical Uses
Typical uses of batch input include the one-time import of data from a legacy system into a newly installed R/3 System. Another typical use is for periodic transfers of data from external systems or legacy systems that are still in use into SAP.


Background of BDC
To ensure data consistency in SAP system, we must not update SAP data directly from ABAP program. We must upload data through similar program flow compared to manual input by user. SAP provide this by BDC. BDC works by simulating the user input from transactional screen via an ABAP program. This means that you do not bypass any of the standard SAP consistency checks, authorisations, update conjunction tables, etc.

How it works
Data input entered by user simulated in BDC by data packet. The transaction then started using this internal table as the input and executed in the background.

Data packet is an internal table has a structure of BDCDATA, it has fields:
1. PROGRAM (program name)
2. DYNPRO (screen number)
3. DYNBEGIN (New screen start) X=new screen
4. FNAM (Field name)
5. FVAL (Field value)
Data packet contain of screen by screen packets. One screen packet contain:
1. Screen no
2. Cursor position
3. User command
4. Input fields
It implemented in internal table in this format:

PROGRAMDYNPRODYNBEGINFNAMFVAL
program1screen1X
BDC_CURSORpos1
BDC_OKCODEcomm1
fieldname1fieldvalue1
fieldname2fieldvalue2
program2screen2X
BDC_CURSORpos1
BDC_OKCODEcomm1
fieldname1fieldvalue1
fieldname2fieldvalue2


For example, we want to create a BDC to change ABAP program title.
Here is what we do manually: Go to screen SE38, enter program, select radiobutton "Attributes", then click "Change". After that, change title then press "Save" button.
In BDC, we simulate this by following internal table:
PROGRAMDYNPRODYNBEGINFNAMFVAL
SAPLWBABAP100X
BDC_CURSORRS38M-FUNC_HEAD
BDC_OKCODE=CHAP
RS38M-PROGRAMMZAALTESTBDC
RS38M-FUNC_EDIT
RS38M-FUNC_HEADX
SAPLSEDTATTR200X
BDC_CURSORRS38M-REPTI
BDC_OKCODE=CONT
RS38M-REPTITest change title BDC
TRDIR-SUBC1
TRDIR-FIXPTX
SAPLWBABAP100X
BDC_CURSORRS38M-PROGRAMM
BDC_OKCODE=BACK
RS38M-PROGRAMMZAALTESTBDC
RS38M-FUNC_HEADX


To accomodate you to build data packet, SAP provide BDC recording in tcode SHDB.
Do following action:
1. Go to tcode SHDB
2. click "New recording", enter recording name to identified your record, and TCode to be recorded.
3. You will enter recording mode of the transaction, simulate action you want to perform in this transaction
4. At the end it will result internal table ready to upload to data transfer methods (Call transaction or BDC sessions).

After internal table created then we pass this to data transfer methods. There are two alternatives of data transfer methods, using Call Transaction or BDC session.
Call transaction performed by calling command ‘Call Transaction’. ABAP program must do the error handling based on returning table from call transaction command. It is used for real-time interfaces and custom error handling & logging features. This is suitable when processing sequential update, it means, next data will depend on previous data.
In BDC 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.

Other useful article:
BDC Tutorial in SAP-Img

46 comments:

Anonymous said...

thx yach atas info - info yang penting ini semoga sukses slalu. ini sangat amat berguna buat saya yg pemula

suwardi said...

Mas, ayo post2 another tips2 lain..
Blog ini guna banget buat saya belajar nih.. :D

Raju said...

how to write a proram for BDC skipping the first record alone from flat file.

ravi kanth said...

Thanks for writing this tutorial.

seventyros said...

For a Excellent Online Resource for SAP EP and SAP Web Dynpro ABAP, Visit Learn SAP Online

SAP script said...

good article....
thank you

santosh said...

thank you very much.....it was very useful

google said...

Excellent Online Resource for SAP EP and SAP Web Dynpro ABAP. Visit Learn SAP Online for Free

SAP and Their Produstcs - SMB Customer - SAP Business One

What is SAP ?

Architecture of SAP Business One Application
Navigation in SAP Business One
SMB Portal and its Functionality
Netweaver Administrator Day to Day Work
SAP Business Intelligence
Business Partners in SAP Business One
Continuous Stock System in SAP business one
How to make WDJ Component available on SAP EP
SAP Enterprise Portal Application in NWDS

And Many Morte Topics

Roshan said...

Excellent Online Resource for SAP EP and SAP Web Dynpro ABAP. Visit Learn SAP Online for Free

SAP and Their Produstcs - SMB Customer - SAP Business One

What is SAP ?

Architecture of SAP Business One Application
Navigation in SAP Business One
SMB Portal and its Functionality
Netweaver Administrator Day to Day Work
SAP Business Intelligence
Business Partners in SAP Business One
Continuous Stock System in SAP business one
How to make WDJ Component available on SAP EP
SAP Enterprise Portal Application in NWDS

And Many Morte Topics

packers and movers Lucknow said...

Nice blog posting, I like this post great work keep it up your nice and good work here i will be back here. thanks for sharing this blog

kumar gaurav said...

thanks for this tutorial..

kiran kumar reddy said...

Dear ABAPers for BDC Interview questions please visit sap abap interview questions

chennai said...

land marvel cherry park velachery
Developing and co-promoting real estate projects on joint venture basis properties

mani said...

Iam really satisfy by your information.
It's well-written, to the point, and relative to what I do.
I like it very much for giving information on
SAP ABAP Online Training

.

Venkat Paruchuri said...

Nice Explanation on BDC with Step to step coding Thanks for the info
This helps a lot for freshers who have done there SAP ABAP online training

Sukaniya Mishra said...


Thanks a lot for the information you are providing on SAP Webdynpro and the topics that are covered up.are very helpful.
i would like to ask that what is the scope of SAP webdynpro ABAP training what all topics
should be covered and has anyone studies from this course
http://www.wiziq.com/course/8153-sap-web-dynpro-pro-abap-training of SAP webdynpro ABAP training ??
or tell me any other guidance…
would really appreciate help… and Also i would like to thank for all the information you are
providing on SAP Webdynpro ABAP training.

Swathi Lakshmi said...

thanx a lot for writing this blog swathi

yektek training said...

nice post thank you

Piyush said...

thanks for a very elaborate demo, have very few online resources for BDC concepts.

teena sirvi said...

ola x bdc

akshey sharma said...

e cigarette online

Firoz Khan said...

5S E-Cigarette Manufacturer-Are you looking for cheap and high quality 5s E-Cigarette brands? MJTech is wholesale E cigarette supplier and manufacturer. We always offer high quality products and services to all over the world e-cigarette distributors and retailers.

akshey sharma said...

free weight loss programs

akshey sharma said...

liquid nicotine

John Smith said...

rahulsoni25@gmail.com
seosharmaji@gmail.com
hoangvn1509@gmail.com
smithadam711@gmail.com
edublogger4@gmail.com
sabjan.guestblogger@gmail.com
lukman.imarketerz@gmail.com
john.martinez1303@gmail.com
audricstevens@gmail.com
kamal20079@gmail.com
pr.linkmanager@gmail.com
editorddf@gmail.com
jenniferwinget001@gmail.com
marleebury@gmail.com

John Smith said...

Indian Suicide Hotline - OneLife (NGO) is a 24X7 Indian Suicide Hotline (+91-78930 78930) to address the suicidal tendencies, Teen Suicide Prevention & Depression Counseling. Contact us to help suicidal person


John Smith said...

pakistani dramas - Indian dramas and hum tv dramas prefect collections in online. Phenomenal website for the Pakistani dramas online and indian dramas in Pakistan.Get mobile price in pakistan with mobile network packages and mobile specifications and dramasorigin deal with 3g packages.

Firoz Khan said...

Indian Suicide Hotline-OneLife (NGO) is a 24X7 Indian Suicide Hotline (+91-78930 78930) to address the suicidal tendencies, Teen Suicide Prevention & Depression Counseling. Contact us to help suicidal person

johnson said...

SAP ABAP Online Training is affected by the technology today so most of us are constantly on the lookout to getting more wisdom and perception in regards to the prevailing software and technological systems which improves every feature of our own lives. Smartmind Online Training Explain each and every point in SAP ABAP Online Training. Currently, circumstances have changed a lot and the software pact that is bit by bit controlling each sector of the businesses, is the SAP ABAP Online Training system.

Rustam khan said...

Ethiopian News

John Smith said...

how to reduce face fat - Want to know how to lose face fat? Fast and effective tips to lose face fat. Learn how to reduce face fat fast and easy way.facial exercises to lose face fat fast

Rustam khan said...

steam game keys

John Smith said...

colon cancer symptoms - Cancer Treatment? Find Info and Browse Results for surgical oncology, surgical oncology, what is surgical oncology, gynecologic surgical oncology.

John Smith said...

colon cancer symptoms - Cancer Treatment? Find Info and Browse Results for surgical oncology, surgical oncology, what is surgical oncology, gynecologic surgical oncology.

John Smith said...

premier designs jewelry - Jewerly-watches24 is best way to find great deals on premier designs jewelry & on best watch brands. Buy premier designs jewelry & best watch
brands at the watch shop.

John Smith said...

premier designs jewelry - Jewerly-watches24 is best way to find

great deals on premier designs jewelry & on best watch brands. Buy premier designs jewelry & best watch

brands at the watch shop.

Rustam khan said...

Ethiopian News

sarkari naukri

Rustam khan said...

Ethiopian News

sarkari naukri

Top said...

Buy Cheap Games in Pakistan online. Instantly use the CD key activate and download pc games

Rustam khan said...

Total Contact Casting Total Contact Casting is recognized as the Gold Standard for offloading diabetic foot ulceration within the diabetic foot-care community.

John Smith said...

Fashioned Orange Juice - Orange juice having a refreshing and invigorating taste, it also comes packaged with a host of nutritional benefits. Fashioned orange juice & orange juice brands

John Smith said...

hår - Planta.no

John Smith said...

hår - Planta.no

Cat Minds said...

Hey it was really a nice article and i was really impressed by reading this article about SAP Online Training, In USA catminds online training also provide the best Software Courses Online Training with an experienced faculty.

John Smith said...

FI CO interview questions and answers

kits online said...

very nice article.Thanks for sharing the post...!
Hadoop Online Training