A dynamic name of variable

I always name variable manual. And today I'd faced necessity
do it by AS3 code. And I couldn't do it. How it's done?

that's nonsense and wouldn't even compile in as2, let alone
as3. use:

Similar Messages

  • Creating a variable with a dynamic name

    I read a XML which has a unknown number of
    TextFormat-Definitions.
    I used Arrays to hold the data. Every time the TextFormat
    should be used, I overwrite a temporary one with the data i hold in
    the array and then I apply this format to the specific text.
    Now I want to optimise this and create TextFormats at once
    which can be applied when needed, without all the conversion.
    The best way I can think of is by having
    dynamic names for the
    TextFormats for the user to call.
    I can't use the way I did in AS2:
    var ["TF_"+string]:TextFormat = new TextFormat(x,y,z);
    How is the
    right Syntax in ActionScript3.0?

    Yeah, the Application class is no longer dynamic, so you can
    just add members on the fly.
    You could create an "associative array" (object), and store
    the formats in that, keyed by 'string". Associative arrays are like
    hash tables and are efficient at looking up values by key.
    I have heard of but not used Dictionary objects.
    Tracy

  • Dynamic names for class and variable

    Hi Folks,
    How do you make a new instance of a class with a dynamic name.
    var dynamicname = new dynamicname()
    i try something
    var this["test"]:Class = new ["Test"]()
    but offcourse its not this...
    I need this couse i have a librairy with SWC fonts they are only reference.. I get the font name from a CSS file and after i need to make a instance of the SWC file so the font is embedded.
    Thanks anyone who can help me!
    Cheer, Michierl

    Btw Murphy its not working......
    var fontRef = Class(getDefinitionByName("Arial"));
    var font = new fontRef();
    trace(font);
    The varibable definition not defined.
    I have 5 fonts as SWC Files set as reference lib in flex.
    But i dont wann to load all fonts yet cosue that will make my movie 200kb ... so i copy the fontname of the stylesheet and then make a instance of that font class.
    But how? With yours it need already a refrences to that class.

  • How to pass dynamic name to a field-symbol?

    Hi All,
    I have a requirement like I need to create dynamic internal table with dynamic name. Say like,
    Create a new Table
       CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
         it_fieldcatalog = it_fieldcat_fin[]
        IMPORTING
         ep_table        = new_table.
        IF sy-subrc EQ 0.
    Create a new Line with the same structure of the table.
         ASSIGN new_table->* to <b>(<fs_table>)</b>.
    In the above code, (<fs_table>) is a variable. Actually it is in the loop, so that first time it comes, it has to create an internal table with name as <fs_01>, next time <fs_02> and so on. Hope I am clear.
    Please help me. I am sure that i will mark the helpful answers.

    DATA: DREF TYPE REF TO DATA,WA_REF TYPE REF TO DATA.
    FIELD-SYMBOLS: <TEMP_TAB> TYPE TABLE, <TEMP_WA> TYPE ANY.
    *&      Form  DYNAMIC_TABLE
          text
    -->  p1        text
    <--  p2        text
    FORM DYNAMIC_TABLE.
      CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
        EXPORTING
          IT_FIELDCATALOG = LT_LVCFIELDCAT
        IMPORTING
          EP_TABLE        = DREF.
      ASSIGN dref->*  TO <TEMP_TAB>.
    ENDFORM.                    " DYNAMIC_TABLE
    the above is the procedure to create dynamic internal tables.
    now <TEMP_TAB> points to the contents of the table table in DREF.
    field symbol it self is meant for dynamic.
    then y r u using (<fs_table>).
    when everytime the same fieldsymbol is pointing to new contents, y u need new name everytime?
    i mean as the data is not static, so what is the use of naming a field symbol every time?.
    if u want to store the data in an internal table with a name,
    then u can do like below,
    data: tabname type string, i type i.
    concatenate '<fs_' i into tabname.
    "let i be the variable which stores the internal tables count
    "MOVE <temp_tab> to tabname.

  • How to set dynamic name of the mail attachment according to source file ?

    Hi,gurus:
    Our scenario is like below:
    Sending files from an FTP server to another FTP server without using the integraiton repositary,and the file name is not changed .Now, we want to also send the file to some with by mail adapter.The scenario  now works by using two business services in receiver determination.But the name of the attachment is "untitled.xml".We know how to set the file name staticly,but how to set the name dynamicly according to the source file name ?
    I have checked miachel's blog "XI: Dynamic name in the mail attachment - pseudo "variable substitution"(/people/michal.krawczyk2/blog/2006/02/23/xi-dynamic-name-in-the-mail-attachment--pseudo-variable-substitution),but how can I get the source file name?
    And another question:Must we restart the adapter or j2ee engine to make the user defined module work?

    Hi,
    >>>but how can I get the source file name?
    form dynamicconfiguration (ASMA)
    >>>And another question:Must we restart the adapter or j2ee engine to make the user defined module work?
    no need for a restart
    Regards,
    Michal Krawczyk

  • Dynamic names for I$ ,C$ and E$ tables in ODI

    Dear ODI Team,
    We have a requirement where we are loading header data and then line data in our Package.ODI internally creates work tables to load data into target tables.If multiple sessions of the same interface is executed at the same time the I$table of the previous session affects the I$ table of the next session.Hence if session1 has completed loading then it is at the stage of dropping the I$ table.Hence the second session is erroring out.Kindly let me know if there is an option to create these work table names dynamically for each session
    Thanks ,
    Anand

    Even I an getting similar error trying to use Global variable for dynamic names of the work tables
    Scripts Generated by the IKM :
    create table XDO.#global."gv_test_dynameSSTST_AN"
    ANY_NEW_ID NUMBER(22) NULL,
    ANY_NEW_ATTRIB1 VARCHAR2(50) NULL,
    ANY_CONC_ATTRIB2 VARCHAR2(150) NULL,
    DECODE_CODE1 CHAR(5) NULL,
    ANY_REF_CODE2 VARCHAR2(60) NULL,
    ANY_DATE1 DATE NULL,
    ANY_DATE2 DATE NULL,
    IND_UPDATE char(1)
    NOLOGGING
    Getting the following error on execution :
    911 : 42000 : java.sql.SQLException: ORA-00911: invalid character
    java.sql.SQLException: ORA-00911: invalid character
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)
    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:639)
    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:185)
    at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:633)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1086)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2984)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3057)
    at com.sunopsis.sql.SnpsQuery.executeUpdate(SnpsQuery.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execStdOrders(SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSqlI.treatTaskTrt(SnpSessTaskSqlI.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
    at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
    at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
    at com.sunopsis.dwg.cmd.e.i(e.java)
    at com.sunopsis.dwg.cmd.g.y(g.java)
    at com.sunopsis.dwg.cmd.e.run(e.java)
    at java.lang.Thread.run(Thread.java:595)

  • Creating Dynamic Internal table with a dynamic name

    Hi,
    I want to create dynamic internal tables with dynamic names.
    For example:
    Suppose I have a table with three fields.
    1. Structure name
    2.Fields
    3.file
    And the structure of the internal table is as follows:
    TYPES:BEGIN OF table_type,
          struct                  TYPE char70,
          fields                   TYPE tt_type OCCURS 0,
          File                      TYPE ttab_type OCCURS 0,
          END OF table_type.
    Suppose I have one record inside my internal table with struct as "STRUCTURE", fields have an internal table content of set of fields and File has some set of records.
    Now I want to create dynamic internal table whose name will be "STRUCTURE" , the fields of the dynamic internal table structure[] will be as in fields, and the records will be as in File.
    Like this if i have 100 records in my internal table then I have to create 100 dynamic internal table dynamically.
    Can anyone suggest how to do this?
    Edited by: Jjammy on Jul 22, 2009 7:52 AM

    Hi,
    Check the sample program and develop your program accordingly.
    <font color=blue><pre>
    REPORT  ztest_notepad.
    *& Declarations
    *Type-pools
    TYPE-POOLS:
          slis.
    *Types
    TYPES:
          ty_fcat      TYPE lvc_s_fcat,
          ty_fcatalog  TYPE slis_fieldcat_alv.
    *Work areas
    DATA:
          wa_fcat      TYPE ty_fcat,
          wa_fcatalog  TYPE ty_fcatalog.
    *Internal tables
    DATA:
          it_fcat      TYPE STANDARD TABLE OF ty_fcat,
          it_fcatalog  TYPE STANDARD TABLE OF ty_fcatalog.
    *Type reference
    DATA:
          it_dyn_tab   TYPE REF TO data,
          wa_newline   TYPE REF TO data.
    *Filed symbols
    FIELD-SYMBOLS:
          <gt_table>   TYPE STANDARD TABLE,
          <fs_dyntable>,
          <fs_fldval>  TYPE ANY,
          <l_field>    TYPE ANY.
    *Variables
    DATA:
          l_fieldname  TYPE lvc_s_fcat-fieldname,
          l_tabname    TYPE lvc_s_fcat-tabname,
          l_fieldtext  TYPE lvc_s_fcat-seltext,
          l_index      TYPE char2.
    "Selection-screen
    PARAMETERS:
             p_colms   TYPE i.
    *& start-of-selection.
    START-OF-SELECTION.
      PERFORM build_fieldcat.
      PERFORM create_dynamic_table.
      DO 20 TIMES.
        DO p_colms TIMES.
          l_index = sy-index.
          CONCATENATE 'FIELD' l_index INTO l_fieldname.
          ASSIGN COMPONENT l_fieldname OF STRUCTURE <fs_dyntable> TO <l_field>.
          <l_field> = sy-index.
        ENDDO.
        INSERT <fs_dyntable> INTO TABLE <gt_table>.
      ENDDO.
      LOOP AT it_fcat INTO wa_fcat.
        PERFORM fieldcatalog1 USING: wa_fcat-fieldname
                                      wa_fcat-tabname
                                      wa_fcat-seltext.
      ENDLOOP.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program = 'ZTEST_NOTEPAD'
          it_fieldcat        = it_fcatalog
        TABLES
          t_outtab           = <gt_table>.
    *&      Form  BUILD_FIELDCAT
    FORM build_fieldcat .
      CLEAR: l_fieldname,
             l_tabname,
             l_fieldtext,
             l_index.
      DO  p_colms TIMES.
        CLEAR l_index.
        l_index = sy-index.
        CONCATENATE 'FIELD' l_index INTO l_fieldname.
        CONCATENATE 'Field' l_index INTO l_fieldtext.
        l_tabname = '<GT_TABLE>'.
        PERFORM fieldcatalog USING: l_fieldname
                                    l_tabname
                                    l_fieldtext.
      ENDDO.
    ENDFORM.                    " BUILD_FIELDCAT
    *&      Form  CREATE_DYNAMIC_TABLE
    FORM create_dynamic_table .
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = it_fcat
        IMPORTING
          ep_table        = it_dyn_tab.
      ASSIGN it_dyn_tab->* TO <gt_table>.
    Create dynamic work area and assign to FS
      CREATE DATA wa_newline LIKE LINE OF <gt_table>.
      ASSIGN wa_newline->* TO <fs_dyntable>.
    ENDFORM.                    " CREATE_DYNAMIC_TABLE
    *&      Form  FIELDCATALOG
    FORM fieldcatalog USING field table f_txt.
      wa_fcat-fieldname = field.
      wa_fcat-tabname   = table.
      wa_fcat-seltext = f_txt.
      APPEND wa_fcat TO it_fcat.
      CLEAR  wa_fcat.
    ENDFORM.                    " FIELDCATALOG
    *&      Form  FIELDCATALOG1
    FORM fieldcatalog1 USING field table f_txt.
      wa_fcatalog-fieldname = field.
      wa_fcatalog-tabname   = table.
      wa_fcatalog-seltext_m = f_txt.
      APPEND wa_fcatalog TO it_fcatalog.
      CLEAR  wa_fcatalog.
    ENDFORM.                    " FIELDCATALOG1 </pre>
    </font>
    Thanks
    Venkat.O

  • Dynamic Name for Yellow Interface Table

    Hi All,
    Can anybody guide me how to use dynamic name for Yellow Interface Target Table.
    Eg: T_SESSIONID.
    I tried
    1)Refreshing the SESSIONID in a Variable V1 and using T_#V1 directly
    2) Refreshing the T_#V1 in a Variable V2 and using #V2
    But its not creating properly.
    Please guide.

    You want to create dynamic target table name right?
    You can refresh a variable like #GET_SESSION
    #GET_SESSION= SELECT <%=odiRef.getSession("SESS_NAME")%> FROM DUAL
    My tmp table name like TMP_#GET_SESSION
    then in your package refresh #GET_SESSION variable and you can use it.
    I hope this can be helpful
    Thanks

  • Physical Table (Dynamic Name) x Physical Table x Alias

    Hello,
    We are customizing the standard OBI Applications .rpd. but this question is in reference to OBIEE, hence the post here.
    I have no problems with Physical Tables and Alias in the Physical layer.
    It just happens that the standard OBI Applications .rdp has some other 'physical tables' - the one for: Dim_W_PARTY_ORG_D_Customer that in its properties uses a Dynamic Name pointing to a variable that contains W_PARTY_ORG_D.
    There are other similar cases in the vanilla .rpd
    I fail to understand why sometimes (most of the time) the vanilla .rpd uses Alias and in these few cases use this strange Physical table. Pls. anyone would care to comment ?
    As we expand W_PARTY_ORG_D with new columns... these new columns are NOT automatically part of the Dim_W_PARTY_ORG_D_Customer as it happens in an Alias definition.
    Txs. for any comments.
    Antonio

    Hi Antonio,
    From the 11g documentation (http://docs.oracle.com/cd/E14571_01/bi.1111/e10540/physicallayer.htm#i1005872) ;
    Select this option to use a session variable to specify the physical table name, similar to catalog and schema objects. This option is available for non-multidimensional data source tables when you select a table type of Physical Table.
    You might want to choose this option if you have a multi-tenancy implementation and you want to define a separate physical table name for each customer. Another example would be to select between primary and shadow tables that are valid at different times in your ETL cycle. In both cases, you can assign session variables to dynamically select the appropriate table.
    Hope this helps.
    Daan Bakboord
    http://obibb.wordpress.com

  • 'use dynamic name' and 'caching properites' options for alias table...

    Hello everybody,
    can anybody please explain 'use dynamic name' and 'caching properites' options for alias tables...
    Thanks...
    eagerly waiting for a response..
    Vijay

    You want to create dynamic target table name right?
    You can refresh a variable like #GET_SESSION
    #GET_SESSION= SELECT <%=odiRef.getSession("SESS_NAME")%> FROM DUAL
    My tmp table name like TMP_#GET_SESSION
    then in your package refresh #GET_SESSION variable and you can use it.
    I hope this can be helpful
    Thanks

  • OBIEE 10G deliver content dynamic name

    For example, I want to send the answer report to a user every day via email. The name of the answer report is 'promotion aaa'. Is it possible to send the report as an excel attachment with name like promotion aaa [day], where day can be from a variable? I know I can do that in Headline or in the body of email but it would be better to have a dynamic name in the attachment. Thanks.

    I dont think you can do that.

  • Giving arrays a dynamic name

    how would you give an array a dynamic name?
    for(f=0;f<6;f++){
    for(g=0;g<hexArray.length;g++){
    if(f==0){
    var kleurenIndexArray:Array = [] <---- this has to be a
    dynamic name like [kleurenIndexArray+f]
    kleurenIndexArray.push("0x"+g+"00000")
    All the things i've tried haven't worked

    I'm not sure exactly what you're trying to do but to give any
    variable name based on a variable by doing something like:
    x=3;
    this["test"+x]="hello";
    this is the equivalent of writing:
    test3="hello";
    you would do the same for arrays such as:
    x=3;
    this["test"+x]=new Array();
    this is the equivalent of writing:
    test3=new Array();
    however, why not create an array rather than a variable with
    a dynamic name? my example above could be the following instead:
    eg
    test=new Array();
    test[3]=new Array();
    this would give you a multidimensional array.
    Does this answer your question?

  • Calling Classes Using Dynamic Names

    I've recently been learning ActionScript 3 after have gotten
    used to AS2, and I've run into a problem concerning getting
    particular MovieClips onto the stage. Calling MovieClips a by
    dynamic name was easy using identifiers, but since all MovieClips
    are now just classes, I'm unsure how to call them dynamically.
    For example:
    I have two MovieClips in my FLA file called
    &quot;mt_1&quot; and &quot;mt_2&quot;. My randomly
    chooses either the number 1 or 2 (we'll call the variable
    &quot;num&quot;) and then it should place the corresponding
    MovieClip on the stage. What I have now is clearly not working.
    Does anyone have the solution to this?

    Sorry to follow up on this Answered thread but it seemed
    appropriate.
    In the above scenario, how would one add something like this:
    var thumbRef:Class = getDefinitionByName("shape") as Class;
    for (var i:Number = 0; i<6; i++) {
    var square
    :* = new thumbRef(); // or this["square_"+i]:* = new thumbRef();
    master_holder.addChild(this["square_"+i])
    How do we beat the simple identifier restriction?

  • When I click SAVE PDF i need to get default dynamic name to save the PDF document.

    Hi All,
    When I click SAVE PDF option I need to get default dynamic name. In my case lets say Sales Order Number.pdf.
    Thanks,
    SP.

    Hi,
    I have created SAP Abobe Form for Patient Order.
    So when we execute we will see output as a PDF. If I want to save the PDF From, and click on the SAVE button, by default it comes up with my SAP FORM name, which I don’t want.
    What I want is when I click SAVE button by default it should come up with the Patient Number on the PDF Form, so that i can directely save without changing the name.
    For Example if I view the 101010 Patient Number then i should save the pdf from by 101010.pdf, same way if i view 202020 Patient number then i should save the pdf form by 202020.pdf.
    Please let us know is this possible.
    Thanks,
    SP

  • Dynamic name for a tab in a tabstrip

    Hello,
    I have a tab strip with 10 tabs and all of them have the text Target 1 to 10. Depending on the information one of the tabs must display another text at runtime and I don´t know how.
    I found here some posting where it is stated that I have to declare a variable in my programme with the same name as the tab and in PBO I can assign the new text. This unfortunately does not work. I declared the text as string when we´re talking about a pushbutton.
    Can someone help ??

    1) Tick the "output only" of all your tabstrip buttons
    2) Declare the tabstrip button names as variables in your abap program (string or C, as you want) and fill them with the text you want

Maybe you are looking for

  • My iMac 2006 had a crashed Lion and now does not accept any Lion installation.

    Hi I have tried to install my Lion from an external drive. This drive has basic Lion on it and runs great with my iMac. However installing the Lion on my iMac fails constantly. I have reviewed the installation protocol and can not find a clue. It see

  • Consolidation 4.6b 4.6c

    Hi Guru's, This is the situation we have: In preparation for a project, one of the questions/subjects the client has is to prepare for the legal merger of two of their companies in BeNe. One, is already running in SAP version 4.6c full scope. The oth

  • Cloud Accounting Technology Expo Launches for Xero Users│Cheyney Group Marketing

    One of Australia's leading cloud software integrators launched an online expo today to introduce a selection of cloud programs that connect with cloud accounting software. Jeri Murphy, publisher of cloud integrator website JeriMurphy.com, has recorde

  • Workbook: Document store operation failed due to missing authorization

    Hello authorizer gurus, I have got 3.5. I have transported. I try to open a workbook. I am getting a Error Message:            Document store operation failed due to missing authorization Newly saved Queries as workbook can be openend. What's wrong ?

  • Missing clips

    I'm running FCP 4.5 on my G4 PowerBook. Every once in a while when I open an existing project I get the notice "Missing clip so and so." This has been an on going problem with me since I started FCP. I just don't seem to be able to understand where t