File adapter: file_name with counter, stable after restart J2EE

Hello guys,
we are on XI 7.0.
in a receiver file channel we have to create file names with a stable counter (7digits).
The payload is IDOC flat file after ABAP mapping (not XML format).
The  bad thing with the counter is that it is not stable. After restart of J2EE engine the counter starts again more or less
from the beginning (also described in a FAQ OSS note).
Does anybody have an idea how we could realize a stable counter for file names that also increases the counter after restart of J2EE. Is individual programming necessary? module ?
We thought about SAP number ranges (DB) but how to integrate this in the file channel. Also generating the the number in ERP and send it in the IDOC to XI, but after the ABAP mapping to IDOC flat file we cannot use the payload for variable replacement.
Every help is appreciated
best regards
Hans

Hello Georg,
You can achieve this by developing a Customized adapter module,
Try to maintain the counter in one of the temporary file in the XI system, read the counter number from the temporary file and increment the counter by 1.
rename the receiver filename with the sufix as counter.
replace the counter number in the temporary file with the latest counter number i.e increment by '1'.
regards,
Chandra Shekhar

Similar Messages

  • [SOLVED] Files in /etc with a dash after them (e.g. /etc/group-)

    Hi,
    What are the files in /etc with a dash after them? For example, I have:
    /etc/group
    /etc/group-
    /etc/gshadow
    /etc/gshadow-
    /etc/shadow
    /etc/shadow-
    What are the dashed versions for? Do I need to keep them?
    Last edited by jwhendy (2010-10-25 21:47:13)

    AFAIK, they are a backup of the previous copy of the file (eg, passwd- is what passwd was before the last change). They are kept because they are such important files. You can delete them, but backups are a "good thing"™.

  • How to make pdf file auto open with adobe reader after downloaded

    how to make pdf file auto open with adobe reader after downloaded

    I note from your system details that you have the plugin for adobe pdf s so I would have expected the files should open in firefox '''without''' you needing to explicitly download them.
    Once the files are open in firefox, you will also get the option to save them permanently to a location on your computer. If you wish I suppose you could set the file type pdf to be associated with and be opened by firefox instead of with the Adobe Acrobat Reader, but that would just seem to be an additional complexity.

  • Reset of counter in file adapter after restart J2EE

    Hi,
    When the J2EE engine is restarted all counters in the file adapter (Add Counter to filename) are resetted and start at 1 again.
    Is this a bug?
    How to prevent this?
    Even when I put into the file adapter that is has to start counting at 00009 it still starts at 00000. Or if I indicate that it has to start again from 44 it starts counting on 42. .... very strange behaviour.
    regards
    Ron
    Edited by: Ron van der Sterren on Jul 15, 2008 11:54 AM

    See FAQ on File adapter
    question 32
    I think this is not a good solution from SAP.
    Suggestion is that a counter can be used. But it is designed that it will be reset by a restart of the engine.
    Ron

  • Sender File Adapter- Incrementing the counter in file name

    Hello,
    We have a requirement to read a different file name with every read. Every subsequent file would have a numeric counter updated when we receive it, we need to read that file as the directory would hold the previous files as well.
    File structure :- EP<counter>.txt ; so first file would be EP001.txt, next one would be EP002.txt.
    How could i do this in Sender file adapter, as there is no variable substitution available like receiver file adapter.
    I cannot use wild card characters as the directory would contain previous files as well and we ned to pick the latest file.
    Regards

    Hi,
    >>How could i do this in Sender file adapter, as there is no variable substitution available like receiver file adapter.
    Yes true this is not available in sender channel
    >>I cannot use wild card characters as the directory would contain previous files as well and we ned to pick the latest file.
    You can use EP* as the filename and use processing mode as Set to Read-Only
    Regards
    Suraj

  • How to configure File Adapter along with OS command option

    Hello,
    I want to configure a scenario using File Adapter with OS command option.
    How to use that option in channel configuration of File Adapter.
    What is the default path where it is actually runs this OS command?
    Thanks,
    Soorya

    >
    surya venkat wrote:
    > Hello,
    > I want to configure a scenario using File Adapter with OS command option.
    > How to use that option in channel configuration of File Adapter.
    There are two ways to use the Os command in the file adapter.
    Lets talk about the sender File Adapter.
    First: Run operative system Before Message Processing
    Whenever any operation needs to be performed uppon the source file Just before XI picks it up.
    e.g. Calculate any hash code, backup the file to a given location, create a log at os level, etc...
    ... After Message Processing
    After Xi has processed the message, you can trigger a new os level command:
    e.g. Trigger a mail, check if the archiving was successful, etc.
    > What is the default path where it is actually runs this OS command?
    >
    Theres no default path, you assign the desired path in the Comm Channel configuration.
    > Thanks,
    > Soorya
    I hope it helps.

  • .pdf File Type Extension reverts to nothing after restart

    Adobe reader works correctly however after I restart the computer the Default File Type Extension resets to nothing for .pdf extensions.
    I have reinstalled Adobe reader, done sfc /scannow, used a registry repair, manually changed the file extension type through windows.
    Again everything works, and after I change the file extension type it will stay changed until restarting the computer then it reverts to no known file type extension and I have to right click open with.
    Thoughts on this? Thanks in advance.

    If you look at your PDF files with Windows Explorer (after the extension has "disappeared"), what does it show in the Type column?

  • File Adapter: Run OS command unix after processing message

    Hi,
    in file adapter configuaration, after processing message, I've configured the channel that it has to call an unix script.
    The sintax in configuration is:
    sh /XS0/usr/sap/XS0/DVEBMGS01/work/TEST_FILE_XI/OUT/rename_lib_contabili.sh <variable>.
    I tried also without the entire path and without the sh command at start of it.
    We have a XI 3.0 sp20.
    I don't understand, What other I have to do.
    Regards,
    Antonello

    Hi Carme,
    I found a warning that "describes" the error...
    2009-09-29 13:36:15     Success     Write to file "/XS0/usr/sap/XS0/DVEBMGS01/work/TEST_FILE_XI/OUT/LIBROGIORNALE_test_mov.zip" as binary, size 7248 bytes
    2009-09-29 13:36:15     Success     Execute OS command "/home/xs0adm/scripts/rename_lib_contabili.sh LIBROGIORNALE_test_mov.zip"
    2009-09-29 13:36:15     Warning     Error when executing OS command "/home/xs0adm/scripts/rename_lib_contabili.sh LIBROGIORNALE_test_mov.zip"
    2009-09-29 13:36:15     Success     File processing complete
    2009-09-29 13:36:15     Success     MP: Leaving module processor
    2009-09-29 13:36:15     Success     The message was successfully delivered to the application using connection
    File_http://sap.com/xi/XI/System.
    2009-09-29 13:36:15     Success     The message status set to DLVD.
    if I try to execute this script from Unix schell or ABAP OS shell this working fine.
    You have any idea?!
    Thanks,
    Antonello

  • Sender File Adapter - Problem with field separator

    Hi,
    I want to upload a CSV file into XI.
    The file contains a text part which uses from time to time quotation marks like this:
    SD,575757,383838,N/A,XYZ,"This is a text part",7676
    But besides there are lines like this:
    SD,575757,777722,N/A,XDE,FREETEXT,7575
    Has anyone any idea how to configure the file adapter to get it recognize the quotation marks not as field separator?
    I've already tried the enclosureSign parameters but that leads to an total unconverted line.
    Is it maybe possible to customize two field separators like this:
    Structure.fieldSeparator - ,"
    Thanks for any answer,
    Christina

    No, it doesn't work.
    I've specified now:
    Structure.fieldSeparator        ,
    Structure.enclosureSign         "
    Structure.enclosureSignEscape   ""
    Every line without quotation marks is converted fine. Lines with quotation marks stay like in the original CSV file and the whole line is put into one XML tag (still comma separated).
    Also the parameter fieldContentFormatting - nothing doesn't make a difference.
    Other ideas?

  • Sender file Adapter, problem with proxy authentication

    HI all,
    i'm having some problems with the following scenario, i need to configure a sender file adapter which connects to a FTP server. To connect this FTP server i need to set a proxy (and so a username and a password), and i don't know how to do.
    From note 821267 seems that the proxy is not supported for an FTP adapter, but the are some workaround like the ones described in the following link
    Re: Proxy server inFTP adapter
    http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=57137
    They don't work in my case as i need to se two username (the one for proxy and the one for the ftp server) and i cannot force the proxy use for all XI applications.
    Can anyone help me?
    Thanks a lot
    Aldo

    Proxy is necessary to exit the customer local intranet. It's not possible to go outside network without going through the proxy server.
    I cannot set the proxy server in file adapter as it's not supported like described in SAp note,  a possible workarounf is to force the proxy server in the J2ee stack but in this way all PI calls would use that proxy..

  • Polling by file adapter (sender) with FIFO functionality

    Hi,
    here are one question:
    What happen if, for example, the sender system generates multiple files with the same timestamp (HH:MM:SS), or the file adapter on XI is stopped for a moment, and then, when activated, in the source directory (polling directory) there are many files? How can XI handle the correct sequence of messages? Is this impossible. How XI poll on a file (sender) - what is the logic? The files should be polled by FIFO.
    Thanks in advance.
    Regards
    Frank

    Hi,
    There is a logic called EOIO. Its exactly once in Order (EOIO). It takes care of all these iisues. Also XI gurantees the delivery of files.
    Refer these links
    http://help.sap.com/saphelp_nw04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm
    Regards
    Aashish Sinha
    PS ; reward points if helpful

  • Need  file adapter polling with read operation to be triggered by a BPEL without using synchronous read

    The scenario is:-
    Web Service Client -->input-->BPEL-->if input valid-->trigger file adapter with read operation--> receive file
    i am not able to stop the polling until it is required to trigger the polling.
    As soon as i deploy the composite the file adapter starts polling without waiting for input.
    Since i am using two receive activities, the second one which is suppose to receive file from file adapter is always showing pending state. (asynchronous callback)

    Hi there,
    IMHO the traditional read is used only as inbound operation, that means
    that it starts polling the input folder as soon as the composite gets
    deployed - which is the same you are experiencing.
    In your case you need an outbound operation that needs to be invoked at
    a certain moment. I don't know what are the reasons not to use sync
    read, but this is the only outbound read operation supported by the
    adapter. If you can not use the sync read, then you would have to design
    some custom solution where you call a web service or EJB for instance
    that reads the desired files.
    Another option I can think of, though have not use personally is using
    the adapters programatically in Java - take a look at this blog post as
    it seems related to this topic -
    https://technology.amis.nl/2012/01/22/using-the-oracle-weblogic-technology-adapters-with-custom-java-message-driven-bean-mdb-triggered-by-file-adapter-part-of-the-story/.
    Hope this helps,
    A.

  • The *.icc file is associated with PS process after assigning profile for a picture of CMYK mode ?

    Hi everyone, I have a curious problem for your help 
    My OS is Windows 7. Start PS and open an image, choose "Edit" -> "Assign Profile...", in the pop-up dialog there is a drop-down list showing many system profiles, and I find all of these *.icc files are stored in folder "C:\Windows\System32\spool\drivers\color". Just choose any profile to assign, then go to folder "C:\Windows\System32\spool\drivers\color" and find the related icc file, for example, JapanColor2001Coated.icc is for profile "Japan Color 2001 Coated". Now you can still rename the icc file, that is, the icc file is not taken by photoshop process. Our company has a software to generate icc files, however, when assign these profiles, the icc file is associated with PS process, which means I can't rename or delete the related icc file, even after assigning another profile, unless close the image documents, that is unwanted. So I'd like to know the reason, in fact I'm not very clear about the ICC file structure. I want to make the local disk file not associated with the process so I can do other operations.
    Any suggestion will be appreciated.

    I made a quick try and I can change the name of various custom profiles I've created using Photoshop but it appears that the name of the profile can't be changed if Photoshop was started with the profile in question selected as a soft proofing profile in View > Proof Setup. You have to quit Photoshop, just changing the soft proofing profile to another is not enough.

  • FTPS file adapter setup fields not visible after SP13 install

    After installation of SP13, I was looking for file adapter FTPS setup (fields described in SP13 release notes). I could not see any. It's just like the old adapter.
    Java cryptolib is installed, and we checked it is there.
    we recycled the whole thing.
    Any idea what could be missing ?

    Solved. We had applied SP12 file.
    Note that this originates from the SP stack download tool.
    We had followed the generic download process and it did not contain the SP13 tpz file.
    I tried again this morning, when selecting source sp11 target sp13, The selection of packages selects
    SAPBASIS12_0-10002900.zip... and not the SP13 one.
    Watch out if you move two SP up !
    Detailed solution :
    Downloaded the SP13 zip file. the following way.
    service.sap.com  download/entry by app grp/sap content
    process integration (XI content)/ XI_CONTENT_SAP_BASIS/ XI_CONTENT_SAP_BASIS_6.40/DB independant/ selected sp13 from the list
    Unzipped, and put the tpz file in the import directory
    of the repository. file name is XI3_0_SAP_BASIS_6.40_13_02.tpz
    Imported it
    And it works now
    Thanks a lot for your help.

  • Sony File Commander really doesn't save files on sd card - they vanished after restart

    Like in the subject. I've Sony Xperia Z3 dual sim version - 16GB + 64GB Kingston SD card. I was recording very important meeting with my phone. But after a few hours the internal space was full and I moved all of the recordings to my sd card using Sony File Commander. The files where there. But I have to restart my phone and I was so surprised that after doing that all of my files on sd card that I've moved using SFC where gone. I've lost very important stuff.
    I'm using Sony Audio Recorder and this program can save recordings only to internal storage. There is no option in settings to change that. Please help! Sony, help!
    Going back to factory settings, uninstalling software updates and cleaning data of SFC didn't solve the problem. All versions of SFC have this problem.

    alexdon wrote:
    I think this is something related to the microSD cards themselves. Have you tried others?
    I'm using two Kingston 64 GB SD cards. The same issue is on my Sony Xperia Z3 Tablet Compact. When I remove my SD card and plug it directly through my SD/USB adapter to my computer I can easily cut and paste any files on it and there is no problem with them at all.

Maybe you are looking for