2006 May 09 12:24 PM
Guyz!
hope u all r growing at a great pace. i am having one doubt. In FM 'GUI_UPLOAD', the supporting file types are 'bin', 'dat', 'asc'. But if you will have a look at the source code of the function module, it has given 2 cases for 'bin' and 'asc'. for other file types it is raising error message stating invalid filetype. but in import tab for filetype, in the long text, it is saying that there is provision for 'dat' filetype. so anybody came accross this situation and found any solution? looking forward to some fruitful reply.
best regards
manas
2006 May 09 12:27 PM
hi
i too faced some prblm while using dat but i have changed it to asc and it worked fine for me..
Cheers,
Abdul
hi
i too faced some prblm while using dat but i have changed it to asc and it worked fine for me..
Cheers,
Abdul
2006 May 09 12:27 PM
hi
i too faced some prblm while using dat but i have changed it to asc and it worked fine for me..
Cheers,
Abdul
2006 May 09 12:44 PM
Hi Manas,
1. See the GUI_Upload fm works fine with the file types ASC or BIN. And it is mentioned in the code of the fm too.
2. I just wrote a code to upload a file and passed 'DAT' for the parameter Filetype. (Uncomment all the exceptions mentioned in the fm in the main program).
It gave neither compilation error nor runtime error. But no data was uploaded.
However , with everything remaining the same when you change the filetype to ASC , the data is successfully uploaded.
So, conclusively the fm works fine with the two filetypes 'ASC' or 'BIN'.
Regards,
Kunal.
2006 May 09 12:45 PM
Hi Manas,
1. See the GUI_Upload fm works fine with the file types ASC or BIN. And it is mentioned in the code of the fm too.
2. I just wrote a code to upload a file and passed 'DAT' for the parameter Filetype. (Uncomment all the exceptions mentioned in the fm in the main program).
It gave neither compilation error nor runtime error. But no data was uploaded.
However , with everything remaining the same when you change the filetype to ASC , the data is successfully uploaded.
So, conclusively the fm works fine with the two filetypes 'ASC' or 'BIN' only.
Regards,
Kunal.
2006 May 09 12:55 PM
Hai Manas
Check the following Code
tables : mara.
data : begin of it_mara occurs 0,
matnr like mara-matnr,
mbrsh like mara-mbrsh,
mtart like mara-mtart,
maktx like makt-maktx,
meins like mara-meins,
end of it_mara.
start-of-selection.
perform upload_data.
&----
*& Form upload_data
&----
text
----
--> p1 text
<-- p2 text
----
FORM upload_data .
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = 'c:\mat_bdc.xls'
FILETYPE = 'DAT'
DAT_MODE = 'X'
TABLES
DATA_TAB = it_mara.
IF SY-SUBRC = 0.
SORT IT_MARA BY MATNR.
ENDIF.
ENDFORM. " upload_data
the flatfile structure as follows
PRANIT_011 C COUP This is Testing material Kg
PRANIT_012 C COUP This is Testing material Kg
PRANIT_013 C COUP This is Testing material Kg
PRANIT_014 C COUP This is Testing material Kg
PRANIT_015 C COUP This is Testing material Kg
Thanks & regards
Sreenivasulu P
2006 May 09 1:07 PM
Sreenivasulu P
it is not working. it's throwing the same error message: wrong value of the parameter filetype.
2006 May 09 1:36 PM
Hi Manas,
It wont work . this program by Sreenivasulu P also proved this. So the only types that we can work using fun module gui_upload is ASC and BIN.
And this has been mentioned clarely when you go through the code of fm Gui_upload.
Regards,
Kunal.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |