Accessing a file in Imported Archive from Adapter module

Hi,
I am designing a module for File/FTP and Mail adapters. Is it possible to retrieve data from a CSV or TXT file uploaded in the Imported Archive from the Java code in the module? If this is possible, do I use the same approach as accessing the CSV data from the mapping using a UDF? If this is not possible, can you suggest other ways were I can access a CSV or TXT configuration file from an adapter module?
I would like to avoid using Module key, Parameter name and Parameter value as I would like to make the adapter module generic and the data I will be reading might be too much to be specified in this location. However, I would use the Module key, Parameter name and Parameter value to specify the CSV or TXT filename which the adapter module will be using.
Thanks in advance for any help that you can provide.
Regards,
Elbert

Imported archives are part of mapping flow and adapter modules are more part of routing. Therefore I don't think imported archive could  be made accessible anywhere outside mapping.
but my CSV or TXT file would be updated regularly by the developer.
So were you planning to import this file again and again under imported archive? This doesn't seems to be a good solution when you think about changin Design part in Production environment. It would be better to give access to certain folder to developer to put the file there and access it using some code. You may refer this
/people/sundararamaprasad.subbaraman/blog/2005/12/09/making-csv-file-lookup-possible-in-sap-xi
Regards,
Prateek

Similar Messages

  • Access SRM documents in external archive from ERP

    Dear gurus,
    our system landscape is as follows:
    SAP ERP 6.0 EHP 4
    SAP SRM 5.0
    IXOS archive system
    We use the archive system to store documents (pdf, doc etc.) linked to our SAP ERP documents (purchase orders etc.).
    Now we would like to enable the users using SAP SRM to attach files to a shopping cart item. Those files should be stored in the IXOS archive (just like files attached to SAP ERP documents).
    When SRM then creates a purchase requisition for the shopping cart, the buyer agent should be able to access the file in the archive directly from the purchase requisition.
    Is there any way to do this?
    We found OSS 1057932, but
    1) it did not work, the document cannot be accessed in ERP and
    2) obviously the archive system is not used, but the documents are stored in the SAP database instead.
    Any ideas?
    Cheers
    Alicia

    Hi
    We can use either the CPPR functionality which requires PI/XI to be in place or maintaining the T160PR and T160EX tables in ECC and running the report BBP_EXTREQ_TRANSFER to push the PR's into SRM. In SRM we have to maintain the entry channel to bring the PR's into SOCO.
    R/ Reddy.

  • How to access a file in Unix server from windows using java

    I want to access a file in unix server from windows using java program.
    I have the following code. I am able to open the url in a web browser.
    String urlStr="ftp:user:passwd@unix-server:ftp-port//javatest/test.csv;type=i";
    URL url = new URL(urlStr);
    BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream)));
    String inputLine;
    while((inputLine=in.readLine()))!=null){
    System.out.println(inputLine);
    in.close();
    I get the following error
    java.io.FileNotFoundException: /javatest/test.csv
    at sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(FtpURLConnection.java:333)
    at java.net.URL.openStream(URL.java:960)
    at com.test.samples.Test.main(Test.java:45)

    urlStr="ftp:user:passwd@unix-server:ftp-port//javatest/test.csv;type=i";
    I have given the format of the urlStr that I am using in the code. The actiual values are used in my code. I have tried pasting this url in the browser and it opens the file.

  • Is it possible to send error message from Adapter Module to CCMS?

    Hi
    Is it possible to send error message from Adapter Module  to CCMS...?I have written on adatper module from there i have to send error message to CCMS or SXMB_MONI. Is it possible if yes please send me the related documents
    Best Regards
    Ravi Shankar B

    Hi
    I have written following User Defined Exeption in my Module program
    class DuplicateFileException extends ModuleException{
              DuplicateFileException(String message){
                   super(message);
    I am throwing my Exception like this
    try{
         throw new DuplicateFileException("Duplicate File");
    }catch(DuplicateFileException e){
         throw e;
    But i am not getting this exception in SXMB_MONI. In adpater monitoring i am getting the following exceptions
    <b>
    2007-05-16 15:51:30 GMT+05:30: Retry interval started. Length: 5.000 s
    - 2007-05-16 15:51:30 GMT+05:30: Error: java.lang.NullPointerException
    - 2007-05-16 15:51:30 GMT+05:30: An unknown error occured.
    - 2007-05-16 15:51:30 GMT+05:30: Processing started
    - 2007-05-16 15:51:25 GMT+05:30: Error: java.lang.NullPointerException</b>
    can any one give me the idea how to send error from module program to SXMB_MONI
    Thanks & Regards
    Ravi Shankar B

  • Accessing files in library from adapter module

    Hello everyone!
    We are using XI with Netweaver 2004 and have programmed our own adapter for message transformations.
    After the transformation we want to validate the generated XML file with the validator from SAP XML Toolkit.
    Validator validator = new Validator();
    String[] xsdFileNames = new String[]{
         "???/de/nordakademie/ext/gen/" + ediStandard + "/" + parser.getEdiVersion().toLowerCase() + "/xsd/" + parser.getEdiMessageName().toLowerCase() + ".xsd",
         "???/de/nordakademie/ext/gen/" + ediStandard + "/" + parser.getEdiVersion().toLowerCase() + "/xsd/segments.xsd"
    boolean isValid = validator.validate(byteIn, xsdFileNames);
    But we don't know how to address the necessary xsdFiles for the transformation. At the moment we get thw following error: [location : null] ERROR : E:\...\de\nordakademie\ext\gen\edifact\d96a\xsd\orders.xsd (The system cannot find the path specified)
    The xsd files are located in the following package: de.nordakademie.ext.gen.edifact.d96a.xsd.
    This package is part of a jar file which was deployed to the J2EE-Engine in a Libary.
    But how can we access these files in the code example above?
    Thanks in advance!

    Hey!
    Thanks for your help. I ha´ve now solved the problem. The following code works:
    String xsdMessagePath = "de/nordakademie/ext/gen/.../abc.xsd";          
    String xsdSegmentsPath = "de/nordakademie/ext/gen/.../xyz.xsd";
    Validator validator = new Validator();
    URL xsdMessageUrl = getClass().getClassLoader().getResource(xsdMessagePath);
    URL xsdSegmentsUrl = getClass().getClassLoader().getResource(xsdSegmentsPath);                                   
    String[] xsdFileNames = new String[]{
         xsdMessageUrl.toString(),
         xsdSegmentsUrl.toString()
    boolean isValid = validator.validate(byteIn, xsdFileNames);

  • Issue in .class file in imported archive ESR - after upload using eclipse

    Dear Friends,
    My requirement here is too change existing java mapping. Here I am exporting zip file from imported archive and after making changes in eclipse upload the .JAR file again. Here .class file is not opening after upload in Imported Archive.
    Error is
    Setup I am having on my system.
    -> JDK version on my system JDK 1.6_34
    -> JRE on my system – JRE 6
    -> Using eclipse SDK 4.2.2
    SAP PI servers settings.
    I searched online blogs but no help. Can anybody guide me what wrong am I doing here?
    Thanks.
    Sumeet.

    Thanks for reply..Hareesh.
    -> In Eclipse only 1 warning is coming and no error. I guess Eclipse automatically compile .class file. Is there any way in eclipse to see if compilation is done properly?
    -> I imported few external JAR files and already few JAR files are there in Eclipse(JRE1.6), as shown in fig below. Which JAR file is being user? How can I make sure?
    -> When using Run as option I am not getting any option. Is it normal or did I have to activate some option?
    Please give your views on this.
    Thanks.
    Sumeet.

  • Blocking access to file sharing (AFP/SMB) from outside of network

    Hello all,
    Is there a way to block access to file shares from outside of our LAN? I have a machine that has some sharing turned on (it is also my email server) and I can reach it across the internet and mount shares as if I was in the office.
    How can I block this access? Both SMB and AFP?
    Thank you,
    -John

    Justin, thank you for your reply. The machine is on a public ip address and is not behind a NAT router. I've turned on the software firewall and that is working now. However, I imagine it would be better to use a hardware firewall. Any suggestions on a good one? Thank you.

  • How to access jpeg files on icloud drive from your iphone (5s)

    Can anyone tell me how to access a jpeg file on icloud drive from iphone? I have upgraded my macbook pro (with retina) to Yosemite, and my iphone is on ios 8.01 and I have turned on icloud drive. The only content I have seen online is accessing word docs through Pages which I get - but what about jpeg files? Thank you!

    At the moment, you can't.  A favourite complaint.  Hopefully, the situation will change in the near future, but only Apple knows when or if.

  • How to access .asl file in PSE 13 from old PSE 10?

    Can’t access .asl files I had used with PSE10 in PSE 13.  Computer: Mac OS 10.10.1  with PSE 13
    What I have done:
    1- .ASL files from PSE 10 were copied to PSE 13:  Mac HD> applications > PSE13 > Support files  > Presets > styles
    2- Closed PSE 13 and opened again
    3-  Tried to add styles with Preset Manager. Message is  “Sorry that style set has already been loaded”
    4- The only styles I can access are from the Effect/Styles panel and only the ones that came with PSE13, not my old .asl files I had been using with PSE10.

    finally found the answer here:  How to Load Layer Styles in Photoshop Elements | theStudio | Digital Scrapbooking Studio

  • Access wav-files in jar-archives (URL works, File works not)

    Hi there!
    The un-jar-ed application works fine, but I have a problem with accessing files in jar archives.
    URL url = Classname.class.getResource("testdir/test.wav");works fine (and loading images works this way), but as soon as I try to get the file
    File file = new File(url.getFile());I get an null-exception.
    (in my case, I use the jmf package to play the sound-files, and I get the problem when I try to instatiate the MediaLocator
    MediaLocator mediaLocator = new MediaLocator(url);but I think the problem is the same)
    Thanx for help

    works fine Then keep doing it that way. What's the problem? It's true that you can't access something in a jar archive via a File object, so don't do that.

  • Get poll interval parameter from adapter module

    Hi,
    I'd like to make special treatment in my adapter module based on the "poll interval" information filled in Processing Parameters part of the adapter configuration.
    Can an adapter module access this information?
    regards
    Yann

    Hi Yann,
    >>>>Can an adapter module access this information?
    of course it can you just have to use
    a correct parameter's name
    check this post to get the java code
    Re: Access the URL Parameter from a Adaptermodule
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • Best approach for RFC call from Adapter module

    What is the best approach for making a RFC call from a <b>reciever</b> file adapter module?
    1. JCo
    2. Is it possible to make use of MappingLookupAPI classes to achieve this or those run in the mapping runtime environment only?
    3. Any other way?
    Has anybody ever tried this? Any pointers????
    Regards,
    Amol

    Hi ,
    The JCo lookup is internally the same as the Jco call. the only difference being you are not hardcoding the system related data in the code. So its easier to maintain during transportation.
    Also the JCO lookup code is more readable.
    Regards
    Vijaya

  • JAR File for Channel-Class for Adapter-Modules

    Hello,
    does anybody know which JAR and Package i need for the Channel-Class.
    It's not:
    com.sap.aii.mapping.lookup.Channel
    I need this one with the method "getValueAsString" in order to write an Adapter-Module.
    Gunnar

    Hi,
    Check out this link for the documentation of com.sap.aii.mapping.lookup.
    You will get all the functions of this. and import com.sap.aii.mapping.lookup and use the function of this package.
    Link : http://help.sap.com/javadocs/NW04S/SPS09/pi/com/sap/aii/mapping/lookup/class-use/Channel.html
    hope this will help you.
    Regards
    Aashish Sinha
    PS : reward points if helpful

  • How can transfer the read file name via own developed adapter module

    Hello experts,
    I want to know how I can handle the following issue:
    I developed a J2EE adapter module for the file adapter "sender" with the aim to read the file name of incoming files. Thereto I implement the following code like this:
    public ModuleData process(ModuleContext mc, ModuleData md) throws
    ModuleException
    Hashtable mp = (Hashtable)
    md.getSupplementalData("module.parameters");
    String fileName = null;
    if (mp != null)
    fileName = (String) mp.get("FileName");
    Now I get the filename which includes a order nr.  I need this order number to call a RFC Adapter via mapping. So my question is how can transfer this order nr to the RFC adapter?
    Kind regards,
    Fatih

    Hi,
    >> to read the file name of incoming files
    Use file adapter with Adapter specific identifiers selected.
    >>Thereto I implement the following code like this:
    use udf in message mapping and avoid module
    >>Now I get the filename which includes a order nr. I need this order number to call a RFC Adapter via mapping. So my question is how can transfer this order nr to the RFC adapter?
    use RFC Look up function in message mapping...
    Is module so necessary in this case???
    Regards
    Suraj

  • Why can't I access my most recently imported event from Facebook?

    I imported a bunch of photos and video to iphoto...no problem, created a new event, I can easily access it from iphoto of course. BUT...when I try to access the event from Facebook or from gmail to send as an attachment the event doesn't seem to exist. I look through "recent import" and they aren't there either. Where have they disappeared to?

    Where have you got your library stored?
    As a Test:
    Hold down the option (or alt) key and launch iPhoto. From the resulting menu select 'Create Library'
    Import a few pics into this new, blank library. Is the Problem repeated there?

Maybe you are looking for

  • Problem Displaying image from blob

    Hi all, I m using, Database : 10g Rel 2 Frontend : DevSuite 10g OS : WinXp Browser : IE 6 Problem : In my forms i m displaying images from blob column but some of the images are not displayed. I have tried with all image formats available in combinat

  • I keep getting a 9808 error

    I have been having the same issue for almost a month now, everytime I try to log into the Itunes store I get a 9808 error. I was forced to get a new computer and am trying to log into my store to authorize a new iPod to my account also and this is re

  • Video From DVD(DvdxDv)Only Half Size

    A client sent me video on a dvd to add to a project. After using DVDxDV, the QT movie is 352x480, and only shows half(Left side)of the original video. Now, I figure it was downloaded from their site at a bad setting, but if the info is there while lo

  • Editing rule in separate panel in CC like in CS5

    In Dreamweaver CS5 when I wanted to edit a style on a style sheet, I would highlight the style in the css panel and there was a little pencil icon which when clicked would open the whole rule in a separate window. This panel listed all the options yo

  • Batch switch off during delivery

    Hi, My client has activated batch at material level. For inbound delivery, batch charecteristics are manually entered and for outbound, automatic batch determination is activated. we have a seperate plant created now for which we don;t want batches.