2011 Apr 16 1:16 AM
Hi Friends,
GUI_UPLOAD is NOTbehaving correctly.
Please help me if you have any idea.
Using GUI_UPLOAD, second record 1114 is not populating to internal table.
Really it is STRANGE..
Code
Using internal table :
TYPES : BEGIN OF ty_filedata,
anln1 TYPE anla-anln1, "Asset No
ch_typ TYPE char1, "Change type
statecd TYPE sta_rsyid,
pstlz TYPE pstlz,
e_date(8) TYPE c, "Effective Date
amount TYPE nafap, "Sale Amount
currency TYPE waers, "Currency
sernr TYPE am_sernr,
END OF ty_filedata.
data : i_filedata type standard table of ty_filedata.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = l_file
filetype = 'ASC'
has_field_separator = 'X'
TABLES
data_tab = i_filedata
File data :Tab delimited data text file.
My file is having below data.
2800008 2 GA 30097 20110423 100.00 USD 1112
2800008 3 sp sp sp sp sp 1114
Please help me if you have any idea.
When you are checking , Please observe that 2nd record last value: 1114 shoud be below 1112(1st Record) . 'sp' means space.
Thanks,
Balaji.T.
Edited by: balajit on Apr 16, 2011 2:18 AM
2011 Apr 16 10:53 AM
Hi balaji,
First enter all your input values in Excel and save it as tab delimted txt file. then u upload that txt file.
Hi Friends,
GUI_UPLOAD is NOTbehaving correctly.
Please help me if you have any idea.
Using GUI_UPLOAD, second record 1114 is not populating to internal table.
Really it is STRANGE..
Code
Using internal table :
TYPES : BEGIN OF ty_filedata,
anln1 TYPE anla-anln1, "Asset No
ch_typ TYPE char1, "Change type
statecd TYPE sta_rsyid,
pstlz TYPE pstlz,
e_date(8) TYPE c, "Effective Date
amount TYPE nafap, "Sale Amount
currency TYPE waers, "Currency
sernr TYPE am_sernr,
END OF ty_filedata.
data : i_filedata type standard table of ty_filedata.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = l_file
filetype = 'ASC'
has_field_separator = 'X'
TABLES
data_tab = i_filedata
File data :Tab delimited data text file.
My file is having below data.
2800008 2 GA 30097 20110423 100.00 USD 1112
2800008 3 sp sp sp sp sp 1114
Please help me if you have any idea.
When you are checking , Please observe that 2nd record last value: 1114 shoud be below 1112(1st Record) . 'sp' means space.
Thanks,
Balaji.T.
Edited by: balajit on Apr 16, 2011 2:18 AM
2011 Apr 16 4:57 AM
Hi Balaji,
Check your file weather after each record tab space is existed or not.
After For each record press tab button and try to upload again.
Regards,
Hari priya
2011 Apr 16 5:04 AM
Hi Balaji,
Whats is filename = l_file .Where is the declaration for that.Pass the body also. If you feel there is any issue with that fm use calss DATA:
lf_file TYPE string,
lf_filelength TYPE i,
lt_datatab TYPE STANDARD TABLE OF ty_xline.
lf_file = file.
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = lf_file
filetype = 'BIN'
IMPORTING
filelength = lf_filelength
CHANGING
data_tab = lt_datatab
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
DISPLAY LIKE 'E'
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
EXIT. " =================== EXIT =====================
ENDIF.
Regards,
Madhu.
2011 Apr 16 10:53 AM
Hi balaji,
First enter all your input values in Excel and save it as tab delimted txt file. then u upload that txt file.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |