JDBC to File Adapter

Dear All,
I am configuring an JDBC to File scenario.Can anyone please highlight on this scenario in detail.This is the first time i am configuring this scenario and i have a few problems in it.
Regards,
Amit

Amit,
check the following
Multiple stored procedures using JDBC Adopter, Synchronous call
Document Formats for Receiver JDBC adapter
http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
Re: Multiple stored procedures using JDBC Adopter, Synchronous call
/people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30
Regards
Sreeram.G.Reddy

Similar Messages

  • Is XI Mapping dependent on the Adapter Type ??? JDBC  versus File Adapter

    Gretings,
    I am setting a scenario JDBC (Access) -> XI -> Idoc ->R3.
    First I set up the scenarion File ->XI ->IDOC. Everything worked fine, and the I tried to use JDBC adapter instead of the File Adapter. The JDBC adapter is able to retrieve the data from the Access Database but I got a mapping problem only the Idoc control record was filled, the data segment are empty.
    This mapping was working fine in the case of a File adapter !!!
    Here is the XML File in a case of File Adapter :
      <?xml version="1.0" encoding="UTF-8" ?>
    - <ns:POS_TRANSACTION xmlns:ns="http://aramco.com/XI/POS_OIL">
      <DATE>11/17/2004</DATE>
      <TIME>08:25:03</TIME>
      <TRANS_CODE>01</TRANS_CODE>
      <CUSTOMER>1235</CUSTOMER>
      <AMOUNT>105</AMOUNT>
      <POS_ID>1000</POS_ID>
      </ns:POS_TRANSACTION>
    And then The XML file in a case of JDBC adapter :
      <?xml version="1.0" encoding="utf-8" ?>
    - <ns:POS_TRANSACTION xmlns:ns="http://aramco.com/XI/POS_OIL">
    - <row>
      <DATE>11/17/2004</DATE>
      <TIME>00:00:07</TIME>
      <TRANS_CODE>01</TRANS_CODE>
      <CUSTOMER>23456</CUSTOMER>
      <AMOUNT>1456</AMOUNT>
      <POS_ID>1000</POS_ID>
      </row>
      </ns:POS_TRANSACTION>
    what is really strange is SAP XI mapping process should be adapter independent ! why am I having this problem ?
    Any help is more than welcome.
    Regards,
    Mustapha

    Hallo Mustapha,
    as far as i know, it is currently not possible to omit the row tag. Looking at the technique behind it, it makes sense: the JDBC Adapter polls a database with an SQL Statement and what gets back from the database is a resultset with zero, one or more rows (compare JDBC Classes, where you have java.sql.ResultSet). I guess, that maybe in later versions, it could be possible to customize the row tag to any name you want, but it will never be possible to completely omit it, as SQL statements can retrieve several rows and then you need to be able to differentiate between the rows. 
    best regards
    Christine

  • How to read accdb and mdb files using JDBC or File Adapter

    Hi,
    How to read and extract the .accdb and .mdb files  from FTP server and parsing into xml  by using FTP or JDBC Adapter in SAP PI7.11 With linx Os.
    Regards
    Upendra

    Hi,
    As per SAP note:1681420 i have to  install the below  driver from Microsoft
    Our SAP PI installed under Unxi OS ,how to install the driver (.exe file) .
    Driver name :AccessDatabaseEngine_x64.exe
    Url:Download Microsoft Access Database Engine 2010 Redistributable from Official Microsoft Download Center
    1681420 - PI : Where to locate the JDBC Driver for Microsoft Access
    Regards
    Upendra

  • File adapter/JDBC adapter processing

    Hi,
    I have scenarion as below
    > XI gets an IDOC message from R/3
    > Based on that message XI uses a fileadapter to call a UNIX shell script in the other system (system B - non SAP)for pre-processing.
    > The script call returns no errors.. So, XI/BPM now uses the JDBC adapter to convert the IDOC into a JDBC insert.
    > On successful inserts, the process again uses a file adapter to perform a post-processing script call
    Is the above scnarion possible using JDBC/File adapters in XI/BPM ?
    Thanks
    mad

    Hi Maddux,
    Is it a pre-codintion to execute the unix shell script before inserting the data using JDBC adapter?
    FYI, If there is no pre-condition and you want to send the data to two different systems, you can configure multiple receivers(both file and JDBC) in your Receiver Determination object without BPM.
    -Sam Raju

  • Adapter module to enhance File adapter

    Hey guys
    i need a small clarification regarding adapter modules.
    is it possible via adapter modules to enhance the File adapter to such an extent that it can deliver files to two separate systems in separate landscapes.
    i know i can design one more receiver determination and can also use Run OS command options,but modules in general give better performance compared to others so just wan't to explore a little bit more about them.
    Thanx
    Aamir

    Hey Aamir,
    yeah, they do take a lot of resources, but that's how XI was built to work.
    What you're trying to do is a workaround and may not get support from SAP.
    If I have understood right, you still wanna maintain the endpoint connection data in the communication channels but want to acces them directly without going through the technical routing pipeline, is that so?
    If that's it, I'm sorry but I cannot help you any further.
    The only way I know of accessing adapters without going throught technical routing is by using lookup API (RFC, JDBC, Soap) but it is not intended for endpoint scenarios (insert, update etc), mainly for simple read (lookups).
    If maintaining the connection data outside adapters is not a concern, you could try to create the connections directly in Java code, inside java proxies.
    Regards,
    Henrique.

  • How to create multiple files with Receiver File Adapter in SAP PI 7.31 Java Stack

    Dear Friends,
    I am using Sender JDBC Adapter and Receiver File Adapter in Integration Flow in SAP PI 7.3 EHP 1 SP08 Java Stack environment. The requirement is that we need to create multiple files based on the row count in jdbc resultset. If there are 5 rows in resultset, we need to create 5 XML files with one row elements in one file. Similarly if there are 10 rows, we need to create 10 XML files.
    So how can we create multiple files in this scenario. I tried placing a for loop in the Java Mapping as below in the transform method:
    DynamicConfiguration conf = arg0.getDynamicConfiguration();
    StringBuffer sbFileData = new StringBuffer();
    for (int i =0; i < record.size(); i++ {
         . // Create XML for each row and Marshal the object into to the String Buffer
         String strFileName = "DC_" + new SimpleDateFormat("ddMMyyyyHHmm").format(new java.util.Date())+"_"+i+".xml";
         conf.put(KEY_FILENAME, strFileName);
         arg1.getOutputPayload().getOutputStream().write(sbFileData.toString().getBytes("UTF-8"));
         arg1.getOutputPayload().getOutputStream().flush();
    So here I'm flushing the OutputStream for each record. But it's not creating the multiple file, instead it creates only one file will all record XMLs appended to each other.
    Please let me know if I missing something or need to do some thing else.
    Regards,
    Shreyansh Shah

    Hi
    You can easily achieve this using graphical mapping.  Create your target message type like below
    MT_Target
      Details  0 to 1
          Data  0 to 1
    Source sample structure
    <resultset>
    <row>
    <column-name>column-value</ column-name>
    </row>
    Then do the message mapping like below
    map <row> with  MT_Target
    contant ----> Deatils
    column-name ------>Data
    In the signature tab of message mapping, choose the occurrence of your target message type as
    0 to unbounded.
    This will generate multiple files from multiple rows.
    Let me know if you have any doubt.

  • File processing in FIle adapter

    Hi,
    i have configured Sender File Adapter (FTP) in my scenario which picks the file from FTP folder and sends to JDBC.
    now i have 2 flat files in my FTP (yesterdays and todays). file names are test_07062010 and test_08062010.
    now my requirement is while processing the files, my file adapter has to process first file as test_07062010 and then test_08062010. but now it is processing first test_08062010 and then test_07062010. due to this yesterdays data is overwriting on todays data in Database.
    i know we have some option in file sender adapter (NFS)...but i need to do with FTP file sender...please let me know how to proceed further.
    Thanks in Advance.

    Hi Praveen...thanks for reply
    my communication channel is active all the days. but sometimes due to PI server down or some maintance we will stop channels.
    that time file will not pick by file sender and it will be in FTP.then next day one more file will generate in FTP. 
    So my proble is while processing these files my sender file adapetr is processing todays file first and then yesterdays.due to this yesterdays data is overwriting on todays data.
    can you tell me how to handle that in file adapter.

  • Sender File adapter problem

    Hi,
    I have File to JDBC sceanrio,  File is on FTP server and data is added in file in every 15 mint.  while adding data to file its takes some time.
    My problem : when data is being  added to file, sender adapter picks the file when addition of data is not completed. so it picks incomplete file and send to target.
    What  can be the possible solution to be used for this problem or what configurtaion can be done in CC required.
    Thanks
    Laxmi Bhushan

    Hi Laxmi,
    is PI picking file in NFS mode or FTP mode?
    With NFS mode, you can use setting wait for file modification check. Same setting is available for FTP but it doesnt not work for FTP.
    Another option could be ask Source system to generate file with a temporary name & rename once file is writen completely.
    Regards
    Sushil

  • Sender File adapter stops polling

    Hi All,
    We have a strange issue. A sender File (NFS) communication channel which was working fine, suddenly stops polling.
    The cache, is upto date. There are no errors in the channel monitoring. In fact the polling logs are being recorded in the RWB showing successful polling. But the channel does not pick up the file which is lying in the file location. Channel has been working fine till then.
    Finally we had to create a new communication channel with the same configuration which picked up the file instantly.
    Is this a known issue with File adapter and is there a solution to prevent this situation from happening.
    Regards,
    Sathya

    In fact the polling logs are being recorded in the RWB showing successful polling. But the channel does not pick up the
    file which is lying in the file location. Channel has been working fine till then
    Did you checked if the adapter was locked out? Normally this is the reason....happens with FILE and JDBC....channel shows successfully processed but there is no message that is actually passed.
    Needs to unlock the adapter from VA....SAP Note available mentioning this problem.
    Regards,
    Abhishek.

  • Error on file adapter (GENERAL_ERROR on XI_J2EE_ADAPTER_XI_HANDLER )

    Hi Experts,
    I have just configured a sender file adapter  with content conversion in a PI 7.0. I will try to explain the problem:
    1. I put the text file on the selected folder, to be taken.
    2. The file is taken from the folder and archived in the archive folder.
    Until here everything works fine, but from here:
    - I can't watch the message in the sxmb_moni
    - I can watch the message in the message monitoring in the Runtime Workbench. Here I can even see the XML well formed(the text file have been processed correctly)
    The error log:
    Message Data
    Attribute Value
    Engine Adapter Engine
    {Status System Error
    Repeatable Yes
    Cancelable Yes
    Error Category XI_J2EE_ADAPTER_XI_HANDLER
    Error Code GENERAL_ERROR
    Does anybody know where will be the error?
    Regards
    Gonzalo

    Hi,
       please check the following links related to your error category.
    File (xml)>>xi>>IDoc
    Problem in JDBC Reciver Channel
    Problem in Webservice -> XI -JDBC
    regards
    mahesh.

  • Sener file adapter has read/pick the files first in first out method.

    HI
    In my Interface I am Using Sender as File adapter. As per my requirement Sender file adapter has to read the file from file directory. This directory having 1000u2019s of files with some files are same name (time stamp is different) and some files are different name here file adapter has to pick the file with mentioned name   in File sender adapter like ZMPSMSGSTATUSMST-.xml .
    But source file name is like <TABLENAME>-<TIME_STAMP>.XML (ZMPSWRKFLOWHIST-20090527-150522-628) in file directory.
    The file adapter in XI will poll to this directory and picks the file in first- in first-out by sorting according to timestamp.
    To do this configuration what I have to do in sender file adapter please give me your valuable inputs.

    HI Abhi,
    Thank you for your spot replay.
    I tested now but i am geting below error.
    Putting message into send queue failed, due to: com.sap.aii.af.ra.ms.api.DuplicateMessageException: Message ID f4ca4f86-9c5d-4bdd-1fb1-a6bd7cda99a8(OUTBOUND) already exists in database: com.sap.sql.DuplicateKeyException: [NWMss][SQLServer JDBC Driver][SQLServer]Violation of PRIMARY KEY constraint 'PK__XI_AF_MSG__491A1D0B'. Cannot insert duplicate key in object 'dbo.XI_AF_MSG'..
    Could not archive file 'E:\file\in\ZMPSMSGSTATUSMST-20090527-150522-628.xml' after processing
    but i am able to see this file in Archive foleder. once file is archivied sucessfully the same file is delted from source directory?
    I given processing parametes queue name is TEST.
    Thanks
    srinivas
    Edited by: srinivasreddy p on May 28, 2009 8:43 AM
    Edited by: srinivasreddy p on May 28, 2009 8:52 AM

  • Sender File Adapter  not able to get file via FTP from an external system

    Hi,
    I have a Sender File Adapter using FTP which polls a server every 10 seconds looking for a file ".xml".  The adapter will connect and pick up the waiting file, but sometimes the adapter not able to get file via FTP from an external system. The file is on the server, but despite the polling, the adapter does not pick up it. There is no return error.
    The connect mode is Permanently and the transfer mode is Binary.
    Can you help me?
    Thanks.
    T.

    Hi Teresa,
    does this case appears with a file size higher the others?
    Personally, I do not recommend to have a polling under 1min.
    10s could be too just, if the file is not small and/or if the file server is far (several kilometers) to where the Adapter Engine is, and/or this file server is beside a firewall. Do not forget also that, with previous points, you could have like a conflict, betwen the 1st polling and the 2nd polling, if in less 10s PI adapter has not enough time: to connect to the FTP server (several Km), find the file (perhaps among 100 other files in the directory), go back to the file to Adapter Engine server (several Km again), convert your file to XML message (with a complex Content Conversion), then check the XML structure, and when all that is done, return back to FTP server (several Km), to archive the source file... Well It's my understanding of a FTP exchange with FILE adapter...
    If you really need a 10s polling, that's mean your have a pseudo real time interface. In that case, in my mind file should not be used! but we should use a Web service, JDBC JMS (any exchange without a physical object like a file). For me, it's a non-sens to have a file in that case.
    regards.
    mickael

  • OS command error=13, Permission denied in File Adapter

    Hi All,
    I am trying to call the OS commands in File adaper, when i check the Audit log i am getting Error exectuting the command. the same command when i check in OS its working fine.
    i have collected the debug log and i can see the message saying
    Catching #1#java.io.IOException: java.io.IOException: error=13, Permission denied
         at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)
         at java.lang.ProcessImpl.start(ProcessImpl.java:65)
         at java.lang.ProcessBuilder.start(ProcessBuilder.java:451)
         at java.lang.Runtime.exec(Runtime.java:591)
         at java.lang.Runtime.exec(Runtime.java:429)
         at java.lang.Runtime.exec(Runtime.java:326)
         at com.sap.aii.af.lib.util.system.CommandLauncher.exec(CommandLauncher.java:64)
         at com.sap.aii.adapter.file.util.OSCommand.exec(OSCommand.java:58)
         at com.sap.aii.adapter.file.util.OSCommand.exec(OSCommand.java:33)
         at com.sap.aii.adapter.file.File2XI.processFileList(File2XI.java:991)
         at com.sap.aii.adapter.file.File2XI.invoke(File2XI.java:622)
         at com.sap.aii.af.lib.scheduler.JobBroker$Worker.run(JobBroker.java:500)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:169)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:266)
    I hope the problem with problem XI communication with OS level, Could you pls suggest me the problem?
    Thanks,
    Venkat

    Hello!
    You can see more information about os command using the file adapter in SAP note:
    #841704 - XI File & JDBC Adapter: Operating system command
    o  The command line of an operating system command run through the
       File and JDBC Adapter is interpreted slightly different compared
       to common operating system shells. E.g. quotes and apostrophes
       are handled differently. If in doubt, check if the command can be
       successfully run through the Java Runtime.exec(...) API. Also
       note that the command is run as user "<sid>adm" (Unix) /
       "SAPService<SID>" (Windows).
       Under Windows, this especially means that you cannot use any
       shell commands interpreted by teh command processor (such as
       "copy", "ren" or "del") using the operating system command.
    Best regards,
    Franklin

  • JDBC-XI-FILE scenario. How to extract data from more than one table in JDBC

    Hi,
    I was asked a question like in JDBC-XI-FILE scenario........ How to extract data from more than one tables (i.e from JDBC system) ?? What is the logic to do the same ??
    I am not sure whether this is a valid question..........but any help in this regards is highly appreciated.
    Regards
    Kumar

    HI,
    Yes it can be possible ,please see the following links
    JDBC  Receiver with Oracle Stored Procedures
    configuring jdbc adapter with multiple tables
    RFC -> XI -> JDBC Scenario Updating Multiple Tables
    /people/alessandro.berta/blog/2005/10/04/save-time-with-generalized-jdbc-datatypes
    JDBC Adapter multiple Selects
    https://www.sdn.sap.com/irj/sdn/advancedsearch?query=jdbc%20with%20multiple%20tables&cat=sdn_all
    Regards
    Chilla..

  • File adapter with empty files!

    Hi guys,
    My scenario is: File -> XI (BPM) -> JDBC
    Under BPM I have a fork with two parallel receivers correlated and two sender file adapters for that. Those senders also have file conversion (.seq file to XML).
    My problem is: in case of files coming empty, is it possible that senders file adapter generates error during file conversion? And/or generates errors during correlations?
    If so, "I wouldn’t like", because after receive these two files I have a switch to check if the file(s) coming empty and a control step to terminate the process in case of true. But this only works if no errors have occurred on the earlier steps!
    At this moment I can’t test it, so I’m asking If anyone has faced an issue like this one?
    Thanks in advance,
    Ricardo.

    Hi,
    Which SP are you on?
    Before Sp19 on XI 3.0 and SP10 on Pi, Empty Files are ignored by XI. The file adapter picks the file and if it is a empty file ( a zero byets file ) the file does not create a message at all for the file.
    From Sp19, the file adapter has options that allow you to decide how to process the empty file. You can create an error message etc.
    Regards
    Bhavesh

Maybe you are looking for

  • How do i connect my ipad to my tv to stream

    I'm trying to connect my iPad to my new Smart TV, so that I can stream video from a website.  When I plug the USB into the tv I can't make the video play on the tv.

  • PSE8 - cropping and final size

    While cropping images, one in particular came out more square, but showed exactly what I want. When I upload to snapfish for a friend to access, she doesn't have the option to resize it properly. I did check out resizing in PE8, though it wouldn't le

  • SmartObjects: placing from external files + auto-refresh

    Hello, when I place a SmartObject from an external file PSP CS3 seems to store it in the current file; if I change the external file, the placed object does not change automatically (I have to use the replace function to apply changes in the external

  • Changes should not reflect in report

    Hello friends, I had run a report in BEx and which gives two values per record. For ex : i have ctrl1 and the value is 50 and after some period of time the value got changed to 40. i am getting two records in the report one with the value 50 and othe

  • Option to view bookmarks bar as icons in Safari?

    This question has been asked many times by the community if you ever used internet explorer you have the option to view bookmarks or favorites as icons only this keeps it neat and tidy plus it is less clunky as safari has it now and then. This needs