<?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: inserting data into a view in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-into-a-view/m-p/2893730#M680115</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Here is the smae program for uploading an Excel document into an internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

*..............................................................
*: Description                                                :
*: -----------                                                :
*: This is a simple example program to get data from an excel :
*: file and store it in an internal table.                    :
*:                                                            :
*: Author : &amp;lt;a href="www.sapdev.co.uk" TARGET="test_blank"&amp;gt;www.sapdev.co.uk&amp;lt;/a&amp;gt;, based on code from Jayanta      :
*:                                                            :
*: SAP Version : 4.7                                          :
*:............................................................:
REPORT  zupload_excel_to_itab.

TYPE-POOLS: truxs.

PARAMETERS: p_file TYPE  rlgrap-filename.

TYPES: BEGIN OF t_datatab,
      col1(30)    TYPE c,
      col2(30)    TYPE c,
      col3(30)    TYPE c,
      END OF t_datatab.
DATA: it_datatab type standard table of t_datatab,
      wa_datatab type t_datatab.

DATA: it_raw TYPE truxs_t_text_data.

* At selection screen
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
  CALL FUNCTION 'F4_FILENAME'
    EXPORTING
      field_name = 'P_FILE'
    IMPORTING
      file_name  = p_file.


***********************************************************************
*START-OF-SELECTION.
START-OF-SELECTION.

  CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
    EXPORTING
*     I_FIELD_SEPERATOR        =
      i_line_header            =  'X'
      i_tab_raw_data           =  it_raw       " WORK TABLE
      i_filename               =  p_file
    TABLES
      i_tab_converted_data     = it_datatab[]    "ACTUAL DATA
   EXCEPTIONS
      conversion_failed        = 1
      OTHERS                   = 2.

  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.


***********************************************************************
* END-OF-SELECTION.
END-OF-SELECTION.
  LOOP AT it_datatab INTO wa_datatab.
 Z_table-Field1 = wa_datatab-col1.
 Z_table-Field2 = wa_datatab-col2.
 Z_table-Field3 = wa_datatab-col3.
 Insert Z_TABLE.
  ENDLOOP.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After getting the data into the Internale table, Just loop through the Internal tabel then upadte the Z table.&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; Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Oct 2007 13:39:05 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-08T13:39:05Z</dc:date>
    <item>
      <title>inserting data into a view</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-into-a-view/m-p/2893725#M680110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;Is it possible to insert any value into a view?&lt;/P&gt;&lt;P&gt;I have said :&lt;/P&gt;&lt;P&gt;modify ZPP_UTLIST_V from wa.&lt;/P&gt;&lt;P&gt;But id did not accepted ZPP_UTLIST_V as a table or view in spite of the fact that it is a view.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2007 13:15:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-into-a-view/m-p/2893725#M680110</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-08T13:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: inserting data into a view</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-into-a-view/m-p/2893726#M680111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Deniz,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the view is filled up with data by the system, because it is a 'view' of different fields of different transparent tables. You have to check what fields/tables are behind the view, fill that tables with entries and you'll see the records in the view&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;ec&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2007 13:21:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-into-a-view/m-p/2893726#M680111</guid>
      <dc:creator>JozsefSzikszai</dc:creator>
      <dc:date>2007-10-08T13:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: inserting data into a view</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-into-a-view/m-p/2893727#M680112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ABAP help documentation (see below) says that you cannot if the view is based on more than one table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;i&amp;gt;&amp;lt;b&amp;gt;Only views that refer to a &amp;lt;u&amp;gt;single database table&amp;lt;/u&amp;gt;, and whose maintenance status in the ABAP Dictionary permits change access can be specified.&amp;lt;/b&amp;gt;&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2007 13:22:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-into-a-view/m-p/2893727#M680112</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-08T13:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: inserting data into a view</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-into-a-view/m-p/2893728#M680113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;You can do the operations in DATABASE view, but you can do any operations on the rest of the views&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; Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2007 13:23:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-into-a-view/m-p/2893728#M680113</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-08T13:23:33Z</dc:date>
    </item>
    <item>
      <title>Re: inserting data into a view</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-into-a-view/m-p/2893729#M680114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can not add any data into view from excel.&lt;/P&gt;&lt;P&gt;I have added data into it via function VIEW_MAINTENANCE_CALL,&lt;/P&gt;&lt;P&gt;however what I want is that I want to add data of an excel file into a view.&lt;/P&gt;&lt;P&gt;But I do not know.&lt;/P&gt;&lt;P&gt;How can I add the excel data into a view table?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2007 13:34:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-into-a-view/m-p/2893729#M680114</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-08T13:34:35Z</dc:date>
    </item>
    <item>
      <title>Re: inserting data into a view</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-into-a-view/m-p/2893730#M680115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Here is the smae program for uploading an Excel document into an internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

*..............................................................
*: Description                                                :
*: -----------                                                :
*: This is a simple example program to get data from an excel :
*: file and store it in an internal table.                    :
*:                                                            :
*: Author : &amp;lt;a href="www.sapdev.co.uk" TARGET="test_blank"&amp;gt;www.sapdev.co.uk&amp;lt;/a&amp;gt;, based on code from Jayanta      :
*:                                                            :
*: SAP Version : 4.7                                          :
*:............................................................:
REPORT  zupload_excel_to_itab.

TYPE-POOLS: truxs.

PARAMETERS: p_file TYPE  rlgrap-filename.

TYPES: BEGIN OF t_datatab,
      col1(30)    TYPE c,
      col2(30)    TYPE c,
      col3(30)    TYPE c,
      END OF t_datatab.
DATA: it_datatab type standard table of t_datatab,
      wa_datatab type t_datatab.

DATA: it_raw TYPE truxs_t_text_data.

* At selection screen
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
  CALL FUNCTION 'F4_FILENAME'
    EXPORTING
      field_name = 'P_FILE'
    IMPORTING
      file_name  = p_file.


***********************************************************************
*START-OF-SELECTION.
START-OF-SELECTION.

  CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
    EXPORTING
*     I_FIELD_SEPERATOR        =
      i_line_header            =  'X'
      i_tab_raw_data           =  it_raw       " WORK TABLE
      i_filename               =  p_file
    TABLES
      i_tab_converted_data     = it_datatab[]    "ACTUAL DATA
   EXCEPTIONS
      conversion_failed        = 1
      OTHERS                   = 2.

  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.


***********************************************************************
* END-OF-SELECTION.
END-OF-SELECTION.
  LOOP AT it_datatab INTO wa_datatab.
 Z_table-Field1 = wa_datatab-col1.
 Z_table-Field2 = wa_datatab-col2.
 Z_table-Field3 = wa_datatab-col3.
 Insert Z_TABLE.
  ENDLOOP.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After getting the data into the Internale table, Just loop through the Internal tabel then upadte the Z table.&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; Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2007 13:39:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-into-a-view/m-p/2893730#M680115</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-08T13:39:05Z</dc:date>
    </item>
  </channel>
</rss>

