Dynamic Source directory path
Hi Experts
I am doing file to Idoc scenario. For the source file, the files can reside in different folders. Is it possible to handle the different folders in single communication channels or we need to create multiple communication channels for the different folders.
Thnz
Faheem
Hi Aamir,
I dont think we can make a sender file adapter poll in multiple directories. May be the file name could be given using wild card characters, but not the file path. Is there really a way we could achieve this. If so, I have no clue here. Can you throw more light on this. Am too looking forward for a soln here.
Regards,
Jaishankar
Similar Messages
-
Dynamic source directory in sender adapter
Hi Experts,
I have a File to File scenario, where my source directory needs to be dynamic. The directory structure is like:
Y:\ParentDrive\<DynamicFolder>\<DynamicFolder>\<DynmicFileName>
And then on the receiver side, I need to create the DynamicFolders and the file.
Please let me know if this can be achieved using modules or if there is any other approach.hi,
refer my article:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/70c89607-e4d9-2910-7280-f6746e964516
it shows using filename. similarly u can use directory attribute.
[reward if helpful]
regards,
latika. -
How to create dynamic source file path for lumira?
i have source file for lumira visualization on D:\lumira\SourceFiles\sample.xlsx;
also .lums file in D:\lumira\demo.lums
But when i use the same Lumira folder in different system i have to again create connection for the datasource for fetching the data.So please suggest me how can i use this file so that i don't need to create a new connection again and i should get the updated data i.e. the data should change according to the change in the datasource file.Hi,
this isn't possible.
you need to go the Connections window in Lumira home page, and repoint the connection to the new location
regards,
H -
How to specify source directory in File sender adpate using (NFS)?
Hello experts,
I am doing File-PI-Proxy scenario.
Input file is available on machine which is within the Network area and FTP is not available on that machine.
For this reason I am using the NFS Transport Protocol.
In ID File sender I have specified Source Directory:-
IP Address\Directory
I am geeting the Error in RWB as 'Configured source directory '
IP Address\Directory' does not exist'.
Please suggest how to specify the Source Directory path.
Regards,
JageshHi,
If you want to use NFS protocol, then the file needs to be within the a folder in the XI server and not outside it, In your case if you need to use the file in a different machine which is on a network then try to use the FTP protocol.
Refer this blog:
/people/shabarish.vijayakumar/blog/2006/08/01/along-came-a-file-adapter-mr-ftp-and-rest-of-the-gang which shows the details of how you can install a local FTP and use it
Regards,
Nithiyanandam
Edited by: Nithiyanandam A.U. on Mar 18, 2009 10:43 AM -
Dynamic Configuration - Set Directory Path for File Receiver Adapter
Hi Experts,
I have a question regarding the dynamic configuration for the file adapter. Is it possible to set a directory path without a message mapping for the file receiver adapter? the problem is that I want to import a pdf document. this pdf document I want to store in a dynamic directory (depending on the filename). so I have to read the filename out of the dynamic configuration and generate (depending on the filename) a directory for this file. Is that possible without a message mapping? I cannot make a message mapping because the file has the pdf format and should not get changed.
best regards
Christopher KühnHi Gaurav,
I use the ASMA (respectively the filename) for the sender adapter. After the pdf was imported into XI this filename is in the ASMA.
But what then??? How can I get this filename with the help of the variable substitution? and if I have this filename I have to change this filename a bit to generate the name / path of the directory.
Please explain it to me detailled
Thanks and regards
christopher -
Dynamically construct Target/Source Directory in File Adapter
Hi All,
Is it possible to Dynamically construct target/Source Directory in File Adapter? If yes can anyone plz provide details about the same.
regards
VinayHi vinay,
have a look @ these threads..u may get some help!!
Re: Dynamic directory name in Receiving File adapter
Dynamic FileName and Directory - UDF
Re: Dynamic Directory and File Naming in Receiver Adapter
Re: target directory in file adapter
Regards
BILL -
Change directory path dynamically using UTL_FILE
I have a directory TEST_DIR which points to /test/files/
CREATE OR REPLACE PROCEDURE file_exist (v_country in varchar2) is
v_check_file_exist BOOLEAN;
v_dir VARCHAR2 (256) := 'TEST_DIR';
begin
UTL_FILE.fgetattr (V_DIR || V_COUNTRY,'file123' ||'.txt', v_check_file_exist, v_a,v_b);
IF NOT v_check_file_exist THEN
DBMS_OUTPUT.put_line (TO_CHAR(from_date,'YYYYMMDD')||'.rds');
END IF;
END LOOP;
I would like to change the directory path based on the country which is passed as input to the procedure
exec file_exist('IND'), so in this case I want the procedure to look for file 'file123.txt' under path /test/files/IND.
But this is not working..
But when I change the directory to
create or replace directory TESTDIR as '/test/files/IND' and then change my UTL_FILE.fgetattr (V_DIR,'file123' ||'.txt', v_check_file_exist, v_a,v_b)(removing || v_country, this time it works.
am trying this as I have many country folders under the path like
/test/files/IND
/test/files/USA
/test/files/AFR
and want to change the direcotry path dynamically according to input given.
Any suggestionsMake sure that the directories you are trying to write to have been set up for UTL_FILE.
Refer to UTL_FILE_DIR parameter or CREATE DIRECTORY privilege depending on what DB version you are on.
HTH
--Johnnie -
Change Directory Path using Dynamic Configuration
Hi,
We have a requirement where the directory path for placing the files is different across our different environments. Ex: Development Environment has a different path than the Quality Enviornmnet. Also the full path is depending on fileds within the message.
I want to use Dynamic Configuration to create the Directory path. But in order to capture the full requirement I need to know wheich environment I am within the User Defined Function.
Can someone provide me the java class and function that I can use in my UDF to read the environment I am in.
( Essentially I want to read Sy-SYSID in ABAP...using Java. )
Regards,
ArunavaHi Arunva,
>>Essentially I want to read Sy-SYSID in ABAP...using Java.
It might not be possible to read system id in java, but you can read the sender or receiver service(SENDER_SERVICE or RECEIVER_SERVICE) and based on it can decide the diretory in DynamicConfiguration.
If you have a sender or receiver SAP sysem then better to read its name because this business systm ill haeunique name aross different environment. Check this thread too
User-defined function: RFC call
Regards
Suraj -
F4 Help to get the path for a File source directory
There are numerous function modules for browsing a particular file in desktop and getting the file path (including the fine name) , like F4_FILENAME , KD_GET_FILENAME_ON_F4 , WS_FILENAME_GET etc. But can anyone tell me how to fetch only the directory path to the field were the F4 help is given. Actually the filename has to come in some other field in the selection screen. Is there separate funtion modules for these OR will changing parameters in the above function modules work?
Pls Help....
Also are there function modules for providing F4 help for getting the path to a file in application directory?Try this method CL_GUI_FRONTEND_SERVICES.
It is a Global CLASS which is having different methods for different purposes
see the documentation of it and use the methods of it
see
CL CL_GUI_FRONTEND_SERVICES
Short Text
Frontend Services
Functionality
The class CL_GUI_FRONTEND_SERVICES contains static methods for the following areas:
File functions
Directory functions
Registry
Environment
Write to / read from clipboard
Upload / download files
Execute programs / open documents
Query functions, such as Windows directory, Windows version, and so on
Standard dialogs (open, save, directory selection)
Example
Determine the temp directory on your PC:
DATA: TEMP_DIR TYPE STRING.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>GET_TEMP_DIRECTORY
CHANGING
TEMP_DIR = TEMP_DIR
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2.
IF SY-SUBRC 0.
Error handling
ENDIF.
flush to send previous call to frontend
CALL METHOD CL_GUI_CFW=>FLUSH
EXCEPTIONS
CNTL_SYSTEM_ERROR = 1
CNTL_ERROR = 2
OTHERS = 3.
IF SY-SUBRC 0.
Error handling
ENDIF.
WRITE: / 'Temporary directory is:', TEMP_DIR.
Notes
The class CL_GUI_FRONTEND_SERVICES is based on the Control Framework. See the documentation for more information, in particular on CL_GUI_CFW=>FLUSH which must be called after many CL_GUI_FRONTEND_SERVICES methods.
Migration Information
The old file transfer model was based on function modules of the function group GRAP. The old features have been replaced by the class CL_GUI_FRONTEND_SERVICES. The following list contains the old function modules (italic) and the new methods (bold) that replace them:
CLPB_EXPORT
CLIPBOARD_EXPORT
CLPB_IMPORT
CLIPBOARD_IMPORT
DOWNLOAD
GUI_DOWNLOAD, dialog replaced by FILE_SAVE_DIALOG
PROFILE_GET
No replacement, use REGISTRY_* methods instead
PROFILE_SET
No replacement, use REGISTRY_* methods instead
REGISTRY_GET
REGISTRY_GET_VALUE, REGISTRY_GET_DWORD_VALUE
REGISTRY_SET
REGISTRY_SET_VALUE, REGISTRY_SET_DWORD_VALUE
UPLOAD
GUI_UPLOAD, dialog replaced by FILE_OPEN_DIALOG
WS_DDE
Obsolete: This function is no longer supported.
SET_DOWNLOAD_AUTHORITY
Obsolete: This function is no longer supported.
WS_DOWNLOAD
GUI_DOWNLOAD
WS_DOWNLOAD_WAN
Obsolete: This function is no longer supported.
WS_EXCEL
Obsolete: This function is no longer supported.
WS_EXECUTE
EXECUTE
WS_FILENAME_GET
FILE_SAVE_DIALOG, FILE_OPEN_DIALOG
WS_FILE_ATTRIB
FILE_SET_ATTRIBUTES, FILE_GET_ATTRIBUTES
WS_FILE_COPY
FILE_COPY
WS_FILE_DELETE
FILE_DELETE
WS_MSG
Obsolete: This function is no longer supported.
WS_QUERY
CD (current directory)
DIRECTORY_GET_CURRENT
EN (read/write environment)
ENVIRONMENT_GET_VARIABLE
ENVIRONMENT_SET_VARIABLE
FL (determine file length)
FILE_GET_SIZE
FE (check if file exists)
FILE_EXIST
DE (check if directory exists)
DIRECTORY_EXIST
WS (determine Windows system)
GET_PLATFORM
OS (operating system)
GET_PLATFORM
WS_UPLDL_PATH
Obsolete: This function is no longer supported.
WS_UPLOAD
GUI_UPLOAD
WS_VOLUME_GET
Obsolete: This function is no longer supported.
Reward points if useful. -
Take Source file path in sender adapter from an environment variable .
Hi,
Is it possible to take source file path(half file path) dynamically in sender file adapter.
Please suggest any alternative to this.Hi,
One option, use Dynamic Configuration and set the values in the Mapping.
By the ways, the File Directory and the Filename are taken runtime in the file adapters after transportation.
Only if you are using FTP will you need to key in the FTP addess user id password etc.
Refer -- same way try for File adapter
Dynamic Configuration of Some Communication Channel Parameters using Message Mapping
Ps Note : I have personally never tried it to use the Dynamic Configuration for file path. But you can try.
Thanks
Swarup -
Dynamic file Directory : Sender File Adapter
Hi all
In one of our interface development ,at we require a dynamic Directory path at the sender file adapter ..
ex :
path = Root/A/B/C
filename = test.txt
now in Root Directory, Folder & subfolder " A ( B ( C ))) are dynamic.
Subfolder "C" wil contain the source file..
Will it possible...with Z module development..??
Regards,
Ashutoshhi,
if you want your directory name dynamically from Payload, you can use the option variable substitustion;
For example follow below procedure:
1)in the Target directory name --> /%dir%
2)go to advanced tab and check for the variable substitution option(enable),
3)variable name:dir
Reference:Payload:mt_filetest,1,name,1
according to the given details in the communication channel your payload should be like this
<?xml version="1.0" encoding="UTF-8"?>
<ns0:mt_filetest xmlns:ns0="urn://filetest">
<name>madhav</name>
</ns0:mt_filetest>
now directory is created with the name of madhav (Dynamically according to the payload directory name is created).
Note: points if it is useful
Thanks
Madhav -
Error in sender file adapter: source directory does not exist
Hi,
The PI system is 7.11
I've created sender file adapter with following details:
Transport Protocol : File System
Source directory: /interfaces/In
I checked in AL11 that this path really exists and it does. (I can even see the .txt file that should be processed.)
But still i get in Communication Channel Monitoring the following error:
"Configured Source directory "/interfaces/In" does not exist.
(i also tried to give the source directory as "interfaces/In" and as "//interfaces/In" but still the same error.
Any suggestions as to what is wrong?
kr
RobertActually, Need to use forward slash (/) to separate directory names in accordance with the Java specification.
But wanted to try if that works..
Also check directory name , path again as this is case sensitive...
--Divyesh -
FTPs connection error:When using Variable substitution for Directory path
Hi
I am transferring data from BI to xml file via PI: Here a Client proxy from BI sends the data to PI and the PI FTPs the XML file to a remote location. For FTP I am using FTPs SSL connection.
It was working fine untill I used Variable susbstitution to determine Directory path dynamically. I am using this because different xml files are intended to goto the different locations.
I did the variable substitution like this:
Target Message Structure:
---> Target Directory: %var1%
<?xml version="1.0" encoding="UTF-8" ?>
<MT_BI_EXTRACT_FILE>
<Header>
<Directory>/Customer</Directory>
</Header>
<Detail>
</Detail>
</MT_BI_EXTRACT_FILE>
And in the variable substitution I am doing it this way
payload:MT_BI_EXTRACT_FILE,1,Header,1,Directory,1
And the error I am getting is:
Attempt to process file failed with Error when getting an FTP connection from connection pool: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: iaik.security.ssl.SSLException: Peer sent alert: Alert Fatal: handshake failure
MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Error when getting an FTP connection from connection pool: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: iaik.security.ssl.SSLException: Peer sent alert: Alert Fatal: handshake failure
Exception caught by adapter framework: Error when getting an FTP connection from connection pool: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: iaik.security.ssl.SSLException: Peer sent alert: Alert Fatal: handshake failure
Delivery of the message to the application using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Error when getting an FTP connection from connection pool: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: iaik.security.ssl.SSLException: Peer sent alert: Alert Fatal: handshake failure.
Does anybody have some Idea of this ??
Regards
NainaHi,
I guess the problem is not with Variable Substitution..
Error when getting an FTP connection from connection pool:
So its a connection problem..
Also check the option Disable Security check and try again...
Try to check again if the interface is executing properly without Variable substitution and let us know..
Babu
Edited by: hlbabu123 on Jan 7, 2011 2:46 PM -
Variable Substitution for Source Directory
Hello,
I have seen several threads about using a UDF and variable substitution for dynamically determining the Target Directory.
Is anyone familiar with (or had to implement) a solution where the Source Directory is dynamically determined.
My challenge is to connect to a different Source Directory name (sy-datum format, ex: 20070920 ) each day on an ftp site and download all the files in the folder to a know target directory. I am doing a simple file-to-file transfer, so no mapping is involved.
Your comments, suggestions and feedback is greatly welcomed.
Thanks,
RalphHello Carme,
I have not found a solution for this type of event.
I was attempting this because the FTP site I was connecting to would DELETE a file the moment XI touched it. So when XI (using FTP Transfer protocol) configured with a DELETE or ARCHIVE (Processing Mode), it would error off because the file was no longer on the FTP site. I contacted the site but they refused to deactivate their script to auto-delete files. Using TEST processing mode is not recommended per SAP in a server pool environment. You would think SAP XI would provide a fourth option in which a DELETE command is not issued back to the FTP site.
The FTP site did have sub-directories in which copies of the original files were stored, but I could not figure out how to dynamically change the XI Source Directory as the current date changed.
I settled on using File NFS (Transfer Protocol) and running the FTP commands from a .bat (batch file). I put the command I run down at the bottom of the XI page with a 60 second timeout.
I still do not change to each folder dynamically because the standard FTP (GET and MGET) commands do not attempt a Delete after file retrieval.
Perhaps using a batch file is an option you may want to consider using.
Cheers,
Ralph -
Dynamic FTP Directory Address in File Adapter - is this possible?
We have a customer who would like us to pick up a file via an FTP file adapter once per day. The problem is, they have a different directory each day containing the file. The directory name is of the form YYYY-MM-DD. The name of the file in the directory is always the same.
Is it possible to dynamically calculate the Source Directory name in the FTP file adapter? If so, how?
Kind Regards,
Tony.>
Dharamveer Gaur wrote:
> Hi
> Look this same thread:
> Re: Dynamic folder name (when reading file in file adapter)
Hi,
All the examples I have seen are to configure the Receiver File Adapter, not the Sender File Adapter. I don't thinl I have seen one blog yet whereby the source directory of a Sender File Adapter has been dynamically configured. I wonder if it can be done because the sender file adapter does not have Variable Substitution possibilities for filenames and directories.
So has anybody a link to a blog where this dynamic choice of a source directory has been done for a SENDER file adapter?
BR,
Tony.
Maybe you are looking for
-
BAPI_SALESORDER_CHANGE. Error V1 045 -- Indicate number of document.
Hi Experts. When a pre-order (ZAG) it's confirmed in SAP, we make an oficial order (TA), then, when save the oficial order I need delete the field LCNUM in pre-order. I'm using this BAPI, in a USER EXIT inside program SAPVM45A, when the number of doc
-
Dear Forum, I have below 4 scenario to seek advice. When there is quantity variance during miro, how does the system do 1) PO quantity 100 unit. GR 40 unit and IR time also 40 unit. This will post automatically during miro as GR/IR account value same
-
PLEASE help me settle this question....
does BlazeDS support data real-time data synchronization? My manager says it does, but i thought that at the last MAX i specifically asked that question and was told that it is only supported under LiveCycle. Example: I have a textInput synchronized
-
Hi, i want to know the procedure for background execution for reports with example , Thank u, Regards, Sivaram. Moderator message: please search for available information/documentation. Edited by: Thomas Zloch on Apr 20, 2011 2:26 PM
-
I have purchased laser toner cartridge from Thane shop. I found toner patches. He ask me to go Mumbai for replacement which is 25 kms away from my city. I went to Mumbai shop but he do not have stock at present and ask me to come after 5 days. What i