Sequence Number in File Name

Hi All,
I have a requirment where the Output file name should be appeneded with a sequence number which needs to be in sync with the number of records processed.
Each time this sequence has to be started from the previous number where it ended.
The soultion at the moment we have used it to store each time this counter in a file and read is back and update when done. Other solution is to meke use of the Tabe on ECC side
Is there any solution with in the map it self to maintain this number.
Any help will be appreciated.
Thanks
-Kulwant

Hi Kulwant,
Within Mapping you cannot save the counter as container and even global variables are flushed once the mapping is executed for the message, so i think we cannot do it using mapping.
Also, dont know if you have tried OS commands feature provided by SAP for file adapter explained in link below:
[/people/santhosh.kumarv/blog/2008/07/27/glimpse-at-os-command-yet-another-scenario]
We can first create the file on some temporary location of the application server and then execute a batch file which would contain the code to fetch previous count(variables in OS commands can hold this value) and increment the same and copy the flie thus created by communication channel by appending the count to file name and also delete the file created by communication channel.
Hope this helps !
Regards,
Amit

Similar Messages

  • Officejet Pro 8600 Plus, not appending number in sequence to base file name when saving PDF.

    Officejet Pro 8600 Plus (new today - everything else working great), Vista 32-bit, HP desktop.
    After scanning documents and creating a PDF file (Save to file on my computer w/USB connection), using HP Scan, it does not append numbers in sequence to base file name.  HP Scan (Under Advanced Settings/Destinations) reads that it will do this (when you over over the base name field).  Perhaps I have to enable something.  Do you know how I can do this?  Thank you.

    I'm not really sure what's going on.  The install might not have written right.  Try uninstalling and installing from a fresh download.  Let me know what happens.
    -------------How do I give Kudos? | How do I mark a post as Solved? --------------------------------------------------------

  • How to add increment number to file name properly

    Hi, all:
    I have a simple question. As shown in the attached code, I need to add an increment number to file name and save the file. The problem is, if you run the code and put something like ".dat" in the extension name, you will see a blank space between the number and the dot in the file name. What should I do to eliminate the blank space? I can't specify the format of the file name since the file name would vary from case to case.
    Thanks a lot for any suggestion and correction in advance.
    Attachments:
    temp.vi ‏11 KB

    Hi,
    Please take a look to the attached VI. I hope that I understood what you really want.
    I've replaced the Vi: Format into string with Number to Decimal String plus a Concatenate String. 
    Now, this is working for me, I don't get a space anymore.  If something is wrong, please let me know.
    Regards,
    Paul
    Attachments:
    temp_back.vi ‏11 KB

  • Getting PO number as file name when getting output as pdf file

    Hi Experts,
    Is there any possibility to get PO number into file name (instead of spool number) when getting output as pdf file.
    Since I'm printing POs in batches (as pdf) it is too difficult to find exact PO among all the pdf files.
    If PO number maintained as file name, would be great time saver for me.
    Thanks
    Kamal

    Hi,
    Please check the below link..
    Number ranges for Spool Requests
    hope it may help you
    Kuber

  • Idoc number  as file name

    Hi
    I am working on idoc - file scenario. I need to get the idoc number as file name in the receiver side? How could it be done ?

    Hi,
    You need to use Dynamic Configuration to set the file name dynamically in your mapping. In your receiver Communication Channel, on the Advanced tab, mark the Use Adapter-Specific Message Attributes and File Name checkboxes. Please refer to this help if you need further information about it:
    http://help.sap.com/saphelp_nwpi71/helpdata/en/44/6830e67f2a6d12e10000000a1553f6/content.htm
    Then create a user-defined function in your graphical message mapping, with the following code:
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String SourceFileName = a;
    return  SourceFileName;
    The "a" here is the importing parameter of the user-defined function. Map IDoc number to this function to have the parameter set.
    Hope this solves your problem,
    Grzegorz

  • Limit on the number of file names retrieved using FM 'RZL_READ_DIR_LOCAL'

    Hi All,
    I am using FM 'RZL_READ_DIR_LOCAL' , to retrieve file names from a specified directory.
    When executed, i am getting 10,000 records(file names) only against lakhs of files present in the directory.
    I would like to know if there is any limitation on the number of file names retrieved using that FM and how to over come it.
    Also please let me know if the FM 'EPS2_GET_DIRECTORY_LISTING' also has any such limitations.
    Thanks in advance,
    Sreeni Vallem

    I did not know about this limitation of number of files returned. You can give a try to the external command way of doing it in your development system.  Well, creating 10001 files in development is a boring job . You can write a sample program as Rob has mentioned in this thread and copy files to a specific directory ABAP: Copy files from one R3 directory to another. This doesn't disturb the existing program written.
    Mean while let's wait for expert's reply.
    Kesav

  • ITunes appends incrementing number to file name

    Hi,
    I noticed that with some of my mp3 files iTunes 6 keeps on creating copies of them, appends an incrementing number to the file name and adds the new file to my iTunes library, which means I end up with multiple copies of the same song in my library.
    So if I have got a file called "03 All I Need.mp3" iTunes will create
    03 All I Need 1.mp3
    03 All I Need 2.mp3
    03 All I Need 3.mp3
    etc...
    Perhaps it could be related to the fact that I have got two computers accessing the same mp3 folder via a network?
    I really can't explain to myself why iTunes would be doing this, but it is terribly annoying, as I end up with the same song over and over again in my iTunes library.
    Does anybody know how I can prevent iTunes from doing that?
    Thanks heaps!

    Hi,
    Please take a look to the attached VI. I hope that I understood what you really want.
    I've replaced the Vi: Format into string with Number to Decimal String plus a Concatenate String. 
    Now, this is working for me, I don't get a space anymore.  If something is wrong, please let me know.
    Regards,
    Paul
    Attachments:
    temp_back.vi ‏11 KB

  • Moving from old to new hard drive, some songs lost track number in file nam

    Anyone have thoughts on this? I changed to a larger hard drive a month ago. Copied everything over and things seemed OK. Synced daughter's ipod and things started acting weird. I compared old to new hard drive now and a bunch of songs are missing from the new drive but weirder is that some songs lost the track numebr in the name on the new drive - 04 loving.mp3 is now loving.mp3.
    we can't find a pattern to why those specific songs are like that. any thoughts?

    Sorry, never heard of that before.

  • Material number as receiver file name in XI

    hi experts,
    here iam doing IDoc to file scenario, when i push data from BD10 the data will come to XI and i want that material number as file name.
    can any one explains me how to do that dynamic configuration.
    thanks in advance.
    JOHN

    hi john
    make use of VARIABLE SUBSTITUTION
    checkn this blog for reference
    An interesting usage of Variable Substitution in XI                    
    An interesting usage of Variable Substitution in XI                         
    SAP NetWeaver XI: Variable Substitution with Adapter-Specific Message Attributes via DynamicConfigurationBean                                                  
    SAP NetWeaver XI: Variable Substitution with Adapter-Specific Message Attributes via DynamicConfigurationBean
    regards
    kummari

  • No File name or number after uploading to MobileMe

    After upgrading to patch Nov 4 with iphoto 11. The number or file name will not show up after uploading to MobileMe for sharing to others.

    Same thing here. Can't get iPhoto 11 to display filenames in MobileMe galleries. I've already filed 2 bug reports from 2 different Macs with the same issue. I recommend you do the same. Just go to the 'iPhoto' menu, then select 'Provide iPhoto Feedback.'

  • Counter in file name in receiver file adapter

    Hi,
    I am using FTP, my requirement is to add counter in the file name i.e XYZ001.
    And added to this i can increment the counter till XYZ020, after this i am supposed to start again from XYZ001.It will be some how handled that when i place XYZ001 for the second time , it will not overwrite the earlier one as it will be proccess by that time.
    I could have used addcounter but it doesnt work for FTP:(...also have seen /people/shabarish.vijayakumar/blog/2009/10/05/pixi-maintaining-sequence-numbers-in-file-name-scheme
    Do we have any new feature added in PI 7.1 for handling this.
    Regards,
    Abhi

    thanks shabz..
    Request you to please let me know how to proceed with the first option which you have mentioned i.e,how to create tables and will i be able to start the counter again from xyz001 once i reach xyz020? is there any abap code to be written (wiil be asking SAP counterpart ) or we need to do it in the dynamic configuration udf? Please let me know how to do the same.
    1. Maintain a table in SAP. Use/Code a RFC call to look up the sequence number from this table, incrementing the value after it is read. The result is then used in a dynamic configuration code, and the file name can be generated at that point.
    Will this impact performance ?..mine is a credit card authentication interface and response time is imp...
    Regards,
    Abhi

  • How to sort video by file name in Event Library?

    How to sort? so that I many all clips sorted by name and can drag them all to my project to create quick movie that has correct date and time sequence, as the file name.
    Thanks!

    I cannot figure out how to sort the clips either....

  • File name generation with sequence number

    Hi All,
    My scenario is, File to File.  I need to generate the filenames at the target side like File1.xml, File2.xml..File9999.xml for each file triggered from source system. The interface tiggesrs multiple times in a day.
    For example, for the first time, 5 files triggered, need to generate File1.xml,File2.xml..File5.xml. After some time the interface might trigger with 10 files, then need to generate files as File6.xml,File7.xml....File15.xml . Once the file count reaches 9999 then need to generate the files from  1 (File1.xml)again.
    Could you please suggest me the possible solutions. For this any Lookups required?
    Regards,
    Praveen Kumar

    Hi Praveen,
    Case 1: If a field in source data carries the information regarding the sequence.
                 You can map this value ( Directly .. or using some transformation ) in some temporary field in the target and then use a Variable substitution at the receiver communication channel.
    Case 2. If the source file name carries the sequence information. then you can enable the Adapter specific settings in the Sender communication channel , and then get the information of the source file name using the Container object in the mapping. Then assign the sequence number to a field in the target , use a Variable substitution at the receiver communication channel.
    Case 3 : If Case 1 and Case 2 are not applicable ... then you have to use a  Ztable  to store the sequence number , a function module to fetch the number , and then use a UDF  in which you will implement the  RFC call logic.Then the same process ....      assign the sequence number to a field in the target , use a Variable substitution at the receiver communication channel.
    BR,
    Sushil.

  • Sequence number/counter in File name using FTP

    Hi
    I have to add sequence number in the file name. How can i do that? everytime file generates it should pick up the latest file number.
    Example File1 File2 File3. 1,2 and 3 are the sequnce number.
    Regards

    Hi ria,
             You can do this by dynamic file creation. Use this following code and cretate an UDF. The map the required file format to the target header structure as below;
    UDF
    sequence number:
    IDENTIFIER is the parameter
    Import com.bp.xi.util.*;
    Code:
    return ServiceUtil.getSequenceValue( IDENTIFIER, container, false );
    Dynamic file:
    Key & Value is the parameter
    Code:
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get( StreamTransformationConstants.DYNAMIC_CONFIGURATION );
    DynamicConfigurationKey confkey = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/File",  Key );
    conf.put( confkey, Value );
    return "";     
    Input parameter "Key" is given a constant value"FileName"
    Second parameter "Value" is the file pattern
    Mapping
    Constant(File)concat function sequence numberUDF ==> Dynami File udf ==>target header record.
    In the receiver communication channel check the adapter specific function, filename
    points if useful
    regards,
    Murugavel

  • Reg : I need to generate a file name sequence number.

    Dear All,
    I need to generate file name in sequence number. Now i have generated file in specific folder. In that folder file i am reading one by one and generating. Problem is folder file some names having special characte those names are not generating while reading 'Cat' Caommand in shell script. Instad of that i want to generate files in 1.ldt,2.ldt to etc..
    Please guide me how to generate in specific folder.
    Thanks in advance.
    Best Regards,
    Velu.

    First, LabVIEW 7 allows you to pass string and path data types directly into the Matlab script node. Otherwise, in LV <= 6.1 you can do the following:
    In LabVIEW, convert the string to an array of U8s using the String to Byte Array function. Then pass the U8 array into the Matlab script node as a Real Vector type. Finally, in Matlab, convert the Real Vector to a string using the char() function. For example:
    stringAsString = char(stringAsRealVector)
    Attached is an image that shows how to do this.
    Good luck,
    -Jim
    Attachments:
    Matlab_Script_Node_String_Input.GIF ‏6 KB

Maybe you are looking for

  • XI: file to Idoc

    Hi all, I am getting source data like: Order     order_no    1-1     name         1-1     Item1      0- Unbounded         f1         0-1         f2           0-1 the Requirement is for each item i need to generate new Idoc on target side....is it pos

  • Question on executing operations in Background

    Hi All, I am building up an universal app targeting 8.1 runtime and also new to whole .NET world. I have some operations  in my application which I want to perform in parallel, asynchronously and also in background. These operations include file uplo

  • BI Publisher Scheduling Problem

    Hi Experts, Our BI Publisher is currently integrated with siebel, whenever i tried generating 35k records bip report via manual generation in siebel, it completed successfully, however when i tried generating it via bip scheduling it fails. Do you ha

  • N97 mini cherry black colour availability for arab...

    Hello, THe N97 mini has been available in the middle east for over a month now. But it is only available in the garnett colour. I asked the local resellers, and Nokia Care about the availability of the cherry black colour, but no body knows. I really

  • I cannot open emails in MAIL - they come through from Webmail, but I cannot open them....please help....

    As above, I cannot open emails in MAIL - they come through from Webmail, but I cannot open them - I can also not read Sent messgaes or old emails that I have already read. They just don't open....please help.... Thank You!