Problem in Uploading Excel Data ! - Urgent
Dear Experts,
I am uploading excel data using FM 'TEXT_CONVERT_XLS_TO_SAP' , its directly convert data and store in internal table same as in excel sheet(row , column wise).
But the problem is , one of the column having description more then 500 characters. so while uploding excel to itab its truncating the text and only uploding 255 characters.
Is there any other way , so that i can upload more then 500 characters long text. Also i have tried 'ALSM_EXCEL_TO_INTERNAL_TABLE' FM , it was also not working.
Please Help me , its Urgent.
Points will be rewared.
Thanks & Regards,
Hi,
Please use FM 'GUI_UPLOAD'.
types: begin of ttab,
rec(1000) type c,
end of ttab.
types: begin of tdat,
fld1(10) type c,
fld2(10) type c,
fld3(10) type c,
end of tdat.
data: itab type table of ttab with header line.
data: idat type table of tdat with header line.
data: file_str type string.
parameters: p_file type localfile.
at selection-screen on value-request for p_file.
call function 'KD_GET_FILENAME_ON_F4'
exporting
static = 'X'
changing
file_name = p_file.
start-of-selection.
file_str = p_file.
call function 'GUI_UPLOAD'
exporting
filename = file_str
filetype = 'ASC'
tables
data_tab = itab
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.
Best regards,
Prashant
Similar Messages
-
How to upload Excel data in Ztables fastly & easily.
Dear ALL,
I want to compare material codes in 2 different excel sheets.
I have downloaded output from 2 different SQVI into 2 different excel sheets.
Now I want to compare these 2 sheets to get matching codes or unmatching codes.
I can use VLOOKUP in excel also. But How can I make use of ABAP by downloading these excel data in 2 different Ztables and compare these 2 tables with some user defined TC (transaction code) ?
For this activity How to upload Excel data(2 sheets) in 2 Ztables fastly & easily ?
Is there any method other than SCAT , BDC and LSMW ???
Or which is best method in above ?
Pl' reply.
Thanks.Have a look at the program
*: Description :
*: This is a simple example program to get data from an excel :
*: file and store it in an internal table. :
*: Author : www.sapdev.co.uk, 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.
WRITE:/ wa_datatab-col1,
wa_datatab-col2,
wa_datatab-col3.
ENDLOOP.
Message was edited by:
K N REDDY -
How to avoid the split problem when uploading the data from csv file
Dear Friends,
I have to upload data from the .csv file to my custom table , i have found a problem when uploading the data .
i am using the code as below , please suggest me what i have to do in this regard
SPLIT wa_raw_csv AT ',' INTO
wa_empdata_csv-status
wa_empdata_csv-userid
wa_empdata_csv-username
wa_empdata_csv-Title
wa_empdata_csv-department.
APPEND wa_empdata_csv TO itab.
in the flat file i can see for one of the record for the field Title as
Director, Finance - NAR............there by through my code the wa_empdata_csv-Title is getting splited data as "Director, and Department field is getting Finance - NAR" , i can see that even though " Director, Finance - NAR" is one word it is getting split .
.......which is the problem iam facing.Please could any body let me know how in this case i should handle in my code that this word
"Director,Finance - NAR" wil not be split into two words.
Thanks & Records
MadhuriHi Madhuri,
Best way to avoid such problem is to use TAB delimited file instead of comma separated data. Generally TAB does not appear in data.
If you are generating the file, use tab instead of comma.
If you cannot modify the format of file and data length in file is fixed character, you will need to define the structure and then move data in fixed length structure.
Regards,
Mohaiyuddin -
Upload excel data into Internal table
Hi,
I'm trying to upload excel data into internal table, well the excel file layout will be different on each run of the report.
Excel file will have 60 columns and 500 record limit. I can upload the excel data using 'ALSM_EXCEL_TO_INTERNAL_TABLE' and 'KCD_EXCEL_OLE_TO_INT_CONVERT' but the output table is generates 60 lines for each record i.e.., 60 * 500 = 30,000 which could cause performance.
I try with the FM 'TEXT_CONVERT_XLS_TO_SAP', but this will only work if the file structure is static. It didn't work for dynamic file layout. Even GUI_UPLOAD doesn't work to upload excel file, it will work if I convert the file to Tab delimited file.
Please advise if you know any alternate procedure to upload excel data into internal table.
Thanks,
Kumar.Moderator message - Cross post locked
Rob -
Upload excel data thru gui_upload in CRM
Hi,
Can anyone tell me how to upload excel data into internal table thru GUI_UPLOAD only in CRM without converting into text files. Please help me out.
Thanks in advance.
regards
sireeshahi,
Use the FM 'ALSM_EXCEL_TO_INTERNAL_TABLE'.
call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
exporting
filename = filename
i_begin_col = i_begin_col
i_begin_row = i_begin_row
i_end_col = i_end_col
i_end_row = i_end_row
tables
intern = intern
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 2
OTHERS = 3 .
if sy-subrc <> 0.
* error
endif.
Regards,
Richa -
Problem to upload the data into internal table record length more than 6000
Hi all
I stuck with this problem from past 3 days. I have to upload the data from excel sheet. iam making it tab delimited and trying to upload from gui_upload. but in the structure of file, we have, one field of 4000 characters, and other fields of 255 characters.
how can i upload this into internal table . From excel sheet or from tab delimeted or any other format? or any special function module is there? while iam doing this its truncating the datat 255 characters and not uploading the other fields also...
can any one of you help me out. ASAP
thnks in advancefrom one of the forum iam just pasting code which it is used in lsmw, try the same logic in ur code hope it can work.
you have to create multiple lines with do...enddo loop., like this:
(assuming excel_long_text-text is 924 characters long, 7 lines X 132 char)
__GLOBAL_DATA__
data: offset type i,
text_132(132) type c.
__BEGIN_OF_RECORD__ Before Using Conversion Rules
Rule : Default Settings Modified
Code: /sapdmc/ltxtl = init_/sapdmc/ltxtl.
CLEAR offset.
DO 7 TIMES.
text_132 = excel_long_text-text+offset(132).
offset = offset + 132.
__END_OF_RECORD__ After Using Conversion Rules
Rule : Default Settings Modified
Code: transfer_record.
ENDDO.
also check this
COMMIT_TEXT
To load long text into SAP
READ_TEXT
To load long text into SAP -
Upload excel data in a table maintenance view
Hi,
I have a requirement to add a button in the application toolbar of the table maintenance screen of a custom table. This button should upload the excel sheet data into the maintenance screen online.
I have created the button in the table maintenance generator. Also, uploaded the data into the internal table from the excel sheet.
The problem is I am unable to populate the data from the internal table to the maintenance screen online.
Any pointers in this regards will be appreciated.
Thanks,
Best regards,
AjithHi,
I think you have to use BDC call transaction (SM30) and use that table control to upload the data. Try and see..
Cheers,
Phani. -
Uploading excel data to database table
Dear Experts,
I have an Excel file which was downloaded from SQL database, now I need to export this data into my 'ztable', for this first I created an internal table of ztable structure and tried to upload into this table through ''TEXT_CONVERT_XLS_TO_SAP".
But I was unable to get data into the internal table(incompatible type), so now I created an internal table of character type fileds now I able to get data to this internal table, but to put this internal table data to actual database table it gives error, here the actual problem is the fields of internal table are getting concated with blank spaces(observed through debug), I unable to condense these blanks also, (I have created an Excel of my own and put data into it and uploaded that data there is no problem working fine but this problem occurs only for the excel downloaded from SQL db)
The problem occurs for quantity and currency fields(I tried through standard FMs also to convert data types ), Could plz suggest something..........
Thank you
Regards
SrinivasHi,
To upload excel sheet into database table, define a types which is of same as table fields.
and try it with the function module TEXT_CONVERT_XLS_TO_SAP
Here is a sample code:
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
I_FIELD_SEPERATOR ='X'
i_tab_raw_data = fs_truxs( TYPE of truxs_t_text_data.)
i_filename = '<FILE-PATH>'
tables
i_tab_converted_data = <Internal Table>
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.
LOOP AT <internal-table> INTO field string.
INSERT <DATABASE- TABLE> FROM <field string>.
ENDLOOP.
Hope this solves the issue.
Regards,
Rajani -
Upload Excel data to Sharepoint list VIA infopath form
Hi,
I'll try to explain the process of what I want to do first.
1. In Excel
I have an exceldocument (XLS, XLSX or XLSM) with 4 named columns and a named worksheet saved locally on my computer.
I want to upload this data into preferably a custom list in sharepoint but it needs to run via a infopath template first.
2. In Infopath
The Infopath template will prompt the user to specify values in 2 additional fields.
After giving input to these fields user may browse for the locally stored excel document and upload the document.
In the same infopath template a dynamic array should be visible containing 6 columns (4 from excel + 2 from headerlevel of template) and the amount of rows based on the number of rows from excelsheet.
At the end of template a submit button is found for uploading the entire array into sharepoint custom list.
Is this possible to do at all?
NOTE! End user should not have to save the excelsheet as XML file nor do a XML mapping.
Infopath should, perhaps with help of VBA read excelsheet and transfer data to correct destination in sharepoint on it self.
Looking forward to your replyHi Jonas,
You can attach your Excel doucment into InfoPath form and send InfoPath form to a custom web service. Then you can parse the Excel data and combine the Excel data and additional fields into SharePoint list in the customized web service.
For more information, you can have a look at the thread:
http://dandeng.blogspot.com/2012/03/submit-infopath-form-data-to-web.html
http://www.codeproject.com/Articles/88547/Submit-entire-InfoPath-form-to-web-service
https://social.msdn.microsoft.com/Forums/office/en-US/590f1e78-5c08-47bd-8af4-9709102b568d/webservice-to-send-attachments-in-infopath-form-to-different-location?forum=sharepointcustomization
https://msdn.microsoft.com/en-us/library/office/gg575571.aspx?f=255&MSPPError=-2147217396
Best Regards,
Eric
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
Problem in Uploading excel file using WebDynpro for Java
Hi All
I have followed for Uploading excel file using WebDynpro for Java added by Tulasi Palnati
I done all, but I'm getting 500 Exception please contact u r system admin meag at run time also Jxl/Workbook class not found msag but i downloaded Jxl.jar file and there is no error signals in coding part. How can I solve the Problem.
Thanks
PolakaPlease ask the people in the Web Dynpro Java forum for a solution.
-
Problem when upload legacy data
Hi all,
I've faced a problem when uploading asset legacy data (AS91) for customer. My customer have started depreciation on May 21, 2009, and I set transfer date is November 30, 2010. So SAP doesn't calculate right planned value for December, 2010. I think that problem related to the first month depreciation. It calculated full month for depreciation (instead of from May 21) and change the planned value for December 2010. So I want SAP just calculate 11 days depreciation for May 2009. How can I config to do this?
Thanks in advance!Hi,
Check in the asset master Opening Start Date for depreciation.. If it is under open mode change that date and see asset explorer for depreciation values.
Thanks,
Padmaja -
Problem to upload excel into table using sqlldr
hi ,
i'm using following code on 10g forms (when button pressed) to upload excel to oracle table i.e.
--V_USERID_CS:=USER||'/'||PWD||'@'||CONNSTR ;
V_USERID_CS:='saf_integ'||'/'||'saf_integ'||'@'||'ORCLREG'; ---connection string for AS on this machine, control files and .csv files are also on that machine--
LOG_EVENTS('BEFORE HOST CALLING'); just to trace the message
LOG_EVENTS('SQLLDR'||' '||RTRIM(V_USERID_CS)||' '||'control='||'c:\overtime.ctl'||' '||'log='||'C:\LOG_FILE.log'||';'); just to trace the command
HOST('SQLLDR'||' '||RTRIM(V_USERID_CS)||' '||'control='||'c:\overtime.ctl'||' '||'log='||'C:\LOG_FILE.log'||';');
LOG_EVENTS('AFTER HOST CALLING'); just to trace the message
COMMIT;
LOG_EVENTS IS PROCEDURE TO TRACE THE BUG; WHICH SHOWS THE DATA AS GIVEN BELOW:
SYSDATE_1 ERROR_TEXT ID
5/14/2010 BEFORE HOST CALLING 8464274
5/14/2010 SQLLDR saf_integ/saf_integ@ORCLREG control=c:\overtime.ctl log=C:\LOG_FILE.log; 8464275
5/14/2010 AFTER HOST CALLING 8464276
i'm not getting any error but even data is not uploaded into table.
but when i get the same command from the log table run directly on that machine it's working fine.
please suggest me where is the gap?
Thanks
kami'm not getting any error but even data is not uploaded into table.
but when i get the same command from the log table run directly on that machine it's working fine.
please suggest me where is the gap?The SQLLDR.EXE file exists where. In the APPLICATION SERVER or in the CLIENT MACHINE. If it is in the client machine. Then you need to use CLIENT_HOST instead of HOST. CLIENT_HOST exists in webutil library.
-Ammad -
Problem while uploading master data through two files
Hi all,
When i try to upload master data of CUSTOMER with two files , Attribute and Text.
Text gets uploaded perfectly.
for Attribute, the data upload is done and psa i can see the exact data. But when i check the CUSTOMER object, i am not able to find the actually Attributs data. Instead those colmns are filed with 'E'.
Can anybdy please explain me wheret the problem is.
Thanks..Hi Sun,
First check the data in PSA whether the records are fine or any discrepancy in them. Also check the properties of the COSTUMER object into which you are loading. The properties "type" or the "size" of the object may not be matching with the same in the file.
Check them and try to load once again.
Hope this helps u...
Regards,
Koundinya Karanam.
Edited by: koundinya karanam on Jan 15, 2008 12:05 AM -
Problems with uploading master data in BI 2004S
Hi all,
I wanna upload master data in FI from R/3 System to BI System. I created its <b>transformation</b>. Then, I <b>migrated</b> it WITH EXPORT option. After that, I created <b>Data Transfer Process</b> (DTP), I didn't change any thing, just "Save and Active". Then I created <b>InfoPackage</b> for it => choose Schedule tab and press Start. Open DTP and choose Execute tab -> press Execute.
1. In the case of successful process (the log showed no errors), How can we check that data is transferred successfully?
2. <b><u>Case 2:</u></b> I did all above steps for a data source. But when I opened InfoPackage -> it said <b>"This InfoPackage has been already in Process Chain"</b>... I still continued to execute its DTP but I failed. The log said that the data was duplicated.
What does it mean? And what should I do in this case?
3. <b><u>Case 3</u></b>: I have a data souce Account Type with <0ACCT_TYPE_TEXT> (icon dialog). I migrated it but failed. Then, after I refreshed, this datasource moved to the group that had been migrated before (in the end of the tree) but <0ACC_TYPE_TEXT> disappeared.
So, I cannot create DTP or InfoPackage for it to transfer. In this case, Do I have to re-create a DataSource? What should I do?
Thanks in advance.case 1:
Check there might be duplicate record. as it is a text datasource language may be maintained. U can check in monitor what record is showing error.
case 2:
If u migrate the data source then it is a BI7.0 version.
If u want to recover 3.x datasource then u need to use RSDS .
Then again u can create Data Transaformation and DTP and migrate once again.
then load the data.
Normally if u r working on BI7.0 do all the stuffs(DT, DTP) using 3.X version then do the migration of datasource else if u migrate first and do the transformation then u will have to manual mapping and u may missed and do a lot of mistakes.
Thanks,
Debasish -
Uploading excel data(.xls) directly into table
I have a requirement to develop a form that allows the user to upload an excel file data into already created table.(user is not willing to save it as a .CSV file :(
I have to skip some rows in the beginning of the sheet and start uploading data from 25th row.
Any guidance wud be appreciated.
Its urgent ,i am stuck.
ThanksHi Arie,
And here I thought you are preaching for simple solutions :)
Depending on the context it might well be the simplest solution to implement and work with :). At my current customer I have implemented it this way, too. The only user to import the data is a skilled "power user", working frequently with MS Access.
All I did was to build a staging table and the final target table. Then I had a package validating the data in the staging table and marking the errornos rows. In MS Access he could easily set up a macro to copy the data via the database link and call the stored procedure. All by clicking just a simple button ;).
Most of all I am advocating to have a good look at the requirements, especially at the skills of the actual users to do the work. There are soo many different ways to build a solution, the hard task is to choose the best suited one wisely.
Also, I have come to dislike solutions that involve too many manual steps. It will cause problems eventually, most certainly when you have to do it quickly due to time pressure.
Regards,
~Dietmar.
Maybe you are looking for
-
Error while testing the OWSM client agent
Hi All, I've created an Oracle WSM Client Agent to initiate my process invoking a web service. After I've changed the agent.properties file setting component.id and client.home=D:/OracleAS_1_10.1.3.1, I've configured the wsif-wsm-config.xml File to e
-
A Windows XP Pro installation on an old Vectra stopped working properly. I decided to erase the hard disk and reinstall from an installation CD. The PC booted to HP's splash screen. The next thing I got was "Error loading the operating system." I
-
HT201335 Is it possible to use air play mirroring without an Apple TV?
Trying to find out if it's possible to do the air play mirroring with a regular HDTV? If so are there any accessories needed?
-
Very slight stuttering on video?
Hi, Yesterday I finally went out and bought myself a Mini 1.83GHZ standard model with no RAM upgrades or the like. So I have connected it via a DVI-HDMI cable to my Samsung TV. Please bear in mind that I bought the Mini purely for my DVD collection.
-
10.1.0.2.0 RMAN backup- What would cause RMAN to hang?
Oracle gurus- Fellow in trouble, need your guidance. I have a serious issue that has no direct error to examine or fix. I have a replicated offline server that has a scripted RMAN backup to run nightly, but the backup times flux from what should be o