How to get file name from file adapter (Read Operation)

Hi All,
I am reading files from local location, in jca file i gave filename property =*.* ( which reads all files), and now I want to read the incoming file name inside bpel and I want to copy the file name to some variable. Is this possible?

Yes, its possible.
In your receive activity,set below property in its properties tab:
<bpelx:property name="jca.file.FileName" variable="FileName"/>
Before that make sure to create a variable "FileName" of string type.
Whatever file your file adapter will read,its name will be stored in this variable.
Hope this helps.
Regards,
Karan
http://learn-oraclesoa.blogspot.com/

Similar Messages

  • File Name from File Adpter in IDOC

    Hi all,
    We have scenario of file->xi->zidoc.
    Now in one field for segement  i also want to store the file name which has been processed by xi , is there anyway to get it ?
    Thanks & Regards,
    Tuhin

    Hi Holger,
    Thanks but can u guide  me how to include  customize code  in module for communication channel and does it need to be EJB only or jar file can also be included.
    If i get filename thorough this customize code but how to get this name in graphical mapping ??
    Please send me any code or docs on [email protected] .
    Thanks & Regards,
    Tuhin

  • How to get the name of file was read from file adapter ?

    Hello!
    I make a pooling into one directory to read all *.fat files in this directory, and I want the name of this file
    is it possible ?
    God bless all!

    it is mentioned in the sample code.. look at the pdf guide inthe sample code document for file adapter.
    you need to define a variable of message type of the file adapter inbound header message type and assign the variable to the apapters tab in the receive activity..
    the variable will have file name now

  • Passing file name dynamically in Synchronous read operation of FTP adapter in OSB

    Hi,
    We are implementing the integration in OSB 11g and using FTP JCA adapters to check if the file exists in the FTP location or not. We are using Synchronous read operation of FTP adapters. We need to pass the file name dynamically at run time. In the JCA file we can hard code the file name. How that file name can be taken dynamically using OSB.
    Regards,
    Sharmistha

    Hi Sandeep,
    This is possible.
    For creating filenames dynamically for your sender, you will have to crate a variable name ( eg: %VAR%) as you file name and then you will have to give the name of your file under variable substitution. Just check this link for more info,
    http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
    In the case of receiver file adapaters, you have 5 options for file creation like,
    1.Create
    2.Append
    3. Add time stamp
    4.Add Counter
    5. Add Message ID
    You can choose any of these options or you can do it dynamically from you payload. Just check out this help link for more info,
    http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
    Hope this helps

  • How to get key name  from parameter list

    hi..
    i want string from parameter list.. i hv already created parameter list like
    ADD_PARAMETER (param_list_id, 'EMPID', TEXT_PARAMETER,'123');
    ADD_PARAMETER (param_list_id, 'EMPNM', TEXT_PARAMETER, 'ABC');
    ADD_PARAMETER (param_list_id, 'EMPADD', TEXT_PARAMETER, 'XXX');
    i got value like '123' ,'ABC', 'XXX' using
    eg. get_parameter_attr(param_list_id,'EMPID',aprmlist,avalue)
    but i want key name like 'EMPID' , 'EMPNM', 'EMPADD' from param_list_id
    is it possible to get this key name from parameter list ???
    Thanks...

    I cannot think of a way to do that. The code that reads the list is supposed to know the key names. That is sort of the point with parameter lists. If you need to have parameter lists that can be interepreted by some code that doesn't know about a specific list but knows how to interpret it by inspecting the key names, perhaps you can specify a separate parameter list with the key names as values and call the keys of that list something generic?

  • File name from file path

    Hi Friends,
    i am using METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
    i want to know the file name selected from the path.
    example : c:\folder\file.txt.
    here i want to know which file i have selected. if it is a small path then we can use SPLIT command but if the path selected is long with special chareters then?
    urget requirement.
    regards
    Kumar M.

    u can use this function...
    CALL FUNCTION 'WS_FILENAME_GET'
       EXPORTING
         DEF_PATH         = 'C:\'
         MASK             = '*.xls'
         MODE             = 'O'
         TITLE            = SY-TITLE
       IMPORTING
         FILENAME         = FILENAME
       EXCEPTIONS
         INV_WINSYS       = 1
         NO_BATCH         = 2
         SELECTION_CANCEL = 3
         SELECTION_ERROR  = 4
         OTHERS           = 5.
    have a nice day...

  • Using the array of file names from File.list()

    Hi
    I'm having trouble with my code, similar to this:
    File temp=new File(path); //where 'path' is a String containing the directory path
    String [ ] arr = temp.list();
    Then when trying to use arr, I come up with NullPointerExceptions.
    The Java API says that the File.list() method returns a Stirng array.
    But then how do I use/get this array in a nice usable form?
    (eg. to be able to loop through the list of {returned} Files)

    Yes I have referred closely to the documentation.
    The method list() for my File object is definitely not returning null;
    it seems that as soon as the code inside the loop tries to access the next element of the returned array [the one after the last existing element] - which is actually non-existent (ie overstepped the bounds of the array's index) - the program comes up with an Exception*. So the method list() does not return null...
    I have managed a workaround similar to this:
            File temp = new File (path);
            String[] list = new String [temp.list ().length + 1];
            try
                for (int i = 0 ; temp.list () != null ; i++)
    list [i] = temp.list () [i];
    catch (ArrayIndexOutOfBoundsException iobe)
    * The program is not coming up with NullPointerExceptions anymore; only an ArrayIndexOutOfBoundsException if I comment out the try and catch coding.... (?)
    Thanks for your suggestion about posting this at the Java Programming Forum.
    My workaround works, but is there a way to do this without catching an exception?

  • How to get tree structure from file list?

    I have got following rows from my select query presenting a folder structure:
    PATH
    /KING/JONES/SCOTT
    /KING/JONES/SCOTT/ADAMS
    /KING/JONES/FORD
    /KING/JONES/FORD/SMITH
    /KING/BLAKE
    /KING/BLAKE/ALLEN
    /KING/BLAKE/WARD
    /KING/BLAKE/MARTIN
    /KING/BLAKE/TURNER
    /KING/BLAKE/JAMES
    /KING/CLARK
    /KING/CLARK/MILLER
    /PALO/TEMP
    On base of this data I need to build tree in my application by effecient way.
    Therefore i would like to achieve data (SELECT with two columns) as bellow:
    FOLDER        PARENTFOLDER
    KING     NULL
    JONES   KING
    SCOTT  KING/JONES
    ADAMS  KING/JONES/SCOTT
    FORD     KING/JONES
    SMITH    KING/JONES/FORD
    BLAKE    KING
    ALLEN    KING/BLAKE
    WARD    KING/BLAKE
    MARTIN  KING/BLAKE
    TURNER  KING/BLAKE
    JAMES    KING/BLAKE
    CLARK     KING
    MILLER    KING/CLARK
    PALO      NULL
    TEMP      PALOIs this possible to do it on SQL level(not PL SQL)?
    Thanks

    Perhaps something like this?
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select '/KING/JONES/SCOTT' as path from dual union all
      2             select '/KING/JONES/SCOTT/ADAMS' from dual union all
      3             select '/KING/JONES/FORD' from dual union all
      4             select '/KING/JONES/FORD/SMITH' from dual union all
      5             select '/KING/BLAKE' from dual union all
      6             select '/KING/BLAKE/ALLEN' from dual union all
      7             select '/KING/BLAKE/WARD' from dual union all
      8             select '/KING/BLAKE/MARTIN' from dual union all
      9             select '/KING/BLAKE/TURNER' from dual union all
    10             select '/KING/BLAKE/JAMES' from dual union all
    11             select '/KING/CLARK' from dual union all
    12             select '/KING/CLARK/MILLER' from dual union all
    13             select '/PALO/TEMP' from dual
    14            )
    15  --
    16  -- END OF TEST DATA
    17  --
    18  select distinct substr(path,instr(path,'/',1,rn)+1,decode(instr(path,'/',1,rn+1),0,length(path)+1,instr(path,'/',1,rn+1))-instr(path,'/',1,rn)-1) as folder, substr(path,2,instr(path,'/',1,rn)-2) as parent
    19  from t
    20       cross join (select rownum rn from dual connect by rownum <= (select max(length(regexp_replace(path,'[^/]'))) from t)) x
    21* where instr(path,'/',1,rn) > 0
    SQL> /
    FOLDER                  PARENT
    BLAKE                   KING
    SCOTT                   KING/JONES
    JAMES                   KING/BLAKE
    MARTIN                  KING/BLAKE
    SMITH                   KING/JONES/FORD
    KING
    WARD                    KING/BLAKE
    ADAMS                   KING/JONES/SCOTT
    FORD                    KING/JONES
    TURNER                  KING/BLAKE
    MILLER                  KING/CLARK
    PALO
    TEMP                    PALO
    JONES                   KING
    CLARK                   KING
    ALLEN                   KING/BLAKE
    16 rows selected.
    SQL>

  • How to get a value from file to variable in ODI?

    hi
    i created a variable and i want to assign the value of the variable from the flatfile...can v do that ?
    i will be having the value in the flatfile...i want to assign the value to the variable...
    Edited by: sai praneeth on Feb 15, 2009 10:34 PM

    I don`t know how to realize your requirement that assign variable from flatfile directly.
    But I have done this kind of assignment from database table to odi variable.
    So I think, you can transform this variable value in flatfile to database table firstly, and then assign it to odi variable which you want to use.
    Just a kind of solution :-)

  • How to get application name from a receive location?

    Hi all,
    I am trying to do a custom error application, and I want to notify system admin users that "the receive port XXXX has stopped in application YYYYYY".
    Right now I do know which receive location that is being suspended. But I am not being able to get the application name, associated to this receive location (I can also get the ReceivePort, if it matters).
    I've tried 2 ways:
    > using WMI
    > Using SQL (direct query in BizTalk databases - for testing).
    I did not found any solution, even search table by table, i did not found a relation between Applications and receive location..
    Anyone? 
    Thanks in advance
    Ricardo Bessa

    The following SQL query should give you a result of every disabled receive location as well as it's receive port and application:
    SELECT
    RL.Name AS ReceiveLocationName
    , RP.nvcName AS ReceivePortName
    , APP.nvcName As Application
    FROM [BizTalkMgmtDb].[dbo].[adm_ReceiveLocation] AS RL WITH(NOLOCK)
    INNER JOIN [BizTalkMgmtDb].[dbo].[bts_receiveport] AS RP WITH(NOLOCK)
    ON RL.ReceivePortId = RP.nID
    INNER JOIN [BizTalkMgmtDb].[dbo].[bts_application] AS APP WITH(NOLOCK)
    ON RP.nApplicationID = APP.nID
    WHERE
    RL.[Disabled] = -1
    ORDER BY Application ASC
    Christian @ IntegrationAdmin.com

  • How to get return value from java and read by other application?

    i want to read return value from java and the other application read it.
    for example:
    public class test_return {
        test_return(){
        public int check(){
            return 1;
        public static void main(String args[]){
           new test_return().check();
    }from that class i make as jar file. How to read the return value (1) by other application?
    thx..

    If your installer is requiring some process it invokes to return a particular value on failure, then the installer is seriously broken. There are a bazillion commands your installer could invoke, and any of them could fail, which in turn could invalidate the entire install process, and any of them could return any value on failure. The only value that's consistent (in my experience) is that zero means success and non-zero means failure, with specific non-zero values being different in different programs.
    About the only control you have over the JVM's exit code is that if your main method completes without throwing an exception, the JVM will have an exit code of 0, and if main throws an exception (either explicitly or by not catching one thrown from below), it will be non-zero. I'm not even sure if that's guaranteed, but I would guess that's the case.
    EDIT: I'm kind of full of crap here. If you're writing the Java code, you can call System.exit(whatever). But nonetheless, if your installer requires certain exit codes from any app--java or otherwise--you have a problem.
    Edited by: jverd on Oct 29, 2009 1:27 AM

  • How to delete file names from Adobe Reader list

    How can I delete file names from the Adobe Reader list?  I have deleted the file & it's empty, but deleted file names remain in my list & it's very annoying.  I can't seem to find an option anywhere to delete the file names.

    Thanks for the answer, I will try this & post my results with this method.  I have set the amount to zero, & it seems if I want to put back valid files into my list I first need to find them in another file in my pc, such as documents, open them in Adobe Reader, & then then they will reappear in the Adobe Reader list.  Is this correct?  Thank you!
    This seems to be the case, you need to restore each file you want in your list one by one by accessing them elsewhere on your pc, & then you must open them with Adobe Reader to have files reappear in your Adobe Reader list.  However, this seems to be a tedious process if you only want to delete one obsolete file from your list by first emptying the list & rebuilding it file by file.  It works, but I'm wondering if there is a more sensible & efficient way to do this?

  • Search a string with in some file and get the name of file

    i want to search a string in some files that are in a given directory and return the name of file having searched string.I am doing this with grep command as given below
    import java.io.*;
    public class linux_java {
    public static void main(String[] args) {
    try {
    String command = "find . | xargs grep -l Resolv /data2/opt/jakarta-tomcat-4.1.24/webapps/Oa/BOG/*.txt";
    final Process process = Runtime.getRuntime().exec(command);
    OutputStream os= process.getOutputStream();
    System.out.println("out put stream= " +os);
    PrintStream stdIn = new PrintStream(new BufferedOutputStream(process.getOutputStream()), true);
    System.out.println("Return code = " + stdIn);
    } catch (Exception e) {
    e.printStackTrace();
    i dont know how to get the name of file that are return by the execution of command through process object. Please send the code for the same

    thanks for your suggestion....
    i change the code but now it is giving error as /usr/bin/find incomplete syntax....but i am giving the right syntax....
    please confirm whether the syntax is correct...
    import java.io.*;
    import java.util.*;
    public class linux_java {
    public static void main(String[] args) {
    try {
    //String command = "ls -alt";
    String command = "find /data2/opt/jakarta-tomcat-4.1.24/webapps/Oa/BOG -type f -exec grep -sl 'Aggarwal' {} \\; 2>/dev/null";
    ///grep -l System test/*java
    System.out.println(" the command is"+command);
    final Process process = Runtime.getRuntime().exec(command);
    InputStream is = process.getErrorStream();
    InputStreamReader isr = new InputStreamReader(is);
    BufferedReader br = new BufferedReader(isr);
    String line="";
    System.out.println(" the BufferedReader is"+br.readLine());
    while ((line = br.readLine()) != null) {
    System.out.println(" the files are"+line);
    } catch (Exception e) {
    e.printStackTrace();
    }

  • Getting user name from sopa header

    How should get user name from soap header in my udf...?i searched in sdn,but not get exact solution...

    I din't get this with SRemoteUser
    1. i've enabled " Do Not Use SOAP Envolope"
    2.Enabled ASMA
    3.Variable Transport Binding .
    used the following code as well:
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey user = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/SOAP", "SRemoteUser");
    conf.get(user);
    But not value in it.. Correct me if iam wrong..

  • How to get list name through javascript?

    Hi,
    I wrote javascript for getting list items but here I'm hard coded list name as "Projects"(my list name). How can I get list name automatically with out hard coding,
    Appreciate if anyone help.
    Thank you.
    function DoLogicalDelete()
    var clientContext = null;
    var oList = null;
    var oListItem = null;
    // var lstItmIsDeleted = null;
    var itmID = getQuerystring('ID');
    clientContext = SP.ClientContext.get_current();
    oList = clientContext.get_web().get_lists().getByTitle('Projects');
    // var oListItemID = SP.ListOperation.Selection.getSelectedItems(clientContext);
    oListItem = oList.getItemById(itmID); // getting ID
    clientContext.load(oListItem,"Title", "IsDeleted"); // load items to oListItem
    oListItem.set_item('IsDeleted', true);
    oListItem.update();
    clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded),Function.createDelegate(this, this.onQueryFailed));

    Not sure on which context you are executing the code. If you executing this from the list form and trying to get the current list, then you may need to get the list name from the breadcrumb/list title field. Refer to the following posts for more information
    http://sharepoint.stackexchange.com/questions/39008/how-to-get-list-name-from-js-object-model-list-name-from-url-problem
    http://itrob.be/sharepoint-get-all-lists-names-in-javascript-spservice-and-jquery/
    --Cheers

Maybe you are looking for

  • Can we get error message when a component is entered twice in BOM??

    Hi, I have a BOM with around 150 components. Can we get an error or warning message when ever a component is entered twice in the component list???? Thanks for your views. Naveen.

  • Satellite A500-19Q: Win 7 doesn't load - UNMOUNTABLE BOOT VOLUME

    Hy everybody, I'm working since 2 months with my new A500-19Q running Win 7 Home Premium 64bit. Yesterday night the system has been regularly stopped with the windows "shut down" command. Today, the machine doesn't load win 7 at all. If I let the loa

  • [JS][CS3] Getting Page Number

    Hi. I need to find the page number of the page containing a frame. Normally I would use "myFrame.parent.name" to find the page number. However, I cannot use this method on an inline graphic.  What I get returned is the story, which has no page number

  • Adding monitors

    Can i add a 3rd and 4th monitor to an HP Slimline 5000 series using USB to VGA adaptors? This PC cannot be expanded.

  • Linking songs in iTunes

    I have a set of songs that should be played sequentially. I looked in the advanced menu tab, and it had a choice for Join CD Tracks. This sounds like it would do what i wanted to do it do , but I can't get it to work. I went to the help and, as usual