<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: BDC in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2626064#M603416</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BDC using Call transaction involves calling an SAP transaction in back ground from within the ABAP &lt;/P&gt;&lt;P&gt;program. The process involves building an Internal BDC table containing the screen information needed to &lt;/P&gt;&lt;P&gt;execute the required transaction and then passing this to the Call transaction command &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The full procedure for creating a BDC program is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;For a BDC upload you need to write a program which created BDC sessions.&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Steps:&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;1. Work out the transaction you would use to create the data manually. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Use transaction SHDB to record the creation of one material master data. &lt;/P&gt;&lt;P&gt;Click the New recording button or the Menu - Recording - Create &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Save the recording, and then go back a screen and go to the overview. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. Select the recording and click on Edit - Create Program. Give the program a Z name, and select transfer from recording. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. Edit the program. You will see that all the data you entered is hard-coded into the program. You need to make the following changes: &lt;/P&gt;&lt;P&gt;5.1 After the start-of-selection, Call ws_upload to upload the file (the excel file needs to be saved as TAB separated). &lt;/P&gt;&lt;P&gt;5.2 After the open-group, Loop on the uploaded data. For each line, perform validation checks on the data, then modify the perform bdc_field commands to use the file data. &lt;/P&gt;&lt;P&gt;5.3. After perform bdc_transaction, add the endloop. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Execute the program. It will have options to create a batch session or to process directly. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;These are all my finds . Might be it will be useful to you.&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Direct call of transactions, session handling: &lt;/P&gt;&lt;P&gt;/nxxxx This terminates the current transaction, and starts transaction xxxx &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/n This terminates the transaction. This generally corresponds to pressing F15 to go back. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/nend This termiantes all separate sessions and logs off (corresponds to System - Logoff). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/nex This terminates all separate sessions and logs off immediately (without any warning!). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/oxxxx This opens a new session and starts transaction xxxx in This session. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/o This lists existing sessions and allows deletion or opening of a new session. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/i This terminates the current session (corresponds to System End &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/i1, /i2,... This terminates the session with the number given. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.xyzw Fast path: 'xyzw' refers to the underlined letters in the menus. This type of navigation is uncommon and is provided more for emergencies (such as a defective mouse). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;&amp;lt;b&amp;gt;Batch&amp;lt;/b&amp;gt;&amp;lt;/u&amp;gt; &lt;/P&gt;&lt;P&gt;The following commands can be entered in correction mode ('Process in foreground' or 'Display errors only') when processing a batch input session: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/n This terminates the current batch input transaction and characterizes it as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/bdel This deletes the current batch input transaction. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/bend This terminates batch input processing and sets the session to Failed &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/bda This switches from Display errors only to Process in foreground &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/bde This switches from Process in foreground to Display errors only &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;ABAP/4&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;/h This switches into debugging mode. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/hs This switches into debugging mode and activates the debugging of system functions. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Buffer&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;WARNING:&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt; Resetting buffers can significantly change the performance of the entire system for a long time. &lt;/P&gt;&lt;P&gt;It should therefore only be used where there is a good reason tdso. As of release 3.0B system administator authorization is required (authorization object (S_ADMI_FCD). The action is noted in the system log. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/$SYNC This resets all buffers of the application server &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/$CUA This resets the CUA buffer of the application server &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/$TAB This resets the TABLE buffers of the application server &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/$NAM This resets the nametab buffer of the application server &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/$DYNP This resets the screen buffer of the application server &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Check this sample report&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*-----------------------------------------------------------------------
* Data declaration
TABLES: ekko, ekpo.
 
TYPES: BEGIN OF t_ekko,
    ebeln TYPE ekko-ebeln,
    waers TYPE ekko-waers,
    netpr TYPE ekpo-netpr,
    err_msg(73) TYPE c,
 END OF t_ekko.
 
DATA: it_ekko  TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
      wa_ekko  TYPE t_ekko,
      it_error TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
      wa_error TYPE t_ekko,
      it_success TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
      wa_success TYPE t_ekko.
 
DATA: w_textout            LIKE t100-text.
DATA: gd_update TYPE i,
      gd_lines TYPE i.
 
*Used to store BDC data
DATA: BEGIN OF bdc_tab OCCURS 0.
        INCLUDE STRUCTURE bdcdata.
DATA: END OF bdc_tab.
 
*Used to stores error information from CALL TRANSACTION Function Module
DATA: BEGIN OF messtab OCCURS 0.
        INCLUDE STRUCTURE bdcmsgcoll.
DATA: END OF messtab.
 
 
*-----------------------------------------------------------------------
*Screen declaration
SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME
                                    TITLE text-001. "Purchase order Num
SELECT-OPTIONS: so_ebeln FOR ekko-ebeln OBLIGATORY.
 
SELECTION-SCREEN END OF BLOCK block1.
 
SELECTION-SCREEN BEGIN OF BLOCK block2 WITH FRAME
                                    TITLE text-002. "New NETPR value
PARAMETERS:  p_newpr(14)   TYPE c obligatory.  "LIKE ekpo-netpr.
SELECTION-SCREEN END OF BLOCK block2.
 
 
************************************************************************
*START-OF-SELECTION
START-OF-SELECTION.
 
* Retrieve data from Purchase order table(EKKO)
  SELECT ekko~ebeln ekko~waers ekpo~netpr
    INTO TABLE it_ekko
    FROM ekko AS ekko INNER JOIN ekpo AS ekpo
      ON ekpo~ebeln EQ ekko~ebeln
   WHERE ekko~ebeln IN so_ebeln AND
         ekpo~ebelp EQ '10'.
 
 
************************************************************************
*END-OF-SELECTION
END-OF-SELECTION.
 
* Check data has been retrieved ready for processing
  DESCRIBE TABLE it_ekko LINES gd_lines.
  IF gd_lines LE 0.
*   Display message if no data has been retrieved
    MESSAGE i003(zp) WITH 'No Records Found'(001).
    LEAVE TO SCREEN 0.
  ELSE.
*   Update Customer master data (instalment text)
    LOOP AT it_ekko INTO wa_ekko.
      PERFORM bdc_update.
    ENDLOOP.
*   Display message confirming number of records updated
    IF gd_update GT 1.
      MESSAGE i003(zp) WITH gd_update 'Records updated'(002).
    ELSE.
      MESSAGE i003(zp) WITH gd_update 'Record updated'(003).
    ENDIF.
 
* Display Success Report
* **********************
*   Check Success table
    DESCRIBE TABLE it_success LINES gd_lines.
    IF gd_lines GT 0.
*     Display result report column headings
      PERFORM display_column_headings.
*     Display result report
      PERFORM display_report.
    ENDIF.
 
* Display Error Report
* ********************
*   Check errors table
    DESCRIBE TABLE it_error LINES gd_lines.
*   If errors exist then display errors report
    IF gd_lines GT 0.
*     Display errors report
      PERFORM display_error_headings.
      PERFORM display_error_report.
    ENDIF.
  ENDIF.
 
 
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  DISPLAY_COLUMN_HEADINGS
*&amp;amp;---------------------------------------------------------------------*
*       Display column headings
*----------------------------------------------------------------------*
FORM display_column_headings.
  WRITE:2 ' Success Report '(014) COLOR COL_POSITIVE.
  SKIP.
  WRITE:2 'The following records updated successfully:'(013).
  WRITE:/ sy-uline(42).
  FORMAT COLOR COL_HEADING.
  WRITE:/      sy-vline,
          (10) 'Purchase Order'(004), sy-vline,
          (11) 'Old Netpr'(005), sy-vline,
          (11) 'New Netpr'(006), sy-vline.
  WRITE:/ sy-uline(42).
ENDFORM.                    " DISPLAY_COLUMN_HEADINGS
 
 
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  BDC_UPDATE
*&amp;amp;---------------------------------------------------------------------*
*       Populate BDC table and call transaction ME22
*----------------------------------------------------------------------*
FORM bdc_update.
  PERFORM dynpro USING:
      'X'   'SAPMM06E'        '0105',
      ' '   'BDC_CURSOR'      'RM06E-BSTNR',
      ' '   'RM06E-BSTNR'     wa_ekko-ebeln,
      ' '   'BDC_OKCODE'      '/00',                      "OK code
 
      'X'   'SAPMM06E'        '0120',
      ' '   'BDC_CURSOR'      'EKPO-NETPR(01)',
      ' '   'EKPO-NETPR(01)'  p_newpr,
      ' '   'BDC_OKCODE'      '=BU'.                      "OK code
 
* Call transaction to update customer instalment text
  CALL TRANSACTION 'ME22' USING bdc_tab MODE 'N' UPDATE 'S'
         MESSAGES INTO messtab.
* Check if update was succesful
  IF sy-subrc EQ 0.
    ADD 1 TO gd_update.
    APPEND wa_ekko TO it_success.
  ELSE.
*   Retrieve error messages displayed during BDC update
    LOOP AT messtab WHERE msgtyp = 'E'.
*     Builds actual message based on info returned from Call transaction
      CALL FUNCTION 'MESSAGE_TEXT_BUILD'
           EXPORTING
                msgid               = messtab-msgid
                msgnr               = messtab-msgnr
                msgv1               = messtab-msgv1
                msgv2               = messtab-msgv2
                msgv3               = messtab-msgv3
                msgv4               = messtab-msgv4
           IMPORTING
                message_text_output = w_textout.
    ENDLOOP.
 
*   Build error table ready for output
    wa_error = wa_ekko.
    wa_error-err_msg = w_textout.
    APPEND wa_error TO it_error.
    CLEAR: wa_error.
  ENDIF.
 
* Clear bdc date table
  CLEAR: bdc_tab.
  REFRESH: bdc_tab.
ENDFORM.                    " BDC_UPDATE
 
 
*---------------------------------------------------------------------*
*       FORM DYNPRO                                                   *
*---------------------------------------------------------------------*
*       stores values to bdc table                                    *
*---------------------------------------------------------------------*
*  --&amp;gt;  DYNBEGIN                                                      *
*  --&amp;gt;  NAME                                                          *
*  --&amp;gt;  VALUE                                                         *
*---------------------------------------------------------------------*
FORM dynpro USING    dynbegin name value.
  IF dynbegin = 'X'.
    CLEAR bdc_tab.
    MOVE:  name TO bdc_tab-program,
           value TO bdc_tab-dynpro,
           'X'  TO bdc_tab-dynbegin.
    APPEND bdc_tab.
  ELSE.
    CLEAR bdc_tab.
    MOVE:  name TO bdc_tab-fnam,
           value TO bdc_tab-fval.
    APPEND bdc_tab.
  ENDIF.
ENDFORM.                               " DYNPRO
 
 
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  DISPLAY_REPORT
*&amp;amp;---------------------------------------------------------------------*
*       Display Report
*----------------------------------------------------------------------*
FORM display_report.
  FORMAT COLOR COL_NORMAL.
* Loop at data table
  LOOP AT it_success INTO wa_success.
    WRITE:/      sy-vline,
            (10) wa_success-ebeln, sy-vline,
            (11) wa_success-netpr CURRENCY wa_success-waers, sy-vline,
            (11) p_newpr, sy-vline.
    CLEAR: wa_success.
  ENDLOOP.
  WRITE:/ sy-uline(42).
  REFRESH: it_success.
  FORMAT COLOR COL_BACKGROUND.
ENDFORM.                    " DISPLAY_REPORT
 
 
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  DISPLAY_ERROR_REPORT
*&amp;amp;---------------------------------------------------------------------*
*       Display error report data
*----------------------------------------------------------------------*
FORM display_error_report.
  LOOP AT it_error INTO wa_error.
    WRITE:/      sy-vline,
            (10) wa_error-ebeln, sy-vline,
            (11) wa_error-netpr CURRENCY wa_error-waers, sy-vline,
            (73) wa_error-err_msg, sy-vline.
  ENDLOOP.
  WRITE:/ sy-uline(104).
  REFRESH: it_error.
ENDFORM.                    " DISPLAY_ERROR_REPORT
 
 
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  DISPLAY_ERROR_HEADINGS
*&amp;amp;---------------------------------------------------------------------*
*       Display error report headings
*----------------------------------------------------------------------*
FORM display_error_headings.
  SKIP.
  WRITE:2 ' Error Report '(007) COLOR COL_NEGATIVE.
  SKIP.
  WRITE:2 'The following records failed during update:'(008).
  WRITE:/ sy-uline(104).
  FORMAT COLOR COL_HEADING.
  WRITE:/      sy-vline,
          (10) 'Purchase Order'(009), sy-vline,
          (11) 'Netpr'(010), sy-vline,
          (73) 'Error Message'(012), sy-vline.
  WRITE:/ sy-uline(104).
  FORMAT COLOR COL_NORMAL.
ENDFORM.                    " DISPLAY_ERROR_HEADINGS&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Check this link for creating BDC with Screen shots&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/bdc/bdc_recording.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/bdc/bdc_recording.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Check this link on BDC doubts&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm" target="test_blank"&gt;http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="3760681"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward all helpfull answers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pavan&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Jul 2007 06:28:38 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-30T06:28:38Z</dc:date>
    <item>
      <title>BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2626062#M603414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do you send files to the legacy systems from SAP and vice versa? How does one know that the legacy files have come on to the SAP server you are working on?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jul 2007 06:22:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2626062#M603414</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-30T06:22:15Z</dc:date>
    </item>
    <item>
      <title>Re: BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2626063#M603415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Use GUI_UPLOAD or DOWNLOAD or &lt;/P&gt;&lt;P&gt;For App Server use OPEN_DATASET.&lt;/P&gt;&lt;P&gt;also you can check existance of file using CL_FRONTEND_SERVICES class.&lt;/P&gt;&lt;P&gt;Reward if useful!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jul 2007 06:24:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2626063#M603415</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-30T06:24:34Z</dc:date>
    </item>
    <item>
      <title>Re: BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2626064#M603416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BDC using Call transaction involves calling an SAP transaction in back ground from within the ABAP &lt;/P&gt;&lt;P&gt;program. The process involves building an Internal BDC table containing the screen information needed to &lt;/P&gt;&lt;P&gt;execute the required transaction and then passing this to the Call transaction command &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The full procedure for creating a BDC program is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;For a BDC upload you need to write a program which created BDC sessions.&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;Steps:&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;1. Work out the transaction you would use to create the data manually. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Use transaction SHDB to record the creation of one material master data. &lt;/P&gt;&lt;P&gt;Click the New recording button or the Menu - Recording - Create &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Save the recording, and then go back a screen and go to the overview. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. Select the recording and click on Edit - Create Program. Give the program a Z name, and select transfer from recording. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. Edit the program. You will see that all the data you entered is hard-coded into the program. You need to make the following changes: &lt;/P&gt;&lt;P&gt;5.1 After the start-of-selection, Call ws_upload to upload the file (the excel file needs to be saved as TAB separated). &lt;/P&gt;&lt;P&gt;5.2 After the open-group, Loop on the uploaded data. For each line, perform validation checks on the data, then modify the perform bdc_field commands to use the file data. &lt;/P&gt;&lt;P&gt;5.3. After perform bdc_transaction, add the endloop. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Execute the program. It will have options to create a batch session or to process directly. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;These are all my finds . Might be it will be useful to you.&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Direct call of transactions, session handling: &lt;/P&gt;&lt;P&gt;/nxxxx This terminates the current transaction, and starts transaction xxxx &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/n This terminates the transaction. This generally corresponds to pressing F15 to go back. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/nend This termiantes all separate sessions and logs off (corresponds to System - Logoff). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/nex This terminates all separate sessions and logs off immediately (without any warning!). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/oxxxx This opens a new session and starts transaction xxxx in This session. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/o This lists existing sessions and allows deletion or opening of a new session. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/i This terminates the current session (corresponds to System End &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/i1, /i2,... This terminates the session with the number given. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.xyzw Fast path: 'xyzw' refers to the underlined letters in the menus. This type of navigation is uncommon and is provided more for emergencies (such as a defective mouse). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;&amp;lt;b&amp;gt;Batch&amp;lt;/b&amp;gt;&amp;lt;/u&amp;gt; &lt;/P&gt;&lt;P&gt;The following commands can be entered in correction mode ('Process in foreground' or 'Display errors only') when processing a batch input session: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/n This terminates the current batch input transaction and characterizes it as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/bdel This deletes the current batch input transaction. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/bend This terminates batch input processing and sets the session to Failed &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/bda This switches from Display errors only to Process in foreground &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/bde This switches from Process in foreground to Display errors only &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;ABAP/4&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;/h This switches into debugging mode. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/hs This switches into debugging mode and activates the debugging of system functions. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Buffer&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;WARNING:&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt; Resetting buffers can significantly change the performance of the entire system for a long time. &lt;/P&gt;&lt;P&gt;It should therefore only be used where there is a good reason tdso. As of release 3.0B system administator authorization is required (authorization object (S_ADMI_FCD). The action is noted in the system log. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/$SYNC This resets all buffers of the application server &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/$CUA This resets the CUA buffer of the application server &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/$TAB This resets the TABLE buffers of the application server &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/$NAM This resets the nametab buffer of the application server &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/$DYNP This resets the screen buffer of the application server &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Check this sample report&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*-----------------------------------------------------------------------
* Data declaration
TABLES: ekko, ekpo.
 
TYPES: BEGIN OF t_ekko,
    ebeln TYPE ekko-ebeln,
    waers TYPE ekko-waers,
    netpr TYPE ekpo-netpr,
    err_msg(73) TYPE c,
 END OF t_ekko.
 
DATA: it_ekko  TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
      wa_ekko  TYPE t_ekko,
      it_error TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
      wa_error TYPE t_ekko,
      it_success TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
      wa_success TYPE t_ekko.
 
DATA: w_textout            LIKE t100-text.
DATA: gd_update TYPE i,
      gd_lines TYPE i.
 
*Used to store BDC data
DATA: BEGIN OF bdc_tab OCCURS 0.
        INCLUDE STRUCTURE bdcdata.
DATA: END OF bdc_tab.
 
*Used to stores error information from CALL TRANSACTION Function Module
DATA: BEGIN OF messtab OCCURS 0.
        INCLUDE STRUCTURE bdcmsgcoll.
DATA: END OF messtab.
 
 
*-----------------------------------------------------------------------
*Screen declaration
SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME
                                    TITLE text-001. "Purchase order Num
SELECT-OPTIONS: so_ebeln FOR ekko-ebeln OBLIGATORY.
 
SELECTION-SCREEN END OF BLOCK block1.
 
SELECTION-SCREEN BEGIN OF BLOCK block2 WITH FRAME
                                    TITLE text-002. "New NETPR value
PARAMETERS:  p_newpr(14)   TYPE c obligatory.  "LIKE ekpo-netpr.
SELECTION-SCREEN END OF BLOCK block2.
 
 
************************************************************************
*START-OF-SELECTION
START-OF-SELECTION.
 
* Retrieve data from Purchase order table(EKKO)
  SELECT ekko~ebeln ekko~waers ekpo~netpr
    INTO TABLE it_ekko
    FROM ekko AS ekko INNER JOIN ekpo AS ekpo
      ON ekpo~ebeln EQ ekko~ebeln
   WHERE ekko~ebeln IN so_ebeln AND
         ekpo~ebelp EQ '10'.
 
 
************************************************************************
*END-OF-SELECTION
END-OF-SELECTION.
 
* Check data has been retrieved ready for processing
  DESCRIBE TABLE it_ekko LINES gd_lines.
  IF gd_lines LE 0.
*   Display message if no data has been retrieved
    MESSAGE i003(zp) WITH 'No Records Found'(001).
    LEAVE TO SCREEN 0.
  ELSE.
*   Update Customer master data (instalment text)
    LOOP AT it_ekko INTO wa_ekko.
      PERFORM bdc_update.
    ENDLOOP.
*   Display message confirming number of records updated
    IF gd_update GT 1.
      MESSAGE i003(zp) WITH gd_update 'Records updated'(002).
    ELSE.
      MESSAGE i003(zp) WITH gd_update 'Record updated'(003).
    ENDIF.
 
* Display Success Report
* **********************
*   Check Success table
    DESCRIBE TABLE it_success LINES gd_lines.
    IF gd_lines GT 0.
*     Display result report column headings
      PERFORM display_column_headings.
*     Display result report
      PERFORM display_report.
    ENDIF.
 
* Display Error Report
* ********************
*   Check errors table
    DESCRIBE TABLE it_error LINES gd_lines.
*   If errors exist then display errors report
    IF gd_lines GT 0.
*     Display errors report
      PERFORM display_error_headings.
      PERFORM display_error_report.
    ENDIF.
  ENDIF.
 
 
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  DISPLAY_COLUMN_HEADINGS
*&amp;amp;---------------------------------------------------------------------*
*       Display column headings
*----------------------------------------------------------------------*
FORM display_column_headings.
  WRITE:2 ' Success Report '(014) COLOR COL_POSITIVE.
  SKIP.
  WRITE:2 'The following records updated successfully:'(013).
  WRITE:/ sy-uline(42).
  FORMAT COLOR COL_HEADING.
  WRITE:/      sy-vline,
          (10) 'Purchase Order'(004), sy-vline,
          (11) 'Old Netpr'(005), sy-vline,
          (11) 'New Netpr'(006), sy-vline.
  WRITE:/ sy-uline(42).
ENDFORM.                    " DISPLAY_COLUMN_HEADINGS
 
 
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  BDC_UPDATE
*&amp;amp;---------------------------------------------------------------------*
*       Populate BDC table and call transaction ME22
*----------------------------------------------------------------------*
FORM bdc_update.
  PERFORM dynpro USING:
      'X'   'SAPMM06E'        '0105',
      ' '   'BDC_CURSOR'      'RM06E-BSTNR',
      ' '   'RM06E-BSTNR'     wa_ekko-ebeln,
      ' '   'BDC_OKCODE'      '/00',                      "OK code
 
      'X'   'SAPMM06E'        '0120',
      ' '   'BDC_CURSOR'      'EKPO-NETPR(01)',
      ' '   'EKPO-NETPR(01)'  p_newpr,
      ' '   'BDC_OKCODE'      '=BU'.                      "OK code
 
* Call transaction to update customer instalment text
  CALL TRANSACTION 'ME22' USING bdc_tab MODE 'N' UPDATE 'S'
         MESSAGES INTO messtab.
* Check if update was succesful
  IF sy-subrc EQ 0.
    ADD 1 TO gd_update.
    APPEND wa_ekko TO it_success.
  ELSE.
*   Retrieve error messages displayed during BDC update
    LOOP AT messtab WHERE msgtyp = 'E'.
*     Builds actual message based on info returned from Call transaction
      CALL FUNCTION 'MESSAGE_TEXT_BUILD'
           EXPORTING
                msgid               = messtab-msgid
                msgnr               = messtab-msgnr
                msgv1               = messtab-msgv1
                msgv2               = messtab-msgv2
                msgv3               = messtab-msgv3
                msgv4               = messtab-msgv4
           IMPORTING
                message_text_output = w_textout.
    ENDLOOP.
 
*   Build error table ready for output
    wa_error = wa_ekko.
    wa_error-err_msg = w_textout.
    APPEND wa_error TO it_error.
    CLEAR: wa_error.
  ENDIF.
 
* Clear bdc date table
  CLEAR: bdc_tab.
  REFRESH: bdc_tab.
ENDFORM.                    " BDC_UPDATE
 
 
*---------------------------------------------------------------------*
*       FORM DYNPRO                                                   *
*---------------------------------------------------------------------*
*       stores values to bdc table                                    *
*---------------------------------------------------------------------*
*  --&amp;gt;  DYNBEGIN                                                      *
*  --&amp;gt;  NAME                                                          *
*  --&amp;gt;  VALUE                                                         *
*---------------------------------------------------------------------*
FORM dynpro USING    dynbegin name value.
  IF dynbegin = 'X'.
    CLEAR bdc_tab.
    MOVE:  name TO bdc_tab-program,
           value TO bdc_tab-dynpro,
           'X'  TO bdc_tab-dynbegin.
    APPEND bdc_tab.
  ELSE.
    CLEAR bdc_tab.
    MOVE:  name TO bdc_tab-fnam,
           value TO bdc_tab-fval.
    APPEND bdc_tab.
  ENDIF.
ENDFORM.                               " DYNPRO
 
 
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  DISPLAY_REPORT
*&amp;amp;---------------------------------------------------------------------*
*       Display Report
*----------------------------------------------------------------------*
FORM display_report.
  FORMAT COLOR COL_NORMAL.
* Loop at data table
  LOOP AT it_success INTO wa_success.
    WRITE:/      sy-vline,
            (10) wa_success-ebeln, sy-vline,
            (11) wa_success-netpr CURRENCY wa_success-waers, sy-vline,
            (11) p_newpr, sy-vline.
    CLEAR: wa_success.
  ENDLOOP.
  WRITE:/ sy-uline(42).
  REFRESH: it_success.
  FORMAT COLOR COL_BACKGROUND.
ENDFORM.                    " DISPLAY_REPORT
 
 
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  DISPLAY_ERROR_REPORT
*&amp;amp;---------------------------------------------------------------------*
*       Display error report data
*----------------------------------------------------------------------*
FORM display_error_report.
  LOOP AT it_error INTO wa_error.
    WRITE:/      sy-vline,
            (10) wa_error-ebeln, sy-vline,
            (11) wa_error-netpr CURRENCY wa_error-waers, sy-vline,
            (73) wa_error-err_msg, sy-vline.
  ENDLOOP.
  WRITE:/ sy-uline(104).
  REFRESH: it_error.
ENDFORM.                    " DISPLAY_ERROR_REPORT
 
 
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  DISPLAY_ERROR_HEADINGS
*&amp;amp;---------------------------------------------------------------------*
*       Display error report headings
*----------------------------------------------------------------------*
FORM display_error_headings.
  SKIP.
  WRITE:2 ' Error Report '(007) COLOR COL_NEGATIVE.
  SKIP.
  WRITE:2 'The following records failed during update:'(008).
  WRITE:/ sy-uline(104).
  FORMAT COLOR COL_HEADING.
  WRITE:/      sy-vline,
          (10) 'Purchase Order'(009), sy-vline,
          (11) 'Netpr'(010), sy-vline,
          (73) 'Error Message'(012), sy-vline.
  WRITE:/ sy-uline(104).
  FORMAT COLOR COL_NORMAL.
ENDFORM.                    " DISPLAY_ERROR_HEADINGS&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Check this link for creating BDC with Screen shots&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/bdc/bdc_recording.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/bdc/bdc_recording.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Check this link on BDC doubts&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm" target="test_blank"&gt;http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="3760681"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward all helpfull answers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pavan&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jul 2007 06:28:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2626064#M603416</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-30T06:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2626065#M603417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi vamshi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there are many ways to transfer data from one system to other.&lt;/P&gt;&lt;P&gt;they are called conversion programs and interface programs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We use BDC for data Uploads from Legacy system to SAP&lt;/P&gt;&lt;P&gt;BDC programs also called as data conversions&lt;/P&gt;&lt;P&gt;we will use other interfaces like&lt;/P&gt;&lt;P&gt;RFC,BAPI, IDOC/ALE/EDI depending on the requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points for useful answer.&lt;/P&gt;&lt;P&gt;gud luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jul 2007 06:32:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2626065#M603417</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-30T06:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2626066#M603418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Conversions - This type of transfer refers to a one-time transfer from a legacy system to the SAP system. In this case, the &amp;#147;legacy&amp;#148; system is the old system that is being replaced by the SAP system.&lt;/P&gt;&lt;P&gt;For example, the old system being replaced has data for 2,000 vendors that must be transferred to the SAP system.&lt;/P&gt;&lt;P&gt;Interfaces - This type of transfer refers to an ongoing transfer from a complimentary system to the SAP system. In this case, the &amp;#147;complimentary&amp;#148; system is a system that will run along side the SAP system.&lt;/P&gt;&lt;P&gt;For example, customer orders may be taken in another system. For the SAP system to reflect accurate information, these orders must be transferred to the SAP system every night.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BDC can be both interfaces or conversions depending upon the functionality above. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Interfaces are needed when we need data from other than SAP envoronment and vise versa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose aclient may send his business data through Excel sheet which are to be loaded in his SAP Tables.Then we need to use interfaces.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are two Categogies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.From Presentation Layer to your ABAP Program(and then into Database table) &lt;/P&gt;&lt;P&gt;Presentation layer means from your sytem (from C, drives)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.From application Server to your ABAP Program(and then into Database table) &lt;/P&gt;&lt;P&gt;Application Server means the server for your Sap System.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the first case you need to use:From Presentation Layer to your ABAP Program and vise versa)&lt;/P&gt;&lt;P&gt;GUI_UPLOAD to upload data,&lt;/P&gt;&lt;P&gt;GUI_DOWNLOAD to download data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the Second case(From application Server to your ABAP Program and vise versa)&lt;/P&gt;&lt;P&gt;A.OPEN DATA SET FILE NAME ON APPL.SERVER FOR INPUT ENCODING BY DEFAULT. use tranfer command to send data to application server&lt;/P&gt;&lt;P&gt;B. CLOSE DATA SET.&lt;/P&gt;&lt;P&gt;CONVERSION programs are the ones which have one time usage, usually when a legacy system is being replaced by a system like SAP, then the data has to be mapped from the legacy system to SAP system. Here the data to be converted is given on a flat file &amp;amp; is uploaded to SAP tables mostly using LSMW only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INTERFACE programs are the ones which are run at regular intervals, say weekly, monthly or even daily. Here the legacy system continues to co-exist along with SAP system, the legacy system might be useful for certain functionalities but the data might have to run thru SAP transactions for complex data maintenance at regular intervals. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the difference &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;conversion program&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2005/helpdata/en/d3/a65a14e96911d1b401006094b944c8/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2005/helpdata/en/d3/a65a14e96911d1b401006094b944c8/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Interface program&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2005/helpdata/en/64/be5b4150b38147e10000000a1550b0/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2005/helpdata/en/64/be5b4150b38147e10000000a1550b0/frameset.htm&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Conversion program is nothing but file uploading ,it means when you have file from local server or application server,then we need to upload to SAP R/3 ,in this case we use BDC Method's or BAPI Function module&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Interface program - is nothing but getting the data from third party system to SAP R/3 or SAP R/3 to Third party system. In this case we use ALE/IDOC/EDI.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jul 2007 06:45:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2626066#M603418</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-30T06:45:33Z</dc:date>
    </item>
  </channel>
</rss>

