2007 Sep 11 1:39 PM
hi
which function module can be used to select the file from the application server as to select file from the presentation server we use f4-filename.
thanks
ekta
2007 Sep 11 1:42 PM
Hi,
Here is the function module
CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
EXPORTING
directory = ' '
filemask = ' '
IMPORTING
serverfile = p_afile
EXCEPTIONS
canceled_by_user = 1
OTHERS = 2.
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
Sudheer
If you know the complete network path to the application server, you can use the GUI frontend control to do this. For example, this works good for me.
report zrich_0001.
parameters: p_file type localfile.
at selection-screen on value-request for p_file.
data: ifile type filetable.
data: xfile like line of ifile.
data: rc type i.
call method cl_gui_frontend_services=>file_open_dialog
exporting
initial_directory
= '\<host_name>usrsapTST'
changing
file_table = ifile
rc = rc.
read table ifile into xfile index 1.
check sy-subrc = 0.
p_file = xfile-filename.
Regards,
Rich Heilman
2007 Sep 11 1:40 PM
2007 Sep 11 1:42 PM
Hi,
Here is the function module
CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
EXPORTING
directory = ' '
filemask = ' '
IMPORTING
serverfile = p_afile
EXCEPTIONS
canceled_by_user = 1
OTHERS = 2.
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
Sudheer
2007 Sep 11 1:44 PM
If you know the complete network path to the application server, you can use the GUI frontend control to do this. For example, this works good for me.
report zrich_0001.
parameters: p_file type localfile.
at selection-screen on value-request for p_file.
data: ifile type filetable.
data: xfile like line of ifile.
data: rc type i.
call method cl_gui_frontend_services=>file_open_dialog
exporting
initial_directory
= '\<host_name>usrsapTST'
changing
file_table = ifile
rc = rc.
read table ifile into xfile index 1.
check sy-subrc = 0.
p_file = xfile-filename.
Regards,
Rich Heilman
2007 Sep 11 1:44 PM
Hi,
The FM used for obtaining an F4 help from application server is - /SAPDMC/LSM_F4_SERVER_FILE.
The FM used for obtaining files from application server - SUBST_GET_FILE_LIST.
2007 Sep 11 1:47 PM
2007 Sep 12 1:08 PM
I thank all of the people who responded this issue.
thanks
ekta
2007 Sep 12 1:23 PM
Hi,
There is one transaction is for download a file from application server
<b>CG3Y and CG3Z</b>
try to use this for download.
if u want to print a file in application server u have to write a code as following way
OPEN DATASET v_file FOR <b>OUTPUT</b> IN TEXT MODE .
<b>OUTPUT</b> for writing a text into application server
<b>INPUT</b> for reading a text from application server..
<b>reward me a points if it use full answer...</b>
praveen
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |