11-22-2007 12:51 PM
Hi all,
I need a FM to select a directoroy from application server and the name for the file I am going to create.
It must be something like the FM GUI_FILE_SAVE_DIALOG, but for sap server.
Can anyone help me?
Thanks in Advance.
11-22-2007 1:08 PM
Use the code below:
PARAMETERS: f_app(128).
AT SELECTION-SCREEN ON VALUE-REQUEST FOR f_app.
PERFORM get_fname_app.
&----
*& Form get_fname_app
&----
text
----
FORM get_fname_app.
DATA: c_fnh_mask TYPE dxfields-filemask VALUE '.',
search_dir TYPE dxfields-longpath VALUE '/sapglobal/users',
file_path LIKE dxfields-longpath.
CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
EXPORTING
i_location_flag = 'A'
i_server = ' '
i_path = search_dir
filemask = c_fnh_mask
fileoperation = 'R'
IMPORTING
o_path = file_path
EXCEPTIONS
rfc_error = 1
OTHERS = 2.
IF sy-subrc EQ 0.
f_app = file_path.
ENDIF.
ENDFORM. "get_fname_app
Hope it helps.
Lokesh
11-22-2007 12:54 PM
Hi,
There is no function module available to upload the documents to Application server. You need to use OPEN DATASET.....
Regards,
Satish
11-22-2007 12:56 PM
Hi
use
<b>CG3Z</b> transaction to place files on application server from presentation
or have to use OPEN DATASET, READ and TRANSFER dataset concepts
Regards
Anji
11-22-2007 1:01 PM
Hi ,
You can use FM F4_DXFILENAME_TOPRECURSION. This FM will provide you with the option to choos apllication server and the corresponding directory. You can try to test it stand alone in SE37 with default parameters and check if it suits your requirement.
<b>Reward points if useful</b>
Regards
Saket Sharma
null
null
11-22-2007 1:08 PM
Use the code below:
PARAMETERS: f_app(128).
AT SELECTION-SCREEN ON VALUE-REQUEST FOR f_app.
PERFORM get_fname_app.
&----
*& Form get_fname_app
&----
text
----
FORM get_fname_app.
DATA: c_fnh_mask TYPE dxfields-filemask VALUE '.',
search_dir TYPE dxfields-longpath VALUE '/sapglobal/users',
file_path LIKE dxfields-longpath.
CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
EXPORTING
i_location_flag = 'A'
i_server = ' '
i_path = search_dir
filemask = c_fnh_mask
fileoperation = 'R'
IMPORTING
o_path = file_path
EXCEPTIONS
rfc_error = 1
OTHERS = 2.
IF sy-subrc EQ 0.
f_app = file_path.
ENDIF.
ENDFORM. "get_fname_app
Hope it helps.
Lokesh
11-22-2007 2:14 PM
11-22-2007 3:26 PM
Hi again,
Thanks for all the answers.
Unfortunately, that's not help me, because F4_DXFILENAME_TOPRECURSION, let me choose one file that exist in the system, but I need to choose a directory and the name of a file i am going to create, so this file does not exist in the system.