<?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 BDC in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2239036#M482567</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;List the steps how to use BDC and whn to go for session method and transaction method .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 May 2007 05:46:51 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-10T05:46:51Z</dc:date>
    <item>
      <title>BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2239036#M482567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;List the steps how to use BDC and whn to go for session method and transaction method .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 May 2007 05:46:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2239036#M482567</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-10T05:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2239037#M482568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Lakshmanan, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   here you go that will help you in writing BDC , please follow the link , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   &lt;A href="https://www.sdn.sap.com/irj/sdn/advancedsearch?query=bdc%20sample%20code%20&amp;amp;cat=sdn_all" target="test_blank"&gt;https://www.sdn.sap.com/irj/sdn/advancedsearch?query=bdc%20sample%20code%20&amp;amp;cat=sdn_all&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    &lt;A href="https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d4c5e890-0201-0010-bd9a-c3fd8683fc97" target="test_blank"&gt;https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d4c5e890-0201-0010-bd9a-c3fd8683fc97&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;&lt;/P&gt;&lt;P&gt;Hope this will make you understand BDCs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;Ranjita .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Ranjita Kar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 May 2007 05:49:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2239037#M482568</guid>
      <dc:creator>former_member196299</dc:creator>
      <dc:date>2007-05-10T05:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2239038#M482569</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;For a BDC upload you need to write a program which created BDC sessions. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steps: &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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the difference between batch input and call transaction in BDC? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Session method.&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;1) synchronous processing. &lt;/P&gt;&lt;P&gt;2) can tranfer large amount of data. &lt;/P&gt;&lt;P&gt;3) processing is slower. &lt;/P&gt;&lt;P&gt;4) error log is created &lt;/P&gt;&lt;P&gt;5) data is not updated until session is processed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Call transaction.&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;1) asynchronous processing &lt;/P&gt;&lt;P&gt;2) can transfer small amount of data &lt;/P&gt;&lt;P&gt;3) processing is faster. &lt;/P&gt;&lt;P&gt;4) errors need to be handled explicitly &lt;/P&gt;&lt;P&gt;5) data is updated automatically &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;plz reward points if helpful or if it solves ur query.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Chinmay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 May 2007 05:51:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2239038#M482569</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-10T05:51:27Z</dc:date>
    </item>
    <item>
      <title>Re: BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2239039#M482570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;for bdc first u have to declare an internal table of type bdcdata.&lt;/P&gt;&lt;P&gt; now populate the internal table.&lt;/P&gt;&lt;P&gt;see the structure of the bdcdata.and fill the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after populating the internal table&lt;/P&gt;&lt;P&gt;use&lt;/P&gt;&lt;P&gt;call transaction '&amp;lt;transaction name&amp;gt;' using &amp;lt;itab&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for session method u have to go to shdb transaction and start recording .giving the name of recording.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inthe program call funcion modules&lt;/P&gt;&lt;P&gt;bdc_open_group -&lt;/P&gt;&lt;HR originaltext="--------" /&gt;&lt;P&gt;&amp;gt;give the session name&lt;/P&gt;&lt;P&gt;bdc_insert -&lt;/P&gt;&lt;HR originaltext="--------" /&gt;&lt;P&gt;&amp;gt;pass the internal table&lt;/P&gt;&lt;P&gt;bdc_close_group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sample code for call transaction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Report  ZPL_BDC_PA30&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZPL_BDC_PA30.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES : PA0022.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : FILENAME TYPE STRING.&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF IT_DATA OCCURS 0,&lt;/P&gt;&lt;P&gt;         PERNR LIKE PA0022-PERNR,       "Personnel Number&lt;/P&gt;&lt;P&gt;         SLABS LIKE PA0022-SLABS,       "Certificate code&lt;/P&gt;&lt;P&gt;         SLABS1 LIKE PA0022-SLABS,      "Certificate code new&lt;/P&gt;&lt;P&gt;       END OF IT_DATA.&lt;/P&gt;&lt;P&gt;  DATA : IT_BDCDATA LIKE BDCDATA OCCURS 1 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;*PARAMETERS : P_FNAME TYPE DXFIELDS-LONGPATH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*********************************************&lt;/P&gt;&lt;P&gt;*populating internal table&lt;/P&gt;&lt;P&gt;*********************************************&lt;/P&gt;&lt;P&gt;it_data-pernr = '44'.&lt;/P&gt;&lt;P&gt;it_data-slabs = 'U0'.&lt;/P&gt;&lt;P&gt;it_data-slabs1 = 'U1'.&lt;/P&gt;&lt;P&gt;append it_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_data-pernr = '5001'.&lt;/P&gt;&lt;P&gt;it_data-slabs = '00'.&lt;/P&gt;&lt;P&gt;it_data-slabs1 = '01'.&lt;/P&gt;&lt;P&gt;append it_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_data-pernr = '1110'.&lt;/P&gt;&lt;P&gt;it_data-slabs = ''.&lt;/P&gt;&lt;P&gt;it_data-slabs1 = '01'.&lt;/P&gt;&lt;P&gt;append it_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_data-pernr = '44'.&lt;/P&gt;&lt;P&gt;it_data-slabs = 'U0'.&lt;/P&gt;&lt;P&gt;it_data-slabs1 = 'U2'.&lt;/P&gt;&lt;P&gt;append it_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*AT SELECTION-SCREEN OUTPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'&lt;/P&gt;&lt;/LI&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;  I_LOCATION_FLAG       = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;  I_SERVER              = '?'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;  I_PATH                = I_PATH&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;  FILEMASK              = '&lt;STRONG&gt;.&lt;/STRONG&gt;'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;  FILEOPERATION         = 'R'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;  O_LOCATION_FLAG       = O_LOCATION_FLAG&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;  O_SERVER              = O_SERVER&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    O_PATH                = P_FNAME&lt;/P&gt;&lt;/LI&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;  ABEND_FLAG            = ABEND_FLAG&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    RFC_ERROR             = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    ERROR_WITH_GUI        = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    OTHERS                = 3&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           .&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;/LI&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; ENDIF.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;*********************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Uploading an input file data to internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*********************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; FILENAME = P_FNAME.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; CALL FUNCTION 'GUI_UPLOAD'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   EXPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     FILENAME                      = FILENAME&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    FILETYPE                      = 'ASC'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    HAS_FIELD_SEPARATOR           = ' '&lt;/P&gt;&lt;/LI&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;  HEADER_LENGTH                 = 0&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;  READ_BY_LINE                  = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;  DAT_MODE                      = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;  CODEPAGE                      = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;  IGNORE_CERR                   = ABAP_TRUE&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;  REPLACEMENT                   = '#'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;  CHECK_BOM                     = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;  VIRUS_SCAN_PROFILE            = VIRUS_SCAN_PROFILE&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;  NO_AUTH_CHECK                 = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;  FILELENGTH                    = FILELENGTH&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;  HEADER                        = HEADER&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   TABLES&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     DATA_TAB                      = IT_DATA&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    FILE_OPEN_ERROR               = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    FILE_READ_ERROR               = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    NO_BATCH                      = 3&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    GUI_REFUSE_FILETRANSFER       = 4&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    INVALID_TYPE                  = 5&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    NO_AUTHORITY                  = 6&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    UNKNOWN_ERROR                 = 7&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    BAD_DATA_FORMAT               = 8&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    HEADER_NOT_ALLOWED            = 9&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    SEPARATOR_NOT_ALLOWED         = 10&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    HEADER_TOO_LONG               = 11&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    UNKNOWN_DP_ERROR              = 12&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    ACCESS_DENIED                 = 13&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    DP_OUT_OF_MEMORY              = 14&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    DISK_FULL                     = 15&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    DP_TIMEOUT                    = 16&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    OTHERS                        = 17&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           .&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;/LI&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   MESSAGE I000(BCTRAIN) WITH 'FILE NOT UPLOADED'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; ELSE.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   MESSAGE I000(BCTRAIN) WITH 'FILE UPLOADED'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; ENDIF.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; LOOP AT IT_DATA.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   WRITE : / IT_DATA-PERNR,&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             IT_DATA-SLABS,&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             IT_DATA-SLABS1.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; ENDLOOP.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_data . "where slabs is not initial.&lt;/P&gt;&lt;P&gt;perform bdc_hdata using 'SAPMP50A'&lt;/P&gt;&lt;P&gt;                            '1000'&lt;/P&gt;&lt;P&gt;                            'X'.&lt;/P&gt;&lt;P&gt;perform bdc_fdata using 'RP50G-PERNR'&lt;/P&gt;&lt;P&gt;                         it_data-pernr.&lt;/P&gt;&lt;P&gt;perform bdc_fdata using 'RP50G-CHOIC'&lt;/P&gt;&lt;P&gt;                         '0022'.&lt;/P&gt;&lt;P&gt;perform bdc_fdata using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                         '=MOD'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if it_data-slabs is not initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_hdata using 'MP002200'&lt;/P&gt;&lt;P&gt;                            '2000'&lt;/P&gt;&lt;P&gt;                            'X'.&lt;/P&gt;&lt;P&gt;perform bdc_fdata using 'P0022-SLABS'&lt;/P&gt;&lt;P&gt;                         it_data-slabs1.&lt;/P&gt;&lt;P&gt;perform bdc_fdata using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                         '=UPD'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL TRANSACTION 'PA30' USING IT_BDCDATA.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt; message i000(bctrain) with 'No data stored for Education for personnel number' it_data-pernr.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;refresh it_bdcdata.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  bdc_fdata&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM bdc_fdata  USING  FNAM FVAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR IT_BDCDATA.&lt;/P&gt;&lt;P&gt;  IT_BDCDATA-FNAM = FNAM.&lt;/P&gt;&lt;P&gt;  IT_BDCDATA-FVAL = FVAL.&lt;/P&gt;&lt;P&gt;  APPEND IT_BDCDATA.&lt;/P&gt;&lt;P&gt;ENDFORM.                    " bdc_fdata&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  bdc_hdata&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM bdc_hdata  USING program scrno dynbegin.&lt;/P&gt;&lt;P&gt;clear it_bdcdata.&lt;/P&gt;&lt;P&gt;it_bdcdata-program = PROGRAM.&lt;/P&gt;&lt;P&gt;IT_BDCDATA-DYNPRO = SCRNO.&lt;/P&gt;&lt;P&gt;IT_BDCDATA-DYNBEGIN = DYNBEGIN.&lt;/P&gt;&lt;P&gt;APPEND IT_BDCDATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " bdc_hdata&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just paste and execute...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Premalatha G&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 May 2007 05:52:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2239039#M482570</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-10T05:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2239040#M482571</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;Batch data communication (BDC) is used to upload the Master data from legacy system to R3 system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls Go thru the following Link : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d62292b3-0301-0010-df98-aaac31cd4a41" target="test_blank"&gt;https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d62292b3-0301-0010-df98-aaac31cd4a41&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Difference between batch input and call transaction in BDC :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Session method. &lt;/P&gt;&lt;P&gt;1) synchronous processing. &lt;/P&gt;&lt;P&gt;2) can tranfer large amount of data. &lt;/P&gt;&lt;P&gt;3) processing is slower. &lt;/P&gt;&lt;P&gt;4) error log is created &lt;/P&gt;&lt;P&gt;5) data is not updated until session is processed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Call transaction. &lt;/P&gt;&lt;P&gt;1) asynchronous processing &lt;/P&gt;&lt;P&gt;2) can transfer small amount of data &lt;/P&gt;&lt;P&gt;3) processing is faster. &lt;/P&gt;&lt;P&gt;4) errors need to be handled explicitly &lt;/P&gt;&lt;P&gt;5) data is updated automatically&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 May 2007 05:53:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2239040#M482571</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-10T05:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2239041#M482572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt; 1. Batch Input usually are used to transfer large amount of data. For example you are implementing a new SAP project, and of course you will need some data transfer from legacy system to SAP system. &lt;/P&gt;&lt;P&gt;CALL TRANSACTION is used especially for integration actions between two SAP systems or between different modules. Users sometimes wish to do something like that click a button or an item then SAP would inserts or changes data automatically. Here CALL TRANSACTION should be considered. &lt;/P&gt;&lt;P&gt;2. Transfer data for multiple transactions usually the Batch Input method is used. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the CALL TRANSACTION USING statement:&lt;/P&gt;&lt;P&gt;Summary: With CALL TRANSACTION USING, the system processes the data more quickly than with batch input sessions. Unlike batch input sessions, CALL TRANSACTION USING does not automatically support interactive correction or logging functions.&lt;/P&gt;&lt;P&gt;Your program prepares the data and then calls the corresponding transaction that is then processed immediately.&lt;/P&gt;&lt;P&gt;The most important features of CALL TRANSACTION USING are:&lt;/P&gt;&lt;P&gt;Synchronous processing &lt;/P&gt;&lt;P&gt;Transfer of data from an individual transaction each time the statement CALL TRANSACTION USING is called &lt;/P&gt;&lt;P&gt;You can update the database both synchronously and asynchronously&lt;/P&gt;&lt;P&gt;The program specifies the update type&lt;/P&gt;&lt;P&gt;Separate LUW (logical units of work) for the transaction&lt;/P&gt;&lt;P&gt;The system executes a database commit immediately before and after the CALL TRANSACTION USING statement &lt;/P&gt;&lt;P&gt;No batch input processing log&lt;/P&gt;&lt;P&gt;Create a session on the batch input queue:&lt;/P&gt;&lt;P&gt;Summary: Offers management of sessions, support for playing back and correcting sessions that contain errors, and detailed logging. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your program prepares the data and stores it in a batch input session. A session is a collection of transaction data for one or more transactions. Batch input sessions are maintained by the system in the batch input queue. You can process batch input sessions in the background processing system. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your program must open a session in the queue before transferring data to it, and must close it again afterwards. All of these operations are performed by making function module calls from the ABAP program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The most important aspects of the session interface are:&lt;/P&gt;&lt;P&gt;Asynchronous processing &lt;/P&gt;&lt;P&gt;Transfers data for multiple transactions &lt;/P&gt;&lt;P&gt;Synchronous database update&lt;/P&gt;&lt;P&gt;During processing, no transaction is started until the previous transaction has been written to the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A batch input processing log is generated for each session &lt;/P&gt;&lt;P&gt;Sessions cannot be generated in parallel&lt;/P&gt;&lt;P&gt;The batch input program must not open a session until it has closed the preceding session.&lt;/P&gt;&lt;P&gt;&lt;A href="http://myweb.dal.ca/hchinni/sap/bdc_home.htm" target="test_blank"&gt;http://myweb.dal.ca/hchinni/sap/bdc_home.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/bdc&amp;amp;" target="test_blank"&gt;https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/bdc&amp;amp;&lt;/A&gt;;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/learning-bdc-programming.htm" target="test_blank"&gt;http://www.sap-img.com/abap/learning-bdc-programming.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/bdc/bdchome.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/bdc/bdchome.htm&lt;/A&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;A href="http://help.sap.com/saphelp_47x200/helpdata/en/69/c250684ba111d189750000e8322d00/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/69/c250684ba111d189750000e8322d00/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/learning-bdc-" target="test_blank"&gt;http://www.sap-img.com/abap/learning-bdc-&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapbrain.com/TUTORIALS/TECHNICAL/BDC_tutorial.html" target="test_blank"&gt;http://www.sapbrain.com/TUTORIALS/TECHNICAL/BDC_tutorial.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;About Session method&lt;/P&gt;&lt;P&gt;In this method you transfer data from internal table to database table through sessions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unless session is processed, the data is not transferred to database table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BDC_OPEN_GROUP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You create the session through program by BDC_OPEN_GROUP function. &lt;/P&gt;&lt;P&gt;Parameters to this function are: &lt;/P&gt;&lt;P&gt;&amp;#149; User Name: User name &lt;/P&gt;&lt;P&gt;&amp;#149; Group: Name of the session&lt;/P&gt;&lt;P&gt;&amp;#149; Lock Date: The date on which you want to process the session.&lt;/P&gt;&lt;P&gt;&amp;#149; Keep: This parameter is passed as &amp;#145;X&amp;#146; when you want to retain session after&lt;/P&gt;&lt;P&gt;processing it or &amp;#145; &amp;#145; to delete it after processing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BDC_INSERT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This function creates the session &amp;amp; data is transferred to Session.&lt;/P&gt;&lt;P&gt;Parameters to this function are:&lt;/P&gt;&lt;P&gt;&amp;#149; Tcode: Transaction Name &lt;/P&gt;&lt;P&gt;&amp;#149; Dynprotab: BDC Data&lt;/P&gt;&lt;P&gt;BDC_CLOSE_GROUP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This function closes the BDC Group. No Parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some additional information for session processing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL TRANSACTION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;About CALL TRANSACTION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Call transaction &amp;lt;tcode&amp;gt; using &amp;lt;BDCTAB&amp;gt;&lt;/P&gt;&lt;P&gt;Mode &amp;lt;A/N/E&amp;gt;&lt;/P&gt;&lt;P&gt;Update &amp;lt;S/A&amp;gt;&lt;/P&gt;&lt;P&gt;Messages into &amp;lt;MSGTAB&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameter &amp;#150; 1 is transaction code.&lt;/P&gt;&lt;P&gt;Parameter &amp;#150; 2 is name of BDCTAB table.&lt;/P&gt;&lt;P&gt;Parameter &amp;#150; 3 here you are specifying mode in which you execute transaction&lt;/P&gt;&lt;P&gt;A is all screen mode. All the screen of transaction are displayed.&lt;/P&gt;&lt;P&gt;N is no screen mode. No screen is displayed when you execute the transaction.&lt;/P&gt;&lt;P&gt;E is error screen. Only those screens are displayed wherein you have error record.&lt;/P&gt;&lt;P&gt;Parameter &amp;#150; 4 here you are specifying update type by which database table is updated.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;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).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parameter &amp;#150; 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:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Tcode: Transaction code&lt;/P&gt;&lt;P&gt;2. Dyname: Batch point module name&lt;/P&gt;&lt;P&gt;3. Dynumb: Batch input Dyn number&lt;/P&gt;&lt;P&gt;4. Msgtyp: Batch input message type (A/E/W/I/S)&lt;/P&gt;&lt;P&gt;5. Msgspra: Batch input Lang, id of message&lt;/P&gt;&lt;P&gt;6. Msgid: Message id&lt;/P&gt;&lt;P&gt;7. MsgvN: Message variables (N = 1 - 4)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steps for CALL TRANSACTION method&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Internal table for the data (structure similar to your local file)&lt;/P&gt;&lt;P&gt;2. BDCTAB like BDCDATA&lt;/P&gt;&lt;P&gt;3. UPLOAD or WS_UPLOAD function to upload the data from local file to itab. (Considering file is local file)&lt;/P&gt;&lt;P&gt;4. Loop at itab.&lt;/P&gt;&lt;P&gt;Populate BDCTAB table.&lt;/P&gt;&lt;P&gt;Call transaction &amp;lt;tcode&amp;gt; using &amp;lt;BDCTAB&amp;gt;&lt;/P&gt;&lt;P&gt;Mode &amp;lt;A/N/E&amp;gt;&lt;/P&gt;&lt;P&gt;Update &amp;lt;S/A&amp;gt;.&lt;/P&gt;&lt;P&gt;Refresh BDCTAB.&lt;/P&gt;&lt;P&gt;Endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(To populate BDCTAB, You need to transfer each and every field)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The major differences between Session method and Call transaction are as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SESSION METHOD CALL TRANSACTION&lt;/P&gt;&lt;P&gt;1. Data is not updated in database table unless Session is processed. Immediate updation in database table.&lt;/P&gt;&lt;P&gt;2. No sy-subrc is returned. Sy-subrc is returned.&lt;/P&gt;&lt;P&gt;3. Error log is created for error records. Errors need to be handled explicitly &lt;/P&gt;&lt;P&gt;4. Updation in database table is always synchronous Updation in database table can be synchronous Or Asynchronous.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error Handling in CALL TRANSACTION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steps for the error handling in CALL TRANSACTION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Internal table for the data (structure similar to your local file)&lt;/P&gt;&lt;P&gt;2. BDCTAB like BDCDATA&lt;/P&gt;&lt;P&gt;3. Internal table BDCMSG like BDCMSGCOLL&lt;/P&gt;&lt;P&gt;4. Internal table similar to Ist internal table&lt;/P&gt;&lt;P&gt;(Third and fourth steps are for error handling)&lt;/P&gt;&lt;P&gt;5. UPLOAD or WS_UPLOAD function to upload the data from the local file to itab. (Considering file is local file)&lt;/P&gt;&lt;P&gt;6. Loop at itab.&lt;/P&gt;&lt;P&gt;Populate BDCTAB table.&lt;/P&gt;&lt;P&gt;Call transaction &amp;lt;tr.code&amp;gt; using &amp;lt;Bdctab&amp;gt;&lt;/P&gt;&lt;P&gt;Mode &amp;lt;A/N/E&amp;gt;&lt;/P&gt;&lt;P&gt;Update &amp;lt;S/A&amp;gt;&lt;/P&gt;&lt;P&gt;Messages &amp;lt;BDCMSG&amp;gt;.&lt;/P&gt;&lt;P&gt;Perform check.&lt;/P&gt;&lt;P&gt;Refresh BDCTAB.&lt;/P&gt;&lt;P&gt;Endloop.&lt;/P&gt;&lt;P&gt;7 Form check.&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0. (Call transaction returns the sy-subrc if updating is not successful).&lt;/P&gt;&lt;P&gt;Call function Format_message.&lt;/P&gt;&lt;P&gt;(This function is called to store the message given by system and to display it along with record)&lt;/P&gt;&lt;P&gt;Append itab2.&lt;/P&gt;&lt;P&gt;Display the record and message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this program for session method using multiple transactions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have one BDC_OPEN_GROUP, multiple BDC_INSERT s and one BDC_CLOSE_GROUP.&lt;/P&gt;&lt;P&gt;You should have multiple BDC_INSERT s for multiple transactions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function BDC_OPENGROUP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Build BDC data and cal lBDC_INSERT for transaction 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Build BDC data and cal lBDC_INSERT for transaction 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Build BDC data and cal lBDC_INSERT for transaction 3&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function BDC_CLOSE_GROUP.&lt;/P&gt;&lt;P&gt;Check out this sample program&lt;/P&gt;&lt;P&gt;REPORT ztest_report&lt;/P&gt;&lt;P&gt;NO STANDARD PAGE HEADING&lt;/P&gt;&lt;P&gt;LINE-SIZE 255&lt;/P&gt;&lt;P&gt;MESSAGE-ID ZRASH.&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal Table Declarations *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;*--Internal Table for Data Uploading.&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF IT_FFCUST OCCURS 0,&lt;/P&gt;&lt;P&gt;KUNNR(10),&lt;/P&gt;&lt;P&gt;BUKRS(4),&lt;/P&gt;&lt;P&gt;KTOKD(4),&lt;/P&gt;&lt;P&gt;ANRED(15),&lt;/P&gt;&lt;P&gt;NAME1(35),&lt;/P&gt;&lt;P&gt;SORTL(10),&lt;/P&gt;&lt;P&gt;STRAS(35),&lt;/P&gt;&lt;P&gt;ORT01(35),&lt;/P&gt;&lt;P&gt;PSTLZ(10),&lt;/P&gt;&lt;P&gt;LAND1(3),&lt;/P&gt;&lt;P&gt;SPRAS(2),&lt;/P&gt;&lt;P&gt;AKONT(10),&lt;/P&gt;&lt;P&gt;END OF IT_FFCUST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Internal Table to Store Error Records.&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF IT_ERRCUST OCCURS 0,&lt;/P&gt;&lt;P&gt;KUNNR(10),&lt;/P&gt;&lt;P&gt;EMSG(255),&lt;/P&gt;&lt;P&gt;END OF IT_ERRCUST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Internal Table to Store Successful Records.&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF IT_SUCCUST OCCURS 0,&lt;/P&gt;&lt;P&gt;KUNNR(10),&lt;/P&gt;&lt;P&gt;SMSG(255),&lt;/P&gt;&lt;P&gt;END OF IT_SUCCUST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Internal Table for Storing the BDC data.&lt;/P&gt;&lt;P&gt;DATA : IT_CUSTBDC LIKE BDCDATA OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Internal Table for storing the messages.&lt;/P&gt;&lt;P&gt;DATA : IT_CUSTMSG LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : V_FLAG1(1) VALUE ' ',&lt;/P&gt;&lt;P&gt;"Flag used for opening session.&lt;/P&gt;&lt;P&gt;V_TLINES LIKE SY-TABIX,&lt;/P&gt;&lt;P&gt;"For storing total records processed.&lt;/P&gt;&lt;P&gt;V_ELINES LIKE SY-TABIX,&lt;/P&gt;&lt;P&gt;"For storing the no of error records.&lt;/P&gt;&lt;P&gt;V_SLINES LIKE SY-TABIX.&lt;/P&gt;&lt;P&gt;"For storing the no of success records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Selection screen *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK B1.&lt;/P&gt;&lt;P&gt;PARAMETERS : V_FNAME LIKE RLGRAP-FILENAME,&lt;/P&gt;&lt;P&gt;V_SESNAM LIKE RLGRAP-FILENAME.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK B1.&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Start-of-selection *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;*-- Form to upload flatfile data into the internal table.&lt;/P&gt;&lt;P&gt;PERFORM FORM_UPLOADFF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;TOP-OF-PAGE *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;TOP-OF-PAGE.&lt;/P&gt;&lt;P&gt;WRITE:/ 'Details of the error and success records for the transaction'&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;ULINE.&lt;/P&gt;&lt;P&gt;SKIP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;End of Selection *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;END-OF-SELECTION.&lt;/P&gt;&lt;P&gt;*-- Form to Generate a BDC from the Uploaded Internal table&lt;/P&gt;&lt;P&gt;PERFORM FORM_BDCGENERATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--To write the totals and the session name.&lt;/P&gt;&lt;P&gt;PERFORM FORM_WRITEOP.&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;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form form_uploadff&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Form to upload flatfile data into the internal table.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM FORM_UPLOADFF .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Variable to change the type of the parameter file name.&lt;/P&gt;&lt;P&gt;DATA : LV_FILE TYPE STRING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LV_FILE = V_FNAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Function to upload the flat file to the internal table.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'GUI_UPLOAD'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;FILENAME = LV_FILE&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FILETYPE = 'ASC'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;HAS_FIELD_SEPARATOR = 'X'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;HEADER_LENGTH = 0&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;READ_BY_LINE = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;DAT_MODE = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FILELENGTH =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;HEADER =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;DATA_TAB = IT_FFCUST&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;FILE_OPEN_ERROR = 1&lt;/P&gt;&lt;P&gt;FILE_READ_ERROR = 2&lt;/P&gt;&lt;P&gt;NO_BATCH = 3&lt;/P&gt;&lt;P&gt;GUI_REFUSE_FILETRANSFER = 4&lt;/P&gt;&lt;P&gt;INVALID_TYPE = 5&lt;/P&gt;&lt;P&gt;NO_AUTHORITY = 6&lt;/P&gt;&lt;P&gt;UNKNOWN_ERROR = 7&lt;/P&gt;&lt;P&gt;BAD_DATA_FORMAT = 8&lt;/P&gt;&lt;P&gt;HEADER_NOT_ALLOWED = 9&lt;/P&gt;&lt;P&gt;SEPARATOR_NOT_ALLOWED = 10&lt;/P&gt;&lt;P&gt;HEADER_TOO_LONG = 11&lt;/P&gt;&lt;P&gt;UNKNOWN_DP_ERROR = 12&lt;/P&gt;&lt;P&gt;ACCESS_DENIED = 13&lt;/P&gt;&lt;P&gt;DP_OUT_OF_MEMORY = 14&lt;/P&gt;&lt;P&gt;DISK_FULL = 15&lt;/P&gt;&lt;P&gt;DP_TIMEOUT = 16&lt;/P&gt;&lt;P&gt;OTHERS = 17&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;*--Deleting the headings from the internal table.&lt;/P&gt;&lt;P&gt;DELETE IT_FFCUST INDEX 1.&lt;/P&gt;&lt;P&gt;*--Getting the total number of records uploaded.&lt;/P&gt;&lt;P&gt;DESCRIBE TABLE IT_FFCUST LINES V_TLINES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDFORM. " form_uploadff&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form Form_bdcgenerate&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Form to Generate a BDC from the Uploaded Internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM FORM_BDCGENERATE .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Generating the BDC table for the fields of the internal table.&lt;/P&gt;&lt;P&gt;LOOP AT IT_FFCUST.&lt;/P&gt;&lt;P&gt;PERFORM POPULATEBDC USING :&lt;/P&gt;&lt;P&gt;'X' 'SAPMF02D' '0105',&lt;/P&gt;&lt;P&gt;' ' 'BDC_OKCODE' '/00' ,&lt;/P&gt;&lt;P&gt;' ' 'RF02D-KUNNR' IT_FFCUST-KUNNR,&lt;/P&gt;&lt;P&gt;' ' 'RF02D-BUKRS' IT_FFCUST-BUKRS,&lt;/P&gt;&lt;P&gt;' ' 'RF02D-KTOKD' IT_FFCUST-KTOKD,&lt;/P&gt;&lt;P&gt;'X' 'SAPMF02D' '0110' ,&lt;/P&gt;&lt;P&gt;' ' 'BDC_OKCODE' '/00',&lt;/P&gt;&lt;P&gt;' ' 'KNA1-ANRED' IT_FFCUST-ANRED,&lt;/P&gt;&lt;P&gt;' ' 'KNA1-NAME1' IT_FFCUST-NAME1,&lt;/P&gt;&lt;P&gt;' ' 'KNA1-SORTL' IT_FFCUST-SORTL,&lt;/P&gt;&lt;P&gt;' ' 'KNA1-STRAS' IT_FFCUST-STRAS,&lt;/P&gt;&lt;P&gt;' ' 'KNA1-ORT01' IT_FFCUST-ORT01,&lt;/P&gt;&lt;P&gt;' ' 'KNA1-PSTLZ' IT_FFCUST-PSTLZ,&lt;/P&gt;&lt;P&gt;' ' 'KNA1-LAND1' IT_FFCUST-LAND1,&lt;/P&gt;&lt;P&gt;' ' 'KNA1-SPRAS' IT_FFCUST-SPRAS,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'X' 'SAPMFO2D' '0120', &lt;/P&gt;&lt;P&gt;' ' 'BDC_OKCODE' '/00',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'X' 'SAPMF02D' '0125', &lt;/P&gt;&lt;P&gt;' ' 'BDC_OKCODE' '/00',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'X' 'SAPMF02D' '0130', &lt;/P&gt;&lt;P&gt;' ' 'BDC_OKCODE' '=ENTR',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'X' 'SAPMF02D' '0340', &lt;/P&gt;&lt;P&gt;' ' 'BDC_OKCODE' '=ENTR',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'X' 'SAPMF02D' '0360',&lt;/P&gt;&lt;P&gt;' ' 'BDC_OKCODE' '=ENTR',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'X' 'SAPMF02D' '0210', &lt;/P&gt;&lt;P&gt;' ' 'KNB1-AKONT' IT_FFCUST-AKONT,&lt;/P&gt;&lt;P&gt;' ' 'BDC_OKCODE' '/00',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'X' 'SAPMF02D' '0215',&lt;/P&gt;&lt;P&gt;' ' 'BDC_OKCODE' '/00',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'X' 'SAPMF02D' '0220', &lt;/P&gt;&lt;P&gt;' ' 'BDC_OKCODE' '/00',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'X' 'SAPMF02D' '0230', &lt;/P&gt;&lt;P&gt;' ' 'BDC_OKCODE' '=UPDA'.&lt;/P&gt;&lt;P&gt;*--Calling the transaction 'fd01'.&lt;/P&gt;&lt;P&gt;CALL TRANSACTION 'FD01' USING IT_CUSTBDC MODE 'N' UPDATE 'S'&lt;/P&gt;&lt;P&gt;MESSAGES INTO IT_CUSTMSG.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;*--Populating the error records internal table.&lt;/P&gt;&lt;P&gt;IT_ERRCUST-KUNNR = IT_FFCUST-KUNNR.&lt;/P&gt;&lt;P&gt;APPEND IT_ERRCUST.&lt;/P&gt;&lt;P&gt;CLEAR IT_ERRCUST.&lt;/P&gt;&lt;P&gt;*--Opening a session if there is an error record.&lt;/P&gt;&lt;P&gt;IF V_FLAG1 = ' '.&lt;/P&gt;&lt;P&gt;PERFORM FORM_OPENSESSION.&lt;/P&gt;&lt;P&gt;V_FLAG1 = 'X'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;*--Inserting the error records into already open session.&lt;/P&gt;&lt;P&gt;IF V_FLAG1 = 'X'.&lt;/P&gt;&lt;P&gt;PERFORM FORM_INSERT.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;*--Populating the Success records internal table.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;IT_SUCCUST-KUNNR = IT_FFCUST-KUNNR.&lt;/P&gt;&lt;P&gt;APPEND IT_SUCCUST.&lt;/P&gt;&lt;P&gt;CLEAR IT_SUCCUST.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;*--Displaying the messages.&lt;/P&gt;&lt;P&gt;IF NOT IT_CUSTMSG[] IS INITIAL.&lt;/P&gt;&lt;P&gt;PERFORM FORM_FORMATMSG.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;*--Clearing the message and bdc tables.&lt;/P&gt;&lt;P&gt;CLEAR : IT_CUSTBDC[],IT_CUSTMSG[].&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Getting the total no of error records.&lt;/P&gt;&lt;P&gt;DESCRIBE TABLE IT_ERRCUST LINES V_ELINES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Getting the total no of successful records.&lt;/P&gt;&lt;P&gt;DESCRIBE TABLE IT_SUCCUST LINES V_SLINES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Closing the session only if it is open.&lt;/P&gt;&lt;P&gt;IF V_FLAG1 = 'X'.&lt;/P&gt;&lt;P&gt;PERFORM FORM_CLOSESESS.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " Form_bdcgenerate&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form populatebdc&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FOrm to Populate the BDC table.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM POPULATEBDC USING VALUE(P_0178)&lt;/P&gt;&lt;P&gt;VALUE(P_0179)&lt;/P&gt;&lt;P&gt;VALUE(P_0180).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF P_0178 = 'X'.&lt;/P&gt;&lt;P&gt;IT_CUSTBDC-PROGRAM = P_0179.&lt;/P&gt;&lt;P&gt;IT_CUSTBDC-DYNPRO = P_0180.&lt;/P&gt;&lt;P&gt;IT_CUSTBDC-DYNBEGIN = 'X'.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;IT_CUSTBDC-FNAM = P_0179.&lt;/P&gt;&lt;P&gt;IT_CUSTBDC-FVAL = P_0180.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND IT_CUSTBDC.&lt;/P&gt;&lt;P&gt;CLEAR IT_CUSTBDC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " populatebdc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form FORM_OPENSESSION&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Form to Open a session.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM FORM_OPENSESSION .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Variable to convert the given session name into reqd type.&lt;/P&gt;&lt;P&gt;DATA : LV_SESNAM(12).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LV_SESNAM = V_SESNAM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Opening a session.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BDC_OPEN_GROUP'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;CLIENT = SY-MANDT&lt;/P&gt;&lt;P&gt;GROUP = LV_SESNAM&lt;/P&gt;&lt;P&gt;HOLDDATE = '20040805'&lt;/P&gt;&lt;P&gt;KEEP = 'X'&lt;/P&gt;&lt;P&gt;USER = SY-UNAME&lt;/P&gt;&lt;P&gt;PROG = SY-CPROG&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;QID =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;CLIENT_INVALID = 1&lt;/P&gt;&lt;P&gt;DESTINATION_INVALID = 2&lt;/P&gt;&lt;P&gt;GROUP_INVALID = 3&lt;/P&gt;&lt;P&gt;GROUP_IS_LOCKED = 4&lt;/P&gt;&lt;P&gt;HOLDDATE_INVALID = 5&lt;/P&gt;&lt;P&gt;INTERNAL_ERROR = 6&lt;/P&gt;&lt;P&gt;QUEUE_ERROR = 7&lt;/P&gt;&lt;P&gt;RUNNING = 8&lt;/P&gt;&lt;P&gt;SYSTEM_LOCK_ERROR = 9&lt;/P&gt;&lt;P&gt;USER_INVALID = 10&lt;/P&gt;&lt;P&gt;OTHERS = 11&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;WRITE &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; 'Session not open'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " FORM_OPENSESSION&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form FORM_INSERT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;fORM TO INSERT ERROR RECOED INTO A SESSION.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM FORM_INSERT .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Inserting the record into session.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BDC_INSERT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;TCODE = 'FD01'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;POST_LOCAL = NOVBLOCAL&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;PRINTING = NOPRINT&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;SIMUBATCH = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CTUPARAMS = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;DYNPROTAB = IT_CUSTBDC&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;INTERNAL_ERROR = 1&lt;/P&gt;&lt;P&gt;NOT_OPEN = 2&lt;/P&gt;&lt;P&gt;QUEUE_ERROR = 3&lt;/P&gt;&lt;P&gt;TCODE_INVALID = 4&lt;/P&gt;&lt;P&gt;PRINTING_INVALID = 5&lt;/P&gt;&lt;P&gt;POSTING_INVALID = 6&lt;/P&gt;&lt;P&gt;OTHERS = 7&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;WRITE &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; 'Unable to insert the record'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDFORM. " FORM_INSERT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form FORM_CLOSESESS&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Form to Close the Open Session.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM FORM_CLOSESESS .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BDC_CLOSE_GROUP'&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;NOT_OPEN = 1&lt;/P&gt;&lt;P&gt;QUEUE_ERROR = 2&lt;/P&gt;&lt;P&gt;OTHERS = 3.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDFORM. " FORM_CLOSESESS&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form FORM_FORMATMSG&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Form to format messages.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM FORM_FORMATMSG .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Var to store the formatted msg.&lt;/P&gt;&lt;P&gt;DATA : LV_MSG(255).&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'FORMAT_MESSAGE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;ID = SY-MSGID&lt;/P&gt;&lt;P&gt;LANG = SY-LANGU&lt;/P&gt;&lt;P&gt;NO = SY-MSGNO&lt;/P&gt;&lt;P&gt;V1 = SY-MSGV1&lt;/P&gt;&lt;P&gt;V2 = SY-MSGV2&lt;/P&gt;&lt;P&gt;V3 = SY-MSGV3&lt;/P&gt;&lt;P&gt;V4 = SY-MSGV4&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;MSG = LV_MSG&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;NOT_FOUND = 1&lt;/P&gt;&lt;P&gt;OTHERS = 2.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; LV_MSG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ULINE.&lt;/P&gt;&lt;P&gt;ENDFORM. " FORM_FORMATMSG&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form form_writeop&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;To write the totals and the session name.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM FORM_WRITEOP .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; 'Total Records Uploaded :',V_TLINES,&lt;/P&gt;&lt;P&gt;/ 'No of Error Records :',V_ELINES,&lt;/P&gt;&lt;P&gt;/ 'No of Success Records :',V_SLINES,&lt;/P&gt;&lt;P&gt;/ 'Name of the Session :',V_SESNAM.&lt;/P&gt;&lt;P&gt;ULINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " form_writeop&lt;/P&gt;&lt;P&gt;use of methods depending upon amount;&lt;/P&gt;&lt;P&gt;if you have run time validation while updating the data into SAP R/3 Transaction,then use BDC Call Transaction.&lt;/P&gt;&lt;P&gt;example : when you load the data into Sales order then you need to load the into Header text of sales order.&lt;/P&gt;&lt;P&gt;for this ,you have to use Update Mode 'S'.&lt;/P&gt;&lt;P&gt;it is online update and if you small amount of data ,then prefer this one&lt;/P&gt;&lt;P&gt;2. If you have huge amount of data and then prefer Session Method.&lt;/P&gt;&lt;P&gt;we have one more advantage in session method...&lt;/P&gt;&lt;P&gt;suppose file has 1,00,000 records and the if you use all the records at time,then you will get short dump like system time exceed .&lt;/P&gt;&lt;P&gt;then you can split the each 10,000 records into one session and will process.&lt;/P&gt;&lt;P&gt;3. Direct Input method : we prefer this method only few Transaction ,&lt;/P&gt;&lt;P&gt;this will not applicable to when system has customer fields .&lt;/P&gt;&lt;P&gt;if helpful reward points&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 May 2007 06:26:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2239041#M482572</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-10T06:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2239042#M482573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Answered&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 May 2007 06:57:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2239042#M482573</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-11T06:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2239043#M482574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HELLO,&lt;/P&gt;&lt;P&gt;    thaks for info.&lt;/P&gt;&lt;P&gt;  while running shdb transaction for mm01 i was stucking with one problem,&lt;/P&gt;&lt;P&gt;i had to select  view mannualy, why it is?&lt;/P&gt;&lt;P&gt;it was taking all data automatically.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Dec 2007 13:11:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2239043#M482574</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-14T13:11:18Z</dc:date>
    </item>
  </channel>
</rss>

