Server file path
Using BlazeDS to call a JAVA service on the server via AMF doesn't invoke any servlet information. How can I determine a path to a file on the server with an AMF call? Is it possible? The relative path will be something like...
/downloads/edi/[FILENAME].pdf
...I just need to determine if the file actually exists. Thanks for any help you can provide.
Hi
you can use the same name in the target directory.
but the folder that you create should be on the same path.
C:/CacheSys/PI
go to c: dir , then go to Cachesys then go to PI and put the file in this folder.
if you still face the problem please reply me back.
Thanks
Rinku
Similar Messages
-
Application server file path vaidation
I have written the code for application server file path validation.
DATA : l_fname TYPE filename-fileintern." type c.
DATA : l_filpath TYPE filename-fileintern,
l_filname(40) TYPE c.
PARAMETER : p_sucfil LIKE rfpdo-rfbifile OBLIGATORY. " rlgrap-filename
AT SELECTION-SCREEN ON p_sucfil.
l_fname = p_sucfil.
CALL FUNCTION 'FILE_GET_NAME'
EXPORTING
CLIENT = SY-MANDT
logical_filename = l_fname
OPERATING_SYSTEM = SY-OPSYS
PARAMETER_1 = ' '
PARAMETER_2 = ' '
PARAMETER_3 = ' '
USE_PRESENTATION_SERVER = ' '
WITH_FILE_EXTENSION = 'X'
USE_BUFFER = ' '
ELEMINATE_BLANKS = 'X'
IMPORTING
EMERGENCY_FLAG =
FILE_FORMAT =
FILE_NAME = l_filpath
EXCEPTIONS
FILE_NOT_FOUND = 1
OTHERS = 2
IF sy-subrc <> 0.
message 'Invalid file name' type 'E'.
ENDIF.
But always i will get Invalid file name.
Y is it so.
pls help me.Praveen,
I have checked ur code and I found that if i give a logical file name from
tran. FILE under folder 'Logical file name definition, cross client' then ur code works. Pl. check.
Regards,
Joy.
DATA : l_fname TYPE filename-fileintern." type c.
DATA : l_filpath TYPE filename-fileintern,
l_filname(40) TYPE c.
PARAMETER : p_sucfil LIKE rfpdo-rfbifile OBLIGATORY. " rlgrap-filename
AT SELECTION-SCREEN ON p_sucfil.
l_fname = p_sucfil.
CALL FUNCTION 'FILE_GET_NAME'
EXPORTING
logical_filename = l_fname
operating_system = sy-opsys
with_file_extension = 'X'
IMPORTING
file_name = l_filpath
EXCEPTIONS
file_not_found = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE 'Invalid file name' TYPE 'E'.
ENDIF. -
How to give the application server file path in the module pool programming
Hi,
Could somebody help me how to provide the application server file path in module pool programming once the logo is uploaded to sap system.
For eg I have imported a logo name owens into sap system by using transaction se78; now I need to call the path in the below url,
if container2 is initial.
CREATE OBJECT CONTAINER2
EXPORTING
CONTAINER_NAME = 'PICTURE_CONTAINER2'.
CREATE OBJECT PICTURE2
EXPORTING
PARENT = CONTAINER2.
CALL METHOD PICTURE2->SET_DISPLAY_MODE
EXPORTING
DISPLAY_MODE = CL_GUI_PICTURE=>display_mode_fit_center
EXCEPTIONS
ERROR = 1.
CALL METHOD PICTURE2->LOAD_PICTURE_FROM_URL
EXPORTING
URL = " ? "
EXCEPTIONS
ERROR = 1
Others = 2.
endif.
Thanks in advance
Deepuhi Deepu,
Use FM '/SAPDMC/LSM_F4_FRONTEND_FILE' for fetching the data from the application server path/presentation server path
Regards,
Santosh -
Regarding Application server file path browsing
Hi All,
I have a issue regarding Application Server File Path browsing.
Actually in my selection-screen i will declare a parameter as <b>Application Server File Path</b> now when i press F4 in that field it should be able to browse through <b>Application Server Path's</b>.
Just like <b>F4_FILENAME</b> in the case of <b>Presentation Server File Path</b> Browsing.
Can anybody solve my issue.
Thanks in advance.
Thanks & Regards,
Rayeez.Hi Shaik,
Just copy and paste:
Here is the code for retrieving list of files contained within specific Application server directory(SAP).
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.
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.
Hope this will help you.
Let me know incase of any concerns.
EDIT:
There are few FM for ur refernce :
RZL_READ_DIR_LOCAL
SUBST_GET_FILE_LIST Return table with file list for the given directory (pattern allowed)
F4_DXFILENAME_TOPRECURSION Popup to select one file from the given application server directory
TH_SERVER_LIST Returns list of application servers.
EPS_GET_DIRECTORY_LISTING Lists filenames from the application server .
Cheers
Sunny
Rewrd points, if found helpful
Message was edited by: Sunny -
Equalent of F4_filename function module for application server file path
hi experts,
i am using cl_gui_frontend_services=>file_open_dialog
for bring file path dynamically for user, in front end.
same feature i want to give when i am trying upload file from application server.
kindly provide me function module or class method, which will do it.
thanks in advance
regards,
pavanHi,
Use FM F4_DXFILENAME_TOPRECURSION
Sample code here
report ztest.
data : filename like DXFIELDS-LONGPATH.
data : begin of itab occurs 0,
a(200) type c,
end of itab.
CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
EXPORTING
I_LOCATION_FLAG = 'A'
*I_SERVER = '?'
*I_PATH =
FILEMASK = '.*'
*FILEOPERATION = 'R'
IMPORTING
*O_LOCATION_FLAG =
*O_SERVER =
O_PATH = filename
*ABEND_FLAG =
EXCEPTIONS
RFC_ERROR = 1
ERROR_WITH_GUI = 2
OTHERS = 3
break-point.
open dataset filename for input in binary mode.
while sy-subrc = 0.
clear itab .
read dataset filename into itab.
append itab.
endwhile.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
FILENAME = 'd:\abc.txt'
FILETYPE = 'BIN'
TABLES
DATA_TAB = itab
Regards,
Satish -
Validation and F4 help on an application server file path parameter
Hi
I have a field on a selection screen called File Path and it is for a download program where the user needs to specify the path for the download (NOT THE ACTUAL FILENAME).
I am trying to find a function or method that allows a user to use F4 help to browse for a directory rather than a specific file. There are lots of posts out there asking this question but all of the answers point to functions that allow you to browse for a particular file rather than just the file path/directory.
Does anyone know of a function that provides F4 help to browse for a file path on the Server (NOT PC). I would want the user to just be able to select the directory or path and have the path returned. They should not need to pick a specific file.
F4_DXFILENAME_TOPRECURSION is a very good function but unfortunately it makes the user pick a file rather than just a directory.
In addition to this, does anyone know of a function or method that allows you to then validate the path\directory that is entered?
Thanks for your help
NicoleHi,
You can try with the FM 'EPS_GET_DIRECTORY_LISTING'. With this Fm module you will get you the list of files of a particular path in an internal table. Then you can populate this internal table in F4 help.
Hope this solves your problem. If any difficulty, come back to me about that.
Below are some other FM related to application server directory. Hope these Helps.
EPS_GET_DIRECTORY_LISTING
EPS_GET_DIRECTORY_PATH
EPS_GET_FILE_ATTRIBUTES
EPS_GET_FTP_SYSTEM_INFO
Regards,
Shailesh Jadhav -
Regarding Application server file path
Hi All,
please explain the process how to create logical file path in FILE t-code.Hi,
logical file path
The (platform-independent) logical file path is evaluated at runtime to get the (platform-dependent) physical path (see Assignment of Physical Paths to Logical Path).
Two examples of this are:
· Logical file path: BW_OLAP_CACHE
Name: BW OLAP Cache
· Logical file path: BW_OLAP_CACHE_SPAN
Name: BW OLAP cache cross-application server
Assignment of Physical Paths to Logical Path
At runtime, the physical path assigned for the corresponding operating system platform is generated from the logical file path.
Since the physical path is platform-dependent, the customer must set it her/himself. The closer the file is to the application server or, with the cross-application server cache mode, to the application server, the faster it can be found and read.
Log(ical) path: BW_OLAP_CACHE
Name: BW OLAP Cache
Syntax group: UNIX (all Unix platforms)
Phys(ical) path: /usr/ (Syntax group WINDOWS NT)
In a heterogeneous system landscape (such as UNIX and Windows NT servers) all system-specific syntax groups must be maintained. Ensure that the definitions for the various syntax groups point to the same directory.
5. Save your entries
for detailed information
Have a look at this links... i guess it explains what you are looking for...
http://help.sap.com/saphelp_47x200/helpdata/en/8d/3e4ec2462a11d189000000e8323d3a/content.htm
http://help.sap.com/saphelp_erp2005vp/helpdata/en/25/ab3a57df3b11d189fc0000e829fbbd/frameset.htm
http://help.sap.com/saphelp_sm40/helpdata/EN/8d/3e4ec2462a11d189000000e8323d3a/frameset.htm
Regards,
Raj. -
Hi all,
I am accessing the SAP-XI test server(Web Server
Provided by SAP). In this I am going to do FILE->IDOC
Scenario. Now which File path I want to mention in File
Adaptor to place the Source XML file?
regards,
Khaja.skHi Khaja,
If you are placing ur file in the server itself then u can mention the file path as given below:
D:/usr/sap/trans/tmp/sender
Here the D: indicates the drive where ur server is installed.
Within the given path sender is a folder created to hold the input file.
Regards
Neetu -
Application server file path name separated by apace
Hi All,
I am writing files on application server. Below is my fie path.
parameters: p_o_file like rlgrap-filename default '/xxx/tmp/app/outbound/1~lcxxxx~ACTUAL~periodfyyear~RR.txt'.
data : mnthyear(12) type c,
year(6) type c.
case p_rpmax.
when '010'.
p_ryear = p_ryear - 1.
concatenate 'FY' p_ryear into year.
concatenate 'OCT' '-' year into mnthyear separated by space.
replace 'periodfyyear' with mnthyear into p_o_file.
In the report output I am getting the file name correctly.
Output File: /dev/tmp/app/outbound/1~LC1000~ACTUAL~OCT - FY2013~RR.txt
When checked in AL11, it is showing me the below file name
1~LC1000~ACTUAL~OCT
my file name is truncated after space.
Can we create a file name with spaces? Awaiting your replies.
Thanks,
HarithaPl find snipet..
FORM save_file.
DATA: lv_data TYPE string.
*Move complete path to filename
gv_file = '1~LC1000~ACTUAL~OCT - FY2013~RR.txt'.
* Open the file in output mode
OPEN DATASET gv_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc NE 0.
MESSAGE 'Unable to create file' TYPE 'I'.
EXIT.
ENDIF.
LOOP AT gt_spfli INTO gwa_spfli.
CONCATENATE gwa_spfli-carrid
gwa_spfli-connid
gwa_spfli-countryfr
gwa_spfli-cityfrom
gwa_spfli-airpfrom
gwa_spfli-countryto
gwa_spfli-cityto
gwa_spfli-airpto
gwa_spfli-arrtime
INTO lv_data
SEPARATED BY ','.
*TRANSFER moves the above fields from workarea to file with comma
*delimited format
TRANSFER lv_data TO gv_file.
CLEAR: gwa_spfli.
ENDLOOP.
* close the file
CLOSE DATASET gv_file.
ENDFORM. -
Hi Experts,
I need to place the file in "C:/CacheSys/PI" in FTP server.
what is the target directory i must specify in Communication channel.
Kind Regards,
kiranHi
you can use the same name in the target directory.
but the folder that you create should be on the same path.
C:/CacheSys/PI
go to c: dir , then go to Cachesys then go to PI and put the file in this folder.
if you still face the problem please reply me back.
Thanks
Rinku -
Friends to surf the flat file
function module
what we use is
'KDGET_FILENAME_ON_F4'_
like this what is the fuction module for application server?????Try:
F4_DXFILENAME_TOPRECURSION
PARAMETERS: f_app(128).
AT SELECTION-SCREEN ON VALUE-REQUEST FOR f_app.
PERFORM get_fname_app.
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[/code]
OR
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_apath.
CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
IMPORTING
serverfile = p_apath
EXCEPTIONS
canceled_by_user = 1
OTHERS = 2. -
To find if a record (file) exist in the Appplication server directry path
As per the scenario, a file is loaded from an external system to the SAP Applicatoin server (Trasaction AL11 ) everyday. Whenever the file is loaded a timestamp is maintianted against the file displaying its last changed data and time. The server file path is constant for this inbound file.
Can anyone please suggest an ABAP code or a procedure and all the function modules involved that will help in finding if the file is generated for the present day...If not than a notification needs to be sent to the person (or team) through an E-mail to repeat the load processYes, Understood your requirement. I could think of 2 solutions:
1) After you process the file move the it to some other folder so that the file doesn't keep lying in the same folder, More preferrable solution
2) You can get the properties of Unix File, by executing UNIX Command in ABAP something like
CALL SYSTEM Unix command to read file attributes which I dont remember now
Hope this helps!
Regards
Shital -
Validate application server file
Hi,
I have to validate the application server file path on selection screen.
I am using following code :
form VALID_APP_FILEPATH using p_filpath TYPE FILENAME-FILEINTERN.
data : l_fname(60).
CALL FUNCTION 'FILE_GET_NAME'
EXPORTING
LOGICAL_FILENAME = p_filpath
OPERATING_SYSTEM = SY-OPSYS
IMPORTING
FILE_NAME = L_FNAME
EXCEPTIONS
FILE_NOT_FOUND = 1
OTHERS = 2.
IF SY-SUBRC ne 0.
MESSAGE 'Enter the valid file path'(e01) TYPE 'E'.
ENDIF.
endform. " VALID_APP_FILEPATH
but if i choose correct file path from F4 help also.
It displays error message.
Sy-subrc always equals 1.
Help me outHi,
I have implemented the code mentioned by you and am not having any problems even when I use F4 to get the fle name.
Pls recheck and get back if the error persists.
Reward if found helpful.
Warm Regards,
R Adarsh -
Drag and drop just to extract file path
I'm writing a Cocoa GUI app to facilitate working with a command-line program. The scenario is quite similar to what I see in the Apple FileMerge.app. I'd have a NSView (or a drop pocket of whichever class appropriate) into which I can drag the file icons just in order to retrieve file's path, one by one, no visualization, no checking for file types, just for assembling a list of files to eventually be passed to the data crunching program as command line arguments. I've come across CocoaDragAndDrop sample program, which does great work in displaying dragged picture tiff and pdf files. Probably 90% of the code there is beyond what I need, but the semantics are so unlike anything I've ever come across (I'm miles away from image processing). I can't even figure where to start since everything seems so interconnected. Is there a simplest case example of Drag and drop which only serves file path extraction? From the aforementioned sample code I'm struggling to figure out what is the part which is absolutely needed only to retrieve the path? Do I have to init a [NSImage canInitWIthPasteboard: ... ...] if a file is a plain text file, or a raw data file? The app doesn't need to know what the file is, since passing the absolute path as text argument cannot do any harm in this case - the number crunching command line program takes care of the content. Do I need coders? Do I need a sourceOperationMaskForDragingContext? Does Drag and Drop even cover such trivial demands?
Thanks in advance!
Regards, UUThanks for your kind replay. Please let's stay on-topic: my question shouldn't have pointed at if "Apple works like this or like that".
IMHO, it's quit opposite: many things are cut-and-paste compatible, yet I'm missing few basic explanations.
The following code can be derived from the API reference:
#import "DragTView.h"
#import "AppDelegate.h"
@implementation DragTView
- (id)initWithFrame:(NSRect)frame{
self = [super initWithFrame:frame];
if (self) [self registerForDraggedTypes:[NSArray arrayWithObject:NSFilenamesPboardType]];
return self;
- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender{
highlight=YES;
[self setNeedsDisplay: YES];
return NSDragOperationGeneric;
- (void)draggingExited:(id <NSDraggingInfo>)sender{
highlight=NO;
[self setNeedsDisplay: YES];
- (void)drawRect:(NSRect)rect
[super drawRect:rect];
if ( highlight ) {
[[NSColor grayColor] set];
[NSBezierPath setDefaultLineWidth: 5];
[NSBezierPath strokeRect: rect];
- (BOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender {
highlight=NO;
[self setNeedsDisplay: YES];
return YES;
- (BOOL)performDragOperation:(id < NSDraggingInfo >)sender {
NSArray *draggedFilenames = [[sender draggingPasteboard] propertyListForType:NSFilenamesPboardType];
NSURL* fileURL;
NSTextField* pathField = [(AppDelegate*)[[NSApplication sharedApplication] delegate] pathField];
if (([[[draggedFilenames objectAtIndex:0] pathExtension] isEqual:@"txt"]){
fileURL=[NSURL URLFromPasteboard: [sender draggingPasteboard]];
[pathField setStringValue: [fileURL path] ];
return YES;
} else return NO;
- (void)concludeDragOperation:(id <NSDraggingInfo>)sender{
@end
It reveals the file path, yet, it boils down to fifty meaningless lines of code, since the pathField object (of class NSTextField) would itself reveal a dropped file's path without a single extra line of drag-and-drop code. What I find confusing is the following:
How should a drag operation be set up, so a text file can be dragged to the DragTView object (declared as @interface DragView: NSImageView <NSDraggingSource, NSDraggingDestination>), which would than show the image of file's icon (without dragged file itself being an image file)? This is rather unclear in the documentation, with all due respect to Apple.
Thanks in advance. -
I'm trying to execute a SSIS package via SQL agent with a flat file source - however it fails with Code: 0xC001401E The file name "\server\share\path\file.txt" specified in the connection was not valid.
It appears that the problem is with the rights of the user that's running the package (it's a proxy account). If I use a higher-privelege account (domain admin) to run the package it completes successfully. But this is not a long-term solution, and I can't
see a reason why the user doesn't have rights to the file. The effective permissions of the file and parent folder both give the user full control. The user has full control over the share as well. The user can access the file (copy, etc) outside the SSIS
package.
Running the package manually via DTExec gives me the same error - I've tried 32 and 64bit versions with the same result. But running as a domain admin works correctly every time.
I feel like I've been beating my head against a brick wall on this one... Is there some sort of magic permissions, file or otherwise, that are required to use a flat file target in an SSIS package?Hi Rossco150,
I have tried to reproduce the issue in my test environment (Windows Server 2012 R2 + SQL Server 2008 R2), however, everything goes well with the permission settings as you mentioned. In my test, the permissions of the folders are set as follows:
\\ServerName\Temp --- Read
\\ServerName\Temp\Source --- No access
\\ServerName\Temp\Source\Flat Files --- Full control
I suspect that your permission settings on the folders are not absolutely as you said above. Could you double check the permission settings on each level of the folder hierarchy? In addition, check the “Execute as user” information from job history to make
sure the job was running in the proxy security context indeed. Which version of SSIS are you using? If possible, I suggest that you install the latest Service Pack for you SQL Server or even install the latest CU patch.
Regards,
Mike Yin
If you have any feedback on our support, please click
here
Mike Yin
TechNet Community Support
Maybe you are looking for
-
Had a pc now have a mac and my downloaded cds do not show up on mac. help
I had a pc and now have a mac computer. Itunes does not show any downloaded cds in the library. Idon't know what to do.
-
Alt text for photos not appearing
Hi, I tagged a large document in InDesign (because Acrobat Pro's feature is too unpredictable). I assigned alt text to all the photos, but when I hover my cursor over them while viewing the exported PDF, only some are showing up. It turns out that la
-
I am unable to add a bookmark to a Safari page on my iPhone 4.
I am unable to add a bookmark to a Safari page on my iPhone 4. The " " does not appear, so that I can do so. Is there a fix?
-
Problems Syncing iPhone 4S with MS Outlook 2010 after years of no problems
For several years, I have sync'ed my iPhone 4S regularly and flawlessly using itunes with my Windows 7 desktop that was running Outlook 2010. Last week, disaster struck and my hard drive failed and had to be replaced. Luckily, my backup drive had eve
-
Could someone please explain to me what it means to "roll up aggregates"? I've read through some documentation and it really doesn't make perfect sense to me. Could someone provide an analogy or an example that could better illistrate what this ter