02-01-2008 4:32 AM
I WANT TO KNOW D DIFFERENCE B/W BAPI AND BDC . IS IT POSSIBLE TO MAKE BDC THROUGH BAPI? IF IT IS ,PLZZ GIVE SOME EXAMPLES..
AWNSER FOUND USEFUL WILL BE DEFINATELY REWARDED.
02-01-2008 4:38 AM
02-01-2008 4:35 AM
Hi
Hope it will help you.
Pls reward if help.
BAPI
BAPI stands for Business API(Application Program Interface).
A BAPI is remotely enabled function module
ie it can be invoked from remote programs like standalone JAVA programs, web interface etc..
You can make your function module remotely enabled in attributes of Function module but
A BAPI are standard SAP function modules provided by SAP for remote access.
Also they are part of Businees Objest Repository(BOR).
BAPI are RFC enabled function modules. the difference between RFc and BAPI are business objects.
You create business objects and those are then registered in your BOR (Business Object Repository)
which can be accessed outside the SAP system by using some other applications (Non-SAP) such as VB or JAVA.
In this case u only specify the business object and its method from external system
in BAPI there is no direct system call. while RFC are direct system call.
Some BAPIs provide basic functions and can be used for most SAP business object types.
These BAPIs should be implemented the same for all business object types.
Standardized BAPIs are easier to use and prevent users having to deal with a number of different BAPIs.
Whenever possible, a standardized BAPI must be used in preference to an individual BAPI.
Check these Links out
http://searchsap.techtarget.com/ateQuestionNResponse/0,289625,sid21_cid558752_tax293481,00.html
http://www.sap-img.com/abap/interview-question-on-bapi-rfc-abap-objects-tables.htm
http://www.sap-img.com/fu033.htm
http://www.sap-img.com/abap/ale-bapi.htm
Refer following SDN threads:
BDC:
Batch Data Communication (BDC) is the process of transferring data from one SAP System to another SAP system or from a non-SAP system to SAP System.
Features :
BDC is an automatic procedure.
This method is used to transfer large amount of data that is available in electronic medium.
BDC can be used primarily when installing the SAP system and when transferring data from a legacy system (external system).
BDC uses normal transaction codes to transfer data.
Types of BDC :
CLASSICAL BATCH INPUT (Session Method)
CALL TRANSACTION
BATCH INPUT METHOD:
This method is also called as CLASSICAL METHOD.
Features:
Asynchronous processing.
Synchronous Processing in database update.
Transfer data for more than one transaction.
Batch input processing log will be generated.
During processing, no transaction is started until the previous transaction has been written to the database.
CALL TRANSACTION METHOD :
This is another method to transfer data from the legacy system.
Features:
Synchronous processing. The system performs a database commit immediately before and after the CALL TRANSACTION USING statement.
Updating the database can be either synchronous or asynchronous. The program specifies the update type.
Transfer data for a single transaction.
Transfers data for a sequence of dialog screens.
No batch input processing log is generated.
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.sap-img.com/abap/learning-bdc-
http://www.sapbrain.com/TUTORIALS/TECHNICAL/BDC_tutorial.html
02-01-2008 4:38 AM
02-01-2008 4:38 AM
02-01-2008 4:39 AM
Hi
Hope it will also help you.
Pls reward if help.
BDC = Batch Data Commands
Comparable to macros in, e. g., Word. You enter data in a SAP standard transaction while recording it. This recording can be turned into an ABAP program or function module. You can modify these programs to change, e. g., the static data that you enteren in the recording to dynamic data that is read from a file or something like that.
Works best with "simple" transactions, espacially the newer "Enjoy" transactions aren't easy to implement.
Not recommended by SAP any more, although it can be simple and effective to use sometimes.
Works with single or multiple transactions (hence "Batch").
BAPI = Business Application Programming Interface.
From an ABAP programmer's perspective a BAPI is simply a certain type of RFC-enabled function module that obeys certain rules such as: No explicit COMMIT WORK in the FM, return a BAPIRETxxx message, no user interaction, etc. See the documentation for details.
Recommended and supported way for management of many SAP business objects. Many different objects and methods available, although not everything a programmer needs.
Synchronous function modules, generally only one business object per call.
FEW MORE.
Difference between BAPI and BDC:BAPI is a higher end usage for tranfering the data from SAP to non-SAP and vice-versa. for ex: if we are using VB application,where in that we want to connect to SAP and retireve the data,and then change and update the data in SAP for that purpose we can use that.Apart from that, we can also use it for Uploading/Downloading the data from SAP to Non-SAP like BDC, provided we have an existing BAPI for that.BAPI function modules will also do all the checks required for data integrity like Transactions for BDC.There is one more advantage using BAPI instead of BDC. When we go for upgradation, there might be pozzibility to change the screen elements for transactions depending on the requirement. In that case,our BDC pgm may or may not work (depending on the screen changes they have made). Unless and until we prepare new BDC we cant use the old BDC pgm. But in BAPI, SAP promises that they are going to keep the old BAPI and for new functionality they will provide an upgraded BAPI. Until we write a new BAPI pgm, we can use the exisitng BAPI pgm.-Viplove
Reward if it helps you.
02-01-2008 4:39 AM
well friend BDC is method taht ios not object oriented but BAPI is object oriented and BDC is conventional but BAPI is new way to attain same thing as BDC.
HERE ARE BENEFITS OF BAPI OVER BDC
BAPICan be used in diverse languages / Development Environments
(ABAP, Visual Basic, Java, C++, etc.)
Can be called from diverse platforms (COM, CORBA, Unix)Reduced development cost
Reduced maintenance cost
Best-of-both-worlds approach
Rich functionality of the R/3 systemUser-specific front-ends
SO tou can say that bapi is
A Business Application Programming Interface is a precisely defined interface providing access process and data in Business Applications Systems Such as SAP R/3
plz reward if useful
keep rockin
vivek
02-01-2008 4:42 AM
Hi Ric
short and simple answer:
BAPI can be called/ triggered externally from any other system, non SAP as well..
BDC cannot... its local to SAP.
02-01-2008 5:00 AM
Hi,
BAPI
BAPI Programming guide: -
http://help.sap.com/saphelp_nw04/helpdata/en/e0/9eb2370f9cbe68e10000009b38f8cf/frameset.htm
BAPI user guide: -
http://help.sap.com/saphelp_46c/helpdata/en/7e/5e115e4a1611d1894c0000e829fbbd/frameset.htm
BAPI STEP BY STEP PROCEDURE: -
http://www.sap-img.com/abap/bapi-step-by-step-guidance.htm
Example:-
http://www.erpgenie.com/abap/bapi/example.htm
PDF download: -
list of all bapis
http://www.planetsap.com/LIST_ALL_BAPIs.htm
for BAPI's
http://www.sappoint.com/abap/bapiintro.pdf
http://www.sappoint.com/abap/bapiprg.pdf
http://www.sappoint.com/abap/bapiactx.pdf
http://www.sappoint.com/abap/bapilst.pdf
http://www.sappoint.com/abap/bapiexer.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf
http://www.planetsap.com/Bapi_main_page.htm
http://www.topxml.com/sap/sap_idoc_xml.asp
http://www.sapdevelopment.co.uk/
http://www.sapdevelopment.co.uk/java/jco/bapi_jco.pdf
Also refer to the following links..
http://www.sap-img.com/bapi.htm
http://www.sap-img.com/abap/bapi-conventions.htm
http://www.planetsap.com/Bapi_main_page.htm
http://www.sapgenie.com/abap/bapi/index.htm
Checkout !!
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
http://techrepublic.com.com/5100-6329-1051160.html#
BDC
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.
General Flow of a BDC Program
General flow of a BDC program is like this....
1) First create recording for the T code which you want to make BDC for... Use T code SHDB for recording.
2 ) Now save that recording and create pogram from that recording using Create Program button. give the BDC driver program name and create.
3 ) Now the general logic of BDC program goes like this....
- Upload Flat file into and internal table using function module "UPLOAD"
- OPEN BDC GROUP.
- Now loop at that internal table which contains the data from flat file.
- move data from internal table to fields of BDCDATA using automatically gebnerated code from BDC.
- CALL TRANSACTION <T CODE> using BDCDATA...
- CLOSE BDC GROUP
A sample program for the same is attatched here for your referance... just go through it..
report ztej_test_new no standard page heading line-size 255.
data bdcdata like bdcdata occurs 0 with header line.
tables: zipcldesigcat.
data : begin of itab occurs 0,
mandt like zipcldesigcat-mandt,
zdesigncd like zipcldesigcat-zdesigncd,
zdesignation like zipcldesigcat-zdesignation,
zdesigcat like zipcldesigcat-zdesigcat,
end of itab.
*INCLUDE bdcrecx1.
start-of-selection.
perform upload.
perform open.
loop at itab.
perform move.
call transaction 'SE16' using bdcdata mode 'E'.
refresh bdcdata.
endloop.
perform close.
&----
*& Form UPLOAD
&----
text
-
--> p1 text
<-- p2 text
-
form upload.
call function 'UPLOAD'
exporting
CODEPAGE = ''
filename = ''
filetype = 'DAT'
item = 'Your File'
FILEMASK_MASK = ' '
FILEMASK_TEXT = ' '
FILETYPE_NO_CHANGE = ' '
FILEMASK_ALL = ' '
FILETYPE_NO_SHOW = ' '
LINE_EXIT = ' '
USER_FORM = ' '
USER_PROG = ' '
SILENT = 'S'
IMPORTING
FILESIZE =
CANCEL =
ACT_FILENAME =
ACT_FILETYPE =
tables
data_tab = itab
exceptions
conversion_error = 1
invalid_table_width = 2
invalid_type = 3
no_batch = 4
unknown_error = 5
gui_refuse_filetransfer = 6
others = 7
.
if sy-subrc 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
*CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = 'C:TEST.XLS'
i_begin_col = 1
i_begin_row = 1
i_end_col = 3
i_end_row = 5
tables
intern = ITAB
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 2
OTHERS = 3
.
*IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.
*
endform. " UPLOAD
-
Start new screen *
-
form bdc_dynpro using program dynpro.
clear bdcdata.
bdcdata-program = program.
bdcdata-dynpro = dynpro.
bdcdata-dynbegin = 'X'.
append bdcdata.
endform.
-
Insert field *
-
form bdc_field using fnam fval.
if fval space.
clear bdcdata.
bdcdata-fnam = fnam.
bdcdata-fval = fval.
append bdcdata.
endif.
endform.
&----
*& Form OPEN
&----
text
-
--> p1 text
<-- p2 text
-
form open.
call function 'BDC_OPEN_GROUP'
exporting
client = sy-mandt
DEST = FILLER8
group = 'ZDESIGCAT_R'
HOLDDATE = FILLER8
KEEP = FILLER1
user = sy-uname
RECORD = FILLER1
IMPORTING
QID =
exceptions
client_invalid = 1
destination_invalid = 2
group_invalid = 3
group_is_locked = 4
holddate_invalid = 5
internal_error = 6
queue_error = 7
running = 8
system_lock_error = 9
user_invalid = 10
others = 11
.
if sy-subrc 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
endform. " OPEN
&----
*& Form MOVE
&----
text
-
--> p1 text
<-- p2 text
-
form move.
perform bdc_dynpro using 'SAPLSETB' '0230'.
perform bdc_field using 'BDC_CURSOR'
'DATABROWSE-TABLENAME'.
perform bdc_field using 'BDC_OKCODE'
'=ANLE'.
perform bdc_field using 'DATABROWSE-TABLENAME'
'ZIPCLDESIGCAT'.
perform bdc_dynpro using 'SAPLZIPCLDESIGCAT' '0001'.
perform bdc_field using 'BDC_CURSOR'
'VIM_POSITION_INFO'.
perform bdc_field using 'BDC_OKCODE'
'=NEWL'.
perform bdc_dynpro using 'SAPLZIPCLDESIGCAT' '0001'.
perform bdc_field using 'BDC_CURSOR'
'ZIPCLDESIGCAT-ZDESIGCAT(01)'.
perform bdc_field using 'BDC_OKCODE'
'=SAVE'.
perform bdc_field using 'ZIPCLDESIGCAT-ZDESIGNCD(01)'
'2101'.
perform bdc_field using 'ZIPCLDESIGCAT-ZDESIGNATION(01)'
'new'.
perform bdc_field using 'ZIPCLDESIGCAT-ZDESIGCAT(01)'
'n'.
perform bdc_dynpro using 'SAPLZIPCLDESIGCAT' '0001'.
perform bdc_field using 'BDC_CURSOR'
'ZIPCLDESIGCAT-ZDESIGNCD(02)'.
perform bdc_field using 'BDC_OKCODE'
'=ENDE'.
perform bdc_dynpro using 'SAPLSETB' '0230'.
perform bdc_field using 'BDC_OKCODE'
'/EEND'.
perform bdc_field using 'BDC_CURSOR'
'DATABROWSE-TABLENAME'.
endform. " MOVE
&----
*& Form CLOSE
&----
text
-
--> p1 text
<-- p2 text
-
form close.
call function 'BDC_CLOSE_GROUP'
exceptions
not_open = 1
queue_error = 2
others = 3.
if sy-subrc 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
endform. " CLOSE
Also do refer
http://aspalliance.com/1130_Batch_Data_Communication_BDC_in_SAP_R3
http://www.sapdevelopment.co.uk/programs/programssap.htm
http://www.sap-img.com/abap/learning-bdc-programming.htm
http://www.sap-img.com/bdc.htm
Regards,
Chandru