‎2007 Nov 27 1:50 PM
hi,
which function can upload the internal table data to sap server? i need the field separated by tab,not is a string.
please give me some suggestion.thank you !
regards
sophia
‎2007 Nov 27 1:55 PM
There is no function.
You have to use OPEN DATASET, search in forum por uploading files to application server.
‎2007 Nov 27 2:14 PM
hi.
use "the open dataset" , the field of the internal will concatenated a string .
eg. itab-col1 = 000022
itab-col2 = abcd
itab-col3 = kkll
at sap server ,the text is '000222abcdkkll' ,is can not separated by tab.
how solve this question? ths.
sophia
‎2007 Nov 27 7:02 PM
Easiest way is to create a variable of type C that is the length of your output record and then loop at your itab and do this:
DATA: wa_outstring(100) type c.
CONSTANTS: c_tab TYPE x VALUE '09'.
CONCATENATE itab-col1 itab-col2 itab-col3 into wa_outstring separated by c_tab.
Then write each wa_outstring to your dataset.
‎2007 Nov 27 1:59 PM
Check the Code within the FM C13Z_FILE_UPLOAD_ASCII but there is no FM for direct download internal table to App server
‎2007 Nov 27 2:00 PM
sample code....
OPEN DATASET dsn FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
" opens a file for writing; if the file is not thr in the working direct
"ory it will create one with the same name.
LOOP AT itab.
concatenate itab-fname itab-lname itab-place into rec separated by space
.
TRANSFER rec TO dsn.
rec = ''.
ENDLOOP.
CLOSE DATASET dsn.
use
CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB
for getting tab limited file....
Regards
vasu