Change Value While Uploading data From Excel File
Dear Expert,
Please guide me is it Possible?, if yes then How?
We have one BDC Uploader there After uploading data from Excel File, i want to check one field like this....
if it_f65data-newbs contains any Alphabet.
then user Should be able to change value on the same time while executing Program in table.
Please tell me how i can change value in running program
Regards'
Shelly Malik
Hi,
What you can probably do is, perform a consistency check on your data in the internal table and segregate all those rows that have inconsistent data (in your case, the field NEWBS containing albhabets) into another temporary internal table. Display the temporary internal table in an editable ALV grid saying that these data have not been inserted to the database, coz they have inconsistent data in the field NEWBS. Allow the user to edit and then save the data which will consequently refresh the internal table contents.
Similar Messages
-
hi guru,
I want to upload data from excel file for mm02.. first of all help on the matter of how to upload data from excel...
i hv used the FM ALSM_EXCEL_TO_INTERNAL_TABLE.. but its not working it uploading garbage value ... so tell me how to used it...
help me on this matter.Check below example.
parameters : p_file LIKE rlgrap-filename OBLIGATORY.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
PERFORM get_file_name.
PERFORM get_file_to_excel.
*& Form get_file_name
FORM get_file_name.
DATA: lv_name LIKE sy-repid.
lv_name = sy-repid..
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
program_name = lv_name
dynpro_number = syst-dynnr
static = 'X'
CHANGING
file_name = p_file.
ENDFORM. " get_file_name
*& Form get_file_to_excel
FORM get_file_to_excel.
DATA: idata LIKE alsmex_tabline OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = p_file
i_begin_col = '1'
i_begin_row = '2' "Do not require headings
i_end_col = '2'
i_end_row = '60000'
TABLES
intern = idata
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
STOP.
ENDIF.
* Get first row retrieved
READ TABLE idata INDEX 1.
* Set first row retrieved to current row
DATA: gd_currentrow TYPE i.
gd_currentrow = idata-row.
LOOP AT idata.
* Reset values for next row
IF idata-row NE gd_currentrow.
APPEND f. CLEAR f.
gd_currentrow = idata-row.
ENDIF.
CASE idata-col.
WHEN '0001'.
f-belnr = idata-value.
ENDCASE.
ENDLOOP.
APPEND f. CLEAR f. -
Upload data from excel file to mii without UDS and PCo
Hi Experts,
I am trying to upload data from excel file to mii db without using UDS and PCo. Is there any other ways that we can achieve it.
I am thinking one solution , writing stored procedure. any other solutions?
Thanks in advance,
Eswar.Hi,
Thanks for reply.
I tried to create OLEDB data server which will point to my excel file in D drive.Its created successfully and i tried to query the datasource using sql query, I am not getting any modes in sql query template.
can u provide some steps..how to access this file.
Thanks, Eswar -
Upload data from excel file to Oracle table
Dear All,
I have to upload data from excel file to Oracle table without using third party tools and without converting into CSV file.
Could you tell me please how can i do this using PLSQl or SQL Loader.
Thnaks in Advance..Dear All,
I have to upload data from excel file to
Oracle table without using third party tools and
without converting into CSV file.
Could you tell me please how can i do this
using PLSQl or SQL Loader.
Thnaks in Advance..As billy mentioned using ODBC interface ,the same HS service which is a layer over using traditional ODBC to access non oracle database.Here is link you can hit and trial and come out here if you have any problem.
http://www.oracle-base.com/articles/9i/HSGenericConnectivity9i.php[pre]
Khurram -
While uploading data from local file
Hi,
While uploading data from local file having the header text into interal table using the GUI_UPLOAD function module,there is problem in upload because of header text in file, do we have any option in this FM itself to skip this header text and upload from sdecond line because as per our requirement we can't delete this header text from the file.Hi Manish,
Do you have the problem while uploading? Is it giving any error?
If not, if your uploading is successful into the internal table, then delete the first row, which is header, from the internal table using index eq 1.
Regards,
Chandra Sekhar -
UPLOADING DATA FROM EXCEL FILE.
Hi All,
i have to upload the data from excel file to an internal table.I am using FM 'ALSM_EXCEL_TO_INTERNAL_TABLE' for that. But the problem is it taking upto 50 characters only from each cell of excel sheet. in each cell i have more than 100 characters.
How to read these type of data?..
Plz help me in this regard.
thank you in advance!!!!
Regards,
RaviHi,
Check my previous post for the same question for referance
Re: Excel to itab
Guess this will help you.
Regards,
Ram. -
Upload data from excel file -URGENT
Hi All,
Advanced thanks to ur reply
How to upload data from excel sheet to itab
what are the functional modules we are using for that
Please help me
i look forward to ur reply
Regards
Raja Sekhar.THi,
TYPE-POOLS: truxs.
DATA: i_text_data TYPE truxs_t_text_data,
v_filename_string TYPE string.
DATA: BEGIN OF itab OCCURS 0,
Name(30),
Phone(15),
Fax(500).
DATA: END OF itab.
PARAMETERS: p_file LIKE rlgrap-filename.
START-OF-SELECTION.
v_filename_string = p_file.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = v_filename_string
filetype = 'ASC'
has_field_separator = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
dat_mode = ''
IMPORTING
FILELENGTH =
HEADER =
TABLES
data_tab = i_text_data
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
i_field_seperator = 'X'
I_LINE_HEADER =
i_tab_raw_data = i_text_data
i_filename = p_file
TABLES
i_tab_converted_data = itab
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.
I think this code will help u.
With Regards,
Ranganathan -
Uploading data from excel file to a dynamically created internal table
Hi,
I have a requirement where i have to upload data from an excel file into a database table. I would be able to determine the structure of the table only at runtime based on the user input.. so i have created an internal table dynamically.
Could you please tell me if its possible to upload data from an excel file to the dynamically created internal table using any function modules?
I thought of doing this by declaring a generic internal table of one field and then uploading the *.csv file into it and then splitting it based on "," and then assigning it to the field symbol referencing the internal table.. but my file length exceeds 132 characters and i'm only able to get data of lenght 132 char's in my internal table ( generic one).
Could anyone please show me a way around this.
Thanks in advance,
HarshaSure, check this out.
report zrich_0002.
type-pools: slis.
field-symbols: <dyn_table> type standard table,
<dyn_wa>,
<dyn_field>.
data: it_fldcat type lvc_t_fcat,
wa_it_fldcat type lvc_s_fcat.
type-pools : abap.
data: new_table type ref to data,
new_line type ref to data.
data: iflat type table of string.
data: xflat type string.
data: irec type table of string with header line.
data: tabix type sy-tabix.
data: file type string.
selection-screen begin of block b1 with frame title text .
parameters: p_file type rlgrap-filename default 'c:Test.csv'.
parameters: p_flds type i.
selection-screen end of block b1.
start-of-selection.
* Add X number of fields to the dynamic itab cataelog
do p_flds times.
clear wa_it_fldcat.
wa_it_fldcat-fieldname = sy-index.
wa_it_fldcat-datatype = 'C'.
wa_it_fldcat-inttype = 'C'.
wa_it_fldcat-intlen = 10.
append wa_it_fldcat to it_fldcat .
enddo.
* Create dynamic internal table and assign to FS
call method cl_alv_table_create=>create_dynamic_table
exporting
it_fieldcatalog = it_fldcat
importing
ep_table = new_table.
assign new_table->* to <dyn_table>.
* Create dynamic work area and assign to FS
create data new_line like line of <dyn_table>.
assign new_line->* to <dyn_wa>.
file = p_file.
call method cl_gui_frontend_services=>gui_upload
exporting
filename = file
changing
data_tab = iflat
exceptions
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
others = 17.
loop at iflat into xflat.
clear irec. refresh irec.
split xflat at ',' into table irec.
loop at irec.
tabix = sy-tabix.
assign component tabix of structure <dyn_wa> to <dyn_field>.
<dyn_field> = irec.
endloop.
append <dyn_wa> to <dyn_table>.
endloop.
* Write out data from table.
loop at <dyn_table> into <dyn_wa>.
do.
assign component sy-index of structure <dyn_wa> to <dyn_field>.
if sy-subrc <> 0.
exit.
endif.
if sy-index = 1.
write:/ <dyn_field>.
else.
write: <dyn_field>.
endif.
enddo.
endloop.
Regards,
Rich Heilman -
Upload data from excel file to "Fast Data Entry" in FB60
Hi,
I have a requirement from users, they want to load data of G/L accounts items in FB60 using "Fast Data Entry" from an excel file.
I did some research and found out that the framework to transfer clipboard data into an SAP table(http://www.synactive.com/examples/example0016.html) seems to be the suitable solution.
However, I still cannot make it work.
Do you have any suggestion for my case ? How can I load data from an excel file to the transaction FB60?
Thanks in advance,
HungDear Hung,
You can upload data through LSMW (Batch Input).
But you need to convert your excel sheet into CSV format or txt format.
Please take help of your ABAP team if required.
This will accommodate your requirement.
Regards
Saurabh -
Error While Uploding data from Excel File
I try to upload data directly from Xlfile to Internal table.I have used the foll function module
ALSM_EXCEL_TO_INTERNAL_TABLE
and it's working nicely when i run the program from R/3.
My Question is ,if i access the same program from ITS ,no record is uploaded .
Any help will be much appreciated .
Rgds,
J.Hi,
try with this sample code.
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.
clear itab.
call function 'WS_UPLOAD'
exporting
codepage = ' '
filename = p_file
filetype = 'DAT'
tables
data_tab = itab
exceptions
conversion_error = 1
file_open_error = 2
file_read_error = 3
invalid_type = 4
no_batch = 5
unknown_error = 6
invalid_table_width = 7
gui_refuse_filetransfer = 8
customer_error = 9
others = 10.
if sy-subrc ne 0.
message e000 with text-e01.
stop.
endif.
I hope it will work for you.
Thanks. -
Problem while uploading data from flat file
hi friends,
suppose if there are 100 records in flat file , if 20 records uploaded with out any problem and if error occurs while uploading remaing data . is necessary to upload entire data again or else only remaining data should be uploaded?
i had used call transaction for purchase order application?
please give me reply soon its urgent
thanks & regards
priyaHi Hari,
you have to upload the remaining data.
as u have used CT method, do 1 thing trap the error data in runtime & prepare another flat file. next time correct the data in new flat file. & run the DBC program again with this new flat file.
Reward if useful
Regards
ANUPAM -
Reg : Error While uploading Datas from EXCEL in to SAP
Hi Experts,
Please help me with code inorder to upload EXCEL File DATA in to SAP.... I tried with FM : ALSM_EXCEL_TO_INTERNAL_TABLE & TEXT_CONVERT_XLS_TO_SAP but exception raised like UPLOAD_OLE for me..
Wat to do...?
Please help with exact data (EXCEL) and code...
regards
e arthiHi arthi
save you file as CSV file in excel.
that means your file will be coma separated,
and then use fm
GUI_UPLOAD.
This will solve your problem.
Regards,
Vijay -
ERROR while uploading data from EXCEl to sap using ALSM_EXCEL FUNCION MODULE
Hi Experts,
I am uploading excel data into sap suing function module ALSM_EXCEl_TO_INTERNAL_TABLE , used this funcion module in the program while running the program one blank excel sheet is opening and data is not uploading into internal table . even same blank sheet is opeining if we user
CONVERT_EXCEL_TO_INTERNAL function module also.
can you please tell me why this error is coming how to over come this error.
My excel sheet data records are less then 10000.
Thanks & regards
kiranHi Taranam,
Use FM ALSM_EXCEL_TO_INTERNAL_TABLE.
Regards,
Atish -
Upload data from excel( XLS/xs format) in SAP CRM
Upload data from excel( XLS/xs format) in SAP CRM 7.0 as there is no *ALSM*EXCEL*ITAB* like FM there unlike ECC 6.0...?
hello Buddy,
plz go through below links
http://wiki.scn.sap.com/wiki/display/CRM/CRM+Web+UI+-+Uploading+data+from+Excel+files
http://scn.sap.com/docs/DOC-50732
http://scn.sap.com/docs/DOC-31985
Hope This will Help You... -
Upload data from excel (not the excle file) into SAP
Guys,
how can we upload data from excel sheet into SAP? I mean just the data not the entire file,
I have a requirement where user press a button in excel sheet and the data in the sheet will get uploaded into SAP.
I am sure we have to use BAPI and some VB programming for macros, I will really appriciate if anyone can help how to achive this.
some sample code exampe will help.
Cheers!I think u r writing BDC for Uploading the data from excel flile to sap. for this is the code I am sending u can use then for Uploading data from excel to sap.
DATA: lv_filename TYPE rlgrap-filename.
FIELD-SYMBOLS : <fs>.
DATA : l_intern TYPE alsmex_tabline OCCURS 0 WITH HEADER LINE.
DATA : l_index TYPE i.
PARAMETERS : startcol TYPE i ,
startrow TYPE i ,
endcol TYPE i ,
endrow TYPE i .
PARAMETERS: p_flnam LIKE rlgrap-filename.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_flnam.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = sy-repid
FIELD_NAME = ' '
IMPORTING
file_name = p_flnam .
MOVE p_flnam TO lv_filename.
Uploading the flat file from the desktop
START-OF-SELECTION.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = lv_filename
i_begin_col = startcol
i_begin_row = startrow
i_end_col = endcol
i_end_row = endrow
TABLES
intern = l_intern
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
SORT l_intern BY row col.
LOOP AT l_intern.
MOVE l_intern-col TO l_index.
ASSIGN COMPONENT l_index OF STRUCTURE itab TO <fs>.
MOVE l_intern-value TO <fs>.
AT END OF row.
APPEND itab.
CLEAR itab.
ENDAT.
ENDLOOP.
I hope it will help u.
Regards
Nayan
Maybe you are looking for
-
I purchased elements 9 for iMac as a paid download 10/23/2015, recently I had to replace my computer's hard drive and lost elements. I had read that downloaded purchases would be available for 3 years but, when I click onto the serial number of that
-
Object Indicator field in Report painter
we are looking for some field details in RWCOOM table like object indicator. There is object indicator field name in CCSS table. We want to ignore planned cost of service orders from the project planned cost as there is already planing of cost at pro
-
Re: Error, numeric or value error: character to number conversion error
Can someone please please tell me why I'm getting this error and what I'm doing wrong? It looks like a simple error, "numeric or value error: character to number conversion error". My code is as follows: string connectionString = WebConfigurationMana
-
Display Picture on the Log in Pageo
Hi, How do I change the display picture of the Log in page. Currently it is the default cosmic looking one from Apple. Pls help,
-
Some TV shows/movies will not airplay with audio.
While airplaying/mirroring some movies/tv shows will not play with audio.