2008 Oct 31 6:34 AM
Hi everyone,
I am using the FM GUI_upload to upload a .txt tab seperated
file .
when when the FM executes i am finding that the internal table
does not hold all the values in the file.
i ckecked and the no of fields and their type is equal in both the internal table and the file.
what could be the reason for this?
Hi
what could be the reason for this?You can find out the reason..with the help of a tool called Debugging. The best tool an ABAPer can get..
Just debug right from the start...and see in the FM...whats happening..
Regards,
Vishwa.
2008 Oct 31 6:38 AM
Hi
what could be the reason for this?You can find out the reason..with the help of a tool called Debugging. The best tool an ABAPer can get..
Just debug right from the start...and see in the FM...whats happening..
Regards,
Vishwa.
2008 Oct 31 6:39 AM
Hi Aditya,
Check out the other sample program to upload the data into the xls file.
REPORT ZCC_EXCEL_UPLOAD.
type-pools: truxs.
data:p_file type RLGRAP-FILENAME.
p_file = 'H:\INT221\testmat1.xlsx'.
*data : sw_string type string.
*sw_string = 'H:\INT221\testmat1.xlsx'.
*p_file = sw_string .
types:begin of t_mara,
matnr(10) ,
end of t_mara.
data:it_tab type standard table of t_mara with header line.
data:w_tab type TRUXS_T_TEXT_DATA.
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
* I_FIELD_SEPERATOR =
I_LINE_HEADER = 'X'
i_tab_raw_data = w_tab
i_filename = p_file
tables
i_tab_converted_data = it_tab
* 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 it_tab.
write:/ it_tab-matnr.
endloop.
Thanks,
Chidanand
2008 Oct 31 6:40 AM
Hi,
Are you giving the exporting parameter HAS_FIELD_SEPARATOR = 'X' ?
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = p_filename
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
tables
data_tab = t_output.
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |