Beruflich Dokumente
Kultur Dokumente
(http://w
ww.sap.c
Products
om/) (https://www.sap.com/products.html)
Industries Industries (https://www.sap.com/industries.html)
Support Training
(https://www.sap.com/support.html) Training (https://www.sap.com/training-certi cation.html)
Community Developer
(https://www.sap.com/community.html) Developer (https://developers.sap.com/index.html)
Partner About
(https://www.sap.com/partner.html) About (https://www.sap.com/corporate/en.html)
Ask a Question (https://answers.sap.com/questions/ask.html) Write a Blog Post (https://blogs.sap.com/wp-admin/post-new.php) Login (https:/
Archived discussions are read-only. Learn more about SAP Q&A (https://go.sap.com/community/about/questions-and-answers.html)
What is the exact difference between BDC,LSMW and BAPI and why we are going for LSMW ,BAPI, if BDC is suitable or viceversa (for uploading legacy
data).
Tags: abap
(https://people.sap.com/former.member)
Former Member
November 20, 2007 at 12:22 PM
0 Likes
Not what you were looking for? View more on this topic (https://go.sap.com/community/tag.html?
id=833755570260738661924709785639136) or
7 replies
Hi,
http://www.geekinterview.com/question_details/33450
http://www.allinterview.com/showanswers/1646.html
Reward if helpful.
Regards,
Nagaraj
https://archive.sap.com/discussions/thread/640283 1/10
5/2/2019 Difference between lsmw,bdc & bapi
Hi Satish,
BDC is traditional way of coding the transactions for uploading the legacy data, Sap is
changing all transactions to Object oriented programming. Since BAPI is Object based
and supports all the new transactions it is preffered over BDC. More over BAPI's process
data faster than BDC.
BAPI is a SAP-supplied function module with a defined interface, which allows you to
interact with various business objects. SAP guarantees the integrity of your database for
anything updated using a BAPI. BDC is a method of driving screens programatically, for
updating SAP data. BAPIs are generally faster than BDCs.
A BAPI is faster because it is updating the DB "directly". Whereas BDC with call
transaction goes through the whole screen sequence like any user would do, simply put,
fills screens.
However - there is not always a BAPI for a particular transaction and not all functions that
are performed by a transaction can be done by a BAPI. BDCs produce error sessions
which can be processed by the user, while BAPIs don't.
SAP comes up with Change in Version, so each and every time they will change the
screens/number etc.
and also Most of the Latest versions transactions are Enjoy Transaction. they will not
support BDC's in Background.
A BDC with call transaction goes through the whole screen sequence like any user would
do, simply put, it is filling screens.
advantages:
1. using bdc we can upload data into database tables using 2 ways
1. foreground -
means that user interaction is there for each and every record.
2. back ground -
using these two options is one of the greatest advantage over bapi.
2. in bdc call transaction method we can control the display of screen resolution which is
not possible with bapi's
3. bdc is generally used for transferring of large amount of data than bapi's
4.session method of bdc allows us to place data directly in application server and then
finally transfered into sap database tables
disadvantages:
3. using bapis we can connect to remote systems and also to non sap systems.
https://archive.sap.com/discussions/thread/640283 2/10
5/2/2019 Difference between lsmw,bdc & bapi
A BAPI is a method of a SAP Business Object. BAPI enables SAP and third party
applications to interact and integrate
http://www.sapgenie.com/abap/bapi/example.htm
http://sappoint.com/abap/
Batch Data Communication (BDC) is the oldest batch interfacing technique that SAP
provided since the early versions of R/3. BDC is not a
typical integration tool, in the sense that, it can be only be used for uploading data into R/3
and so it is not bi-directional.
BDC works on the principle of simulating user input for transactional screen, via an ABAP
program. Typically the input comes in the form
of a flat file. The ABAP program reads this file and formats the input data screen by screen
into an internal table (BDCDATA). The
transaction is then started using this internal table as the input and executed in the
background.
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. .
http://sappoint.com/abap/
In case of bdc data transfer takes place from flat file into sap system ie the file existing in
sap system to sap sytem
where is bapi's r remotly enabled function modules which are assigned to some business
objects n used to transfer the data between different business partners who are using
different systems other than sap.
when you plan to upgrade your system version then bdc willnot support those
upgradations where as bapi's will support.
Manish</b>
Helpful Answer
Hi
<b>main diff</b>
LSMW offers different technique for migrating data: Direct input, BAPI, Idoc, Batch input recording. While BDC basically uses
batch input sessions and CALL TRANSACTION method.
Limit on number of records which can be uploaded in one session of BDC (999 records). No such limit in LSMW.
<b>Rward if suefull</b>
https://archive.sap.com/discussions/thread/640283 3/10
5/2/2019 Difference between lsmw,bdc & bapi
Hi Satish,
<b>BDC:</b>
When a company decides to implement the SAP R/3 to manage business-critical data, it usually does not start from a no-data
situation. Normally, a SAP R/3 project comes into replace or complement existing application.
In the process of replacing current applications and transferring application data, two situations might occur:
• The first is when application data to be replaced is transferred at once, and only once.
• The second situation is to transfer data periodically from external systems to SAP and vice versa.
• There is a period of time when information has to be transferred from existing application, to SAP R/3, and often this process
will be repetitive.
The SAP system offers two primary methods for transferring data into SAP systems. From non-SAP systems or legacy system.
These two methods are collectively called “batch input” or “batch data communication”.
1. SESSION METHOD
2. CALL TRANSACTION
3. DIRECT INPUT
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.
• To build an internal table containing every screen and every field to be filled in during the execution of an SAP transaction.
Analyzing transaction
• 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.
<b>LSMW:</b>
http://sapabap.iespana.es/sapabap/manuales/pdf/lsmw.pdf
http://service.sap.com/lsmw.
http://saptechnical.com/Tutorials/LSMW/LSMWMainPage.htm
http://sapabap.iespana.es/sapabap/manuales/pdf/lsmw.pdf
http://myweb.dal.ca/hchinni/sap/lsmw_home.htm
http://www.sap-img.com/sap-data-migration.htm
http://www.sapgenie.com/saptech/lsmw.htm
http://sapabap.iespana.es/sapabap/manuales/pdf/lsmw.pdf
https://archive.sap.com/discussions/thread/640283 4/10
5/2/2019 Difference between lsmw,bdc & bapi
http://www.sap.info/public/INT/int/glossary/int/glossaryletter/Word-17643ed1d6d658821_glossary/L#Word-
17643ed1d6d658821_glossary
<b>BAPI</b>
http://www.sapgenie.com/abap/bapi/example.htm
http://www.planetsap.com/LIST_ALL_BAPIs.htm
Regards,
Satish
Hi
<b>main diff</b>
LSMW offers different technique for migrating data: Direct input, BAPI, Idoc, Batch input recording. While BDC basically uses
batch input sessions and CALL TRANSACTION method.
Limit on number of records which can be uploaded in one session of BDC (999 records). No such limit in LSMW.
Data migration is about 20% to 40% oft the total implementation expenses.
Most of the functions should reside in R/3. No collection of individual programs on different platforms.
The quality and consistence of the data imported into R/3 should be more important than speed and performance of data
migration.
The developed ”mapping" and rules should be reusable and thus be used repeatedly in projects.
<b> Features:-</b>
The import technique to be used in an individual case, depends on the business object as well as on the availability of standard
input programs
Batch input
Direct input
Structured way of working, because you have to finish every step before starting the next step
Run the relevant transaction in the SAP system manually with test data from the legacy system and see which fields must be
filled. There may be required fields that do not correspond to data fields in the legacy system. In such a case, one should better
assign a fixed value or establish an optional field for data transfer.
Map the fields in advance in written form: Assign the source fields to the target fields.
Determine the form in which non-SAP data will be transferred into the SAP system (e.g. via "Move" or according to a rule).
IDOC’s
Advantages: Fast to load, easy processing, low programming for standard IDOC’s
https://archive.sap.com/discussions/thread/640283 5/10
5/2/2019 Difference between lsmw,bdc & bapi
Disadvantages: Good knowledge of IDOC processing required, time consuming if changes have to be made to a created IDOC
2. BAPI’s
Advantages: Fast to load, easy processing, logical interface for functional/end user based on the business processes involved.
3. Standard/Direct Input
Disadvantages: No enjoy transactions, not always complete with all input fields of a transaction.
4. Batch Input
Disadvantages: Comparatively slow, to use new screens or tabs a new recording has to be created, not easily usable for enjoy
transactions, dependant on user settings, difference in foreground and background processing may occur.
<b>Reward if usefull</b>
Helpful Answer
hi,
when we will use LSMW means minimum of data we want to uplode we will go for LSMW. this is for function concultent work why
because here there is no coding so thats y easily the will uploade the data form lecacy system to sap system.
When we will go for BDC while we have used in customer Exit in our tcode so that time we want go for bdc otherwise we will go
for bapi why because in BAPI is standard Function module so if we r using BAPI which t code having the Enchansment we can't
upload the data.
In BAPI we will transfer the data from no sap( like java...) to sap .
In BDC we can't.
regards,
S.Nehru.
Hi there,
We used LSMW for uploading some legacy data and it was a NIGHTMARE!
The next time we uploaded some data we used a program along the lines of this:
[there are no exceptions or validation in this version - but it should get you started... just
copy and past then use an excel sheet with the correct no. of columns and with the
CORRECT DATA types in the excel sheet and you'll see how easy it is :)]
____________________________________________
REPORT ZGAVAMEXBTU1.
Lower line level detail to read - declare here - used to concatenate other details into
https://archive.sap.com/discussions/thread/640283 6/10
5/2/2019 Difference between lsmw,bdc & bapi
trvl_dest(6) type c,
col 004 in xcel file - travellers departure date - used in concatenation of LongText so
format unimportant
trvl_dept(8) type c,
trvl_sname(13) type c,
col 011 in xcel file - used in "if statements" - I HAVE NO IDEA WHAT THE HECK
THIS IS
ref_no(20) type c,
END OF ttab.
DATA:
Pre-Entry Screen Level Invoice Detail to declare are caprutred at selection screen
To concatente 'Amex Travel of invoice date ' with pinvdat (value given in selection
screen)
line level details to be assigned with 'S' or 'H' based on whether amount is -ve or
+ve values
*other things that were declared in original spec but not used here... yet!
LineNo type n.
***********************************************************************
***********************************************************************
https://archive.sap.com/discussions/thread/640283 7/10
5/2/2019 Difference between lsmw,bdc & bapi
'TEST1'.
SELECTION-SCREEN SKIP 1.
***********************************************************************
***********************************************************************
TOP-OF-PAGE.
concatenate 'Amex Travel Invoice ' pinvdat into TopText separated by SEP.
ULINE.
/ 'Reference:',
EXPORTING
static = 'X'
CHANGING
file_name = p_file.
START-OF-SELECTION.
PERFORM upload_data.
LOOP AT itab.
SEP.
if no invoice number - skips line - prevent extra lines at the bottom being inputted
D_C = 'S'.
ELSE.
D_C = 'H'.
ENDIF.
else.
ENDIF.
Add 1 to counter.
ENDLOOP.
https://archive.sap.com/discussions/thread/640283 8/10
5/2/2019 Difference between lsmw,bdc & bapi
----
FORM upload_data *
----
........ *
----
FORM upload_data.
file = p_file.
EXPORTING
filename = file
i_begin_col = '1'
i_begin_row = '4'
i_end_col = '20'
i_end_row = '500'
TABLES
intern = xcel
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
OTHERS = 3.
LOOP AT xcel.
CASE xcel-col.
WHEN '0001'.
itab-InvoiceText = xcel-value.
WHEN '0003'.
itab-trvl_dest = xcel-value.
WHEN '0004'.
itab-trvl_dept = xcel-value.
WHEN '0005'.
itab-trvl_sname = xcel-value.
WHEN '0008'.
itab-CostCentre = xcel-value.
WHEN '0009'.
itab-AmountInLocCurr = xcel-value.
WHEN '0009'.
itab-ref_no = xcel-value.
ENDCASE.
AT END OF row.
LineNo = xcel-row.
APPEND itab.
CLEAR itab.
ENDAT.
ENDLOOP.
ENDFORM.
____________________________________________
https://archive.sap.com/discussions/thread/640283 9/10
5/2/2019 Difference between lsmw,bdc & bapi
________________________________________________
Just name the excel file as per code. Have fun! If you can't get it to work just give me
a shout.
Kind Regards,
Gavin
https://archive.sap.com/discussions/thread/640283 10/10