04-13-2006 6:15 AM
High Everybody
Can anybody plz tell me the difference between UPLOAD & GUI_UPLOAD FUNCTION IN bdc
When i was using the function UPLOAD..thr was a message.. this funciton is obsolete..don use..
Actually i was uploading a flat file (txt) and the data was uploaded with funcion UPLOAD while there was an error when GUI_UPLOAD function was used
Thanks in Advance
04-13-2006 6:19 AM
Nikita,
These functions are obsolete and cannot be used any more. Look at the calls CL_GUI_FRONTEND_SERVICES. You will find all the methods (GUI_UPLOAD) that you required.
What is error you are getting?
Regards,
Ravi
Note : please mark the helpful answers
04-13-2006 6:19 AM
Nikita,
These functions are obsolete and cannot be used any more. Look at the calls CL_GUI_FRONTEND_SERVICES. You will find all the methods (GUI_UPLOAD) that you required.
What is error you are getting?
Regards,
Ravi
Note : please mark the helpful answers
04-13-2006 6:30 AM
hi Nikita,
Upload and Download FM are obsolete so as to function in a similar fashion...
for upload.
use <b>CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG</b> and then call GUI_UPLOAD FM.
for download.
use <b>CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG</b> and then call GUI_DOWNLOAD FM.
DATA W_WSU_FILENAME02 TYPE STRING.
DATA W_WSU_FILETYPE02 TYPE CHAR10.
W_WSU_FILETYPE02 = 'ASC'.
READ TABLE ITAB_FILE1_TABLE INDEX 1 INTO W_WSU_FILENAME02.
CALL FUNCTION <b>'GUI_UPLOAD'</b>
EXPORTING
FILENAME = W_WSU_FILENAME02
FILETYPE = W_WSU_FILETYPE02
HAS_FIELD_SEPARATOR = 'X'
TABLES
DATA_TAB = ITAB_INFILE
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
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards,
Santosh
04-13-2006 6:25 AM
Hi Nikita,
The UPLOAD Function Module is an obsolete Function Module. When you use this Function Module to upload data from Flat file , it will ask for the confirmation of the path that you have given, by displaying a dialog box. In that dialog box you can see the path and filetype you have given. You need to click on transfer button to continue.
GUI_UPLOAD Function Module also serves the purpose of uploading data.In that case, no extra dialog appears while handling BDC.
GUI_UPLOAD should work. I see no reason why it shouldn't work.
Can you specify what error you were encountering??
Regards,
SP.
04-13-2006 6:30 AM
See to it that the FILENAME you are using in GUI_UPLOAD should be of type String while in UPLOAD it is of type RLGRAP-FILENAME
04-13-2006 6:36 AM
HI
GOOD
UPLOAD->
Upload is when you use function Upload it prompts for a dailog box where in you need to key in the file location.
GUIUPLOAD->Retrieve data file from presentation server(Upload from PC)
DATA: i_file like rlgrap-filename value '/usr/sap/tmp/file.txt'.
DATA: begin of it_datatab occurs 0,
row(500) type c,
end of it_datatab.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = i_file
filetype = 'ASC'
TABLES
data_tab = it_datatab "ITBL_IN_RECORD[]
EXCEPTIONS
file_open_error = 1
OTHERS = 2.
THE FUNCTION IS ABSOLETE->THAT FUNCTION MODULE MIGHT BE NOT USE NOW A DAYS THATS WHY YOU R GETTING THAT ERROR MESSAGE.
THANKS
MRUTYUN
04-13-2006 6:37 AM
Thanks for your responses
Sarvanthi can u plz bit elaborate your point
The error was smthing like FTP 004 (sm number) on the status bar
I tried to get information about it but not successed and than switched to UPLOAD function
04-13-2006 6:45 AM
hi Nikitha,
the file name that u are passing to GUI_UPLOAD has to be declared as type string where in your previous FM UPLOAD it is declared as type RLGRP-FILENAME. Hope this is what Sravanthi is trying to tell you ...
Regards,
Santosh
04-13-2006 6:41 AM
04-13-2006 7:11 AM
hey Guyz
Can u plz tell me if thrz demo program explaining BDC techniques in SAP
04-13-2006 7:17 AM
04-13-2006 7:39 AM
Hi Nikita,
You can also find useful info from the site
Sappoint.com
Just check these pdf documents.
http://www.sappoint.com/abap/bdcconcept.pdf
http://www.sappoint.com/abap/bdcrec.pdf
http://www.sappoint.com/abap/files.pdf
Regards,
SP.