10-08-2007 2:15 PM
Hi all,
Is it possible to insert any value into a view?
I have said :
modify ZPP_UTLIST_V from wa.
But id did not accepted ZPP_UTLIST_V as a table or view in spite of the fact that it is a view.
Thanks.
10-08-2007 2:21 PM
hi Deniz,
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
hope this helps
ec
10-08-2007 2:22 PM
ABAP help documentation (see below) says that you cannot if the view is based on more than one table.
<i><b>Only views that refer to a <u>single database table</u>, and whose maintenance status in the ABAP Dictionary permits change access can be specified.</b></i>
10-08-2007 2:23 PM
HI,
You can do the operations in DATABASE view, but you can do any operations on the rest of the views
Regards
Sudheer
10-08-2007 2:34 PM
I can not add any data into view from excel.
I have added data into it via function VIEW_MAINTENANCE_CALL,
however what I want is that I want to add data of an excel file into a view.
But I do not know.
How can I add the excel data into a view table?
Thanks.
10-08-2007 2:39 PM
Hi,
Here is the smae program for uploading an Excel document into an internal table
*..............................................................
*: Description :
*: ----------- :
*: This is a simple example program to get data from an excel :
*: file and store it in an internal table. :
*: :
*: Author : <a href="www.sapdev.co.uk" TARGET="test_blank">www.sapdev.co.uk</a>, 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 <> 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.
After getting the data into the Internale table, Just loop through the Internal tabel then upadte the Z table.
Regards
Sudheer