Variable filename

I'm doing a project where I have to take snap shots from a video camera. I've manage to do this part but I can't create a variable file name to save the images. If I can take the variable out of a while loop, in every loop, I can use this value to name the file.
Thank You Guys... 

duplicate post
Do not mark your original question as solved and then ask the same thing. Unmark the solution (click the Options button) and respond back in the original thread. DO NOT resond here.

Similar Messages

  • Send Invoice as PDF Attachment with variable Filename

    Hello!
    We got a requirement from one customer. We should send our invoices as PDF-Attachment via E-Mail but the attachment must have a variable filename. At the Moment we can send invoice as PDF-Attachment but only with a fix filename.
    How can we change the filename in our Adobe Forms?
    Best Regards
    Markus

    Hi Florian!
    Answer 1:
        The original Name is Druckdaten.pdf
    Answer 2:
         Our entry in NAST-NACHA = 1
    Answer 3:
         I can implement some ABAP-Code
    Here some Screenshots:
    Configuration  of printer E-MAIL:
    Best regards
    Markus

  • The variable $filename and the the *.fm extension

    When you need the title of the document importing into a document, you can use the variable <$filename>.
    This is useful as you can have a template that changes its name with the name of the file.
    However, the variable always writes the document name with the file extension (for example help.fm) making the variable useless.

    Gareth,
    Please also enter a feature request using the official request route via Bugbase & Wishlist and provide some use cases.

  • PayloadZipBean - variable filename inside the archive

    Hi,
    I'm using the Adapter-Specific Message Properties in a sender fileadapter to determine the incoming filename, which has variable components (i.e. date and time). After changing the prefix and suffix in a Message-Mapping the new name is applied in a receiver fileadapter. The new name is now part of the payload in the tag <Filename>. The receiver fileadapter contains the PayloadZipBean to compress the output file, everything works fine.
    Now I want the file inside my compressed archive always to have the same name as my archive has. In Stefan Grube's blog about the PayloadZipBean I only found the possibility to choose a fix name by using the MessageTransformBean (name="file.txt").
    Example:
    1. variable input filename:                       IN_RNK_20080227_1006.txt
    2. filename after Message-Mapping:        OUT_RNK_20080227_1006.gz
    3. archive filename after receiver adapter: OUT_RNK_20080227_1006.gz
        filename inside the archive:                 MainDocument (this is the default (payload-name))
    I would like to name the file inside the archive OUT_RNK_20080227_1006, too.
    Question 1: Is there any possibility to read out the mapped <Filename>-tag from the payload to use it for the element inside my archive (File Name Scheme and Variable Substitution don't work when using Adapter-Specific Message Properties).
    Question 2: Is there a way to modify the name of the payload so that I can change "MainDocument" to "OUT_RNK_20080227_1006"?
    I'm on XI 3.0 - SP19.
    Many thanks,
    Ralph

    >
    Stefan Grube wrote:
    > In this thread there is a module for reading the content type and setting the dynamic configuration:
    > sender mail adapter - attachment name
    > It should be not be so difficult to derive the reverse way
    Thanks for this info Stefan.
    [Stefan Grube's webinar on custom adapter module development|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/64a6bdab-0c01-0010-079a-b3707717cecd?prtmode=navigate]
    The code of the EJB module we had to write to get the filename from the Dynamic Configuration (ASMA) and then set the content type of the message is given below.
    * Created on Apr 23, 2008
    package zfilezipper;
    * @author Krishneel Goundar
    import javax.ejb.CreateException;
    import javax.ejb.SessionBean;
    import javax.ejb.SessionContext;
    import com.sap.aii.af.mp.module.*;
    import com.sap.aii.af.ra.ms.api.*;
    * @ejbHome<{com.sap.aii.af.mp.module.ModuleHome}>
    * @ejbLocal<{com.sap.aii.af.mp.module.ModuleLocal}>
    * @ejbLocalHome<{com.sap.aii.af.mp.module.ModuleLocalHome}>
    * @ejbRemote<{com.sap.aii.af.mp.module.ModuleRemote}>
    * @stateless
    public class SetContentTypeEJB implements SessionBean, Module{
         private SessionContext myContext;
         public void ejbRemove() {}
         public void ejbActivate() {}
         public void ejbPassivate() {}
         public void setSessionContext(SessionContext context) {
         myContext = context;
         public void ejbCreate() throws CreateException{}
         public ModuleData process(ModuleContext moduleContext,ModuleData inputModuleData) throws ModuleException{
              try {               
                   Message msg = (Message) inputModuleData.getPrincipalData();     //Used to read dynamic configuration data
                   TextPayload payload = msg.getDocument();     //Used to set 'contentType' value
                   //The name of the file to be zipped is read from the dynamic configuration.
                   String fileName = msg.getMessageProperty("http://sap.com/xi/XI/System/File", "FileName");
                   if(fileName == null)     //If no file name can be determined we set 'contentType' to "defaultbeanile.txt"
                        payload.setContentType("text/plain;charset = \"UTF-8\";filename=\"defaultbeanfile.txt\"");     
                   else     //If a file name can be found we set 'contentType' to the name of the file.
                        payload.setContentType("text/plain;charset = \"UTF-8\";filename=\"" + fileName + "\"");     
                   //After setting the value of 'contentType' we need to update the ModuleData object (inputModuleData).
                   inputModuleData.setPrincipalData(msg);
              } catch (Exception e) {
                   ModuleException me = new ModuleException(e);
                   throw me;
              return inputModuleData;          //Return the updated ModuleData object.
    Edited by: Charu Kulkarni on Apr 28, 2008 1:41 AM

  • Variable Filename in Sender-Fileadapter

    Hello,
    i have a question about the possibility to implement the following part of a scenario:
    Step 1: An E-Mail with a filename will be sent to the XI
    Step 2: There starts an BPM process
    Step 3: The XI read the filename from the mail
    Step 4: The Sender-Fileadapter gets the filename which was sent by mail
    Step 5: The File "filename" is read from the filesystem
    Now the question is, how do I get the filename to the configuration of the Sender-Fileadapter?
    Can i use variable-substitution? When yes, how?
    Do i have to implement an adapter-module?
    Is this possible at all? Or do i have to implement the scenario in an other way?
    Thorsten

    Hi Thorsten,
    I feel your assumption is wrong.
    >Step 1: An E-Mail with a filename will be sent to the >XI
    Step 1: An E-Mail with an attachment with some name will be sent to the XI
    >Step 4: The Sender-Fileadapter gets the filename >which was sent by mail
    You are assumption that Sender File Adapter is wrong.
    Possiblity is that you will read the attachement name from Mail Message(Mail Adapter) using Dynamic Configuration(in mapping) and you can use this name further according to your requirement.
    This is what I grasped from your explanation. If any where my understanding is wrong please let me know your exact requirement.
    thanks,
    Gujjeti
    Edited by: Praveen Gujjeti on Apr 23, 2008 2:07 PM

  • Webi - store report in Variable filename.

    Hi,
    I have BO Webi report say XYZ which is schedule and run on weekdays. once it is refresed I  wanted to give name as XYZ_YYYYMMDD.XLs ( where YYYYMMDD is system date).
    in CMC there is option to name the report with some extension ( CMS-> Folder->Schedule->Destination and specify filename radio button). but the one I am looking is not available.
    is there any way to change the report name with some variable value and store in Excel ?
    Your early response would be appreciated.
    Regards,
    Avi

    You can select 'Date and Time' when check specify file name. Select 'Title' put an hyphen and select 'Date and Time' and also check 'add file extension'.

  • Variable filename and folder in receiver cc

    Dear experts,
    On PI, I need to create a (text-) file with a variable name and folder. The scenario is as follows:
    idoc-> PI -> txt file
    In my incoming Idoc I get the following data:
    - directory where the txt file should be saved;
    - name that the txt file should get.
    How can I realise this in PI? Using variable substitution? As I never done this before, I have a hard time getting this to work...
    Please help.
    Thanks in advance
    William

    Hi,
    Use Dynamic Configuration:
    Input will be 2 variables var1, var2.
    String Name1 = var1;
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
    conf.put(key1, Name1);
    String Name2 = var2;
    DynamicConfigurationKey key2 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "Directory");
    conf.put(key2, Name2);
    return "";
    Maping:
    Var1---
    UDF----TargetMessageNode.
    Var2---
    Under ID: Enable ASMA in file receiver adapter and chk FileName and Directory.
    and put * under File name and / underTarget Directory(File receiver).
    NOTE: U can alter this UDF according to ur req.
    Thanks
    Amit

  • Variable filename for output

    Hey all,
    I want to have the file I spool to in a sql script to change depending on the database I'm connecting to, but am unsure how to accomplish this. Can this be done? Can someone provide an example?

    an alternative is to use a recent client and the predefined variable
    $ export NLS_DATE_FORMAT='YYYY-MM-DD_HH24-MI-SS'
    $ sqlplus scott/tiger
    SQL*Plus: Release 10.2.0.2.0 - Production on Thu May 8 13:25:03 2008
    Copyright (c) 1982, 2005, Oracle.  All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    SQL> spool file_&_CONNECT_IDENTIFIER._&_DATE..txt
    SQL> prompt hello
    hello
    SQL> spo
    currently spooling to file_TINF4_2008-05-08_13-25-43.txt
    SQL> spool offThe main advantage is that you do not need to execute a query, so the file will be created with the right name even if the instance is not mounted and it will not generated an ORA- error if you are not connected
    up2u

  • Variable filename external table

    I have written a script to import data from a .csv into a table in Apex:
    CREATE TABLE APEX_USER_002.INK_KASSA_LOAD
    KASS_DTM      VARCHAR2(255),
           KASS_ID       VARCHAR2(255),
           KASS_VKP_COD  VARCHAR2(255),
           KASS_VKP_OMS  VARCHAR2(255),
           KASS_COD VARCHAR2(255),
           KASS_OMS   VARCHAR2(255),
           KASS_PRS_COD VARCHAR2(255),
           KASS_PRS_OMS VARCHAR2(255)
    ORGANIZATION EXTERNAL
      TYPE ORACLE_LOADER
      DEFAULT DIRECTORY AFM_KASSA_IN
      ACCESS PARAMETERS
        RECORDS DELIMITED BY NEWLINE CHARACTERSET WE8MSWIN1252
          LOGFILE AFM_KASSA_LOG: 'log.log'
        BADFILE AFM_KASSA_BAD: 'badfile.bad'
        NODISCARDFILE
        SKIP 1
        FIELDS TERMINATED BY ';'
        OPTIONALLY ENCLOSED BY '"'
        LRTRIM
        MISSING FIELD VALUES ARE NULL
    KASS_DTM,
           KASS_ID,
           KASS_VKP_COD,
           KASS_VKP_OMS,
           KASS_COD,
           KASS_OMS,
           KASS_PRS_COD,
           KASS_PRS_OMS
        LOCATION  ('variable_filename.csv')
    It works fine when I put the name of the .csv hardcoded in the script. Like this: LOCATION ('Kassa_20130406130014.csv')
    I have written a function which returns the filename, but when I use the function in LOCATION (function()) I get an error: ora-00905: missing keyword
    How can I call a function in LOCATION ()?

    Hi,
    I'm not sure but I think you need re-create external table.
    Create procedure that drops and re-creates external table dynamically with new file name.
    Or use e.g. DBMS_SCHEDULER to call OS script that renames file always to same name for external table.
    Regards,
    Jari

  • InDesign export to single PDF files with variable Filename

    Hi there,<br /><br />I create a document with Data Merge which contains about 200 Pages. Now i want to export each page to a single PDF-File. Also the filename has to be generated from the placed content. The placed content are adresses. So i want to generate a filename with a static name. I got an ID, a static phrase and then a ZIP-Code. The Filename should look like this: <ID>September<ZIP Code>.pdf while ID and ZIP Code are fields from the datamerge.

    what you need is to operate throuh a loop.<br />for(i=0; i<app.activeDocument.pages.length;i++)<br />{<br /> //Assuming you labelled the textframe containing the ID with ID<br /> var myID = app.activeDocument.pages[i].textFrames.item("ID").contents;<br />//Assuming you labelled the textframe containing the ZIP with ZIP<br /> var myZip = app.activeDocument.pages[i].textFrames.item("ZIP").contents;<br /><br />var myPath = //something like "/disk/folder/" //Set a path to where you want to export the pdf<br />var myFileName = myID + myPath + myZip + ".pdf";<br />//Export to PDF - the forum is full of examples, you should find easily what you are asking for with search<br />} <br /><br />Loic

  • How to select variable filename from local directory with fn to load xml

    I would like to select a specific xml file to load from a local directory. The file name is composed of “Title” + “number sequence”.  I know the Title (in this case its XLink07), but I need to select the latest number sequence or the latest by date stamp.
    For example, the local directory has the following files:
    XLink01[36735298100].xml
    XLink02[36735298100].xml
    XLink02[36735298101].xml
    XLink07[36735298100].xml
    XLink07[36735298101].xml
    In this example I need to select file XLink07[XXXXXXXXXXX].xml where XXXXXXXXXXX is the highest number within the XLink07[XXXXXXXXXXX].xml files.  Title is Xlink07 and function should return Number sequence [36735298101]. Files with higher number sequence have later date stamps than files with lower number sequences. I need to select the highest number or the latest date stamp for the file that begins with XLink07….
    My action script to load the local .xml file without any function to select the correct file is:
    Security.allowDomain("*", "*")
    var xmlLoader:URLLoader = new URLLoader();
    xmlLoader.load(new URLRequest("XLink07[36735298101].xml"));
    xmlLoader.addEventListener(Event.COMPLETE, showXML);
    function showXML(e:Event):void {
    XML.ignoreWhitespace = true;
    var Innards:XML = new XML(e.target.data);
    tweet_name.text = Innards.XLink01[0].screen_name;
    tweet_1.text = Innards.XLink01[0].text;
    tweet_date.text = Innards.XLink01[0].created_at;
    Thanks for the help if anyone can script that function for me if its possible.

    If you develop for Flash browser plugin (not AIR), there is no way to read directories.

  • Error in Variable Substitution

    Dear All,
    Result Payload:
    <ns1:MT_Level1 xmlns:ns1="http://test.com">
    <Header>
      <Separator>,</Separator>
    </Header>
      <Detail>
      <FileNumber>30</FileNumber>
      <LinkToNextLevel />
      <Expansion1>0</Expansion1>
      <Expansion2>0</Expansion2>
      <Expansion3>0</Expansion3>
      <Expansion4>0</Expansion4>
      </Detail>
    <Detail>
      <FileNumber>30</FileNumber>
      <LinkToNextLevel />
      <Expansion1>0</Expansion1>
      <Expansion2>0</Expansion2>
      <Expansion3>0</Expansion3>
      <Expansion4>0</Expansion4>
      </Detail>
      <FileNode>
      <FileName>test.txt</FileName>
      </FileNode>
      </ns1:MT_Level1>
    I want to use "File Name" in the "File Node" node for my variable substitution.
    In the configuration:
    File Name Scheme = %filename%
    Variable = filename
    reference = payload: Messages, 1, Message, 1, MT_Level1, 1, FileNode, 1, FileName, 1
    Note: I'm using multimapping (1 to N).
    File Name path is /ns0:Messages/ns0:Message2/ns1:MT_Level1/FileNode/FileName ( from right click in the file name --> copy path).
    I got following error:
    "Attempt to process file failed with com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: filename"
    Please advise!
    Best Regards,
    Victor.

    Dear All,
    My problem is solved!
    The issue is because I don't put the interface mappings sequence as the same sequence as the message mappings sequence. Hence the structure name that i put in the variable substitution all are not match with the structure name in the payload even though all have the file name element.
    So what i did is i have to reorder the sequence of my message mappings to be the same sequence as the interface mappings sequence.
    Thanks for all that trying to help!
    Appreciated it guys.
    BTW, for the variable reference it's correct that i no need to put message and message2 as the reference.
    payload:MT_Level1,1,FileNode,1,FileName,1 will do.
    Best Regards,
    Victor.

  • Dynamic Filename in Fileadapter

    Hi all,
    I like to use the new feature (SP15) of the "Adapter Specific Message Properties" but with out success. I have read Michaels Blog "XI: The same filename from a sender to a receiver file adapter - SP14" but it give me not a clue how to use these properties during the normal receiver configuration and also the manual is not very clear about it. I have set a Variable with "FileName    message:FileName" (I have tried also "message:File_Name") Than I have used this filename Variable in the field "Filename Schema" like %FileName%. But I allways got this error: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: Unknown message header category 'FileName' for variable 'FileName'.
    What have I missed out here?
    Thankx
    Manfred Schmidt-Voigt

    Hi Manfred,
    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

  • Saving FileName in Database

    Hi,
    I have implemented a Proxy Service from type File on my Project and I want to save the name of the file along with the data in the database.
    My problem is that I don't know how I can manage to save the fileName in DB. I have created WS to save the data in database.
    thanks in advance
    Edited by Getachew at 04/17/2007 8:25 AM

    Hello ghaardt,
    first of all thank you very much for your response!
    What I mean is how can I import the variable 'filename' from SB in my java code in web service. I just want to add it in PersonenControl.requestInsertRow parameters. Look at the folowing jws code.
    import cvstoxml.GechMessageFormatDocument;
    import personContFile.PersonenControl;
    import cvstoxml.GechMessageFormatDocument.GechMessageFormat;
    import cvstoxml.PersonnenDocument.Personnen;
    import cvstoxml.impl.PersonnenDocumentImpl;
    public class PersonWS implements com.bea.jws.WebService
    * @common:control
    private personContFile.PersonenControl PersonenControl;
    static final long serialVersionUID = 1L;
    * @common:operation
    * @jws:conversation phase="none"
    * @jws:parameter-xml schema-element="GechMessageFormat"
    public void requestInsertRows(GechMessageFormatDocument person)
    Personnen[] array = person.getGechMessageFormat().getPersonnenArray();
    for (int i = 0; i < array.length; i++) {
    Personnen personnen = array;
    String name = personnen.getName();
    String ort = personnen.getOrt();
    String vorname = personnen.getVorname();
    String geschlecht = personnen.getGeschlecht();
    PersonenControl.requestInsertRow(name, vorname, ort, geschlecht);

  • How do I get the loaded file_name into a variable?

    Hi,
    I am busy loading multiple flat files into my Oracle Database. I have defined a File Format for this and it works fine. However, there is a FILE_NAME field in my table, which should contain the name of the file where a specific record was loaded from.
    My question is, how do I store the file name in a variable so that i can use it to fill the FILE_NAME field in my table? I have defined my global variable $FileName but I don't know how to write the script to fill this variable.
    Your assistance will be highly appreciated.
    Ndahafa

    In DI 11.7 this is very simple because there's a new option in the file reader instance that adds the file name as an additional output column. You will find this option when you use a file format in a dataflow and check the file reader options (last set of options in the list). More information can be found in the Designer guide (File Formats chapter).
    In previous versions this is more difficult to accomplish.
    You would need to:
    1) use script and the exec() function to write al file names to a text file (something like dir *.txt > filelist.txt).
    2) read this file and write to a table
    3) in a loop read the file name from the table (with sql() function) and store in a variable
    3) in the file reader use the variable to acces the file
    It might be worth upgrading to DI 11.7 is you need the simple solution .

Maybe you are looking for

  • My voice memos from my iPhone 5 to my iTunes won't sync

    I'm trying to sync my voice memos from my iPhone 5 to my iTunes. I was on the phone when I initially connected my phone to my computer and the voice memos popped up then disappeared. Ever since then The 6 memos that disappeared will not sync. All mem

  • How do I transfer iTunes Library from external hard drive to another drive?

    I have filled by 160GB drive with my iTunes music library so I am purchasing a 400GB external drive. I want to transfer the entire library to the bigger drive. Can I simply drag via fire wire then entire libarary to the new drive and then "tell" by i

  • How do I delete or edit a captured text layer that contains a single character in Cp 5?

    My captured text layer contains a single character '7'. This renders immediately when I publish the movie, but I don't get any options when I try to edit the layer by right-clicking on it. Can anyone help as this is very annoying...

  • Upgrading to iPhoto 6 - still possible?

    Hi I have a Mac Mini 1.13ghz running 10.4.11. I use it purely for storing my music and photos, and syncing them to Apple TV and my iPhone. I wish to use Snapfish by HP to share my photos online, and they have an iPhoto Exporter available on their sit

  • PHP MYSQL KEYWORD SEARCH HELP

    Im creating a search for a image gallery and I want it to be able to pull up an image based on the keyword assigned to the image you searched. I have 4 fields in my DB, (id,layout"or image",description,key_words). My problem is when I enter a keyword