on 07-18-2008 12:26 PM
Hello Expert,
I have record's in excel sheet. I want to upload into R/3 Databasd via WDAABAP.
PLz tell me steps how to do it.
Regards,
Varun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
By following the above link.
I have used this code its working for notepad but its dumping for Excel sheet.
The dump is " A character set conversion is not possible".
Could you plz help me out for the same, i have to do it for excel sheet.
*Code start
DATA content TYPE xstring.
DATA size TYPE i.
DATA lv_string TYPE string.
DATA s_cont TYPE string.
DATA x_cont TYPE xstring.
DATA convt TYPE REF TO cl_abap_conv_in_ce.
wd_context->get_attribute( EXPORTING name = 'FILECONTENT' IMPORTING value = x_cont ).
convt = cl_abap_conv_in_ce=>create( input = x_cont ).
convt->read( IMPORTING data = s_cont ).
DATA: fields TYPE string_table.
DATA: lv_field TYPE string.
DATA: s_table TYPE string_table.
DATA: itab TYPE zvj_tt_emp.
DATA: str_itab TYPE zvj_ts_emp.
SPLIT s_cont AT cl_abap_char_utilities=>cr_lf INTO TABLE s_table.
FIELD-SYMBOLS: <wa_table> LIKE LINE OF s_table.
LOOP AT s_table ASSIGNING <wa_table>.
SPLIT <wa_table> AT cl_abap_char_utilities=>horizontal_tab INTO TABLE fields.
READ TABLE fields INTO lv_field INDEX 1.
str_itab-employee_id = lv_field.
READ TABLE fields INTO lv_field INDEX 2.
str_itab-name = lv_field.
APPEND str_itab TO itab.
ENDLOOP.
*code end
Thanks and Regards,
Varun
Edited by: Varun Kumar Jain on Jul 21, 2008 8:20 AM
I wouldn't hold out hope for some other solution. This is topic that is discussed frequently in this forum. The Microsoft Binary format for Excel (pre 2007 version) is simply not very accessible to other applications. It is a microsoft-specific format and the specificaiton is not published. It is not based upon any open format that can be processed by ABAP. Therefore most people find that you must resave the document into some other format - Text Tab Delimited, Comma Separated File, or XML. The easiest formats to process are the pure text based ones.
XML is another possible, especially since the native format in office 2007 is now XML. However this is much more difficult to parse than one of the simple text formats.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.