‎2005 Dec 07 3:52 PM
Hello folks,
Is there any standard abap program used for loading a file from presentation server to an SAP directory.
Thanks
‎2005 Dec 07 4:03 PM
Hi Naren,
You can write your own program to upload file from Presentation server (using GUI_UPLOAD) and then use 'open dataset' , 'transfer' and 'close dataset' statements for writing the same to application server (SAP directory).
Regards,
Raj
‎2005 Dec 07 4:03 PM
Hi Naren,
You can write your own program to upload file from Presentation server (using GUI_UPLOAD) and then use 'open dataset' , 'transfer' and 'close dataset' statements for writing the same to application server (SAP directory).
Regards,
Raj
‎2005 Dec 07 4:21 PM
This is not exactly meant for the purpose of transferring files from server to desktop and desktop to server, but it will serve the purpose.
Go to SXDB. Pick up any object and go to next screen. Here, under the "File access" section, enter the file name, path and in the appropriate place(Application Server or Presentation Server). In the application toolbar, select the button for 'Copy'. This will take you to another screen. Specify the 'From' and 'To' appropriately and click 'Copy' again. A decision pop-up will come asking "File contains lines with an unknown structure. Should these lines also be copied?". Click 'Yes' and your file will now be copied to the destination folder.
You need the necessary access to your unix box though.
Srinivas
‎2005 Dec 07 4:07 PM
From Presentation server use function:
GUI_UPLOAD or OPEN DATASET
‎2005 Dec 07 4:16 PM
Hi Naren
I think this Standard program can serve the purpose RPCIFU04
Regards
Neelima.
‎2005 Dec 07 4:16 PM
u may try LSPCAU01 program for doing this. or else u can copy it & enhance according to ur requirements.
Pl. award appropriate points.
‎2005 Dec 07 4:21 PM
Use
Call method CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = l_filename
filetype = l_filetype
has_field_separator = yes "use tabs
* HEADER_LENGTH = 0
* READ_BY_LINE = 'X'
* IMPORTING
* FILELENGTH =
* HEADER =
CHANGING
data_tab = <l_data_tab> "w/o header line
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
not_supported_by_gui = 17
OTHERS = 18.
IF sy-subrc <> 0.
endif.and then <b>open data</b> set destination
and transfer the data set using <b>trasfer </b>.
‎2005 Dec 07 4:22 PM
Hi,
There is no such Program is there, even you can wirte small code for the same,
Use GUI_UPLOAD to get the data from Presentation server and load it in to a Internal table,
then use <b>OPEN DATASET <filename> FOR INPUT IN TEXT MODE</b>
then use *-- LOOP UNTIL THE END OF FLAT FILE
DO.
*-- POPULATES FLAT FILE DATA INTO INTERNAL TABLE
READ DATASET <filename> INTO <Internal table>.
IF sy-subrc <> 0.
EXIT.
ELSE.
APPEND <internale table>.
CLEAR: <internale table>.
ENDIF.
ENDDO.
*--Close the file
CLOSE DATASET <filename>.
hope you understand
Regards
Sudheer
‎2005 Dec 07 4:22 PM
You can:
report ztest.
data: begin of itab occurs 0,
field(256),
end of itab.
data: dsn(100) value '/usr/sap/xfr/FIS/testbmp'.
call function 'GUI_UPLOAD'
exporting
filename = 'c:temptest.txt'
tables
data_tab = itab.
open dataset dsn for output in binary mode.
loop at itab.
transfer itab-field to dsn.
endloop.
close dataset dsn.
Rob
‎2005 Dec 07 4:39 PM
‎2005 Dec 07 4:45 PM