Forums.Sureshkumar.net : A Perfect Place to Share Knowledge         Blogs     Games    Magazines    

"Sharing knowledge does not lessen your store, often it gets you more. Sharing plays a key role in relationships and bonding, happens in small steps and is assisted through community membership."

Go Back   SURESHKUMAR.NET FORUMS > TECHNICAL DISCUSSIONS > SAP ABAP, SAP MM, SAP DD, SAP BASICS & OTHERS
Register FAQ Members List Calendar Games Blogs Search Today's Posts Mark Forums Read

   

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Old 28-04-06, 10:24 AM   #1 (permalink)
Super Moderator
 
Spoorthi's Avatar
 
Join Date: Mar 2006
Posts: 4,803
Thanks: 9
Thanked 630 Times in 488 Posts
Thanks: 9
Thanked 630 Times in 488 Posts
Blog Entries: 2
Rep Power: 101 Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute







BDC (Batch Data Communication)











The SAP System offers three methods for transferring data into the System from other SAP Systems and non-SAP Systems.





These methods are collectively called "batch input" or "batch data communication."








Uses of Batch Input








• Transferring data from another system when you install your SAP System





• Regularly transferring data that is captured by a non-SAP system in your company into the SAP System.





• You can also use batch input to transfer data between two R/3 Systems.














Basic Technique





All batch input methods work by carrying out normal SAP transactions, just as any user would.





Batch-input executes the transactions automatically and
is therefore suitable for entering large amounts of data that are
already available .








The batch input technique offers these advantages for transferring data:





No manual interaction is required during data transfer.





• Batch input ensures data integrity















Spoorthi is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 28-04-06, 10:25 AM   #2 (permalink)
Super Moderator
 
Spoorthi's Avatar
 
Join Date: Mar 2006
Posts: 4,803
Thanks: 9
Thanked 630 Times in 488 Posts
Thanks: 9
Thanked 630 Times in 488 Posts
Blog Entries: 2
Rep Power: 101 Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute





Batch input processing methods











• Method 1 - CLASSICAL BATCH INPUT





• Method 2 - CALL TRANSACTION





• Method 3 - CALL DIALOG
















Method 1 - Classical batch input.



In this method ABAP/4 program reads the external data that is to
be entered in the SAP System and stores the data in a "batch-input
session."





When the program has finished generating the session, you can run the session to execute the SAP transactions in it.





This method uses the function modules BDC_OPEN, BDC_INSERT, and BDC_CLOSE to generate sessions.














Method 2 - CALL TRANSACTION USING





In this method, your program uses the ABAP/4 CALL TRANSACTION USING statement to run an SAP transaction.





Batch-input data is not deposited in a session for later processing. Instead, the entire batch-input process takes place inline in your program.














Method 3 - CALL DIALOG





There is a third batch-input method using the ABAP/4 CALL DIALOG statement.





SAP recommends against using this method unless necessary. The CALL DIALOG method is now outdated and is more complex and less comfortable to use than the other techniques.















Spoorthi is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 28-04-06, 10:34 AM   #3 (permalink)
Super Moderator
 
Spoorthi's Avatar
 
Join Date: Mar 2006
Posts: 4,803
Thanks: 9
Thanked 630 Times in 488 Posts
Thanks: 9
Thanked 630 Times in 488 Posts
Blog Entries: 2
Rep Power: 101 Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute





BDCDATA





All three batch-input methods use a common data structure for holding the instructions and data for SAP transactions. This structure is defined as structure BDCDATA in the ABAP/4 Dictionary.



FIELD NAME
TYPE
LENGTH DESCRIPTION




PROGRAM
CHAR
8
BDC MODULE POOL



DYNPRO
NUMC
4
BDC DYNPRO NUMBER



DYNBEGIN CHAR
1
BDC STARTING A DYNPRO



FNAM
CHAR 35
BDC FIELD NAME



FVAL
CHAR 80
BDC FIELD VALUE












Spoorthi is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 28-04-06, 10:35 AM   #4 (permalink)
Super Moderator
 
Spoorthi's Avatar
 
Join Date: Mar 2006
Posts: 4,803
Thanks: 9
Thanked 630 Times in 488 Posts
Thanks: 9
Thanked 630 Times in 488 Posts
Blog Entries: 2
Rep Power: 101 Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute





Filling the BDCDATA Structure



The first record for each screen must contain information that
identifies the screen: program name, screen name and a start-of-screen
indicator. You record this information in the PROGRAM, DYNPRO, and DYNBEGIN fields of the BDCDATA structure.








Example





BDCDATA-PROGRAM = 'sapms38m'.


BDCDATA-DYNPRO = '0100'.


BDCDATA-DYNBEGIN = 'x'.


APPEND BDCDATA.
















Entering a Value in a Field








After the dynpro-start record, you must add a record for each field that is to receive a value. You need fill only the FNAM and FVAL fields.











Example





BDCDATA-FNAM = 'RS38M-FUNC_EDIT'.


BDCDATA-FVAL = 'x'.


APPEND BDCDATA.
















Executing a function





You can execute a function in a transaction by entering the functioncode or function key number in the command field of an SAP session. You use the FNAM and FVAL fields to enter this information, just as you would for normal screen fields.
The command field is identified by a special name in batch input, BDC_OKCODE. This name is constant and always identifies the command field.


For function key:





BDCDATA-FNAM = 'BDC_OKCODE'.


BDCDATA-FVAL = '/11'.





For function code:





BDCDATA-FNAM = 'BDC_OKCODE'.


BDCDATA-FVAL = '=UPDA'.










Spoorthi is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 28-04-06, 10:37 AM   #5 (permalink)
Super Moderator
 
Spoorthi's Avatar
 
Join Date: Mar 2006
Posts: 4,803
Thanks: 9
Thanked 630 Times in 488 Posts
Thanks: 9
Thanked 630 Times in 488 Posts
Blog Entries: 2
Rep Power: 101 Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute





Entering Values in Loop Fields








Some screen fields need multiple
values, one on each line. To provide input to one of these loop fields,
you must use an explicit line index :



BDCDATA-FNAM = 'fieldx(5)'.





BDCDATA-FVAL = 'value'.



















Positioning the cursor








To position the cursor on a particular field, you must use the special cursor field:





BDCDATA-FNAM = 'BDC_CURSOR'.





BDCDATA-FVAL = 'fieldx'.
















Creating a Session with BDC_OPEN_GROUP





BDC_OPEN_GROUP function module creates a new session. Once you have created a session, then you can insert batch input data into it with BDC_INSERT.





You cannot re-open a session that already exists and has been closed.





A batch input program may have only one session open at a time.

















Using BDC_INSERT





This function module adds a transaction to a batch input session. You specify the transaction that is to be started in the call to BDC_INSERT.





You must provide a BDCDATA structure that contains all of the data required to process the transaction completely.












Spoorthi is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 28-04-06, 10:39 AM   #6 (permalink)
Super Moderator
 
Spoorthi's Avatar
 
Join Date: Mar 2006
Posts: 4,803
Thanks: 9
Thanked 630 Times in 488 Posts
Thanks: 9
Thanked 630 Times in 488 Posts
Blog Entries: 2
Rep Power: 101 Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute





BDC_CLOSE_GROUP





Use the BDC_CLOSE_GROUP function module to close a session after you have inserted all of your batch input data into it. Once a session is closed, it can be processed.





You must close a session before you can open another session from the same program.












CALL TRANSACTION USING for Batch Input









Processing batch input data with CALL TRANSACTION USING is the faster of the two recommended batch input methods. In this method, batch input data is processed inline in your batch input program.





Syntax:








CALL TRANSACTION 'SE38' USING BDCDATA


MODE 'A'


UPDATE 'S'.













Spoorthi is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT +6.5. The time now is 05:48 AM.




Get Short Listed Fast !! Upload Your CV here & Apply New Jobs Everyday.

Search Engine Optimization by vBSEO 3.1.0