<?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/3971855#M948726</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;you first do the recording using SHDB.  Then slect the recording and click on the button Program which asks whether to transfer from the recording or to create from a file. select any option and this creates program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now you have to add the FM to upload the data from flat file to internal table. you can use the following code for that. Now replace the values with the workarea values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we have a function module : ALSM_EXCEL_TO_INTERNAL_TABLE .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Apart from this we have other function modules like &lt;/P&gt;&lt;P&gt;TEXT_CONVERT_XLS_TO_SAP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The FM takes the column and row limits as parameters . This FM reads data from EXCEL file and put in an internal table of format ROWPOS COLPOS VALUE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SO again by looping the same internal table and extracting the values using the CASE.&lt;/P&gt;&lt;P&gt;Please find the sample code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZEXCEL_ITAB .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES : BEGIN OF TY_ITAB ,&lt;/P&gt;&lt;P&gt;V1 TYPE C,&lt;/P&gt;&lt;P&gt;V2(10) TYPE C,&lt;/P&gt;&lt;P&gt;V3(10) TYPE C,&lt;/P&gt;&lt;P&gt;V4(10) TYPE C,&lt;/P&gt;&lt;P&gt;END OF TY_ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : ITAB TYPE TABLE OF TY_ITAB,&lt;/P&gt;&lt;P&gt;WITAB TYPE TY_ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:JTAB TYPE TABLE OF ALSMEX_TABLINE ,&lt;/P&gt;&lt;P&gt;WJTAB TYPE ALSMEX_TABLINE .&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;FILENAME = 'D:\Documents and Settings\hzb14v.APAC\Desktop\Book1.xls'&lt;/P&gt;&lt;P&gt;I_BEGIN_COL = 1&lt;/P&gt;&lt;P&gt;I_BEGIN_ROW = 1&lt;/P&gt;&lt;P&gt;I_END_COL = 4&lt;/P&gt;&lt;P&gt;I_END_ROW = 3&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;INTERN = JTAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT JTAB INTO WJTAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASE WJTAB-COL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHEN '0001'.&lt;/P&gt;&lt;P&gt;MOVE: WJTAB-VALUE TO WITAB-V1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHEN '0002'.&lt;/P&gt;&lt;P&gt;MOVE: WJTAB-VALUE TO WITAB-V2.&lt;/P&gt;&lt;P&gt;WHEN '0003'.&lt;/P&gt;&lt;P&gt;MOVE: WJTAB-VALUE TO WITAB-V3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHEN '0004'.&lt;/P&gt;&lt;P&gt;MOVE: WJTAB-VALUE TO WITAB-V4.&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT END OF ROW.&lt;/P&gt;&lt;P&gt;APPEND WITAB TO ITAB.&lt;/P&gt;&lt;P&gt;CLEAR WITAB.&lt;/P&gt;&lt;P&gt;ENDAT.&lt;/P&gt;&lt;P&gt;CLEAR WJTAB.&lt;/P&gt;&lt;P&gt;ENDLOOP.&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;Thanks and Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Jun 2008 04:58:43 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-11T04:58:43Z</dc:date>
    <item>
      <title>bdc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/3971853#M948724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HELLO ,&lt;/P&gt;&lt;P&gt;I want to migrate date from excel file to SAP using SHDB tcode. can anybody guide me how to do that.....what input i have to give when field contents......from file or from recording?&lt;/P&gt;&lt;P&gt;Where to mention name of file from which we have to take data?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jun 2008 07:53:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/3971853#M948724</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-10T07:53:32Z</dc:date>
    </item>
    <item>
      <title>Re: bdc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/3971854#M948725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Get the Excel Data into a internal table using cl_gui_frontend_services=&amp;gt;gui_upload and then write a logic accordingly to upload data into database tables using Batchinput , Transaction..etc..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jun 2008 23:05:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/3971854#M948725</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-10T23:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: bdc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/3971855#M948726</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;you first do the recording using SHDB.  Then slect the recording and click on the button Program which asks whether to transfer from the recording or to create from a file. select any option and this creates program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now you have to add the FM to upload the data from flat file to internal table. you can use the following code for that. Now replace the values with the workarea values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we have a function module : ALSM_EXCEL_TO_INTERNAL_TABLE .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Apart from this we have other function modules like &lt;/P&gt;&lt;P&gt;TEXT_CONVERT_XLS_TO_SAP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The FM takes the column and row limits as parameters . This FM reads data from EXCEL file and put in an internal table of format ROWPOS COLPOS VALUE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SO again by looping the same internal table and extracting the values using the CASE.&lt;/P&gt;&lt;P&gt;Please find the sample code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZEXCEL_ITAB .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES : BEGIN OF TY_ITAB ,&lt;/P&gt;&lt;P&gt;V1 TYPE C,&lt;/P&gt;&lt;P&gt;V2(10) TYPE C,&lt;/P&gt;&lt;P&gt;V3(10) TYPE C,&lt;/P&gt;&lt;P&gt;V4(10) TYPE C,&lt;/P&gt;&lt;P&gt;END OF TY_ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : ITAB TYPE TABLE OF TY_ITAB,&lt;/P&gt;&lt;P&gt;WITAB TYPE TY_ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:JTAB TYPE TABLE OF ALSMEX_TABLINE ,&lt;/P&gt;&lt;P&gt;WJTAB TYPE ALSMEX_TABLINE .&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;FILENAME = 'D:\Documents and Settings\hzb14v.APAC\Desktop\Book1.xls'&lt;/P&gt;&lt;P&gt;I_BEGIN_COL = 1&lt;/P&gt;&lt;P&gt;I_BEGIN_ROW = 1&lt;/P&gt;&lt;P&gt;I_END_COL = 4&lt;/P&gt;&lt;P&gt;I_END_ROW = 3&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;INTERN = JTAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT JTAB INTO WJTAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASE WJTAB-COL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHEN '0001'.&lt;/P&gt;&lt;P&gt;MOVE: WJTAB-VALUE TO WITAB-V1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHEN '0002'.&lt;/P&gt;&lt;P&gt;MOVE: WJTAB-VALUE TO WITAB-V2.&lt;/P&gt;&lt;P&gt;WHEN '0003'.&lt;/P&gt;&lt;P&gt;MOVE: WJTAB-VALUE TO WITAB-V3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHEN '0004'.&lt;/P&gt;&lt;P&gt;MOVE: WJTAB-VALUE TO WITAB-V4.&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT END OF ROW.&lt;/P&gt;&lt;P&gt;APPEND WITAB TO ITAB.&lt;/P&gt;&lt;P&gt;CLEAR WITAB.&lt;/P&gt;&lt;P&gt;ENDAT.&lt;/P&gt;&lt;P&gt;CLEAR WJTAB.&lt;/P&gt;&lt;P&gt;ENDLOOP.&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;Thanks and Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jun 2008 04:58:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/3971855#M948726</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-11T04:58:43Z</dc:date>
    </item>
  </channel>
</rss>

