2007 Feb 26 11:10 AM
Hi,
Is there a way/FM to find a path of the application server? As it wud be dynamic for each user?
Hi,
Is there a way/FM to find a path of the application server? As it wud be dynamic for each user?
2007 Feb 26 11:14 AM
Hi,
Try the Fun Module FIND_DB_APPLICATION_SERVER
Regards,
Anji
2007 Feb 26 11:16 AM
Call function 'F4_DXFILENAME_TOPRECURSION'
Exporting
i_location_flag = ' '
i_server = ' '
i_path = ' '
Filemask = '.'
Fileoperation = 'R'
Importing
O_LOCATION_FLAG =
O_SERVER =
o_path = p_file*
ABEND_FLAG =
exceptions
rfc_error = 1
others = 2.
Parameter name to which you want to assign the output of the function module
2007 Feb 26 11:20 AM
F4_DXFILENAME_TOPRECURSION <- use this
FIND_DB_APPLICATION_SERVER for default path
Ramesh.
2007 Feb 26 11:29 AM
This FM gives me somethng like this sapds31_S31_31
that's not wht I want. I want the path which comes by default when u click on the browse button it's like
BNGRDC-S-01006\Chethana.Shivamurthy$\cached\Profile Data\SapWorkDir\
I want to fetch this path. Is this possible? how?
2007 Feb 26 12:34 PM
Hi,
May be check this,
F4_FILENAME_SERVER File Path on Server
Regards,
Vinail. K
2007 Feb 27 3:48 AM
Hi,
What input I shud give for this FM? I just want application server default path so that I concatenate a file name and store my file there. I'm not getting whch file name I have to give for this?
Just tried with local file name and application server file name but it gives an error.
2007 Feb 27 4:56 AM
Hi refer this code sampel.
<b>Get list of files within specific directory(Application server)
ABAP code for retrieving list of files contained within specific Application server directory(SAP). </b>
REPORT ZDIRFILES .
PARAMETER: p_fdir type pfeflnamel DEFAULT '/usr/sap/tmp'.
data: begin of it_filedir occurs 10.
include structure salfldir.
data: end of it_filedir.
************************************************************************
*START-OF-SELECTION
START-OF-SELECTION.
* Get Current Directory Listing for OUT Dir
call function 'RZL_READ_DIR_LOCAL'
exporting
name = p_fdir
tables
file_tbl = it_filedir.
* List of files are contained within table it_filedir
loop at it_filedir.
write: / it_filedir-NAME.
endloop.http://www.sapdevelopment.co.uk/file/file_getdirfiles.htm
http://www.sapdevelopment.co.uk/file/file_disall.htm
Hope this solves ur problem. Reward points if this helps.
2007 Feb 27 4:23 AM
hi,,
CALL FUNCTION 'FILE_GET_NAME_USING_PATH'
EXPORTING
CLIENT = SY-MANDT
LOGICAL_PATH = P_LPATH "logical path
OPERATING_SYSTEM = SY-OPSYS
FILE_NAME = 'XXX' "file name
IMPORTING
FILE_NAME_WITH_PATH = LV_FILE
EXCEPTIONS
PATH_NOT_FOUND = 1
MISSING_PARAMETER = 2
OPERATING_SYSTEM_NOT_FOUND = 3
FILE_SYSTEM_NOT_FOUND = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
*--error.
endif.
__________________________________________________________
You could simply try opening it. If sy-subrc <> 0, then you know that the path/filename is not found.
open dataset d1........
if sy-subrc <> 0.
write:/ 'File path not found'.
endif.
__________________________________________________________________
Try FM
RKZ_GET_POSITION_SEQ_FILE...
Also try
giving the file path without the .txt extension.
Hope it works...
_________________________________________________________________
You can use this SUBST_GET_FILE_LIST
use fm EPS_GET_DIRECTORY_LISTING
Please see this example
http://www.sapdevelopment.co.uk/file/file_disall.htm
sri
2007 Mar 05 7:56 AM
the simplest way would be to run transaction CG3Y and see what path is shown there by default
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |