<?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: which to use in BDC programming ?? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/which-to-use-in-bdc-programming/m-p/1055396#M90225</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you are welcome Rad. Thanks for awarding the points!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Dec 2005 23:42:42 GMT</pubDate>
    <dc:creator>former_member186741</dc:creator>
    <dc:date>2005-12-01T23:42:42Z</dc:date>
    <item>
      <title>which to use in BDC programming ??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/which-to-use-in-bdc-programming/m-p/1055392#M90221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Back again...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on your suggestions on BDC, I successfully tried BDC on a couple of insert as well update transactions with my data in a CSV file and it worked well !! thanks to all..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have trouble understanding the different ways each one of you is adoptiong to present the solution...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I followed this and found very simple..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Recorded the transaction using SHDB. Created a program transferred from recording.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Added my file upload logic and saved data in an internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Iterated the internal table in a loop and used itab-fieldname in palce of the constant data . so i had all perform statements inside my loop..Hoep u get it..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This I find very simple.. find attached my code on BDC for MM02. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But some of you have advised me to use BDC_INSERT, CALL_TRANSACTION etc. Whats the difference ? Are there scenarios when my simplest procedure wont work and I need to follow ur advise ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please explain ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report ZBDC2&lt;/P&gt;&lt;P&gt;       no standard page heading line-size 255.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;include bdcrecx1.&lt;/P&gt;&lt;P&gt;Tables: RMMG1, MAKT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of tdata,&lt;/P&gt;&lt;P&gt;         rec(150) type c,&lt;/P&gt;&lt;P&gt;       end of tdata,&lt;/P&gt;&lt;P&gt;       begin of tmtgp,&lt;/P&gt;&lt;P&gt;         matnr LIKE RMMG1-MATNR,&lt;/P&gt;&lt;P&gt;         maktx LIKE MAKT-MAKTX,&lt;/P&gt;&lt;P&gt;       end of tmtgp.&lt;/P&gt;&lt;P&gt;data: idata type table of tdata with header line.&lt;/P&gt;&lt;P&gt;data: imtgp type table of tmtgp with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen begin of block b1 with frame title text-001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters: p_file type localfile default 'C:\mm02_data_csv.csv'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen end of block b1.at selection-screen on value-request&lt;/P&gt;&lt;P&gt;for p_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'KD_GET_FILENAME_ON_F4'&lt;/P&gt;&lt;P&gt;        exporting            static    = 'X'&lt;/P&gt;&lt;P&gt;        changing            file_name = p_file.&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform upload_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at imtgp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform open_group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '0060'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'RMMG1-MATNR'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'RMMG1-MATNR'&lt;/P&gt;&lt;P&gt;                              imtgp-matnr.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '0070'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MSICHTAUSW-DYTXT(02)'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '=ENTR'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MSICHTAUSW-KZSEL(01)'&lt;/P&gt;&lt;P&gt;                              'X'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MSICHTAUSW-KZSEL(02)'&lt;/P&gt;&lt;P&gt;                              'X'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '4004'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MAKT-MAKTX'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MAKT-MAKTX'&lt;/P&gt;&lt;P&gt;                              imtgp-maktx.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARA-MEINS'&lt;/P&gt;&lt;P&gt;                              'EA'.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '4004'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MAKT-MAKTX'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MAKT-MAKTX'&lt;/P&gt;&lt;P&gt;                              imtgp-maktx.&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLSPO1' '0300'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '=YES'.&lt;/P&gt;&lt;P&gt;perform bdc_transaction using 'MM02'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform close_group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form upload_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: filename type string.&lt;/P&gt;&lt;P&gt;clear idata.&lt;/P&gt;&lt;P&gt;refresh idata.&lt;/P&gt;&lt;P&gt;filename = p_file.&lt;/P&gt;&lt;P&gt;call function 'GUI_UPLOAD'&lt;/P&gt;&lt;P&gt;    exporting            filename        = filename&lt;/P&gt;&lt;P&gt;    filetype        = 'ASC'&lt;/P&gt;&lt;P&gt;    tables            data_tab        = idata&lt;/P&gt;&lt;P&gt;    exceptions            file_open_error = 1&lt;/P&gt;&lt;P&gt;    file_read_error = 2&lt;/P&gt;&lt;P&gt;    no_authority    = 6&lt;/P&gt;&lt;P&gt;    others          = 17.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    check sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    loop at idata.&lt;/P&gt;&lt;P&gt;    clear imtgp.&lt;/P&gt;&lt;P&gt;    split idata at ',' into imtgp-matnr imtgp-maktx.&lt;/P&gt;&lt;P&gt;    append imtgp.&lt;/P&gt;&lt;P&gt;    endloop.&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Dec 2005 21:31:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/which-to-use-in-bdc-programming/m-p/1055392#M90221</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-01T21:31:53Z</dc:date>
    </item>
    <item>
      <title>Re: which to use in BDC programming ??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/which-to-use-in-bdc-programming/m-p/1055393#M90222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check out this document. This covers most aspects of BDC programming -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sappoint.com/abap/bdcconcept.pdf" target="test_blank"&gt;http://www.sappoint.com/abap/bdcconcept.pdf&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Dec 2005 22:13:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/which-to-use-in-bdc-programming/m-p/1055393#M90222</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-01T22:13:16Z</dc:date>
    </item>
    <item>
      <title>Re: which to use in BDC programming ??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/which-to-use-in-bdc-programming/m-p/1055394#M90223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rad,&lt;/P&gt;&lt;P&gt;basically what you done is use the 'call transaction' approach already. This is fine for low volumes or once off procedures. If you are processing high volumes or need a regular procedure BDC is the way to go. BDC allows you to create batch(es) of transactions which you can release, re-run, monitor, check logg of etc at your convenience. Transaction SM35 controls BDC sessions but you create can them in your program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The program you have already written only needs to be changed slightly to start creating BDC sessions. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to use BDC_OPEN_GROUP to initiate a session (can be used only once at start of program or can be used n times say every 1000 transactions). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BDC_INSERT should be used instead of 'call transaction, this will add the current transactions screens and data to the current BDC session'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally, BDC_CLOSE_GROUP can be used to close off a session (again this can be used once at end of program or at the end of each set of transactions).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Often, programmers code parameters so that they can decide which mode to run their program in and can easily toggle between 'call transaction' and BDC when testing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Neil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Dec 2005 22:40:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/which-to-use-in-bdc-programming/m-p/1055394#M90223</guid>
      <dc:creator>former_member186741</dc:creator>
      <dc:date>2005-12-01T22:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: which to use in BDC programming ??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/which-to-use-in-bdc-programming/m-p/1055395#M90224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Neil. You explained it well..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Dec 2005 23:38:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/which-to-use-in-bdc-programming/m-p/1055395#M90224</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-01T23:38:07Z</dc:date>
    </item>
    <item>
      <title>Re: which to use in BDC programming ??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/which-to-use-in-bdc-programming/m-p/1055396#M90225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you are welcome Rad. Thanks for awarding the points!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Dec 2005 23:42:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/which-to-use-in-bdc-programming/m-p/1055396#M90225</guid>
      <dc:creator>former_member186741</dc:creator>
      <dc:date>2005-12-01T23:42:42Z</dc:date>
    </item>
  </channel>
</rss>

