Find the File name from directory
Hi Experts,
My Scenario is:
Pick the file from the Directory, Based on the file name, get the Q information from R/3 system and place the file into MQ.
My Question is : How can I get the file name?, any one please guide me..
Thanks for your help,
Thanks,
SR
HI SR
You need to enable the Adapter-Specific Message Attributes
enable the FileName under this. Enabling this will allow to have this parameter as XI header
You can check this value is generated or not using SXMB_MONI -> Inbound message -> SOAP header -> Dynamic Configuration.
This will be captured under http://sap.com/xi/XI/System/File name = FIleNameu201D
Now code given by Anand above will allow you to use this FileName in mapping. Based on this you can check R/3 system for relevant file.
Hope this make you confortable with filename concept
Thanks
Gaurav
Similar Messages
-
Retreiving the file names from directory inside another directory from application server
Hi,
I had a problem in retreiving the file names from a directory inside another directory.
I tried using the FM's SUBST_GET_FILE_LIST, RZL_READ_DIR_LOCAL and EPS_GET_DIRECTORY_LISTING
But here I am getting only one directory details.
Actually my file is located a directory inside one more directory and one more directory and inside the files are located.
i.e total 3 directories inside the 3rd one my files are there.
I need to read the latest file name in the directory.
So that i can do some manipulation after getting the file name.
Is there option like OPEN DATASET , READ DATASET and CLOSE DATASET?
Can anyone please let me know How can i acheive this one.
Regards
RamHi Ram,
Following thread can be helpful for you, were it shows in the tables structure rsfillst a field RSFILLST-TYPE whether its a directory or file..........
http://scn.sap.com/thread/865272
thanks and regards,
narayan -
How to get the file name from directory
Hi,
I have a directory called test inside i have only one .txt file. i dont know that file name.
Is it possible get the file name using PL/SQl code. ???
Using that .txt file i have to create a dynamic table.
If i have use *.txt also not working
Anyone suggest me its possible to do or not????
Cheers,
ShanHi Saubhik ,
Wheni execute the function i am getting the following error
Warning: compiled but with compilation errors
Errors for FUNCTION LISTDIR
LINE/COL
ERROR
7/3
PLS-00201: identifier 'DBMS_BACKUP_RESTORE.SEARCHFILES' must be declared
7/3
PL/SQL: Statement ignored
8/54
PL/SQL: ORA-00942: table or view does not exist
8/20
PL/SQL: SQL Statement ignored
10/11
PLS-00364: loop index variable 'EACH_FILE' use is invalid
10/2
PL/SQL: Statement ignored Cheers,
Shan -
How to find the dsn name from an *.rpd file provided?
How to find the dsn name from an *.rpd file provided? All the ODBC details which would require to run your dashboard.
Hi
DSN name is not a part of .rpd file. So There is no information about DSN name in .rpd file.
Thanks
Siddhartha P -
Finding the file name with Regular Expression
Hello All,
I am having some requirment to find the file name for the input provided parameter.
In my program i am having an input parameter for file name. This contains both the file name and file stored location.
Example : C:\Dokumente und Einstellungen\xs234fs\Desktop\TEST_123_44.txt
From the above example string i need to find only the file name that is TEST_123_44.txt by using Regular expression.
Please let me know how to get this.
Thank you ver much in advance.
Thanks,
Feroz.Hello,
If you have attached an F4 help to the filename input param, in that you can use the FM: GUI_FILE_SAVE_DIALOG.
In this there is a return param FILENAME which contains the name of the file.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
CALL FUNCTION 'GUI_FILE_SAVE_DIALOG'
EXPORTING
window_title = TEXT-001
default_extension = p_extens
default_file_name = ls_deffile
initial_directory = ls_initdet
IMPORTING
filename = ls_filename "This contains the filemame
path = ls_path
fullpath = ls_fullpath
user_action = ls_usaction.
Else if you have hardcoded the filename in the input field you can use rthe FM: PC_SPLIT_COMPLETE_FILENAME to split the filenames into different components
BR,
Suhas
Edited by: Suhas Saha on Mar 6, 2009 9:31 AM -
How to get the file name from Oracle B2B 10g
Hi My requirement is I am getting a CSV file from Trading partner, I am using oracle 10g b2b to translate the data.
In my BPEL 10g I am using AQ adapter to get the message from IP_IN_QUEUE.
Now I want to get the file name Eg: SampleFile.dat of the CSV file in my BPEL process.
I tried using the b2b.filename property in the receive activity and it is not getting the file name.
<sequence name="main">
<receive name="Receive_Note" partnerLink="GetB2BNote"
portType="ns1:Dequeue_ptt" operation="Dequeue"
variable="Receive_Note_Dequeue_InputVariable"
createInstance="yes">
<bpelx:property name="b2b.fileName" variable="WriteFileName"/>
</receive>
</sequence>
Can you help me to get the file name from Oracle b2b 10g ?
Thanks,
b2b userHi My requirement is I am getting a CSV file from Trading partner, I am using oracle 10g b2b to translate the data.
In my BPEL 10g I am using AQ adapter to get the message from IP_IN_QUEUE.
Now I want to get the file name Eg: SampleFile.dat of the CSV file in my BPEL process.
I tried using the b2b.filename property in the receive activity and it is not getting the file name.
<sequence name="main">
<receive name="Receive_Note" partnerLink="GetB2BNote"
portType="ns1:Dequeue_ptt" operation="Dequeue"
variable="Receive_Note_Dequeue_InputVariable"
createInstance="yes">
<bpelx:property name="b2b.fileName" variable="WriteFileName"/>
</receive>
</sequence>
Can you help me to get the file name from Oracle b2b 10g ?
Thanks,
b2b user -
How to find the File name using the FTP Adapter
hi all,
how to find the File name using the FTP Adapter with BPEL.
RegardsFound the solution for this.
First In the mediator's routing rule use assign property $in.property.jca.file.FileName to $out.property.jca.file.FileName
In the BPEL's receive activity go to the properties tab and get the property to a BPEL variable. That should do it.
Thanks for the posts -
How to find the form name from VA02 T.code
how to find the form name from VA02 T.code
Hi Rajyam,
I guess you are looking out for the formname which prints sales related documents.
If this is what you want,then go to the T-code NACE and select the option K1Sales activities and click on the Output Types button on the top.The new window has all the types of Output types listed.Select the most appropriate and double click on the Processing routines button in the left side screen.
The new window lists the program names and the forms associated with that output type.
In case you have any further clarifications,do let me know.
Regards,
Puneet Jhari. -
How to store the File Name from a Unix Directory into a ODI variable?
Hi,
I have built a ODI package with the following steps:
1. ODI is polling for a flat file in a Unix directory. I have used OdiFileWait tool for this purpose. Here the file name is not fixed, so I am using wild character (*) to poll for file. Example: DF*ABC1*.DAT where the first wild character denotes 1 letter and the second wild character denotes 2 digits.
2. In the second step, if the file is found, I am moving the file to ODI file server path (../oracledi/demo/file). Here I have used ODIFileMove tool.
3. Then I am using an ODI Interface to Load the file data into a Oracle database table.
4. I am using a Process log table to keep the log for each step I am executing in ODI that is ODIFileWait, ODIFileMove, Interface etc. for each file. In this table a row needs to be inserted after ODIFileWait tool gets the file, with the File Name and File Date. Later on this row will be updated as the consequent steps are executed.
Here is my concern, I need to get the exact File Name of the file after ODIFileWait gets the file and I need to insert that in the Process Log table after the ODIFileWait step gets a file. So if I can store the File Name in a ODI Variable, I can insert it into the Process log table at this point. This I am not able to do.
The files are coming in a different directory (not in ODI file server path), So after getting the file it is moved to ODI file server path (../oracledi/demo/file)
The Files which I am processing are fixed length format. Also, the File name and File Date is stored in the 1st Record(Header record) of the files.
Kindly provide me suggestions to implement this in my code.
Thanks and Regards,
Anik
Edited by: 809820 on Nov 10, 2010 11:36 PMLook at this link -http://odiexperts.com/getting-one-or-several-unknown-files-from-a-directory
change the command to fetch the ls command and write into File and then using either java or jython break the data and fetch the file name and date and insert into log table.
(or)
you can use the os.system command and get the complete ls command into string and then process and insert it.
Let us know if you need any other help. -
Can we possible to retrive the file name from the directory...?
Can we possible to retrive the list of files or file names from the directory...?
The directory called create or replace directory [directory_name] as ....Yeah, yeah its very good example for this scenario.
I agree. But, I want to learn about Java based PL/SQL code development for that just I am asking any link for this kind of material.....:-) -
SSIS - creating part of the file name from an id in the database
I am trying to figure out how to pull an "id" from my data source to include in the file name. Right now the file name created looks like customer_002_timestamp.txt. I need to add the id to the file name and I need to grab it at the time I get
the data, so then the file name becomes customer_002_id_timestamp.txt.
My data source is Oracle and I am using Attunity, so I do not have the capability of using the resultset found in the SQL Task because I have to use the data task.
Has anyone ever extracted an id from a query against Oracle using the Attunity connector to add as part of the file name? If so, how would I add that to my control flow task?
Thanks in advance for any assistance.Is it a static id value you want
Then you can just use a SSIS variable to hold value from resultset in execute sql task
Then inside your data flow you can use an expression for setting value of another variable which can be used for setting filename in your destination task. The expression will include logic to concatenate id variable also which we populated in the previous
step.
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page -
Hi ALL,
Can any one help us regarding How to fecth the Date column(or month column) from the file name specified in the path in a generalized way .
For example :
file name is :subscribers (Cost) Sep13.csv is specified in the below path
E:\Accounting\documents\subscribers (Cost) Sep13.csv
here I need to fetch the "Sep13" as a Date column in the ODI 11g in the generalized way.
Can any one help us in this case as early as possible.I would suggest using a piece of Jython code for this. Something like this...
import os
import os.path
filelist = os.listdir(E:\Accounting\documents\)
for file in filelist:
datestr = file[19:-4]
You'd need to work out what to do with datestr next... perhaps write it to a table or update an ODI variable with it.
Hope this is of some help. -
How to I find the file name of a photo in iPhoto '11?
I am trying to simply find the actual file name of any photo in iPhoto 2011, so when searching for a specific file in other programs, I can look for it directly. I am fairly new to OS X, and so this might be very easy to others, however I thought I would simply ask.
I am working with a MacBook Pro, without a retina display, running OS X Lion 10.7.4.
Thanks!I recently had to re-index my harddrive because of a similar reason (search results not populating accurately, even though the files were there) and so I am beginning to wonder. Consider something as easy as adding a photo to my profile here was tough because when searching for the file name I could not locate the appropriate photo. Although I used your suggestion (make a copy on desktop), and then select it directly, it would be much easier to search in the "upload" window, i.e. finder, and then move on.
Thanks again for your help! -
How to find the API name from the Integrator
I am looking in a WebADI build solution.
1) I need to find the API name, which is used by the Custom integrator to validate and insert the data into custom table.
Can we find the source where WebADI integrator stores the API name.
Please help me out in this.Satya,
You are right that we are not supposed to change the Oracle supplied files. But some times you really don't have any other option. Some times Oracle support them selves ask you to change their programs.
Anyway the Concurrent program definition is stored in BNE_PARAM_LISTS_B, BNE_PARAM_LISTS_TL, BNE_PARAM_LIST_ITEMS and BNE_ATTRIBUTES table. For a concurrent program with out any parameter there will be 6 records in BNE_PARAM_LISTS_ITEMS and BNE_ATTRIBUTES table.
These racords are
Application, Program, Description, Run date , Sub Request , End of Concurrent Request Parameters and Rest of parameters default.
Look at these tables and you will know how Oracle has defined these Concurrent programs.
HTH
Dinesh -
Need help getting files names from directory
I have never done anything in php before and I'm struggling.
In an attempt to search through potential document names in a directory, I've added the following code to a new php document:
<?php
if ($handle = opendir('.')) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
echo "$file\n";
closedir($handle);
?>
with no luck. When executed all I get is a blank screen. Any ideas why?
End goal is to list the file names in the directory so that the user can choose to open desired document. Thanks!Click here and pick the option which best fits your situation.
(93771)
Maybe you are looking for
-
How to extract row_id from PL/SQL procedure and assign that to batch script
Hello Team, I am stuck with a requirement, wherein I am running a batch script and within the batch script I am calling a procedure which inserts a record in a table (Including a column named l_id). I need this generated l_id to be passed on as a var
-
My ipad2 is 18 months old, I'd like to update the iOS but there is no SW update option under the Settings, General menus. How do I update the iOS. Huw
-
Here is a solution for Captivate swallowing the first syllable of spoken text
It happens occasionaly to me, using Captivate 8, that text which was generated by the text-to-speech feature is not fully audible when the slide is displayed (even in a preview!). I found the following solution for it: Go to the problematic slide In
-
Service Manager us.launch.external SM(9.31)
I am launching a URL from a change form, using US.launch.external function called from a Display Option (SM 9.31). The URL opens correctly from web or windows client. But when I click on the "X" on the change's window the URL launch again. As I avoi
-
I have purchased Pages but not cannot open without upgrading. What do I do?
I have purchased Pages a year + ago and now I cannot open work I have done without upgrading. How do I do this without buying a new product?