<?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/1478155#M224033</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sanju,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These are the steps for BDC of MM01:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Goto transaction SHDB. Click on new recording from application toolbar.&lt;/P&gt;&lt;P&gt;Give recording name and trabnsaction code(MM01)and click on start recording. You will be taken to MM01 screen. Fill the input fields (Material, Industry sector and material type and press enter). Select the views (eg: basic data1, basic data2) and click on continue.Fill the fields you want to transfer value (eg: like material description, basic unit of measure,material group,gross weight and weight unit say). and click on save.you will reach to screen indocatiog recordin you have done. and save here. Click on back button. Select the recording name and click on program button. Fill the program name for your program starting with "Z". Select transfer from recordig radio button and click on contuinue. Give title and click on source code button from dialog box and save it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So your source code is filled.&lt;/P&gt;&lt;P&gt;create a internal table itab containing all the recorded fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data :  begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;        matnr type rmmg1-matnr,&lt;/P&gt;&lt;P&gt;        mbrsh type rmmg1-mbrsh,&lt;/P&gt;&lt;P&gt;        mtart type rmmg1-mtart,&lt;/P&gt;&lt;P&gt;        maktx type makt-maktx,&lt;/P&gt;&lt;P&gt;        meins type mara-meins,&lt;/P&gt;&lt;P&gt;        matkl type mara-matkl,&lt;/P&gt;&lt;P&gt;       end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After start-of-selection : call function module GUI_UPLOAD in which give the path of flat file as &lt;/P&gt;&lt;P&gt; fileneme = 'D:\file.txt'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Specify file type = 'ASC '&lt;/P&gt;&lt;P&gt;and specify tables &lt;/P&gt;&lt;P&gt;data_tab = itab[]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Give statement :Loop at itab "(after perform Open_group) &lt;/P&gt;&lt;P&gt;Replace the fields you have given with itab-field . For eg:&lt;/P&gt;&lt;P&gt;Repalce &lt;/P&gt;&lt;P&gt;perform bdc_field using 'rmmg1-matnr ' 'ZAmit_steel'. &lt;/P&gt;&lt;P&gt;with &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;perform bdc_field using 'rmmg1-matnr ' itab-matnr.&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Applied to all other fields also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Give endloop befor: PERFORM close_group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Activate the program and execute it. In selection screen choose "generate session " radiobutton. give a session name. Check keep sesion checkbox. Remoce "/" from "no data indicator field" and execute.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now goto SM35 and select the session name you have given and click on analysis. And select the appropriate execution method (foreground,background,error analysis). if background is selected entire processing is done at once. if foreground is selected you have to manually press enter to continue processing. After this process is complete press on "Process button" in SM35 which will indicate log of whole process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Give me your mail id I can forward you lot more docs on BDC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;award points if found useful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: amit bhadauria&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 30 Jul 2006 06:50:12 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-07-30T06:50:12Z</dc:date>
    <item>
      <title>BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1478153#M224031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;  i have a requirement on a bdc for MM01 transaction. please provide the sample program for the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Jul 2006 06:08:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1478153#M224031</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-30T06:08:19Z</dc:date>
    </item>
    <item>
      <title>Re: BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1478154#M224032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sanju,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can go through these PDF documents.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://esnips.com/doc/77cd5c2b-6ad0-446b-9059-cf11b4eb9c30/how-to-perform-BDC.pdf" target="test_blank"&gt;http://esnips.com/doc/77cd5c2b-6ad0-446b-9059-cf11b4eb9c30/how-to-perform-BDC.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://esnips.com/doc/301dbea6-c9d8-4fdf-a591-da26e5b8269b/how-to-perform-BDC-part2.pdf" target="test_blank"&gt;http://esnips.com/doc/301dbea6-c9d8-4fdf-a591-da26e5b8269b/how-to-perform-BDC-part2.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Award points if found useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Jul 2006 06:11:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1478154#M224032</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-30T06:11:47Z</dc:date>
    </item>
    <item>
      <title>Re: BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1478155#M224033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sanju,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These are the steps for BDC of MM01:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Goto transaction SHDB. Click on new recording from application toolbar.&lt;/P&gt;&lt;P&gt;Give recording name and trabnsaction code(MM01)and click on start recording. You will be taken to MM01 screen. Fill the input fields (Material, Industry sector and material type and press enter). Select the views (eg: basic data1, basic data2) and click on continue.Fill the fields you want to transfer value (eg: like material description, basic unit of measure,material group,gross weight and weight unit say). and click on save.you will reach to screen indocatiog recordin you have done. and save here. Click on back button. Select the recording name and click on program button. Fill the program name for your program starting with "Z". Select transfer from recordig radio button and click on contuinue. Give title and click on source code button from dialog box and save it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So your source code is filled.&lt;/P&gt;&lt;P&gt;create a internal table itab containing all the recorded fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data :  begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;        matnr type rmmg1-matnr,&lt;/P&gt;&lt;P&gt;        mbrsh type rmmg1-mbrsh,&lt;/P&gt;&lt;P&gt;        mtart type rmmg1-mtart,&lt;/P&gt;&lt;P&gt;        maktx type makt-maktx,&lt;/P&gt;&lt;P&gt;        meins type mara-meins,&lt;/P&gt;&lt;P&gt;        matkl type mara-matkl,&lt;/P&gt;&lt;P&gt;       end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After start-of-selection : call function module GUI_UPLOAD in which give the path of flat file as &lt;/P&gt;&lt;P&gt; fileneme = 'D:\file.txt'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Specify file type = 'ASC '&lt;/P&gt;&lt;P&gt;and specify tables &lt;/P&gt;&lt;P&gt;data_tab = itab[]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Give statement :Loop at itab "(after perform Open_group) &lt;/P&gt;&lt;P&gt;Replace the fields you have given with itab-field . For eg:&lt;/P&gt;&lt;P&gt;Repalce &lt;/P&gt;&lt;P&gt;perform bdc_field using 'rmmg1-matnr ' 'ZAmit_steel'. &lt;/P&gt;&lt;P&gt;with &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;perform bdc_field using 'rmmg1-matnr ' itab-matnr.&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Applied to all other fields also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Give endloop befor: PERFORM close_group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Activate the program and execute it. In selection screen choose "generate session " radiobutton. give a session name. Check keep sesion checkbox. Remoce "/" from "no data indicator field" and execute.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now goto SM35 and select the session name you have given and click on analysis. And select the appropriate execution method (foreground,background,error analysis). if background is selected entire processing is done at once. if foreground is selected you have to manually press enter to continue processing. After this process is complete press on "Process button" in SM35 which will indicate log of whole process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Give me your mail id I can forward you lot more docs on BDC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;award points if found useful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: amit bhadauria&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Jul 2006 06:50:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1478155#M224033</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-30T06:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1478156#M224034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Amit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How r u hope,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plz send me the BDC documents.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my mail id is justin.jayaraj@lunarismail.info&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Aug 2006 06:18:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1478156#M224034</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-18T06:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1478157#M224035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;just check for sample code..&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="1628531"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Aug 2006 06:22:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1478157#M224035</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-18T06:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1478158#M224036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi sanju,&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  ZMM01_BDC                                                   *&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  ZMM01_BDC                               .&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;data: begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;       mbrsh(1),                       " INDUSTRY TYPE&lt;/P&gt;&lt;P&gt;	 mtart(4),                       " MATERIAL TYPE&lt;/P&gt;&lt;P&gt;	 maktx(40),                      " MATERIAL DESCRIPTION&lt;/P&gt;&lt;P&gt;       meins(4),                       " UNIT&lt;/P&gt;&lt;P&gt;       matkl(10) type n,               " MATERIAL GROUP&lt;/P&gt;&lt;P&gt;	 brgew(21),                      " GROSS WEIGHT&lt;/P&gt;&lt;P&gt;	 gewei(4),                       " UNIT&lt;/P&gt;&lt;P&gt;	 ntgew(21),                      " NET WEIGHT&lt;/P&gt;&lt;P&gt; 	 wrkst(18),                      " OLD MATERIAL&lt;/P&gt;&lt;P&gt;	 kzumw(1),                       " ENV.&lt;/P&gt;&lt;P&gt;      end of itab.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;TEXT INTERNAL TABLE&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;data: begin of itxt occurs 0,&lt;/P&gt;&lt;P&gt;        line(255),&lt;/P&gt;&lt;P&gt;      end of itxt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;BDCDATA INTERNAL TABLE&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;data: btab like bdcdata occurs 0 with header line.&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;start-of-selection.&lt;/P&gt;&lt;P&gt;  perform uploads.&lt;/P&gt;&lt;P&gt;  perform bdc_transfer.&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  UPLOADS&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 uploads.&lt;/P&gt;&lt;P&gt;  call function 'UPLOAD'&lt;/P&gt;&lt;P&gt;   exporting&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  CODEPAGE                      = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  filename                      = 'C:\'&lt;/P&gt;&lt;P&gt;     filetype                      = 'ASC'&lt;/P&gt;&lt;P&gt;    tables&lt;/P&gt;&lt;P&gt;      data_tab                      = itxt&lt;/P&gt;&lt;P&gt;            .&lt;/P&gt;&lt;P&gt;  if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" 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="1" 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;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at itxt.&lt;/P&gt;&lt;P&gt;    if sy-tabix &amp;gt; 1.&lt;/P&gt;&lt;P&gt;      split itxt-line at ',' into itab-mbrsh&lt;/P&gt;&lt;P&gt;                                    itab-mtart&lt;/P&gt;&lt;P&gt;                                    itab-maktx&lt;/P&gt;&lt;P&gt;                                    itab-meins&lt;/P&gt;&lt;P&gt;                                    itab-matkl&lt;/P&gt;&lt;P&gt;                                    itab-brgew&lt;/P&gt;&lt;P&gt;                                    itab-gewei&lt;/P&gt;&lt;P&gt;                                    itab-ntgew&lt;/P&gt;&lt;P&gt;                                    itab-wrkst&lt;/P&gt;&lt;P&gt;                                    itab-kzumw.&lt;/P&gt;&lt;P&gt;      append itab.&lt;/P&gt;&lt;P&gt;      clear itab.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;endform.                               " UPLOADS&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_TRANSFER&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_transfer.&lt;/P&gt;&lt;P&gt;  data v_l type d.&lt;/P&gt;&lt;P&gt;  v_l = sy-datum - 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;OPEN GROUP&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  call function 'BDC_OPEN_GROUP'&lt;/P&gt;&lt;P&gt;       exporting&lt;/P&gt;&lt;P&gt;            group    = 'CR MAT'&lt;/P&gt;&lt;P&gt;            holddate = v_l&lt;/P&gt;&lt;P&gt;            keep     = 'X'&lt;/P&gt;&lt;P&gt;            user     = sy-uname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at itab.&lt;/P&gt;&lt;P&gt;    perform populate.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;BDC INSERT&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    call function 'BDC_INSERT'&lt;/P&gt;&lt;P&gt;         exporting&lt;/P&gt;&lt;P&gt;              tcode     = 'MM01'&lt;/P&gt;&lt;P&gt;         tables&lt;/P&gt;&lt;P&gt;              dynprotab = btab.&lt;/P&gt;&lt;P&gt;     REFRESH BTAB.&lt;/P&gt;&lt;P&gt;  endloop.&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;CLOSE GROUP&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  call function 'BDC_CLOSE_GROUP'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.                               " BDC_TRANSFER&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  POPULATE&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 populate.&lt;/P&gt;&lt;P&gt;  perform generate using: 'X' 'SAPLMGMM' '0060', 	&lt;/P&gt;&lt;P&gt;                          ' ' 'BDC_OKCODE' '/00',&lt;/P&gt;&lt;P&gt;                          ' ' 'RMMG1-MBRSH' ITAB-MBRSH,&lt;/P&gt;&lt;P&gt;                          ' ' 'RMMG1-MTART' ITAB-MTART,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                          'X' 'SAPLMGMM' '0070', 		&lt;/P&gt;&lt;P&gt;                          ' ' 'BDC_OKCODE' '=ENTR',&lt;/P&gt;&lt;P&gt;                          ' ' 'MSICHTAUSW-KZSEL(01)' 'X',&lt;/P&gt;&lt;P&gt;                          ' ' 'MSICHTAUSW-KZSEL(02)' 'X',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                          'X' 'SAPLMGMM' '4004',		&lt;/P&gt;&lt;P&gt;                          ' ' 'BDC_OKCODE' '/00',&lt;/P&gt;&lt;P&gt;                          ' ' 'MAKT-MAKTX' ITAB-MAKTX,&lt;/P&gt;&lt;P&gt;                          ' ' 'MARA-MEINS' ITAB-MEINS,&lt;/P&gt;&lt;P&gt;                          ' ' 'MARA-MATKL' ITAB-MATKL,&lt;/P&gt;&lt;P&gt;                          ' ' 'MARA-BRGEW' ITAB-BRGEW,&lt;/P&gt;&lt;P&gt;                          ' ' 'MARA-GEWEI' ITAB-GEWEI,&lt;/P&gt;&lt;P&gt;                          ' ' 'MARA-NTGEW' ITAB-NTGEW,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                          'X' 'SAPLMGMM' '4004',		&lt;/P&gt;&lt;P&gt;                          ' '	'BDC_OKCODE' '/00',&lt;/P&gt;&lt;P&gt;                          ' ' 'MARA-WRKST' ITAB-WRKST,&lt;/P&gt;&lt;P&gt;                          ' ' 'MARA-KZUMW' ITAB-KZUMW,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                          'X' 'SAPLSPO1' '0300',		&lt;/P&gt;&lt;P&gt;                          ' ' 'BDC_OKCODE' '=YES'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; endform.                              " POPULATE&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  GENERATE&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 generate using  value(p_1) value(p_2) value(p_3).&lt;/P&gt;&lt;P&gt;  if p_1 eq 'X'.&lt;/P&gt;&lt;P&gt;    btab-program = p_2.&lt;/P&gt;&lt;P&gt;    btab-dynpro = p_3.&lt;/P&gt;&lt;P&gt;    btab-dynbegin = p_1.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;    btab-fnam = p_2.&lt;/P&gt;&lt;P&gt;    btab-fval = p_3.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;  append btab.&lt;/P&gt;&lt;P&gt;  clear btab.&lt;/P&gt;&lt;P&gt;endform.                               " GENERATE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if helpful,&lt;/P&gt;&lt;P&gt;keerthi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Aug 2006 06:26:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1478158#M224036</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-18T06:26:34Z</dc:date>
    </item>
    <item>
      <title>Re: BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1478159#M224037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;chk the below code tht is session method for MM01 Transaction.Befor tht io have mentioned the steps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steps to be followed:&lt;/P&gt;&lt;P&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;Also chk the link for detail description.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/bdc.htm" target="test_blank"&gt;http://www.sap-img.com/bdc.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Program:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report ZHARINI_BDC_SESSION no standard page heading line-size 255.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES: MARA,MAKT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF ITAB OCCURS 10,&lt;/P&gt;&lt;P&gt;      MATNR LIKE MARA-MATNR,&lt;/P&gt;&lt;P&gt;      MBRSH LIKE MARA-MBRSH,&lt;/P&gt;&lt;P&gt;      MTART LIKE MARA-MTART,&lt;/P&gt;&lt;P&gt;      MAKTX LIKE MAKT-MAKTX,&lt;/P&gt;&lt;P&gt;      MEINS LIKE MARA-MEINS,&lt;/P&gt;&lt;P&gt;      END OF ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*include bdcrecx1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'WS_UPLOAD'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;   FILENAME                      = 'C:/HAR.TXT'&lt;/P&gt;&lt;P&gt;   FILETYPE                      = 'DAT'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    data_tab                      = ITAB&lt;/P&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BDC_OPEN_GROUP'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   GROUP                     = 'SESHR'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  HOLDDATE                  =  SY-DATUM&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   KEEP                      =  'X'&lt;/P&gt;&lt;P&gt;   USER                      =  SY-UNAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM FILL_BDCDATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BDC_INSERT'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;   TCODE                  = 'MM01'&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    dynprotab              = BDCDATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REFRESH BDCDATA.&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;CALL FUNCTION 'BDC_CLOSE_GROUP'.&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  FILL_BDCDATA&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;      text&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; --&amp;gt;  p1        text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; &amp;lt;--  p2        text&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form FILL_BDCDATA.&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-MTART'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '=AUSW'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'RMMG1-MATNR'&lt;/P&gt;&lt;P&gt;                              ITAB-MATNR.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'RMMG1-MBRSH'&lt;/P&gt;&lt;P&gt;                              ITAB-MBRSH.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'RMMG1-MTART'&lt;/P&gt;&lt;P&gt;                              ITAB-MTART.&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(01)'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '=DEF_SAVE'.&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(01)'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                             'X'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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;                              'USRM1-AAUSW'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                              '=DEF_SKIP'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'USRM1-AAUSW'&lt;/P&gt;&lt;P&gt;                              'X'.&lt;/P&gt;&lt;P&gt;&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;                              'USRM1-SISEL'.&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 'USRM1-AAUSW'&lt;/P&gt;&lt;P&gt;                              'X'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'USRM1-SISEL'&lt;/P&gt;&lt;P&gt;                               'X'.&lt;/P&gt;&lt;P&gt;&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;                              '=BABA'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MAKT-MAKTX'&lt;/P&gt;&lt;P&gt;                              ITAB-MAKTX.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                              'MARA-MEINS'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARA-MEINS'&lt;/P&gt;&lt;P&gt;                              ITAB-MEINS.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MARA-MTPOS_MARA'&lt;/P&gt;&lt;P&gt;                              'NORM'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.                    " FILL_BDCDATA&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&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;       Insert field                                                  *&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 BDC_FIELD USING FNAM FVAL.&lt;/P&gt;&lt;P&gt;  IF FVAL &amp;lt;&amp;gt; SPACE.&lt;/P&gt;&lt;P&gt;    CLEAR BDCDATA.&lt;/P&gt;&lt;P&gt;    BDCDATA-FNAM = FNAM.&lt;/P&gt;&lt;P&gt;    BDCDATA-FVAL = FVAL.&lt;/P&gt;&lt;P&gt;    APPEND BDCDATA.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&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;       Start new screen                                              *&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 BDC_DYNPRO USING PROGRAM DYNPRO.&lt;/P&gt;&lt;P&gt;  CLEAR BDCDATA.&lt;/P&gt;&lt;P&gt;  BDCDATA-PROGRAM  = PROGRAM.&lt;/P&gt;&lt;P&gt;  BDCDATA-DYNPRO   = DYNPRO.&lt;/P&gt;&lt;P&gt;  BDCDATA-DYNBEGIN = 'X'.&lt;/P&gt;&lt;P&gt;  APPEND BDCDATA.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward Points if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Harini.S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Aug 2006 06:27:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/1478159#M224037</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-18T06:27:53Z</dc:date>
    </item>
  </channel>
</rss>

