<?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/2061627#M426196</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;As suggested,did you declared it as character?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of it_ps_psa occurs 0,&lt;/P&gt;&lt;P&gt;pernr(8) type c,&lt;/P&gt;&lt;P&gt;werks(4) type c,&lt;/P&gt;&lt;P&gt;btrtl(4) type c,&lt;/P&gt;&lt;P&gt;end of it_ps_psa.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Mar 2007 06:51:00 GMT</pubDate>
    <dc:creator>jayanthi_jayaraman</dc:creator>
    <dc:date>2007-03-12T06:51:00Z</dc:date>
    <item>
      <title>BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2061621#M426190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;I have an excel file. The first column contains personnel number, the second contains personnel area and the third contains personnel subarea. How do I upload this into an in internal table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of it_ps_psa occurs 0,&lt;/P&gt;&lt;P&gt;pernr like pa0001-pernr,&lt;/P&gt;&lt;P&gt;werks like pa0001-werks,&lt;/P&gt;&lt;P&gt;btrtl like pa0001-btrtl,&lt;/P&gt;&lt;P&gt;end of it_ps_psa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;using function module gui_upload. The values that I am getting are all being displayed as ####. Please help me solve this problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards &lt;/P&gt;&lt;P&gt;Abdullah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Mar 2007 06:27:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2061621#M426190</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-12T06:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2061622#M426191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try uploading file into internal table containing the &amp;lt;b&amp;gt;CHAR&amp;lt;/b&amp;gt; type fields ..and it may resolve your problem,,,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assign the points if it helps..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gaurang&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Mar 2007 06:31:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2061622#M426191</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-12T06:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2061623#M426192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;In the function module "GUI_UPLOAD" set the parameter &lt;/P&gt;&lt;P&gt;HAS SEPERATOR = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This shud work. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks. &lt;/P&gt;&lt;P&gt;Rashmi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Mar 2007 06:31:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2061623#M426192</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-12T06:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2061624#M426193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abdulla ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR  UPLOADING  DATA FROM EXCEL FILE , USE FUNCTION MODULE - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM UPLOAD_DATA.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'&lt;/P&gt;&lt;P&gt;     EXPORTING..&lt;/P&gt;&lt;P&gt;..........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DON'T USE WS_UPLOAD ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IT'S WORKING I HAV DONE CUSTOMER MASTER UPLOAD UDING THIS FUNCTION MODULE ..&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;NARENDER B&lt;/P&gt;&lt;P&gt;IF HELP FULL GIVE POINTS .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Mar 2007 06:34:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2061624#M426193</guid>
      <dc:creator>naren112</dc:creator>
      <dc:date>2007-03-12T06:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2061625#M426194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you need to handle this with FM &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;ALSM_EXCEL_TO_INTERNAL_TABLE&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;report zp2.
**excel to internal table .
DATA: BEGIN OF intern OCCURS 0.
        INCLUDE STRUCTURE  alsmex_tabline.
DATA: END OF intern.

TABLES :ZXXXXX.
DATA: ITAB LIKE ZXXXXXX OCCURS 0 WITH HEADER LINE.
DATA: WA_ITAB LIKE ITAB OCCURS 0 WITH HEADER LINE.
data : v_new type i,
       col type i.
data : v_row(4) type n.

PARAMETERS: filename LIKE rlgrap-filename,
            begcol TYPE i DEFAULT 1     NO-DISPLAY,
            begrow TYPE i DEFAULT 1     NO-DISPLAY,
            endcol TYPE i DEFAULT 20     NO-DISPLAY,
            endrow TYPE i DEFAULT 560 NO-DISPLAY.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR filename.
  CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
       EXPORTING
            mask      = '*.xls'
            static    = 'X'
       CHANGING
            file_name = filename.

start-of-selection.
*fetch the same from the excel in the matrix form
*case okay
  CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
       EXPORTING
            filename                = filename
            i_begin_col             = begcol
            i_begin_row             = begrow
            i_end_col               = endcol
            i_end_row               = endrow
       TABLES
            intern                  = intern
       EXCEPTIONS
            inconsistent_parameters = 1
            upload_ole              = 2
            OTHERS                  = 3.

  IF sy-subrc &amp;lt;&amp;gt; 0.
   WRITE:/ 'Upload Error ', SY-SUBRC.
  ENDIF.


  clear intern.
  LOOP AT intern.

*  if intern-row ne v_row.
    at new col.
      v_new = 1.
    endat.
    if v_new = 1.
      clear v_new.
        col = intern-col.
        CASE  col .
         when '1'.
         itab-laufd = intern-value. "ur excel columns
         when '2'.
         itab-matnr = intern-value.
         when '3'.
         itab-werks = intern-value.
         when '4'.
         itab-parent = intern-value.
         endcase.
     endif.

    at end of row.
      append itab. clear itab.
    endat.
*  endif.
  endloop.
loop at itab.
  write : /1(150) itab-laufd right-justified, 12(18) itab-matnr, 34(6)
itab-werks.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a code to handle the upload jsut modify with ur columns..&lt;/P&gt;&lt;P&gt;&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;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Mar 2007 06:42:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2061625#M426194</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-12T06:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2061626#M426195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Abdullah,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are using &amp;lt;b&amp;gt;EXCEL&amp;lt;/b&amp;gt; file (and not any CSV or TAB DELIMITED), you can &lt;/P&gt;&lt;P&gt;try the following logic:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assuming you have a selection screen field for entering file name,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

types:
    begin of t_itab,
       pernr type p0001-pernr,
       werks type p0001-werks,
       btrtl type p0001-btrtl,
    end of t_itab.

data:
    gt_alsmex    type table of alsmex_tabline,
    gs_alsmex    type          alsmex_tabline,
    gv_integ        type i,
    gs_itab type t_itab, 
    gt_itab type table of t_itab.

at selection-screen on value-request for p_file.
    call function 'WS_FILENAME_GET'
    exporting
        def_filename     = ''
        def_path         = ''
        mask             = ',*.xls.'
        mode             = 'O'
        title            = 'Select upload file'
    importing
        filename         = p_file
    exceptions
        inv_winsys       = 1
        no_batch         = 2
        selection_cancel = 3
        selection_error  = 4
        others           = 5.
start-of-selection.
    call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
    exporting
        filename                      = p_file
        i_begin_col                   = '1'
        i_begin_row                   = '2' "1 row for heading
        i_end_col                     = '3'
        i_end_row                     = '9999'
    tables
        intern                        = gt_alsmex
    exceptions
        inconsistent_parameters       = 1
        upload_ole                    = 2
        others                        = 3            .
    if sy-subrc &amp;lt;&amp;gt; 0.
        message i000(00) with 'Invalid file'.
        leave program.
    endif.            .
    sort gt_alsmex by row.
    clear gv_integ.
    describe table gt_alsmex lines gv_integ.
    check not gv_integ is initial.
    read table gt_alsmex into gs_alsmex index gv_integ.
    gv_integ = gs_alsmex-row.
    data:
        lv_rowno(4) type n.
    do gv_integ times.
        lv_rowno = lv_rowno + 1.
        loop at gt_alsmex into gs_alsmex where row = lv_rowno .
            case gs_alsmex-col.
                when '0001'.
                    gs_itab-pernr      = gs_alsmex-value.
                when '0002'.
                    gs_itab-werks    = gs_alsmex-value.
                when '0003'.
                    gs_itab-btrtl = gs_alsmex-value.
            endcase.
        endloop.
        append gs_itab to gt_itab.
        clear gs_itab.
    enddo.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Sajan Joseph.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Mar 2007 06:43:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2061626#M426195</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-12T06:43:37Z</dc:date>
    </item>
    <item>
      <title>Re: BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2061627#M426196</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;As suggested,did you declared it as character?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of it_ps_psa occurs 0,&lt;/P&gt;&lt;P&gt;pernr(8) type c,&lt;/P&gt;&lt;P&gt;werks(4) type c,&lt;/P&gt;&lt;P&gt;btrtl(4) type c,&lt;/P&gt;&lt;P&gt;end of it_ps_psa.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Mar 2007 06:51:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2061627#M426196</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2007-03-12T06:51:00Z</dc:date>
    </item>
    <item>
      <title>Re: BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2061628#M426197</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;If you are directly uploading excel file, u can use the following FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALSM_EXCEL_TO_INTERNAL_TABLE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else u have to convert the excel file into formatted text (space delimited ) that is in prn file then upload.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u will get exact result..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Senthil Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Mar 2007 07:44:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2061628#M426197</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-12T07:44:12Z</dc:date>
    </item>
    <item>
      <title>Re: BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2061629#M426198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;thanks 4 your inputs. The function module ALSM_EXCEL_TO_INTERNAL_TABLE&lt;/P&gt;&lt;P&gt;helped solve the problem.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Abdullah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Mar 2007 08:24:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc/m-p/2061629#M426198</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-12T08:24:07Z</dc:date>
    </item>
  </channel>
</rss>

