This action might not be possible to undo. Are you sure you want to continue?
SAP SM35 SAP SM35 BDC RECORDING 1. Go to SAP Tcode SM35. 2. Press “RECORDING” 3. Enter the recording session name [always start with Z] use “CREATE” function. 4. Enter Tcode to be used in the session. Press “ENTERS”. 5. Enter the required data in the corresponding screen in SAP & make change if necessary. Press “SAVE”. [During this whole process, the BDC records the movements of the cursor and the data change made in these field, so do not repeat any cursor movements which can re-record the movement and go back to a field where the data has been changed or entered] 6. In Batch Input will appear Recording screen listing the screens, data fields, etc recorded. 7. Press “GET TRANSACTION”. SAVE the recording. 8. Go back [F3] to the previous screen. Press “OVERVIEW” “Recording: Overview” will appear. Choose the "recording done" Press "GENERATE PROGRAM". A popup appears and enter the Program name [start the name with Z always]
Status . Press "SOURCE CODE" and the code generated by the program is displayed. Change the data back to the original values as in the original record.Press “ENTERS". 10. Choose the session and process in the background. Analyze the transaction(s) that you will use to process your batchinput data. SAP BDC Procedure of writing BDC PROCEDURE OF WRITING A BDC: 1. (see SM35 BDC overview screenshot) Go back to the record to see the changes made by the current BDC session. Check the program for any syntax errors.T [Test program] Application . 11. Press “EXECUTES" [F8]. . 9. To check the program created. You may have already done this when you wrote your data transfer program.1[Online program].*[Not application-specific]. SAVE the attributes of the program & create the object as a LOCAL OBJECT.Program > Execute. Enter the title of the program Enter the other attributes: Type . Enter the name of the session & the authorization group for the session. Use the menu path . Use T/CodeSM35 to go back to the "BDC session overview".
if necessary. Analyze the data that is to be transferred to the SAP System to .CALL TRANSACTION USING method It offers faster processing if you need it to get your batch input done in the time slot that is available for it. BDCDATA. perform data conversions or error-checking . Decide on the batch-input method that you wish to use. .generate a batch input session for classical batch input. . often from a sequential file that has been exported from another system or prepared by a data transfer program .2.read data in. It offers. less support for error recovery and management of batch input. Write the batch input program. Your program will need to do the following: . however. (see BDC Method) 3.prepare the data for batch input processing by storing the data in the batch input data structure. .BATCH INPUT SESSION (Classical batch input) This is a more comfortable method Restart capability and detailed logging are supported by the batch input management transaction for batch input sessions. or process the data directly with CALL TRANSACTION US (see BDC Method) SAP BDC PROCEDURE OF TRANSFER BDC USING BATCH INPUT PROCEDURE OF TRANSFER DATA USING BAT CH INPUT 1.
.Reading and interpreting the file is much easier if you write it in ASCII or EBCDIC (character) format rather than. Character format is required by the pre-defined SAP batch input programs. for example. . writing numeric data in hexadecimal format. Code your data transfer program.If you're writing your own batch input procedure.The file must use the logical format required by the batchinput program that will import the file (step 6). . .Using the SAP data structure that you generate in step 2. Export the data that is to be transferred to a sequential file. Determine how the data to be transferred must be mapped to the SAP structure. . 5.determine how your existing data should be mapped to the SAP data structure. The standard batch input programs generally require that you use a special predefined data structure. Generate SAP data structures for incorporation into your data export program.If you are using one of Sap’s standard batch input programs. then use of this function is required. You can write the program in ABAP or as an external program. . then you will need to determine the data structure on your own.Determine whether any data type or data length conversions are required. 4. . 3. 2. . You'll need to analyze the SAP transactions to find the names of the fields that the transaction requires. If necessary.Determine structure of the data that is to be transferred into the system. code the ABAP batch input program that will read in the data to be transferred from your file. Requirements: .Use the data structure generation function of the ABAP dictionary to generate data structures for SAP tables in any of several programming languages.
Use the batch-input management function to process erroneous transactions interactively. or . Correct and re-process erroneous data. But you may still need to write a BDC to meet the requirements since the programs given by SAP may not meet them. SAP has provided special data structure for batch data input for most of the objects. Using these structures. .By processing data directly in your batch-input program with the ABAP statement CALL TRANSACTION USING. If you are using CALL TRANSACTION USING.Generating a batch input session. (see BDC Method) 7. The default is. then you will need to analyze the processing messages collected by your program.SAP supplies ready-to-run batch-input programs for most of the SAP applications. 6. one need not know what tables are required for BDC. You should therefore initialize all of the fields in your batch input data structure with the NODATA character. Process the data and add it to the SAP System. SAP has also provided with pre-defined batch input programs for data transfer. If the BDC program does not find a value for a field then it sets the value of that field to. 8. You can do this either by: . Method: Analyze the batch input-processing log. Check that all data has been successfully processed. You can correct data during this interactive processing.
SAP BDC BDC CONCEPT Programming Interface provides two function modules for scheduling and management of background jobs : 1 BACKGROUND PROCESSING JOBVARIANT SCHEDULE The function is for scheduling a job for execution.IV PROCEDURE OF WRITING A BDC -. There are two ways to schedule the jobs: A. -. It requires ABAP program & need a variant and an start time to execute the program.II PROCEDURE TO WRITE A DATA TRANSFER PROGRAM --III PROCEDURE OF TRANSFER DATA USING BATCH INPUT -.I METHOD OF DOING BDC -. job start time options etc. FULL CONTROL Use function modules :JOB OPEN. JOB SUBMIT & JOB CLOSE This method gives complete control over the job scheduling options such as job printing. spool output. 2 BACKGROUND PROCESSING JOBVARIANT_OVERVIEW The function is to manage the jobs To display job logs.VI BDCDATA STRUCTURE & SAMPLE . EXPRESS METHOD Use function module : BP JOBVARIANT SCHEDULE B.V PROCEDURE OF RECORDING BDC -. delete inactive jobs etc.
It uses the normal Transaction codes to transfer the data. So you must close it after transferring data. BDC program will read the data from a sequential dataset file is stored in a batch-input session. 1. BDC INSERT and BDC CLOSE to generate the sessions . and detailed logging. To run the transactions in the session.SAP BDC METHOD OF DOING BDC METHOD OF DOING BATCH DATA COMMUNICATION BDC is used to transfer data from SAP to SAP system or from a non-SAP system to SAP system. CLASSICAL METHOD (CREATING BATCH INPUT SESSION) This is the standard method to do a BDC. It offers management of sessions. You may also process Batch input session using background processing system. You can start and monitor the session from System => Services => Batch Input(see screenshot procedure) The batch-input program must not open a session until it has closed the preceding session. support for playing back and correcting sessions that contain errors. This method is used to transfer large amount data that is available in electronic form. you need to execute the session. A session is a collection of transaction data for one or more transactions. This method uses the function module BDC OPEN.
CALL TRANSACTION : Run BDC using CALL TRANSACTION does not create a session. This method offers faster processing of data than batch input sessions. and logging facilities offered for batch input sessions that are not available for CALL TRANSACTION. The most important aspects of CALL TRANSACTION interface are: . Your program prepares the data and calls the desired transaction for immediate processing. The playback.Transfers data for a single transaction .Synchronous and asynchronous database updating both possible The program specifies which kind of updating is desired. It is recommended that if you're having problems getting data entered into your SAP System quickly enough. Separate LUW for the transaction The system performs a database commit immediately before and after the CALL TRANSACTION USING statement. Both Batch Input Session & Call Transaction methods above need a .2. interactive correction.Synchronous processing .
common data structure for storing the instructions and data for SAP transactions. convert the data types to type C. The data transfer program should convert the data that has to transfer into the SAP system as required by the SAP data structure or the transactions using it. A conversion of the data types could be necessary at times. This structure is used in all the three methods mentioned above .No batch input processing log is generated The data and the necessary action to be performed in order to enter the data into the SAP is stored in Batch Input data structure (BDCDATA). The most important aspects of the CALL DIALOG interface are: Synchronous processing . In this method.No separate database update for the dialog A database update occurs only when the calling program executes a commit operation. The BDC program reads the data from this file during the upload of the data into the SAP system 3. your program prepares data for a sequence of dialog screens. and calls a dialog module for immediate processing.Transfers data for a sequence of dialog screens . And this data transfer program should be able to export the data in SAP format to a sequential file. CALL DIALOG : This method is not recommended to be used to do a BDC if you can enter data by way of sessions or CALL TRANSACTION USING.Shares LUW with calling program . . In case of data type mismatch. To transfer data from an SAP system to another SAP system you may use RFC or CPI-C.
The record specifies the program and screen identifiers. You first create a BDCDATA structure. screen name and a start-of-screen indicator. With BDCDATA-DYNBEGIN. Build the structure line by line using MOVE and APPEND statements. reset the header line of the internal table with the CLEAR statement. You record this information in the PROGRAM. DYNPRO. If your BDC involves more than one transaction. and DYNBEGIN fields of the BDCDATA structure. This sample BDCDATA starts a screen. the record shows that batch input data for a new screen is starting: . Then fill the structures with data using either create session method or call transaction method. The first record for each screen must contain information that identifies the screen: program name. Before building each line.SAP BDC BDCDATA STRUCTURE & SAMPLE The diagram below shows how to declare the structure in your ABAP program and the fields contained in the structure This BDCDATA structure can contain data for one transaction at a time. And then create it again for the next transaction. then this process will be in a loop.
which is Fl 1.BDCDATA-PROGRAM ='sapms38m'. You need fill only the FNAM and FVAL fields. BDCDATA-DYNBEGIN ='x'. you must add a record for each field that is to receive a value. A function code must be prefixed with the = character. APPEND BDCDATA. APPEND BDCDATA. All functions. The line index (in the example: (5). BDCDATA-F VAL ='=UPDA'. BDC OKCODE. are identified by function codes. . but uses the function code instead of the function key assignment. BDCDATA-DYNPRO ='0100'. A function key number must be prefixed with the / (slash) character: BDCDATA-FNAM = 'BDC OKCODE'. whether they are displayed in menus or as buttons. BDCDATA-FVAL ='value'. This sample record would execute the save function. This name is constant and always identifies the command field. This sample record also executes save. Some screen fields need multiple values. one on each line. This sample BDCDATA enters a value into a field. The command field is identified by a special name in batch input. BDCDATA-FVAL = '/11'. To provide input to one of these loop fields. It uses the function key assignment of save. BDCDATA-FVAL ='x'. BDCDATA-FNAM =`BDC_OKCODE'. line 5) indicates in which loop line on the screen values are to appear. After the dynpro-start record. FVAL specifies the value that is to be entered: BDCDATA-FNAM ='RS3SM-FUNC_EDIT'. The FNAM field identifies the target field by its table and field names. you must use an explicit line index BDCDATA-FNAM ='fieldx (5)'.
the following BDCDATA records are necessary to leave the transaction: BDCDATA-PROGRAM = `SAPMSEDT'. you must use the special cursor field: BDCDATA-FNAM ='BDC_CURSOR'. BDCDATA-FVAL = `/15'. BDCDATA-FVAL ='fieldx'. After finishing the BDC. BDCDATA-FNAM = 'BDC OKCODE'. BDCDATA-FVAL ='feldy(5)'. 4. BDCDATA-FNAM = `BDC OKCODE'. 5. you need only include e required tables in your program with the TABLES statement. Write the sequential file that is typically required for making the data available to the batch input program in the SAP System. To position the cursor on a loop field. for example. "Leave text input field BDCDATA-DYNPRO = `2310'. Initialize the SAP data structure. . "Quit function key SAP BDC BDC CONCEPT PROCEDURE TO WRITE A DATA TRANSFER PROGRAM : 1. from the text input screen in the ABAP editor. "Leave ABAP editor BDCDATA-DYNPRO = `0100'. . Generate the SAP data structure If the program is written in ABAP. performing any conversions and errorchecking that are required.BDCDATA-DYNBEGIN = `X'.To position the cursor on a particular field. to return to the SAP Main Menu. you must use again an index:BDCDATA-FNAM ='BDC_CURSOR'. BDCDATA-FVAL = `/3' "Back function key BDCDATA-PROGRAM = `SAPMS38M'. 2. 3. BDCDATA-DYNBEGIN = `X'. Fill the structure with data. Analyze the structure of the existing data and specify the conversions that are required to fill the SAP data structures.
To gather the transaction code that is to used .Field names. There are two ways by which you can achieve the above. & Program name 2. program names for the screen.List of the required fields for input . Go to System => Status Run the transaction and note the information of Screen No.To note the screen numbers involved & . Place the cursor in the field and press Fl for Technical Information of the fields. 1. types and lengths . .THE PURPOSE OF ANALYZING DATA IS : .
This action might not be possible to undo. Are you sure you want to continue?
We've moved you to where you read on your other device.
Get the full title to continue reading from where you left off, or restart the preview.