** How to get Source File Name thru XSLT Mapping

Hi friends,
We require source file name after message processing (SXMB_MONI) in the output structure.  We understad from Forums and  blog 2664, this is possible thru UDF - DynamicConfiguration class. This UDF will work if we use message mapping. But, in our case we are using XSLT mapping. So, how do we call  the same from Java Pacakage ? (Imported Archives). For writing java class separately, what are the changes to be made in the program?
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String ourSourceFileName = conf.get(key);
return ourSourceFileName;
Kindly reply, friends.
Kind Regards,
Jeg P.

Hi,
This is the example in this similar manner u have to call the method in which u have to write the code for picking the source file name.
<name>
   <xsl:if test="function-available('javamap:concat')">
    <xsl:value-of select="javamap:concat($first, $last, $inputparam)"/>
   </xsl:if>
  </name>
for reference check the Link,
http://help.sap.com/saphelp_nw04s/helpdata/en/73/f61eea1741453eb8f794e150067930/frameset.htm
Regards,
Phani

Similar Messages

  • Get the file name using XSLT mapping

    Hi
    How to get the file Name at receiver side using XSLT mapping.
    Could any one please help me
    Regards
    sowmya

    Sowmya
    If you will use Grpahical Mesage Mapping then this can be achieved using Adapter-Specific Attribute u201CFileNameu201D
    http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/content.htm
    Code Snippet -->
    DynamicConfiguration conf = (DynamicConfiguration) container
    .getTransformationParameters()
    .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create(
    u201Chttp://sap.com/xi/XI/System/Fileu201D,
    u201CFileNameu201D);
    But in case you have to ONLY use XSLT mapping then I would suggest to use the same jave code & call it from your XSLT mapping. I never tried such thing you might use couple of jar files too.
    - lalit -

  • How to get Sequence File Name ?

    Hello everybody !!
    I'm using TestStand 3.1 and i would like to get sequence file name. I've tried to use NameOf() function, but without success.
    Of course, I've searched previous posts about the same question, but nothing works.
    Is there someone able to tell me how to get sequence file name ?
    Thanks a lot.
    MrOrange

    MrOrange,
    first of all, the solution i will present only works for saved sequence files.
    you got all information you need within TestStand itself, just browse for RunState.SequenceFile.Path. here you can find the filename. but the path of the file is also included in the string, so this is a part you have to get rid off.
    you can use statements to extract the filename from the path. just search the string for the last occurence of "\\" (searchinreverse!) and then you can retrieve the right() part of the path. beware that right() needs the number of characters you want to extract, not the startindex!!
    hope this helps,
    Norbert B.
    NI Germany
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Get source file name in the structure itself or in the payload

    Hi everyone,
    I have a task regarding mapping
    In my  structure , i defined a field for Filename . What I need is, what ever source file name am sending, that should be mapped into this filed.
    If am sending inputfile.txt.
    My output file should appear like this,
    <?xml version="1.0"?>
             <message id=u201DmessageIDu201D>
                     <header>
                             <filename>D:\\inputfile.txt</filename>
                     </header>
                     <body>
                              FileContent
                     </body>
             </message>
    Any help would be appreciated. Do I need to create any UDF. If So please provide.
    Regards,
    Varun

    Hi Varun,
    are u using the same UDF that I replied. also note that the variable key should be declared only once.
    Use this without changing any thing. It works for me...
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String ourSourceFileName = conf.get(key);
    key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","Directory");
    String dir =  conf.get(key);
    return dir+'/'+ourSourceFileName;
    Also let us know where do you het this error..
    Thanks
    SaNv...

  • How to get the file name in one of the Xml node field?

    Hi Experts,
    i have one requirement with file name in xml file.
    i need to get <b>the file name of file</b> in one of the node in xml content of that file.
    how can i achieve that req?
    treat this as Very Urgent.

    Hi Bheem,
    Explain your scenario in detail..
    >>i need to get the file name of file in one of the node in xml content of that file.
    1. Create an node <b>Filename</b> in the target datatype.
    2. Check the Option Filename in the Adapter Specific Message Attributes in the sender file CC.
    3. Use the following UDF and map it to the Filename field in the target message type.
    public String getFileName(Container container)
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String ourSourceFileName = conf.get(key);
    return  ourSourceFileName; 
    Regards
    San

  • Need to genereate Target file name same as Source File Name thru Local J2SE

    Hi Everyone,
    I want to genereate Target file name exactly same as Source File Name. I know how to handle this in Central Adapter Engine(Sender & Receiver Communication Channel).
    But I need to do this in Local J2SE adpater engine.
    Please help me in this regard.
    Thanks & Regards,
    Nagaraju

    U can use the parameter to save the filename in the message header
    file.messageAttributes=<name,directory>
    This is similar "Adapter-Specific Message Attributes" concept.
    http://help.sap.com/saphelp_nw04/helpdata/en/6f/246b3de666930fe10000000a114084/frameset.htm
    Regards,
    Prateek

  • How to get IDL file name from CORBA IOR string

    hi, is it possible to get IDL file name from the IOR string? how?
    regards

    Hi,
    I don't think so.
    And if it was possible, which interface should be returned if
    the referenced object implements more than one?
    Regards.
    Karl

  • File Upload, how to get full file name

    Hi Experts,
    I have to get the complete file path when I use fileupload UI Element. but I am not able to achive this.
    I used a File Upload UI, with filename property mapped to string variable filename and Data mapped to a binary variable filedata.
    I tried to get the file name in below ways
    1. wdContext.nodefile().currentfileelement.getfilename();
    and
    2. through modifiablebinary type also.
    but in both cases I am getting only the file name, but not the complete path.
    Is there any way that I can get the file path.
    If I uplod a file in D drive (example.txt),
    I am getting the file name as example.txt but I want to get it as D://example.txt
    Please help me,
    Regards,
    Srinivas

    Hi
    What Stream are you using for read a file ?
    InputStream inputStream = resource.read(false);
    File  filePath = new File(inputStream.toString());
    wdComponentAPI.getMessageManager().reportWarning(filePath .getAbsolutePath());
    Best Regards
    Satish Kumar

  • 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 user

    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 user

  • How to get music file name in itunes

    OK I have some music files on pc side. wav files mostly. Some of them have proper id tags, some don't. When I try to import tagged ones to itunes I get only partial info preserved. So either I have to edit tags manually, which is tedious work, either I have to burn to cd and then import. The best is last way, but there is tremendous cd waste involved. Is there easier way to import files? Is there something like virtual cd for mac? I tried using disc utility, but nothing happens. Itunes doesn't recognize files...
    There are verbatim 32x cd-rw too, has anyone any experience with them? Speed is good and would solve waste problem too.
    For burning I use BURN version 1.71u

    Hi Bheem,
    Explain your scenario in detail..
    >>i need to get the file name of file in one of the node in xml content of that file.
    1. Create an node <b>Filename</b> in the target datatype.
    2. Check the Option Filename in the Adapter Specific Message Attributes in the sender file CC.
    3. Use the following UDF and map it to the Filename field in the target message type.
    public String getFileName(Container container)
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String ourSourceFileName = conf.get(key);
    return  ourSourceFileName; 
    Regards
    San

  • 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,
    Shan

    Hi 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

  • Determine Target directory from Source file names with out mapping

    Hi All,
    I have a requirement to determine the Target Directories from the Source file names.
    File Sender Adapter - XI - File Receiver Adapter
    In this scenario I am not doing any mapping. Source File directory contain 3 files. These file should go to 3 directories in the Target Server.
    Please help me how can meet this requirement
    Thanks in advance
    Kevin

    Hi Kevin,
    if you can separate the files by name. have 3 sender communication channels each picking up one of the files (you do this by making the regex in the file name mutually exclusive) and then send them all to the target system using the same comm. channel.
    regards,
    Horia

  • How to get source table name according to target table

    hi all
    another question:
    once a map was created and deployed,the corresponding information was stored in the repository and rtr repository.My question is how to find the source table name according to the target table,and in which table these records are recorded.
    somebody help me plz!!
    thanks a lot!

    This is a query that will get you the operators in a mapping. To get source and targets you will need some additional information but this should get you started:
    set pages 999
    col PROJECT format a20
    col MODULE format a20
    col MAPPING format a25
    col OPERATOR format a20
    col OP_TYPE format a15
    select mod.project_name PROJECT
    , map.information_system_name MODULE
    , map.map_name MAPPING
    , cmp.map_component_name OPERATOR
    , cmp.operator_type OP_TYPE
    from all_iv_xform_maps map
    , all_iv_modules mod
    , all_iv_xform_map_components cmp
    where mod.information_system_id = map.information_system_id
    and map.map_id = cmp.map_id
    and mod.project_name = '&Project'
    order by 1,2,3
    Jean-Pierre

  • How to get source table name

    Hi,
    I need to know how get a source table name. I need to get a source table name and do some transformation. I am adding the step in IKM to do this and therefore need source table name in there.
    <%=odiRef.getSrcTablesList("","[RES_NAME]","","")%> gives work table name (C$_0XXXXX) whereas actual source table name is expected.
    Could someone please help?
    Thanks.

    Hi,
    May i add a point?
    In IKM level, if u use this API it will always return u C$ table name only since for IKM C$ is the source. You need to capture and use this API in LKM level.
    In LKM add a step in Command on target and technology as Jython and try the below code.
    mySourceTable= '<%=odiRef.getSrcTablesList("", "[RES_NAME]", ", ", "")%>'
    And later in IKM use this variable for ur transformation.
    Thanks,
    Guru

  • How to get uploaded file name and path in BefExportToDat event script

    I would like to get hold of the uploaded file name and full path in the event script "BefExportToDat", as I need to extract values from particular fields. However I have not yet found a way to do this.
    - The input variable "strFile" returns the .Dat file path in the Outbox, to which it is about to export the data. This is no use to me.
    - The API variable RES.PstrFilename is returning nothing
    I am using RES.PstrFilename in the "BefFileImport" event script in a different FDM application and it works fine, however I need to find a way to get this to work in the "BefExportToDat" event script.
    Please let me know how this might be achieved.

    I am looking through the API calls in FDM Workbench, but cannot see the table (tPOVPartitions) you mentioned listed. Is this the correct name? And do I just use the function listed in the object browser to run the query?
    Furthermore (going back to my initial thoughts of using strFile), it appears that although the variable contains the .Dat filename and path, the actual file is non-existent when "BefExportToDat" is executed:
    Error:
    Error: Export failed.
    Detail: File not found.
    This would make sense, but it does make the variable "strFile" a little pointless since one cannot make use of the file in this particular event script. Do you please have any thoughts on this?

Maybe you are looking for

  • Converting TIme to a different zone time

    Hi, Right now, In my applicaiton a timestamp value is inserted to Database table. But as of now it inserts current system time (which ever zone application is run). what can I do to make to change it to timestamp of US pacific zone. As of now, the va

  • Lsmw-batch input

    Hi all.. Am uploading vendor master using lsmw-batch input method..when there s one record in my flat file its working fine.. But when i give more than one record its throwing some errors and i cant create the session.. can any one help me regarding

  • ABAP query using IHPA--need partner address

    I am using SQ01 to create a query.  I amusing the EQUI and IHPA.  I need the partner address for Partner function = EC.  I have the parner number but not the address number, so I cannot join to table ADRC.

  • Transfer text message history to a new number

    My friend has given me a new number. Is it possible to simply update their contact information so that new text messages will be added along with the old number. I want to keep the old messages but I do not want them to be in two different text histo

  • Javascript injection in captivate??

    I have been trying to run this file on my machine but i think the javascript code is not getting executed on my browser. Does anyone know how to cope with it?