Escolar Documentos
Profissional Documentos
Cultura Documentos
What is BDC? BDC stands for Batch Data Communication BDC is a method of data entry BDC simulates a user manually entering data through SAP, using the same screens and process that a user would; BDC does this entering of data as quickly as the system can handle it Examples of when BDC can be used Payroll Area Changes (infotype 1) o This could happen if a company modifies its structure and combines two payroll areas (P1 and P2) into just P1. In this case, the BDC would search through personnel numbers, look for any infotype 1 records whose payroll area is P2, and change this payroll area to P1. Pay Rate Increases (infotype 8) o This could happen if a company wants to give a pay raise to all employees in a certain group. In this case, the BDC would search through personnel numbers, look for personnel numbers meeting the proper criteria, and modify their pay rate information in infotype 8. Basically any situation like the two above that are highly repetitive and whose changes are fairly uniform Why use BDC instead of a direct table update? Data Security o SAP ensures that the user running the BDC has the proper authorizations to modify this data; a direct table update does not have this check Data Integrity o SAP ensures the data being entered makes sense (for example, the beginning date of an infotype record (BEGDA) should always be before the ending date (ENDDA) Record History o The most recent change can be tracked. Direct table update will bypass this feature that is on infotypes and tables. Two methods of using BDC Writing the code yourself o This requires a good understanding of what is going on in the BDC o Advantage is that it is usually much cleaner and efficient o Disadvantage is that it takes longer to develop o User unable to identify specific errors in data o Does the update directly from the program, does not create a session that must be run from transaction SM35
Using the BDC recorder to generate the code for you (transaction SHDB) o Advantage is that it can be developed very quickly but usually requires a few minor modifications o Disadvantage is that extraneous, unneeded code can sometimes be generated o Creates a session that must be run from SM35 before the update takes place; does NOT update directly from the program
Important elements to BDC: Program name Screen number Table name Field name These can all be found by going to the desired transaction and screen (PA30, infotype 1, for example), clicking on the desired field, pressing F1, and selecting technical info. These four elements are key in instructing the BDC as to what to update. The BDC is instructed to update a certain field in a certain table, and to do this through a certain screen of a certain transaction (program name). For example, you could tell the BDC to update P0001BEGDA (table name and field name) through screen 2010 (screen number) of program name MP000100 (transaction PA30 for infotype 1).
BDC Exercise
Write a BDC program that will update infotype 16 (contract elements) through transaction PA30 Fill the field initial entry date with the current date Write the code for this program first without using the BDC recorder (transaction SHDB) Write the code for this program next by using the BDC recorder (transaction SHDB)