‎2008 Feb 27 7:02 AM
hai
am created a one text document that was placed in desktop. i want to upload this text document in sap by se38 program.
plz tell the coding for this descripition.
regards
surender
‎2008 Feb 27 7:13 AM
Hi,
Use GUI_UPLOAD. Specify filename and filetype ('ASC') and the internal table(destination) to the FM.
Hope this helps.
Regards,
Ramya
‎2008 Feb 27 7:07 AM
Hi,
Use function module GUI_UPLOAD to upload the document from presentation server.
Pass the file name to the FILENAME parameter and you receive the file contents in the form of an internal table received from parameter DATA_TAB.
Depending upon the file structure you need to declare and use the internal table for receiving the file.
Cheers.
Edited by: Aditya Laud on Feb 27, 2008 2:09 AM
‎2008 Feb 27 7:08 AM
hi,
here F4 help is iven to get the file from desktop.then GUI_UPLOAD is used to upload the file.
CODE:
report zflatfile_upper_f4help.
*----
INTERNAL TABLE
*----
data: begin of wi_upp occurs 0,
text type string,
end of wi_upp.
data: begin of wi_upp1 occurs 0,
text1 type string,
end of wi_upp1.
*----
DATA
*----
data: var1 like rlgrap-filename.
data: var2 like rlgrap-filename.
data : name1 type string ,
name2 type string.
*&----
*& CALLING FUNCTIONAL MODULE 'KD_GET_FILENAME_ON_F4'
*&----
call function 'KD_GET_FILENAME_ON_F4'
exporting
program_name = syst-repid
dynpro_number = syst-dynnr
changing
file_name = var1.
if sy-subrc <> 0.
endif.
name1 = var1.
*&----
*& CALLING FUNCTIONAL MODULE 'GUI_UPLOAD'
*&----
call function 'GUI_UPLOAD'
exporting
filename = name1
filetype = 'ASC'
tables
data_tab = wi_upp.
Hope this helps u,
Regards,
Arunsri
‎2008 Feb 27 7:13 AM
Hi,
Use GUI_UPLOAD. Specify filename and filetype ('ASC') and the internal table(destination) to the FM.
Hope this helps.
Regards,
Ramya