Concept of BDC

i wanna know the concept of BDC with simple examples... also CA

BATCH DATA COMMUNICATION
About Data Transfer In R/3 System
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
Advantages offered by BATCH INPUT method:
1. Can process large data volumes in batch.
2. Can be planned and submitted in the background.
3. No manual interaction is required when data is transferred.
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.
Two main steps are required:
• To build an internal table containing every screen and every field to be filled in during the execution of an SAP transaction.
• To pass the table to SAP for processing.
Prerequisite for Data Transfer Program
Writing a Data Transfer Program involves following prerequisites:
Analyzing data from local file
Analyzing transaction
Analyzing transaction involves following steps:
• The transaction code, if you do not already know it.
• Which fields require input i.e., mandatory.
• Which fields can you allow to default to standard values.
• 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.
To analyze a transaction::
• Start the transaction by menu or by entering the transaction code in the command box.
(You can determine the transaction name by choosing System – Status.)
• Step through the transaction, entering the data will be required for processing your batch input data.
• On each screen, note the program name and screen (dynpro) number.
(dynpro = dyn + pro. Dyn = screen, pro = number)
• Display these by choosing System – Status. The relevant fields are Program (dynpro) and Dynpro number. If pop-up windows occur during execution, you can get the program name and screen number by pressing F1 on any field or button on the screen.
The technical info pop-up shows not only the field information but also the program and screen.
• For each field, check box, and radio button on each screen, press F1 (help) and then choose Technical Info.
Note the following information:
- The field name for batch input, which you’ll find in its own box.
- The length and data type of the field. You can display this information by double clicking on the Data Element field.
• Find out the identification code for each function (button or menu) that you must execute to process the batch-input data (or to go to new screen).
Place the cursor on the button or menu entry while holding down the left mouse button. Then press F1.
In the pop-up window that follows, choose Technical info and note the code that is shown in the Function field.
You can also run any function that is assigned to a function key by way of the function key number. To display the list of available function keys, click on the right mouse button. Note the key number that is assigned to the functions you want to run.
Once you have program name, screen number, field name (screen field name), you can start writing.
DATA TRANSFER program.
Declaring internal table
First Integral Table similar to structure like local file.
Declaring internal table like BDCDATA
The data from internal table is not transferred directly to database table, it has to go through transaction. You need to pass data to particular screen and to particular screen-field. Data is passed to transaction in particular format, hence there is a need for batch input structure.
The batch input structure stores the data that is to be entered into SAP system and the actions that are necessary to process the data. The batch input structure is used by all of the batch input methods. You can use the same structure for all types of batch input, regardless of whether you are creating a session in the batch input queue or using CALL TRANSACTION.
This structure is BDCDATA, which can contain the batch input data for only a single run of a transaction. The typical processing loop in a program is as follows:
• Create a BDCDATA structure
• Write the structure out to a session or process it with CALL TRANSACTION USING; and then
• Create a BDCDATA structure for the next transaction that is to be processed.
Within a BDCDATA structure, organize the data of screens in a transaction. Each screen that is processed in the course of a transaction must be identified with a BDCDATA record. This record uses the Program, Dynpro, and Dynbegin fields of the structure.
The screen identifier record is followed by a separate BDCDATA record for each value, to be entered into a field. These records use the FNAM and FVAL fields of the BDCDATA structure. Values to be entered in a field can be any of the following:
• Data that is entered into screen fields.
• Function codes that are entered into the command field. Such function codes execute functions in a transaction, such as Save or Enter.
The BDCDATA structure contains the following fields:
• PROGRAM: Name of module pool program associated with the screen. Set this field only for the first record for the screen.
• DYNPRO: Screen Number. Set this field only in the first record for the screen.
• DYNBEGIN: Indicates the first record for the screen. Set this field to X, only for the first record for the screen. (Reset to ‘ ‘ (blank) for all other records.)
• FNAM: Field Name. The FNAM field is not case-sensitive.
• FVAL: Value for the field named in FNAM. The FVAL field is case-sensitive. Values assigned to this field are always padded on the right, if they are less than 132 characters. Values must be in character format.
Transferring data from local file to internal table
Data is uploaded to internal table by UPLOAD of WS_UPLOAD function.
Population of BDCDATA
For each record of internal table, you need to populate Internal table, which is similar to BDCDATA structure.
All these five initial steps are necessary for any type of BDC interface.
DATA TRANSFER program can call SESSION METHOD or CALL TRANSACTION. The initial steps for both the methods are same.
First step for both the methods is to upload the data to internal table. From Internal Table, the data is transferred to database table by two ways i.e., Session method and Call transaction.
SESSION METHOD
About Session method
In this method you transfer data from internal table to database table through sessions.
In this method, an ABAP/4 program reads the external data that is to be entered in the SAP System and stores the data in session. A session stores the actions that are required to enter your data using normal SAP transaction i.e., Data is transferred to session which in turn transfers data to database table.
Session is intermediate step between internal table and database table. Data along with its action is stored in session i.e., data for screen fields, to which screen it is passed, the program name behind it, and how the next screen is processed.
When the program has finished generating the session, you can run the session to execute the SAP transactions in it. You can either explicitly start and monitor a session or have the session run in the background processing system.
Unless session is processed, the data is not transferred to database table.
BDC_OPEN_GROUP
You create the session through program by BDC_OPEN_GROUP function.
Parameters to this function are:
• User Name: User name
• Group: Name of the session
• Lock Date: The date on which you want to process the session.
• Keep: This parameter is passed as ‘X’ when you want to retain session after
processing it or ‘ ‘ to delete it after processing.
BDC_INSERT
This function creates the session & data is transferred to Session.
Parameters to this function are:
• Tcode: Transaction Name
• Dynprotab: BDC Data
BDC_CLOSE_GROUP
This function closes the BDC Group. No Parameters.
Some additional information for session processing
When the session is generated using the KEEP option within the BDC_OPEN_GROUP, the system always keeps the sessions in the queue, whether it has been processed successfully or not.
However, if the session is processed, you have to delete it manually. When session processing is completed successfully while KEEP option was not set, it will be removed automatically from the session queue. Log is not removed for that session.
If the batch-input session is terminated with errors, then it appears in the list of INCORRECT session and it can be processed again. To correct incorrect session, you can analyze the session. The Analysis function allows to determine which screen and value has produced the error. If you find small errors in data, you can correct them interactively, otherwise you need to modify batch input program, which has generated the session or many times even the data file.
CALL TRANSACTION
About CALL TRANSACTION
A technique similar to SESSION method, while batch input is a two-step procedure, Call Transaction does both steps online, one after the other. In this method, you call a transaction from your program by
Call transaction <tcode> using <BDCTAB>
Mode <A/N/E>
Update <S/A>
Messages into <MSGTAB>.
Parameter – 1 is transaction code.
Parameter – 2 is name of BDCTAB table.
Parameter – 3 here you are specifying mode in which you execute transaction
A is all screen mode. All the screen of transaction are displayed.
N is no screen mode. No screen is displayed when you execute the transaction.
E is error screen. Only those screens are displayed wherein you have error record.
Parameter – 4 here you are specifying update type by which database table is updated.
S is for Synchronous update in which if you change data of one table then all the related Tables gets updated. And sy-subrc is returned i.e., sy-subrc is returned for once and all.
A is for Asynchronous update. When you change data of one table, the sy-subrc is returned. And then updating of other affected tables takes place. So if system fails to update other tables, still sy-subrc returned is 0 (i.e., when first table gets updated).
Parameter – 5 when you update database table, operation is either successful or unsuccessful or operation is successful with some warning. These messages are stored in internal table, which you specify along with MESSAGE statement. This internal table should be declared like BDCMSGCOLL, a structure available in ABAP/4. It contains the following fields:
1. Tcode: Transaction code
2. Dyname: Batch point module name
3. Dynumb: Batch input Dyn number
4. Msgtyp: Batch input message type (A/E/W/I/S)
5. Msgspra: Batch input Lang, id of message
6. Msgid: Message id
7. MsgvN: Message variables (N = 1 - 4)
For each entry, which is updated in database, table message is available in BDCMSGCOLL. As BDCMSGCOLL is structure, you need to declare a internal table which can contain multiple records (unlike structure).
Steps for CALL TRANSACTION method
1. Internal table for the data (structure similar to your local file)
2. BDCTAB like BDCDATA
3. UPLOAD or WS_UPLOAD function to upload the data from local file to itab. (Considering file is local file)
4. Loop at itab.
Populate BDCTAB table.
Call transaction <tcode> using <BDCTAB>
Mode <A/N/E>
Update <S/A>.
Refresh BDCTAB.
Endloop.
(To populate BDCTAB, You need to transfer each and every field)
The major differences between Session method and Call transaction are as follows:
SESSION METHOD CALL TRANSACTION
1. Data is not updated in database table unless Session is processed. Immediate updation in database table.
2. No sy-subrc is returned. Sy-subrc is returned.
3. Error log is created for error records. Errors need to be handled explicitly
4. Updation in database table is always synchronous Updation in database table can be synchronous Or Asynchronous.
Error Handling in CALL TRANSACTION
When Session Method updates the records in database table, error records are stored in the log file. In Call transaction there is no such log file available and error record is lost unless handled. Usually you need to give report of all the error records i.e., records which are not inserted or updated in the database table. This can be done by the following method:
Steps for the error handling in CALL TRANSACTION
1. Internal table for the data (structure similar to your local file)
2. BDCTAB like BDCDATA
3. Internal table BDCMSG like BDCMSGCOLL
4. Internal table similar to Ist internal table
(Third and fourth steps are for error handling)
5. UPLOAD or WS_UPLOAD function to upload the data from the local file to itab. (Considering file is local file)
6. Loop at itab.
Populate BDCTAB table.
Call transaction <tr.code> using <Bdctab>
Mode <A/N/E>
Update <S/A>
Messages <BDCMSG>.
Perform check.
Refresh BDCTAB.
Endloop.
7 Form check.
IF sy-subrc <> 0. (Call transaction returns the sy-subrc if updating is not successful).
Call function Format_message.
(This function is called to store the message given by system and to display it along with record)
Append itab2.
Display the record and message.
DIRECT INPUT
About Direct Input
In contrast to batch input, this technique does not create sessions, but stores the data directly. It does not simulate the online transaction. To enter the data into the corresponding database tables directly, the system calls a number of function modules that execute any necessary checks. In case of errors, the direct input technique provides a restart mechanism. However, to be able to activate the restart mechanism, direct input programs must be executed in the background only. Direct input checks the data thoroughly and then updates the database directly.
You can start a Direct Input program in two ways;
Start the program directly
This is the quickest way to see if the program works with your flat file. This option is possible with all direct input programs. If the program ends abnormally, you will not have any logs telling you what has or has not been posted. To minimize the chance of this happening, always use the check file option for the first run with your flat file. This allows you to detect format errors before transfer.
Starting the program via the DI administration transaction
This transaction restarts the processing, if the data transfer program aborts. Since DI document are immediately posted into the SAP D/B, the restart option prevents the duplicate document posting that occurs during a program restart (i.e., without adjusting your flat file).
Direct input is usually done for standard data like material master, FI accounting document, SD sales order and Classification for which SAP has provided standard programs.
First time you work with the Direct Input administration program, you will need to do some preparation before you can transfer data:
- Create variant
- Define job
- Start job
- Restart job
Common batch input errors
- The batch input BDCDATA structure tries to assign values to fields which do not exist in the current transaction screen.
- The screen in the BDCDATA structure does not match the right sequence, or an intermediate screen is missing.
- On exceptional occasions, the logic flow of batch input session does not exactly match that of manual online processing. Testing the sessions online can discover by this.
- The BDCDATA structure contains fields, which are longer than the actual definition.
- Authorization problems.
RECORDING A BATCH INPUT
A B recording allows you to record a R/3 transaction and generate a program that contains all screens and field information in the required BDC-DATA format.
You can either use SHDB transaction for recording or
EDIT&#61614; BATCH INPUT &#61614; SERVICES &#61614;SYSTEM
And from here click recording.
Enter name for the recording.
(Dates are optional)
Click recording.
Enter transaction code.
Enter.
Click Save button.
You finally come to a screen where, you have all the information for each screen including BDC_OKCODE.
• Click Get Transaction.
• Return to BI.
• Click overview.
• Position the cursor on the just recorded entry and click generate program.
• Enter program name.
• Click enter
The program is generated for the particular transaction.
BACKGROUND PROCESSING
Need for Background processing
When a large volume of data is involved, usually all batch inputs are done in background.
The R/3 system includes functions that allow users to work non-interactively or offline. The background processing systems handle these functions.
Non-interactively means that instead of executing the ABAP/4 programs and waiting for an answer, user can submit those programs for execution at a more convenient planned time.
There are several reasons to submit programs for background execution.
• The maximum time allowed for online execution should not exceed 300 seconds. User gets TIMEOUT error and an aborted transaction, if time for execution exceeds 300 seconds. To avoid these types of error, you can submit jobs for background processing.
• You can use the system while your program is executing.
This does not mean that interactive or online work is not useful. Both type of processing have their own purposes. Online work is the most common one entering business data, displaying information, printing small reports, managing the system and so on. Background jobs are mainly used for the following tasks; to process large amount of data, to execute periodic jobs without human intervention, to run program at a more convenient, planned time other than during normal working hours i.e., Nights or weekends.
The transaction for background processing is SM36.
Or
Define jobs&#61614; Jobs &#61614; Administration &#61614;Tools
Or
Jobs&#61614; services &#61614;System
Components of the background jobs
A job in Background processing is a series of steps that can be scheduled and step is a program for background processing.
• Job name. Define the name of assigned to the job. It identifies the job. You can specify up to 32 characters for the name.
• Job class. Indicates the type of background processing priority assigned to the job.
The job class determines the priority of a job. The background system admits three types of job classes: A B & C, which correspond to job priority.
• Job steps. Parameters to be passed for this screen are as follows:
Program name.
Variant if it is report program
Start criteria for the job: Option available for this are as follows:
Immediate - allows you to start a job immediately.
Date/Time - allows you to start a job at a specific name.
After job - you can start a job after a particular job.
After event - allows you to start a job after a particular event.
At operation mode - allows you to start a job when the system switches to a particular operation mode.
Defining Background jobs
It is two step process: Firstly, you define the job and then release it.
When users define a job and save it, they are actually scheduling the report i.e., specifying the job components, the steps, the start time.
When users schedule program for background processing, they are instructing the system to execute an ABAP/4 report or an external program in the background. Scheduled jobs are not executed until they are released. When jobs are released, they are sent for execution to the background processing system at the specified start time. Both scheduling and releasing of jobs require authorizations.
HANDLING OF POP UP SCREEN IN BDC
Many times in transaction pop up screen appears and for this screen you don’t pass any record but some indication to system telling it to proceed further. For example: The following screen
To handle such screen, system has provided a variable called BDC_CURSOR. You pass this variable to BDCDATA and process the screen.
Usually such screen appears in many transactions, in this case you are just passing information, that YES you want to save the information, that means YES should be clicked. So you are transferring this information to BDCDATA i.e., field name of YES which is usually SPOT_OPTION. Instead of BDC_OKCODE, you are passing BDC_CURSOR.
BDC_CURSOR is also used to place cursor on particular field.
AN EXAMPLE WITH SESSION METHOD
Following program demonstrates how data is passed from flat file to SAP transaction and further to database table by using SESSION method.
The transaction is TFBA (to change customer).
A simple transaction where you are entering customer number on first screen and on next screen data is displayed for the particular customer number. Field, which we are changing here, are name and city. When you click on save, the changed record gets saved.
Prerequisite to write this BDC interface as indicated earlier is:
1. To find screen number
2. To find screen field names, type of the field and length of the field.
3. To find BDC_OKCODE for each screen
4. Create flat file.
Flat file can be created in your hard disk as follows:
1 Vinod Krishna Hyderabad
2 Kavitha Secunderabad
3 Kishore Hyderabad
(Where 1st character field is Customer number, 2nd field is Customer name and 3rd field is City.)
To transfer this data to database table SCUSTOM following interface can be used.
REPORT DEMO1.
Following internal table is to upload flat file.
DATA: BEGIN OF ITAB OCCURS 0,
ID(10),
NAME(25),
CITY(25),
END OF ITAB.
*Following internal table BDCDATA is to pass date from internal table to session.
DATA: BDCTAB LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
Variables
DATA: DATE1 LIKE SY-DATUM. DATE1 = SY-DATUM - 1. “ This is for Hold Date
To upload flat file to internal table.
CALL FUNCTION UPLOAD
EXPORTING
FILE NAME = ‘C:FF.TXT’
FILE TYPE = ‘ASC”
TABLES
DATA_TAB = ITAB
EXCEPTIONS
CONVERSION_ERROR = 1
INVALID_TABLE_WIDTH = 2
INVALID_TYPE = 3
NO_BATCH = 4
UNKNOWN_ERROR = 5
OTHERS = 6.
If sy-subrc = 0.
Calling Function to Create a Session
CALL FUNCTION ‘BDC_OPEN_GROUP’
EXPORTING
CLIENT = SY-MANDT
GROUP = ‘POTHURI’
HOLDDATE = DATE1
KEEP = ‘X’
USER = SY-UNAME
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.
*-- MAIN Logic--
LOOP AT ITAB
PERFORM GENERATE_DATA. “ Populating BDCDATA Table
CALL FUNCTION ‘BDC_INSERT’
EXPORTING
TCODE = ‘TFBA’
TABLES
DYNPROTAB = BDCTAB
EXCEPTIONS
INTERNAL_ERROR = 1
NOT_OPEN = 2
QUEUE_ERROR = 3
TCODE_INVALID = 4
PRINTING_INVALID = 5
POSTING_INVALID = 6
OTHERS = 7.
REFRESH BDCTAB
ENDLOOP.
Calling function to close the session
CALL FUNCTION ‘BDC_CLOSE_GROUP’
EXCEPTIONS
NOT_OPEN = 1
QUEUE_ERROR = 2
OTHERS = 3.
Endif.
Endif.
*& Form GENERATE_DATA
Create BDC Data
FORM GENERATE_DATA
Passing information for 1st screen on BDCDATA
BDCTAB-PROGRAM = ‘SAPMTFBA’.
BDCTAX-DYNPRO = 100.
BDCTAP-DYNBEGIN = ‘X’.
APPEND BCDTAB.CLEAR BDCTAB.
Passing field information to BDCDATA
BDCTAB-FNAM = ‘SCUSTOM-ID’
BDCTAB-FVAL = ITAB-ID.
APPEND BDCTAB.CLEAR BDCTAB.
Passing BDC_OKCODE to BDCDATA
BDCTAB-FNAM = ‘BDC_OKCODE’.
BDCTAB-FVAL = ‘/5’.
APPEND BDCTAB.CLEAR BDCTAB.
Passing screen information for next screen to BDCDATA
BDCTAB-PROGRAM = ‘SAPMTFBA’.
BDCTAB-DYNPRO = 200.
BDCTAB-DYNBEGIN = ‘X’.
APPEND BDCTAB.CLEAR BDCTAB.
Passing screen information to BDCDATA
BDCTAB-FNAM = ‘SCUSTOM-NAME’.
BDCTAB-FVAL = ITAB-NAME.
APPEND BDCTAB.CLEAR BDCTAB.
Passing screen information to BDCDATA
BDCTAB-FNAM = ‘SCUSTOM-CITY’.
BDCTAB-FVAL = ITAB-CITY.
APPEND BDCTAB.CLEAR BDCTAB.
Passing BDC_OKCODE to BDCDATA
BDCTAB-FNAM = ‘BDC_OKCODE’.
BDCTAB-FVAL = ‘SAVE’.
APPEND BDCTAB.CLEAR BDCTAB.
ENDFORM. “GENERATE_DATA
AN EXAMPLE WITH CALL TRANSACTION
Same steps to be repeated for CALL TRANSACTION
The only difference between the two types of interface is in Session method, you create session and store information about screen and data into session. When session is processed the data is transferred to database. While in CALL TRANSACTION, data is transferred directly to database table.
REPORT DEMO1.
Follow above Code till MAIN Logic. Even the Subroutine should be copied
LOOP AT ITAB
PERFORM GENERATE_DATA, “Populating BDCDATA Table
Call transaction ‘TFBA’ using BCDDATA Mode ‘A’ Update ‘S’.
REFRESH BDCTAB
ENDLOOP.
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.sapbrain.com/TUTORIALS/TECHNICAL/BDC_tutorial.html
Check these link:
http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm
http://www.sap-img.com/abap/question-about-bdc-program.htm
http://www.itcserver.com/blog/2006/06/30/batch-input-vs-call-transaction/
http://www.planetsap.com/bdc_main_page.htm
call Transaction or session method ?
http://www.sapbrain.com/FAQs/TECHNICAL/SAP_ABAP_DATADICTIONARY_FAQ.html
http://www.****************/InterviewQ/interviewQ.htm
http://help.sap.com/saphelp_46c/helpdata/en/35/2cd77bd7705394e10000009b387c12/frameset.htm
regards,
srinivas
<b>*reward for useful answers*</b>

Similar Messages

  • Concept of table control in BDC

    hi friends,
    what is the concept of table control in BDC
    regards,
    malleswari.

    Hey Malleswari,
    Please refer the program given at the following link to understand the concept of BDC:
    <a href="http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm">http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm</a>
    Regards,
    Chetan.
    PS: Reward points if this helps u.

  • Problem with OPERATION TEXT(LTXA1) uploading using BDC For C202 Transaction

    Hi Experts,
    Im presently doing a BDC for the trransaction C202 (Change Master Recipe),my task was to upload the 'OPERATION TEXT' field PLPOD-LTXA1 which is actually Long text to an existing master recipe from a flat file during updation of the 'OPERATION TEXT the number of lines i was able to were 34 which we number lines on the displayed page and while updating the 35th line using the concept of bdc table control it is failing to insert the update text.
    I used all the ok codes but failed to update more than 34 lines.So,can someone tell me how to update the longtext beyound it.
    This is the Screenshot of my problem:
    [BDC_C202_error|http://www.freeimagehosting.net/uploads/79af6bac49.jpg]
    Thanx in advance.

    Hi,
    There is a better way of doing the long text upload in SAP. In your BDC, if I change the text editor, the BDC will not work.
    Hence ,
    Use function module " Save_Text" to update long texts in SAP.
    Please check its FM documentation or perform a search for this FM in SDN for more clarity.
    Write back in case you face further issues.
    Regards,
    Rijuraj
    Edited by: Rijuraj Raju on Sep 10, 2010 3:05 PM

  • BDC Resolution

    <b></b>HAI CAN ANY ONE TELL ME ABT THE RESOLUTION CONCEPT IN BDC, HOW TO HANDLE IT,FOR EXAMPLE WHEN I RECORD A TRANSACTION AND USE PAGE DOWN FOR FILLING LINES OF TABLE CONTROLS , BUT SOME TIMES THE PROBLEM ARISES WHEN IN PRODUCTION WHERE I GET MORE LINES AND THE PAGE DOWN IS TRIGGERED BEFORE ALL LINES ARE FILLED, TAKE THIS WAY IN RECORDING I GET THREE LINES AND THEN I DO PAGE DOWN, BUT IN PRODUCTION I GET FOUR LINES AND THE PAGE DOWN IS TRIGGERED FOR THRRE LINES ONLY INSTEAD OF FOUR , HOW TO RESTRICT THIS
    BYE
    AFZAL

    Hi,
    WA_CTU_PARAMS type ctu_params.
    WA_CTU_PARAMS-DISMODE = 'N'. "no screen mode
    WA_CTU_PARAMS-UPDMODE = 'S'. "synchronus update
    WA_CTU_PARAMS-NOBINPT = 'X'.
    WA_CTU_PARAMS-NOBIEND = 'X'.
    WA_CTU_PARAMS-DEFSIZE = 'X'. "Default size
    CALL TRANSACTION 'VA01' USING it_bdcdata
    OPTIONS FROM WA_CTU_PARAMS
    MESSAGES INTO it_mesg.
    Default size will play good role in terms of resoultion. in one system in table control you can see 10rows, but in others system it will show 20 records. it depends on resoultion. but when you set the default size then it will take same (default screen size) in all the systems when you run BDC.
    Regards
    Sudheer

  • What is BDC and LSMW? Difference

    Dear experts!
    Explore the concept of BDC and LSMW and their difference.
    Merits/Demerits.
    Transactions used for executing and viewing the same.
    Rishi.

    Rishi,
    Hope these links help you:
    http://sap-img.com/bdc.htm
    http://sap-img.com/sap-data-migration.htm
    http://sap-img.com/sap-data-migration.htm
    https://websmp206.sap-ag.de/lsmw
    <b>LSMW</b>
    Data Migration from Non-SAP Systems to SAP systems* Made Easy
    The LSM Workbench is an SAP R/3 based tool that supports the one-time or periodic transfer of data from non-SAP systems ("legacy systems") to SAP systems.
    The LSM Workbench helps you to organize your data migration project and guides you through the process by using a clear sequence of steps.
    The most common conversion rules are predefined. Reusable conversion rules assure consistent data conversion for different data objects.
    The LSM Workbench covers the following steps:
    Read the legacy data from one or several files (e.g. spreadsheet tables, sequential files).
    Convert the data from source format to target format.
    Import the data using standard interfaces (Batch Input, Direct Input, BAPI, IDoc).
    Detailed Information
    Objectives
    High Flexibility to Ensure the Optimal Solution
    The Data Transfer Workbench gives you control of the SAP data transfer interfaces: from proven batch input, through very fast direct input, to Business APIs (BAPIs), which are also suitable for permanent interfaces. This solution is sufficient if certified partner products are available for the transfer of open interfaces, or if you explicitly want to do interface programming in ABAP or the language of the legacy system. SAP provides its customers with the Legacy System Migration (LSM) Workbench, which dramatically reduces the considerable expenditure involved in individual programming. This tool makes it possible to transfer data without any programming. You define the rules for the changeover. The LSM Workbench then uses this definition to generate an ABAP program and thus gives you considerable support during the migration.
    Description
    Data Migration Controlled by your SAP System
    In contrast to many conventional approaches, the solution described here is a component of your SAP system. As a result it is no longer necessary to program in a number of different systems. All you need are basic unloading programs in the legacy system, or, alternatively, existing data interfaces can be used. Everything else takes place in the SAP system. With SAP R/3 Release 4.6C the LSM Workbench is also integrated into the Data Transfer Workbench, and can be called up there.
    Maximum Quality
    Data migration with the Data Transfer Workbench and the LSM Workbench guarantees maximum quality and consistency of your data in the SAP system. When data is imported, the system performs the same checks as it does during online entry. The update in your database is performed through the Standard Batch Input Program, the Standard Direct Input Program, IDOC interfaces, and R/3 System BAPIs.
    Proven Concepts
    SAP has already gathered over seven years of migration experience with its own products. The LSM Workbench has been developed on the basis of experience gained with the R/2-R/3 Migration Workbench. In the meantime, the LSM Workbench has also been successfully used over 500 times in the migration of legacy systems to R/3.Concepts and techniques that have proven their worth form the backbone of the LSM Workbench:
    Transfer of business data objects (such as material master data) instead of individual tables
    Definition of flexible conversion rules that are adapted as part of migration customizing
    Automatic generation of a conversion program
    Synergy Effects through Uniform Procedures
    SAP's experience shows that certain algorithms and techniques appear over and over again during data conversion projects. These techniques have been standardized in the LSM Workbench and can be called at the touch of a button. With this concept of central rules you can ensure, for example, that your vendor numbers are converted in the same way in both your vendor master data and in your purchase orders. This uniform procedure guarantees the consistency of your data and captures synergy effects in cases where you need to migrate data from disparate legacy systems.
    Importing Data from PCs
    More and more medium-sized firms are implementing SAP solutions, and many of them have their legacy data in desktop programs. In this case, the data is exported in a format that can be read by PC spreadsheet systems. As a result, the data transfer is mere child's play: Simply enter the field names in the first line of the table, and the LSM Workbench's import routine automatically generates the input file for your conversion program.
    Data Verification before Update in the Database
    The LSM Workbench lets you check the data for migration against the current settings of your customizing. The check is performed after the data migration, but before the update in your database.
    Substantial Reduction of Effort
    SAP's experiences show that using the Data Transfer Workbench in conjunction with the LSM Workbench can reduce the effort required for data migration by 30% and more.
    Project Library - A Knowledge Database
    The LSM Workbench is a learning tool: The experience gained in other implementation projects is continually fed into the LSM Workbench, where it directly benefits your project.

  • BDC,ALE

    hi gurus
    I am narayan having 3 years of functional experience in SAP SD module.
    Now i am interesting to learn ABAP Concepts of BDC, ALE.
    so if any one please send me meterial of these concepts.
    my mail id is  :  <REMOVED BY MODERATOR>
    Thanks
    narayan
    Edited by: Alvaro Tejada Galindo on Mar 10, 2008 3:44 PM

    ALE (Application Linking and Enabling )
    ALE is technology for SAP mainly use to transfer data between SAP systems.
    A means of creating and operating distributed applications.
    Application Link Enabling (ALE) guarantees a distributed, but integrated, R/3 installation. This involves business-controlled message exchange using consistent data across loosely linked SAP applications.
    Applications are integrated using synchronous and asynchronous communication - not by using a central database.
    ALE consists of the following layers:
    Application services
    Distribution services
    Communication services
    Refer
    http://www.dataxstream.com/doclib/ALESuccessfullyLeverageIDocs.pdf
    http://www.erpgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    ALE Configuration 1
    1 ALE Introduction – Transaction SALE
    2 The 3 ALE methods
    2.1 Push
    2.1.1 First create logical system (In SPRO / SALE)
    2.1.2 Assign Client to Logical System (In SPRO)
    2.1.3 Create RFC Destination – SM59
    2.1.4 Create Distribution Model – BD64
    2.1.5 Send Material – BD10 9
    2.1.6 Check IDOC sent – WE02
    2.2 Pull
    2.2.1 Create Model View – BD64
    2.2.2 Login to 810
    2.2.3 Get Material – BD11
    2.2.4 Check IDOCs – WE02
    2.2.5 Check Material – MM02
    2.3 Change Pointer
    2.3.1 Activate change pointers for message type – BD50
    2.3.2 Activate Change Pointers – BD61
    2.3.3 Execute RBDMIdoc – SE38
    2.3.4 Check IDOCs – WE02
    2.3.5 Check Material – MM02
    BDC
    The batch input program must build all of the input to execute the SAP transaction.
    Two main steps are required:
    • To build an internal table containing every screen and every field to be filled in during the execution of an SAP transaction.
    • To pass the table to SAP for processing.
    Prerequisite for Data Transfer Program
    Writing a Data Transfer Program involves following prerequisites:
    Analyzing data from local file
    Analyzing transaction
    Analyzing transaction involves following steps:
    • The transaction code, if you do not already know it.
    • Which fields require input i.e., mandatory.
    • Which fields can you allow to default to standard values.
    • 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.
    To analyze a transaction::
    • Start the transaction by menu or by entering the transaction code in the command box.
    (You can determine the transaction name by choosing System – Status.)
    • Step through the transaction, entering the data will be required for processing your batch input data.
    • On each screen, note the program name and screen (dynpro) number.
    (dynpro = dyn + pro. Dyn = screen, pro = number)
    • Display these by choosing System – Status. The relevant fields are Program (dynpro) and Dynpro number. If pop-up windows occur during execution, you can get the program name and screen number by pressing F1 on any field or button on the screen.
    The technical info pop-up shows not only the field information but also the program and screen.
    • For each field, check box, and radio button on each screen, press F1 (help) and then choose Technical Info.
    Note the following information:
    The field name for batch input, which you’ll find in its own box.
    The length and data type of the field. You can display this information by double clicking on the Data Element field.
    • Find out the identification code for each function (button or menu) that you must execute to process the batch-input data (or to go to new screen).
    Place the cursor on the button or menu entry while holding down the left mouse button. Then press F1.
    In the pop-up window that follows, choose Technical info and note the code that is shown in the Function field.
    You can also run any function that is assigned to a function key by way of the function key number. To display the list of available function keys, click on the right mouse button. Note the key number that is assigned to the functions you want to run.
    Once you have program name, screen number, field name (screen field name), you can start writing.
    DATA TRANSFER program.
    Check out the link below: You will get all the info. to start with BDC
    http://help.sap.com/saphelp_erp2005/helpdata/en/fa/097119543b11d1898e0000e8322d00/frameset.htm
    http://www.sapbrain.com/TUTORIALS/TECHNICAL/BDC_tutorial.html
    http://www.sap-img.com/abap/learning-bdc-programming.htm
    http://www.sap-img.com/bdc.htm
    www.sappoint.com/abap/bdcconcept.pdf
    http://www.sap-img.com/abap/learning-bdc-programming.htm
    http://www.sapdevelopment.co.uk/bdc/bdchome.htm
    http://www.planetsap.com/bdc_main_page.htm
    Also chk this link
    bdc

  • How to Put a mail to designated User with txt format

    Hi Friends,
    I have a small in  mailing concept of BDC's. Can any one check my code and tell me why my code is not poping any message in txt file. I am not getting any data in text file but the mail is getting trigerred.
    here below is the code regarding mail Concept. Please help me ASAP. This is very important. Please revert where I am wrong and correct me if you can.
    Points will defintely be rewarded.
    *         To Send a mail to the conserned user when we get the 824 detailed
        DATA: V_USRID TYPE PA0105-USRID,    " variable for usrid
              V_SUBJECT(100) TYPE C,               " variable for subject line
              V_SENT_ALL(1) TYPE C.               " variable to  sent messages
        CONSTANTS: C_U(1) TYPE C VALUE 'U',     " constant for U
                   C_X(1)       TYPE C VALUE 'X',     " constant for X
                   C_INT(3)     TYPE C VALUE 'INT',   " constant for INT
                   C_SAPRPT(6)  TYPE C VALUE 'SAPRPT'," constant for SAPRPT
                   C_1(1)       TYPE C VALUE '1',     " constant for 1
                   C_0(1)       TYPE C VALUE '0',     " constant for 0
                   C_B(1)       TYPE C VALUE 'B',      " Constant for B
                   C_RAW(3)     TYPE C VALUE 'RAW',   " constant for RAW
                   C_TXT(3)     TYPE C VALUE 'TXT',   " constant for TXT
                   C_ERR(30)    TYPE C VALUE 'Error 824 detailed file', " constant for Obj description
                   C_INTFC(15)  TYPE C VALUE 'Interface', "constant for Obj Name in attachment
                   C_F(1)       TYPE C VALUE 'F'.     " constant for F
        DATA : T_MESSAGE      TYPE STANDARD TABLE OF SOLISTI1, "Segment e1edk01
               T_PACKING_LIST TYPE TABLE OF  SOPCKLSTI1," table for packing list
               T_RECEIVERS    TYPE TABLE OF  SOMLRECI1, " table for receivers
               WA_PACKING_LIST TYPE  SOPCKLSTI1,     " work area for mail list
               WA_CONTENTS     TYPE  SOLISTI1,       " work area for contents
               WA_RECEIVERS    TYPE SOMLRECI1,       " work area for recivers
               WA_MESSAGE      TYPE  SOLISTI1,       " work area for messages
               T_OBJTXT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
               V_LINES_TXT TYPE I,
               V_LINES_BIN TYPE I,
               WA_DOC_DATA     TYPE SODOCCHGI1.      " work area for doc data
    *To prepare the subject line
        CONCATENATE TEXT-003 P_FILE1  INTO V_SUBJECT SEPARATED BY SPACE.
        CLEAR P_FILE1.
    Create Message Body
    Title and Description
        T_OBJTXT = 'test with dat file Attachment!'.
        APPEND T_OBJTXT.
        DESCRIBE TABLE T_OBJTXT LINES V_LINES_TXT.
        READ TABLE T_OBJTXT INDEX V_LINES_TXT.
       *To append the first line description
        WA_MESSAGE-LINE+1(10) = TEXT-001.
        WA_MESSAGE-LINE+41(20) = TEXT-002.
        APPEND WA_MESSAGE TO T_MESSAGE.
        CLEAR WA_MESSAGE.
    *Add the recipients email address
        CLEAR WA_RECEIVERS.
        REFRESH T_RECEIVERS.
        WA_RECEIVERS-RECEIVER   = '[email protected]'."V_USRID.
        WA_RECEIVERS-REC_TYPE   = C_U.
        WA_RECEIVERS-COM_TYPE   = C_INT.
        WA_RECEIVERS-NOTIF_DEL  = C_X.
        WA_RECEIVERS-NOTIF_NDEL = C_X.
        APPEND WA_RECEIVERS TO T_RECEIVERS.
        CLEAR WA_RECEIVERS.
        CLEAR WA_RECEIVERS.
        WA_RECEIVERS-RECEIVER = 'VSATISHRAJU'.  " replace with <login name>
        WA_RECEIVERS-REC_TYPE = 'B'.
        WA_RECEIVERS-EXPRESS = C_X.
        APPEND WA_RECEIVERS TO T_RECEIVERS.
        CLEAR WA_RECEIVERS.
    Describe the body of the message
        CLEAR WA_PACKING_LIST.
        REFRESH T_PACKING_LIST.
        WA_PACKING_LIST-TRANSF_BIN = SPACE.
        WA_PACKING_LIST-HEAD_START = C_1.
        WA_PACKING_LIST-HEAD_NUM   = C_0.
        WA_PACKING_LIST-BODY_START = C_1.
       WA_PACKING_LIST-BODY_NUM = V_LINES_TXT.
        DESCRIBE TABLE T_MESSAGE LINES WA_PACKING_LIST-BODY_NUM.
        WA_PACKING_LIST-DOC_TYPE   = C_RAW.
        APPEND WA_PACKING_LIST TO T_PACKING_LIST.
      *    **** Attachment
    (pdf-Attachment)
        WA_PACKING_LIST-TRANSF_BIN = C_X.
        WA_PACKING_LIST-HEAD_START = C_1.
        WA_PACKING_LIST-HEAD_NUM = C_0.
        WA_PACKING_LIST-BODY_START = C_1.
       WA_PACKING_LIST-BODY_NUM = V_LINES_BIN.      "satish
        WA_PACKING_LIST-BODY_NUM = V_LINES_TXT + 1 .
       WA_PACKING_LIST-DOC_TYPE = 'PDF'.      "comments by siva
        WA_PACKING_LIST-DOC_TYPE = C_TXT.       " changes by siva
        WA_PACKING_LIST-OBJ_NAME = C_INTFC.
       WA_PACKING_LIST-doc_size   = 255 * ( V_LINES_TXT + 1 ).
        WA_PACKING_LIST-OBJ_DESCR =  C_ERR.
        APPEND WA_PACKING_LIST TO T_PACKING_LIST.
        CLEAR WA_PACKING_LIST.
    *Populate the subject/generic message attributes
        WA_DOC_DATA-OBJ_LANGU   = SY-LANGU.
        WA_DOC_DATA-OBJ_NAME    = C_SAPRPT.
        WA_DOC_DATA-OBJ_DESCR   = V_SUBJECT.
        WA_DOC_DATA-SENSITIVTY  = C_F.
        CLEAR : V_SUBJECT.
    *Call the FM to post the message to SAPMAIL
        CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
          EXPORTING
            DOCUMENT_DATA              = WA_DOC_DATA
            PUT_IN_OUTBOX              = C_X
          IMPORTING
            SENT_TO_ALL                = V_SENT_ALL
          TABLES
            PACKING_LIST               = T_PACKING_LIST
            CONTENTS_TXT               = T_MESSAGE
           CONTENTS_BIN               = T_OBJBIN
            RECEIVERS                  = T_RECEIVERS
          EXCEPTIONS
            TOO_MANY_RECEIVERS         = 1
            DOCUMENT_NOT_SENT          = 2
            DOCUMENT_TYPE_NOT_EXIST    = 3
            OPERATION_NO_AUTHORIZATION = 4
            PARAMETER_ERROR            = 5
            X_ERROR                    = 6
            ENQUEUE_ERROR              = 7
            OTHERS                     = 8.
       IF SY-SUBRC NE 0.
         RAISE NO_MAIL.
       ENDIF.
        COMMIT WORK.
      ENDIF.

    Why dont you see output type 5 in the output condition itself?  You dont have to code for this.
    Albert

  • Can we use Call transaction and session method in same program ?

    Hi experts,
                     Is it suggested to use call Transaction and session method in the same Program ?
                     i have a doubt , why cant we use multiple call transactions in same program instead of session method if we have multiple transaction updations ?

    Hi Dengyong Zhang,
    we can use the call transation and session method in same program.
    However for better performance it's benificial to use call trasaction method of BDC. but if u want to upload very large amount of data then Session method is more preferable to use.
    Session method is one of the method of BDC.
    U can also use BAPI to upload the data in SAP but it's a different concept than BDC. Performance wise BAPI is more advantageous than BDC.

  • Call transaction , and session  method in the same program

    hi experts,
                Can anybody tell me in which cases we will use both call transaction and session methods in same program
    if possible send me example code.
    Regards
    Trinadh

    Hi Dengyong Zhang,
    we can use the call transation and session method in same program.
    However for better performance it's benificial to use call trasaction method of BDC. but if u want to upload very large amount of data then Session method is more preferable to use.
    Session method is one of the method of BDC.
    U can also use BAPI to upload the data in SAP but it's a different concept than BDC. Performance wise BAPI is more advantageous than BDC.

  • Hi All,What is the concept of table control in bdc

    Hi All,What is the concept of table control in bdc .Can u please explain in brief.How we have to handle the logic for va01 transaction .
    Thanks&regards.
    Bharat

    Hi Kaushik Datta ,
                              I already know for me51 ,but i am getting the problem for va01 while populating the item details in to the table control. The code which i have generated is :
    please see the code and tell me where i should increment  the counter for populating the item details
    report ZBKVA01Y
           no standard page heading line-size 255.
    include bdcrecx1.
    parameters: dataset(132) lower case.
       DO NOT CHANGE - the generated data section - DO NOT CHANGE    ***
      If it is nessesary to change the data section use the rules:
      1.) Each definition of a field exists of two lines
      2.) The first line shows exactly the comment
          '* data element: ' followed with the data element
          which describes the field.
          If you don't have a data element use the
          comment without a data element name
      3.) The second line shows the fieldname of the
          structure, the fieldname must consist of
          a fieldname and optional the character '_' and
          three numbers and the field length in brackets
      4.) Each field must be type C.
    DATA: BEGIN OF IT_DUMMY OCCURS 0,
          TEXT(1000),
          END OF IT_DUMMY.
    Generated data section with specific formatting - DO NOT CHANGE  ***
    data: begin of IT_HEADER OCCURS 0,
    data element: AUART
            AUART_001(004),
    data element: VKORG
            VKORG_002(004),
    data element: VTWEG
            VTWEG_003(002),
    data element: SPART
            SPART_004(002),
    data element: BSTKD
            BSTKD_005(035),
    data element: BSTDK
            BSTDK_006(010),
    data element: KUNAG
            KUNNR_007(010),
    data element: KUNWE
            KUNNR_008(010),
    data element: ABHOZ
            ABHOV_009(008),
    data element: ABHOZ
            ABHOB_010(008),
    data element: PRSDT
            PRSDT_011(010),
    END OF IT_HEADER.
    DATA: BEGIN OF IT_ITEM OCCURS 0,
    data element: MATNR
            MABNR_01_012(018),
    data element: KWMENG
            KWMENG_01_013(019),
          end of IT_ITEM.
    *DATA: DATE(10) TYPE C.
    *DATA: I_DATE TYPE SY-DATUM.
    *DATA: I_YEAR(4) TYPE C,
         I_MONTH(2) TYPE C,
         I_DAY(2) TYPE C .
    *DATA:
    End generated data section ***
    start-of-selection.
    CALL FUNCTION 'UPLOAD'
    EXPORTING
      CODEPAGE                      = ' '
      FILENAME                      = ' '
      FILETYPE                      = ' '
      ITEM                          = ' '
      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                      = IT_DUMMY
    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.
    *perform open_dataset using dataset.
    LOOP AT IT_DUMMY.
    IF IT_DUMMY-TEXT+0(1) = 'H'.
    IT_HEADER-AUART_001(004) = IT_DUMMY-TEXT+1(4).
    data element: VKORG
    IT_HEADER-VKORG_002(004) = IT_DUMMY-TEXT+5(4).
    data element: VTWEG
    IT_HEADER-VTWEG_003(002) = IT_DUMMY-TEXT+9(2).
    data element: SPART
    IT_HEADER-SPART_004(002) = IT_DUMMY-TEXT+11(2).
    data element: BSTKD
    IT_HEADER-BSTKD_005(035) = IT_DUMMY-TEXT+13(35).
    data element: BSTDK
    IT_HEADER-BSTDK_006(010) = IT_DUMMY-TEXT+48(8).
    data element: KUNAG
    IT_HEADER-KUNNR_007(010) = IT_DUMMY-TEXT+56(10).
    data element: KUNWE
    IT_HEADER-KUNNR_008(010) = IT_DUMMY-TEXT+66(10).
    data element: ABHOZ
    IT_HEADER-ABHOV_009(008) = IT_DUMMY-TEXT+76(6).
    data element: ABHOZ
    IT_HEADER-ABHOB_010(008) = IT_DUMMY-TEXT+82(6).
    data element: PRSDT
    IT_HEADER-PRSDT_011(010) = IT_DUMMY-TEXT+88(8).
    APPEND IT_HEADER.
    CLEAR  IT_HEADER.
    ELSEIF IT_DUMMY-TEXT+0(1) = 'I'.
    data element: MATNR
    IT_ITEM-MABNR_01_012(018) = IT_DUMMY-TEXT+1(18).
    data element: KWMENG
    IT_ITEM-KWMENG_01_013(019) = IT_DUMMY-TEXT+19(15).
    APPEND IT_ITEM.
    CLEAR  IT_ITEM.
    ENDIF.
    ENDLOOP.
    perform open_group.
    LOOP AT IT_HEADER.
    perform bdc_dynpro      using 'SAPMV45A' '0101'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'VBAK-SPART'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'VBAK-AUART'
                                  IT_HEADER-AUART_001.
    perform bdc_field       using 'VBAK-VKORG'
                                  IT_HEADER-VKORG_002.
    perform bdc_field       using 'VBAK-VTWEG'
                                  IT_HEADER-VTWEG_003.
    perform bdc_field       using 'VBAK-SPART'
                                  IT_HEADER-SPART_004.
    perform bdc_dynpro      using 'SAPMV45A' '4001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'VBKD-BSTKD'
                                  IT_HEADER-BSTKD_005.
    perform bdc_field       using 'VBKD-BSTDK'
                                  IT_HEADER-BSTDK_006.
    perform bdc_field       using 'KUAGV-KUNNR'
                                  IT_HEADER-KUNNR_007.
    perform bdc_field       using 'KUWEV-KUNNR'
                                  IT_HEADER-KUNNR_008.
    perform bdc_dynpro      using 'SAPMSSY0' '0120'.
    perform bdc_field       using 'BDC_CURSOR'
                                  '04/05'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=CHOO'.
    perform bdc_dynpro      using 'SAPMV45A' '4001'.
    perform bdc_field       using 'VBAK-ABHOV'
                                  IT_HEADER-ABHOV_009.
    perform bdc_field       using 'VBAK-ABHOB'
                                  IT_HEADER-ABHOB_010.
    perform bdc_field       using 'VBKD-PRSDT'
                                  IT_HEADER-PRSDT_011.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RV45A-KWMENG(01)'.
    perform bdc_field       using 'RV45A-MABNR(01)'
                                  IT_ITEM-MABNR_01_012.
    perform bdc_field       using 'RV45A-KWMENG(01)'
                                  IT_ITEM-KWMENG_01_013.
    perform bdc_transaction using 'VA01'.
    *enddo.
    ENDLOOP.
    perform close_group.
    *perform close_dataset using dataset.
    Thanks&regards.
    Bharat .

  • About the bdc concept..................................

    Setting up a BDC program where you find
    information from?
    . What has to be done to the packed fields before
    submitting to a BDC session.

    All numeric data should be passed to the BDC in character fields that are the same length as the screen fields of the transaction.
    And if you want to know where to get general information about batch input, you're there already. Just search the forum.
    Rob
    Edited by: Rob Burbank on Jan 10, 2008 2:09 PM

  • Doubt in BDC (Creation of Production order)

    Hi experts,
         I have a doubt in my bdc, in my bdc i am going to create production order in CO01. its working properly but after entered the date i want to click operation overview and change one particular routing workcenter. But all the workcenter have the same field name of ARBPL, if anyone have a idea plz help its urgent. Point will be sure.
    gowri

    Dear Mr.Gowri Sankar,
    As you have created a BDC for creating production order,
    once after the order creation is over u can goto CO02 and change the work centre,routing details before release.
    Please tell us when do u want to change the work centre & routing details?
    If I'm wrong,please correct me.Also please share the concept of your BDC.
    Regards
    Mangal

  • Gui_download function to download the file in application server in bdc

    Can we use gui_download function to download the file in application server in bdc?
    Regards,
    pandu.

    for downloading the file on application sever you use the concept of Dataset. GUI_DOWNLOAD is for presentaion server.
    regards
    Abhi

  • HOW TO HANDLE MULTIPLE VALUES IN BDC FOR A PARTICULAR FIELD.

    I THINK IT IS HANDLING OF TABLE CONTROLS IN BDC
    PLEASE LET KNOW WHETHER THESE TWO ARE SAME CONCEPT OR NOT
    HOW TO HANDLE TABLE CONTROLS IN BDC
    Moderator message - Please do not use all caps. Please do not ask interview questions -  post locked
    Edited by: Rob Burbank on Jun 26, 2009 10:02 AM

    Hi,
    To handle table control in BDC you will have to enter at least one record in the table control and there after use the index number to increment to the next line item.
    Say you run a recording for a transaction which has a table control (ME21), here after you have completed the recording, you'll see the code which will have sometjing like <fieldname>(01) and the entered value. that valeu has been entered as the first line item (01 being the index).
    You will have to replace the hard coded line item index with a variable and inside a loop increment the item index. Once you reach the maximum allowed line items on your screen juct press the pagedown button (or insert new row) and reset the index to 1.
    Following is a code snippet I used while uploading data for ME31K (vendor contract). It is not the complete code but does show how your code needs to be changed with using index for line items.
    Here we assumne that the maximun number of lines displayed at a time on the screen is 14.
    << Unformatable code removed >>
    Hope this helps.
    Regards,
    Sachin
    Edited by: Rob Burbank on Jun 26, 2009 10:03 AM

  • Doubt in bdc and ale reg

    using we can transfer the data from one system and another system. in ale also we can do same thing. what is the need of using ale

    BDC is used in scenarios where a company decides to do away with an existing ERP system and choses to use a SAP R/3 system in its place(Like from Oracle to SAP, or from any legacy system to SAP).
    In the process, the company wil store all the legacy data in flat files before discarding the original system.
    The flat file data, will have to be uploaded into the R/3 System again. It such cases BDCs/ Batch Iput programs are used.
    ALEs are used in a totally different scenario.
    If the company is using two loosely coupled sap systems, and the same data is to be maintained in both the systems, then you will use ALE concept.
    It is like latching them together and changes made to one system are automatically refelected in the other system as well.
    Regards,
    Ravi

Maybe you are looking for

  • Powershell Syntax working when run in cmd, but when run through SCCM2007 Task Sequence it claims the syntax is incorrect?

    The code below is a simple powershell statement which enables me to change the execution policy so that I can run powershell scripts. When I run this in a normal windows enviroment the statement will work fine, not giving me an issue whatsoever. Howe

  • [svn:fx-trunk] 9056: * Cleaned up deprecated warnings in rpc build.

    Revision: 9056 Author:   [email protected] Date:     2009-08-04 07:56:55 -0700 (Tue, 04 Aug 2009) Log Message: Cleaned up deprecated warnings in rpc build. Reviewer: Gordon Tests run: checkintests Is noteworthy for integration: Yes, rpc.swc has been

  • Mass tcode creation from abap programs

    Experts, Is there any way to create  tcodes for 200 abap programs through any function modules or any abap programs.. Regards, Suresh Edited by: Suresh Palani on Dec 5, 2009 8:02 AM

  • Automate save as rtf

    Our clients want Word files in addition to Help and PDFs. They need to be able to base their custom documentation on our content, and they don't have FrameMaker. FM9 saves RTF files that look pretty decent, so we want to offer RTF versions of everyth

  • Using Safari on the iPad unsupported mode with R17

    I have a customer that just purchased iPad's for their sales force and they are trying to use the "Safari" or "Private Browser" in an unsupported mode. They have turned off the message center, but when they try and login after clicking through the un