File Adapter creates file with old record.

Hi,
I am working on Oracle Soa suite and trying to find out the the ways to Write file with the help of File Adaptor. But I find a problem with the file Adaptor that whenever I try to write updated rows to the file, it provides the earlier values in the rows and the new values are not written to the file.
Regards
Udit

Hi Anton,
As Sudhir mentioned, there could be a problem of correct data. The best solution is :
Inside your RFC code just validate the code for empty values. e.g
IF NOT ITAB_RFC[] IS INITIAL.
**ITAB_RFC internal table data.
ENDIF.
and after validating this, if still you are getting some file with "0" length, then check File Content Conv in your CC.
Regards,
Sarvesh

Similar Messages

  • File Adapter - Create File Name from Payload

    Hello,
    I have a scenario where I'm sending deductions to external vendors (wage types) following a payroll run, via XI. Part of the message payload includes a data element 'Vendor Name' (e.g. Zurich Insurance). When the XI File Adapter creates the file, I want to create the files as /usr/file/xi/<Vendor Name>.csv
    How to I pick up the 'Vendor Name' from the message payload and pass this into the "File Name:" field of the "File Access Parameters in the File Adapter communication channel configured?

    hi,
    The dynamic filename generation concept is as follows.
    In your filename field. just give a variable with % symbols. (eg: %file% ).
    Now, under the option Variable Name Substitution, you can give how the value has to be created.
    It can be your interface name, sender service name, etc or it can be some value dynamically from your payload.
    For the former, your give
    message:interface_name ,etc
    and for the payload part you give,
    Payload: "your element root which u wanna acecss"
    Just check this link out,
    http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
    And read the contents under variable substitution and it will help you understand the concepts better.
    If you have any clarifications, do get back,
    Regards,
    Bhavesh

  • File-Adapter create Files with length 0

    Hello Guys,
    the XI get messages from the Backend via RFC and when the File-Adapter writes the Message sometimes with length 0
    Can you help me

    Hi Anton,
    As Sudhir mentioned, there could be a problem of correct data. The best solution is :
    Inside your RFC code just validate the code for empty values. e.g
    IF NOT ITAB_RFC[] IS INITIAL.
    **ITAB_RFC internal table data.
    ENDIF.
    and after validating this, if still you are getting some file with "0" length, then check File Content Conv in your CC.
    Regards,
    Sarvesh

  • File adapter created file permissions at OS

    Hi,
    We have a file adapter scenario and once we run the scenario at OS level the file is being created with following permissions.
    <b>-rw-r----- </b>  1 xisadm   sapsys    19789000 Oct 10 17:01 File10024322.txt
    So it is not being processed further till we change the permisions to<b> -rw-rr</b> .
    Is there any place in XI where we can change to write the file at OS with <b>-rw-rr</b> permisions.
    Thanks
    Sunil

    Moorthy,
    This is XI writing the file at OS and not XI not reading the file.
    But in one of our DEV env the file is being created with <b>-rw-rr </b> permissions after changed some thing , which we are not sure now. Now we have the same issue in production. Bye the way OS is AIX.
    We would like is there any place in XI we can change so that XI can write the file to have "others" to <u>read</u> the file.
    thanks
    Sunil
    Message was edited by: Sunil Guditi

  • Receiver File Adapter - Create File on another SAP System

    I am working on a project that includes this requirement:  PDF files to be copied from a third party company via SFTP to a directory on our ECC system.
    We have worked out the sender side config, and the transfer of the files into PI works fine via SFTP.
    However, the PDF files are ending up in a directory on the PI system and not on our ECC system as expected.
    The receiver communication channel is set up as follows:
    Party = blank
    Communication Component = communication component of the ECC business system
    Adapter type = File
    ('Receiver' is ticked)
    Transport Protocol = File System (NFS)  (etc)
    Target directory = /tmp   (using this temporarily for testing)
    I would have thought using the ECC business system would mean the files would end up on that system, but instead they end up on the /tmp directory on the PI system.
    We are not permitted to use FTP between our SAP systems, so I can't go with that option.
    I've searched for help on this and only see conflicting and vague statements about whether the NFS protocol can or can't be used for transfer to another SAP system in the landscape. 
    Any suggestions and help on the above, and the best method of transferring the files to the end SAP system would be very appreciated.
    Regards,
    Christine

    remember that NFS means that it is referring to a file system on PI server.
    What you could do is mount a space on SAP PI onto SAP ECC so that ECC will be able to access the files on SAP PI.
    Guess that should solve the problem.

  • File Adapter-Creating a temporary file

    Hi,
    I got an requirement to place only completed file(With 100% data) in the target directory. So  i need to gather the data in  a temporary file first before final file is put on the target directory. I know we have an option in the File adapter (Put File). What i need is, where the temporary file is created?  do we need to delete these  temporary file?  and How to test this requirement?
    Thanks in advance.
    Regards
    Sreeni

    HI Sreeni
    If you use Temporary file under put file XI wil create a temporary file at the target location only.
    But when your requirement is to create file why you are looking for temperory file. Just use Create and it will create a final file.
    write mode : directly
    Use empty file handling as Ignore
    Thanks
    Gaurav

  • File adapter fixed lenght with justify

    Hi Developers ,
    I'm developing an interface JDBC - File , the file have a special format because is a flat file with fixed length and some of the fields have to a justified to left , it's possible do that with the file content conversion ????,
    the example of the file is :
    lenght fields :3,3,3
    xx , xx,xxx
    xx , xx,xxx
    xx , xx,xxx
    Regards

    Hi,
    Please see the below links
    http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
    /people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1 - File to File Part 1
    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2 - File to File Part 2
    /people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter - FCC
    /people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter - FCC
    /people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns - FCC
    /people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file - FCC
    /people/harrison.holland5/blog/2006/12/20/xi-configuration-for-mdm-integration--sample-scenario - FCC - MDM
    /people/shabarish.vijayakumar/blog/2006/04/03/xi-in-the-role-of-a-ftp - FCC
    /people/prateek.shah/blog/2005/06/14/file-to-r3-via-abap-proxy - FCC
    /people/mickael.huchet/blog/2006/09/18/xipi-how-to-exclude-files-in-a-sender-file-adapter - EOIO - File
    Regards
    Chilla...

  • XI3.0 - file adapter create directory

    Hi,
    Is there anyway in 3.0 to prevent a receiver file adapter from creating a directory if it does not already exist.  There was a parameter in the J2SE adapter but I do not know if or how this has been implemented in 3.0.
    Regards
    Ian

    Ian,
    SPS 17 introduces a new configuration setting for the receiver file adapter: "Create Target Directory" which does exactly what you want.
    See http://help.sap.com/saphelp_nw04/helpdata/en/57/a21f407b402402e10000000a1550b0/frameset.htm
    Regards,
    Koen

  • Error in Receiver File adapter using File content Conversion

    Hi,
    I am getting the following error in the receiver file adapter.
    Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Parameter 'statement.fieldFixedLengths' or 'statement.fieldSeparator' is missing
    I am using the below parameters for FCC:
    Recordset Structure - statement
    statement.endSeparator - 'nl'
    statement.fieldSeparator - '0X09'
    statement.fieldNames -xblnr,wrbtr,newbs,kostl,newko,prctr,xref1,rke_wwfud,rke_wwst3,blart,bukrs,bldate,budat,gjahr,monat,ctype,waers,bktxt,posnr,wbs_element,mwxkz,businessplace,businessplace,c_waers,c_wrbtr,g_ctype,g_waers,g_wrbtr,h_ctype,h_waers,h_wrbtr,trade_id,lob,sgtxt,zuonr,reason_rev,ldgrp,tcode,lifnr
    ignoreRecordsetName - true
    Please let me know where i am going wrong.
    Thanks,
    Aparna

    Hi Aparna,
    I feel the problem in your content conversion parameters is with
    statement.fieldNames and ignoreRecordsetName
    When you are confirguring receiver file adapter for file content conversion the above one is not required. Please refer below link for details on configuring content conversion in file adapter
    [http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/frameset.htm]
    Hope this helps !!
    Regards,
    Amit

  • File Adapter: Dynamic file name

    Hello,
    I would like to use a filename like this:
    Name.<DOCNUM>.Direction.<Timestamp>
    For DOCNUM I use variable substitution. Works fine.
    For <Timestamp> I need a different format as the timestamp function
    in file adapter create. So I try to set up my timestamp in mapping like
    dynamic file name:
    DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "Timestamp");
    conf.put(key1, a);
    Input a is date function which creates my desired timestamp format. In file adapter I try this:
    Name.%DOCNUM%.Direction.%Timestamp%
    or
    Name.%DOCNUM%.Direction.Timestamp
    or
    Timestamp
    all doesn't work for Timestamp.
    So is there a possibility to configure a dynamic filename like this???
    Is there a possibility to access dynamic configuration variables in dynamic filename except
    the known for filename and directory??
    thanks
    chris
    Edited by: Christian Riekenberg on Mar 10, 2009 4:02 PM
    Edited by: Christian Riekenberg on Mar 10, 2009 4:05 PM

    your file name needs to be
    Name.<DOCNUM>.Direction.<Timestamp>
    dont use variable substitution. use only dynamic configuration and set the file name
    introduce a logic that will create the string
    Name.<DOCNUM>.Direction.<Timestamp>
    eg. String filename = "Name" + var_docnum + "Direction" + var_timestamp;
    then use the dynamic conf code to set the file name and use adapter specific properties in you adapter to retrieve it.
    Ref:
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/frameset.htm

  • File Adapter or File  Transport which one will give more performance

    Hi all,
    File Adapter or File Transport which one will give more performance ? in OSB?
    Which one to select any one did performance analysis?
    Thanks
    Phani

    Why don't you just go read some benchmarks?
    http://www.barefeats.com/mbpp18.html

  • Receiver file adapter creates empty files, Empty-Message Handling SP19

    Hello,
    We have just upgraded the system to SP19.
    One of the new features is that it should be possible to determine how XI messages with an empty main payload are to be handled in the receiver file adapter.
    If the parameter Empty-Message Handling is set to 'Ignore' no file should be created if the main payload is empty. In our case an empty file (size 0 kb) is still created even though the main payload is empty and the flag is set to 'Ignore'.
    Has anybody experienced the same problem?
    //  Best regards  Hans

    This should work:
    Use your own adapter module that parses incoming message and checks if it has any record sets in the document. If it does not have any record sets, then set the message to empty and then give this modified message to File receiver.
    For example, see the example code below:
    Module imports..
    Audit log import..
    DOM imports/SAX imports..
    public ModuleData process(ModuleContext moduleContext, ModuleData inputModuleData) throws ModuleException {
              try {
                   // get the XI message from the environment
                   Message msg = (Message) inputModuleData.getPrincipalData();
                   AuditMessageKey amk = new AuditMessageKey(msg.getMessageId(),AuditDirection.INBOUND);
                   Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS,"RemoveRootTag: Module called");
                   XMLPayload payLoad = msg.getDocument();
                   Document doc = parseXmlFile(payLoad.getInputStream());
                   if(doc != null){
                        if(!doc.getDocumentElement().hasChildNodes()){
                             Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS, "Document is empty!!");
                             payLoad.setContent("".getBytes());
                             msg.setDocument(payLoad);
                   // provide the XI message for returning
                   inputModuleData.setPrincipalData(msg);
                   } catch (Exception e) {
                   // raise exception, when an error occurred
                   ModuleException me = new ModuleException(e);
                   throw me;
                   // return XI message
              return inputModuleData;
         private Document parseXmlFile(InputStream xmlpayload) {
              try {
                   DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                   factory.setValidating(false);
                   //        Create the builder and parse the file
                   Document doc = factory.newDocumentBuilder().parse(xmlpayload);
                   return doc;
              } catch (SAXException e) {
              } catch (ParserConfigurationException e) {
              } catch(IOException e){
              return null;

  • Problem in Sender File Adapter using FCC with Variable structure

    Hi Experts,
    Hi Experts,
    I have facing an issues while using FCC in Sender File adapter. Below are the configs for the same:-
    Recordset structure required is ==HEADER,1,DATA,*,TRAILER,1
    Recordset per message == *
    Key Field Name == Key
    (Sorry i dont know how to insert screen shot here..pls tell me how can i insert screen shots here on sdn)
    HEADER.fieldSeparator           ,
    HEADER.endSeparator           u2018nlu2019
    HEADER.fieldNames               Key,x,y,zu2026
    HEADER.keyFieldValue          1
    HEADER.keyFieldInStructure      ignore
    HEADER.fieldContentFormatting     trim
    HEADER.additionalLastFields     ignore
    HEADER.missingLastFields     ignore
    DATA.fieldSeparator
    DATA.endSeparator
    DATA.fieldNames
    DATA.keyFieldValue
    DATA.keyFieldInStructure
    DATA.fieldContentFormatting
    DATA.additionalLastFields
    DATA.missingLastFields
    Using same variables for Trailer record as well.
    Source CSV file which i am picking:-
    ADSE ,RASD,replan  Contact ,2  0080509 0 8:43:25   ,        
    EMPL ,0011111,  S Top Up ,20080401  ,20080430  ,sdf  ,                          00000000431250  ,2007                                    ,  ,  ,  ,  ,  ,20080414  18:07:35,
    EMPL ,0222222,  r Cash Award ,20070701  ,20070703  ,ded  ,                          00000000023509  ,2007                                    ,  ,  ,  ,  ,  ,20080414  18:09:31,
    EMPL ,0233333,   Cash Award ,20070801  ,20070831  ,df  ,                          00000000044057  ,2007                                    ,  ,  ,  ,  ,  ,20080414  18:10:56,
    EMPL ,0244444,   Cash Award ,20080101  ,20080111  ,sf  ,                          00000000026717  ,2007                                    ,  ,  ,  ,  ,  ,20080414  18:08:29,
    BTRL ,   5140, 
    When i tested the scenario and monitored it using MDT in CC monitoring tool its giving me below mentioned error.
    The XML page cannot be displayed
    Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
    XML document must have a top level element. Error processing resource 'http://myurlname/mdt/me...
    However if i change the occurence of DATA as some specific value for eg 4 instead of * it works fine.
    Kindly help me in solving this problem.
    Thanks,
    Aditya Verma

    Hi Madan,
    Thanks a lot for giving me the way to this. But when i tested this with the below file its giving me the same error. Please let me know if i need to do any changes to the parameters mentioned above:-
    ADSE ,ASDA,Sha  replan Fr ont Feed Contact ,2  0080509 0 8:43:25   ,        
    EMPL ,0011111,   Cash Top Up ,20080401  ,20080430  ,TPV  ,                          00000000431250  ,2007                                    ,  ,  ,  ,  ,  ,20080414  18:07:35,
    EMPL ,0222222,   r Cash Award ,20070701  ,20070703  ,TPV  ,                          00000000023509  ,2007                                    ,  ,  ,  ,  ,  ,20080414  18:09:31,
    EMPL ,0233333,  r Cash Award ,20070801  ,20070831  ,TPV  ,                          00000000044057  ,2007                                    ,  ,  ,  ,  ,  ,20080414  18:10:56,
    EMPL ,0244444,   Cash Award ,20080101  ,20080111  ,TPV  ,                          00000000026717  ,2007                                    ,  ,  ,  ,  ,  ,20080414  18:08:29,
    EMPL ,0255555,   Cash Award ,20080301  ,20080320  ,TPV  ,                          00000000027870  ,2007                                    ,  ,  ,  ,  ,  ,20080414  18:08:25,
    EMPL ,0266666,   Cash Award ,20071001  ,20071020  ,TPV  ,                          00000000020681  ,2007                                    ,  ,  ,  ,  ,  ,20080414  18:09:31,
    EMPL ,0877777,   Cash Top Up ,20080401  ,20080430  ,TPV  ,                          00000000036000  ,2007                                    ,  ,  ,  ,  ,  ,20080414  18:07:05,
    EMPL ,0888888,   Leaver Cash Award ,20071201  ,20071231  ,TPV  ,                          00000000157200  ,2007                                    ,  ,  ,  ,  ,  ,20080414  18:11:29,
    EMPL ,0899999,  S Leaver Cash Award ,20080301  ,20080331  ,TPV  ,                          00000000153530  ,2007                                    ,  ,  ,  ,  ,  ,20080414  18:07:42,
    EMPL ,0800000,  S Leaver Cash Award ,20070701  ,20070731  ,TPV  ,                          00000000012234  ,2007                                    ,  ,  ,  ,  ,  ,20080414  18:08:34,
    BTRL ,   5140,
    This the original csv file which i'll get in live. Kindly suggest as ur solution worked with other file but not working with this scv file.
    Thanks a lot,
    Aditya.

  • File adapter(write files with same extension as we read them)

    Hello
    I am trying to read file as an attachment using file adapter (it can be of any extension .pdf,.txt,.xml)
    I want to write this file using file adapter with the same extension i.e. whatever is read as it is....I am least bothered for reading the content inside the file so am reading it as an attachment..
    Please if anyone knows the answer..reply....

    I ran into a similar issue. As a workaround we ended up just using java to write the files out. When the File Adapter attempts to write out a file it first writes that file to a temp file and then copies that to the appropriate directory.
    I believe that when two or more threads were attempting to write at the same time the write was failing for one (but appearing to work in the console logs). I think a race condition may be created when two threads attempt to write using the File Adapter for access to the temp file. I contacted my oracle rep about it but they are always pretty worthless so I havent ever heard anything back concerning the issue.

  • Text Content Conversion - File Adapter - Creates empty file

    I am running XI 7.0.
    Mapping from abap proxy to file - text content conversion.
    The process works, generates and sends file from mySAP, maps through XI, logs onto ftp site and creates file, but doesn't write any data into the file!
    I am really confused as to what is happening!
    This is taken from the communication channel!
    Audit Log for Message: 5ccc2e46-c0f2-5349-e100-00000ddf240f
    Time Stamp Status Description
    2007-04-28 10:37:21 Success Message successfully received by messaging system. Profile: XI URL: http://host.fqdn:55000/MessagingSystem/receive/AFW/XI Credential (User): XIISUSER
    2007-04-28 10:37:21 Success Using connection File_http://sap.com/xi/XI/System. Trying to put the message into the receive queue.
    2007-04-28 10:37:21 Success Message successfully put into the queue.
    2007-04-28 10:37:21 Success The message was successfully retrieved from the receive queue.
    2007-04-28 10:37:21 Success The message status set to DLNG.
    2007-04-28 10:37:21 Success Delivering to channel: EPIW_FTP_Receiver_EmployeeRecords
    2007-04-28 10:37:21 Success File adapter receiver: processing started; QoS required: ExactlyOnce
    2007-04-28 10:37:21 Success File adapter receiver channel EPIW_FTP_Receiver_EmployeeRecords: start processing: party " ", service "XE_DEV_3RD_EPIW_001"
    2007-04-28 10:37:21 Success Connect to FTP server "ftp.ftp.ftp.ftp", directory "/ECS/Target"
    2007-04-28 10:37:21 Success Write to FTP server "ftp.ftp.ftp.ftp", directory "/ECS/Target",   file "epiw_output.dat"
    2007-04-28 10:37:21 Success Transfer: "BIN" mode, size 125 bytes, character encoding -
    2007-04-28 10:37:21 Success Start converting XML document content to plain text
    2007-04-28 10:37:21 Success File processing complete
    2007-04-28 10:37:21 Success The message was successfully delivered to the application using connection File_http://sap.com/xi/XI/System.
    2007-04-28 10:37:21 Success The message status set to DLVD.
    I can see the data before and after...  Any ideas?

    hi,
    this is starange:)
    did you refresh FTP (F5) ?
    maybe you're checking wrong ftp server? with the same folders ?
    ups - I thought I doens't create any file...
    as suggested check your mapping as per my blog:
    /people/michal.krawczyk2/blog/2005/09/16/xi-how-to-test-your-mapping-in-real-life-scenarios
    just use TCODe for abap mapping tests - SXI_MAPPING_TEST
    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>

Maybe you are looking for

  • OutOfMemoryException ...

    The method below is called several thousand times when 50 users are working with the same screen/form. Result: 2 hours later, the application throws an OutOfMemoryException. The profiler indicates that this method creates many XMLAttr instances when

  • Output message from XI Validations aganist Schma?

    Hi,    My scenario is such that whenever a message is outputted by XI it must be validated aganist the schema.I am using XSL mapping in interface mapping. By default the output message is not validating aganist the output schema. As per the suggestio

  • Value Based Dimension causing Aggrega                         tion problems

    I am new to building cubes in Oracle Olap, and am having trouble with a particular cube. (I hope I get all the terminology accurate enough to describe the problem I am having). Our organization structure is hierarchical. For example, org 0001is at th

  • Mail password issues

    Before, in Lion and previous version of OSX, I could leave my password "blank" in my email accounts under Mail preferences so that when I sign in I have to type in my password for my email account.  I do this for security purposes as other people use

  • ITunes 8 video breaks screensaver

    I upgraded my unibody 2.4ghz macbook to Snow Leopard over the weekend and so far so good. I've come across my second issue with the new OS (the first is wonky Expose behavior while using 4-finger swipes). I have Expose set up so moving the mouse curs