Replacing symbols dynamically

Hi all,
I am trying to make a fairly simple user interface. I have 3 buttons on stage and each button will pull out a correspoinding symbol from the library and display it on the stage.
Eg. Click btn1 and it will show content1 from the library.
So far it is working in that it shows the corresponding content but it appends subsequent content to the bottom of it. I need the content to be replaced instead.
If you would be so kind as to offer some advice, consider this:
I would prefer if I could dynamically get content from the library instead of having items on stage that are set to 'hide' and 'show'.
Note: I noticed that when you create a child symbol on stage that Edge gives it a randomly generated ID. There is some code towards the bottom that tries to rename its ID attribute. I am not 100% sure if it is even doing what I expect it to do. Any improvements are welcome.
var btnArray = ['btn1','btn2','btn3']
function init(){
          for (var i = 0; i < btnArray.length; ++i) {
                    var j = i+1;
                    initBtns(j);
function initBtns(num){
          sym.$('btn'+num).click(function(){
                    showContent(num);
function showContent(num){
          var content = sym.createChildSymbol("content"+num, "Stage");
          content.getSymbolElement().css({
   "top":"0px",
   "left":"0px" 
   var oldID = content.getSymbolElement().attr("id");
   sym.setVariable("oldID", "content"+num);
   var newID = sym.getVariable("oldID");
   content.getSymbolElement().attr("id",newID);
   alert(content.getSymbolElement().attr("id"));
init();

With some help from a colleague I have found the solutioin. Hope it helps anyone else out there with a similar issue. One of the main issues was the a variable was declared localy and needed to be global. See below for full working code.
var btnArray = ['btn1','btn2','btn3'];
var myBoolean = false;
function init(){
          for (var i = 0; i < btnArray.length; ++i) {
                    var j = i+1;
                    initBtns(j);
function initBtns(num){
          sym.$('btn'+num).click(function(){
                    showContent(num);
function showContent(num){
          if(sym.myBoolean){
                    sym.getSymbol(sym.content.getSymbolElement()).deleteSymbol();
          sym.content = sym.createChildSymbol("content"+num, "Stage");
          sym.content.getSymbolElement().css({ "top":"0px", "left":"0px" });
   var oldID = sym.content.getSymbolElement().attr("id");
   sym.setVariable(oldID, "content"+num);
   var newID = sym.getVariable(oldID);
   sym.content.getSymbolElement().attr("id",newID);
   sym.myBoolean = true;
init();

Similar Messages

  • Building Field Symbols Dynamically

    Hi All,
    Has anyone tried to build field symbols dynamically? something like this...
      DATA: field_symbol(13) TYPE c,
            v_lines          TYPE sy-tabix,
            v_count(2)       TYPE n.
      FIELD-SYMBOLS: <f2> TYPE ANY.
      DESCRIBE TABLE itab LINES v_lines.
      DO v_lines TIMES.
        v_count = v_count + 1.
        CONCATENATE '<fs_new_sf' v_count '>' INTO field_symbol.
        ASSIGN (field_symbol) TO <f2>.
        CONCATENATE '<fs_new_sf' v_count '>' INTO field_symbol.
        ASSIGN (field_symbol) TO <f2>.
        ASSIGN  COMPONENT v_sf01 OF STRUCTURE s_MARA TO <f2>.
      ENDDO.
    V_SF01 could be anything from MATNR to any field in table MARA.
    Although the above code is correct syntactically, and though there is no program termination either.
    the statement
    ASSIGN (field_symbol) TO <f2>.
    fails to assign the field symbol.
    Thanks,
    S-ray

    Hi Sudheer,
    There is a program termination because does not exist a field symbol called <fs_new_sf1> or <fs_new_sf2>... <fs_new_sfn> when you assign (field_symbol) TO <f2>.
    You should look for Dymamic Type specification, something like this:
    DATA: dref TYPE REF TO DATA.
    FIELD-SYMBOLS: <dobject> TYPE any.
    PERFORM declareData USING dref 'SFLIGHT'.
    ASSIGN dref->* to <dobject>.
    FORM declareData USING dref TYPE REF TO DATA
                           tname TYPE string.
    Create a data object of type 'tname'
    CREATE DATA dref TYPE (tname).
    ENDFORM.
    regards,
    Alejandro.

  • Define Field Symbols Dynamically

    Hi,
    Is it possible to define field symbols dynamically based on some naming convention? If yes, please let me know how to do that.
    Thanks & Best Regards,
    Kumar.

    I have this code in a loop that does this
        CONCATENATE 'TYPE' zlmltyp-ztext_key '_' zlmstyp-scrnseq
          INTO wk_fldname.
        CONCATENATE wk_fldname '-DATE' INTO fldname.
        ASSIGN (fldname) TO <text_fld>.
        <text_fld> = wa_zlmstat-erdat.
        CONCATENATE wk_fldname '-CURR_STATUS' INTO fldname.
        ASSIGN (fldname) TO <text_fld>.
        IF  wa_zlmstat-ltype  = zlmlead-ltype
        AND wa_zlmstat-status = zlmlead-status.
          <text_fld> = 'X'.
        ELSE.
          CLEAR <text_fld>.
        ENDIF.
    the fields are defined like this
    DATA:
      BEGIN OF scrn_stat_rec,
        ltype            TYPE zlmltype,
        status           TYPE zlmstatus,
        descrip          TYPE zstypex,
        date             LIKE sy-datum,
        curr_status      TYPE c,
        specstatdate     TYPE z_scrn_date,
        auth             TYPE zlmauth,
      END OF scrn_stat_rec,
      type100_01         LIKE scrn_stat_rec,
      type100_02         LIKE scrn_stat_rec,
      type100_03         LIKE scrn_stat_rec,
      type100_04         LIKE scrn_stat_rec,
      type100_05         LIKE scrn_stat_rec,
      type100_06         LIKE scrn_stat_rec,
      type100_07         LIKE scrn_stat_rec,
      type100_08         LIKE scrn_stat_rec,
      type100_09         LIKE scrn_stat_rec,
      type100_10         LIKE scrn_stat_rec,
      type200_01         LIKE scrn_stat_rec,
    ***  all the way to
      type600_09         LIKE scrn_stat_rec,
      type600_10         LIKE scrn_stat_rec,
      type700_01         LIKE scrn_stat_rec,
      type700_02         LIKE scrn_stat_rec,
      type700_03         LIKE scrn_stat_rec,
      type700_04         LIKE scrn_stat_rec,
      type700_05         LIKE scrn_stat_rec,
      type700_06         LIKE scrn_stat_rec,
      type700_07         LIKE scrn_stat_rec,
      type700_08         LIKE scrn_stat_rec,
      type700_09         LIKE scrn_stat_rec,
      type700_10         LIKE scrn_stat_rec.

  • Replace symbolic links with actual file

    Hello everybody,
    I have recently decided to move my seven iPhoto collections from an old external drive with insufficient capacity to a new bigger one. We talk some 50.000+ photos. Up to a couple of years ago, I had decided NOT to let iPhoto import the photos into its internal library, but I left the originals in a distinct directory external to the iPhoto package.
    Moving the iPhoto packages from the old to the new disk, I ran into a problem with the links to this external directory once I had retired the old external drive … because all links to the external originals broke.
    Here an example:
    - The old drive is called MOBIL
    - The new drive is called Photos
    In the directory /Volumes/Photos/iPhoto Library 1999 - 2002/Masters/2000/ESRIN, I find a symbolic link named:
    /Volumes/Photos/iPhoto Library 1999 - 2002/Masters/2000/ESRIN/DCP_0211.JPG
    In a terminal session this file is: -rw-rw-rw-@ 1 js  0 29 Okt  2006 DCP_0211.JPG
    The original is correctly reported as /Volumes/MOBIL/Eigene Bilder - Jurgen/Fotos/2000/09 September/ESRIN/DCP_0211.JPG
    Of course, iPhoto does not find the original once I remove the volume MOBIL.
    I see two possible solutions to this issue:
    1. Replace the broken symbolic link /Volumes/MOBIL/... with the new one /Volumes/Photos
    2. Replace the symbolic link with the actual file, i.e., copy each file from MOBIL to Photos (I don't care about the additional disk space used by this)
    I'd prefer solution 2 but my UNIX knowledge is not sufficient to automate this task - we are talking hundreds of directories and thousands of files …
    Any idea ho to achieve the above ? Any utility around ? Any other idea ?
    Many thanks in advance - Jurgen

    I believe that /Volumes normally contains a single symbolic link to the boot volume, and that all the other items there are not true symbolic links but are rather "mount points" which are managed dynamically by the system. Try running
    ls -l /Volumes
    in Terminal and you will see that all the items except for the boot volume show up as directories, and that only the boot volume item is a symbolic link. When you look at /Volumes in Finder (via Go To Folder) , the mount point icons have curved "alias" arrows and are labeled "alias", similar to symbolic links,  but they are different entities.
    With respect to the iPhoto paths, if you still have the old drive I think I would try cloning it to the new one so that the contents of the new drive are identical, disconnecting the old drive, and then renaming the new drive to match the name of the old drive. Then launch iPhoto and see if it finds everything.

  • Opening a CC .fla in CS6 replaces symbols and duplicates layers, frame labels and code on compile.

    So when I compile an fla in CS6 that I built in CC, It replaces all my symbols and puts "m&#058" in front of all the names.
    Not only that, but on compile, it duplicates layers and frame labels within selected movieclips and then spits errors out calling duplicate functions and frame labels as the issue. Has anyone ever run into this?

    Figured it out.  I had a certain naming convention for my symbols (m:video_1). Turns out that CS6 didn't like the colon and was duplicating my symbols in the library and screwing up a bunch of other stuff too. I changed my naming convention in my library to m_video_1. Adobe take note!

  • Replace symbols in e-mail subject

    Hi
    How can I create the subject of an e-mail that is send when I crete a delivery that depends of the delivery data?
    I want that the subject is ' Delivery (LIKP - VBELN) reference to (VBAK -BSTKD).
    Thanks
    Dora

    Hi
    As I tell you, if you read related notes you can read note Note 718017 - Replacement of text symbols in spool title/MAIL and Note 213511 - Processing text symbols in mail messages. By analogy with SO (that this notes explains), you can see that in report SAPMV50A you can call the subroutine TEXT_SYMBOL_REPLACE. If you don't have the field that you want to edit in subject, these notes explains you how to enhance (ZZ_TEXT_SYMBOL_REPLACE ). Check Note 699554 - Parameter LIKP-VBELN replaced incorrectly in mail and fax too.
    You have this code in report MV50AF0
    *&      Form  mail_texts
    form mail_texts tables it_xtlines structure tline
                    using  is_xthead type thead
                           is_nast type nast.
      data:
        lf_vbeln type vbeln_vl.
    * get likp for nast in case of multiple xlikp entries
      lf_vbeln = is_nast-objky(10).
      if lf_vbeln ne likp-vbeln.
        read table xlikp with key vbeln = lf_vbeln.
        move-corresponding xlikp to likp.
      endif.
    * replace text symbols in mail
      perform text_symbol_replace tables it_xtlines
                                   using is_xthead
                                         is_nast.
    endform.                    " mail_texts                     ^_n_699554
    Regards
    Eduardo

  • How do I replace -| symbol with paragraph mark?

    I edit a newsletter. Some of the contributors send their articles inline (not as attachments). Some of them have a non printing special character that looks like a bent left arrow instead of a paragraph mark. I think it is one of the first ascii characters, but don't know which one.
    How can I use find/replace to change these to paragraph symbols?

    I suspect they compose in Word or similar and then paste into Thunderbird. Something like that bent arrow symbol appears in Word when you use shift+return, though it's not clear why your contributors would be using it; maybe force of habit, or they don't know any better. ;-)
    Shift+return is a handy way to force a line end without creating a paragraph break. Useful in bullet point lists to create multiple paragraphs, or organize pictures. Or they're using something like an Apple which uses non-standard line breaks.
    I don't think Thunderbird's editing tools are capable of doing the search-and-replace that you have asked about.
    If you want to do all your editing inside Thunderbird, you may be able to copy then use "paste without formatting" (ctrl+shift+v) to eliminate these line breaks. Doing this will also remove other formatting, so may create more problems than it solves.
    I think in your position I'd take the text away to a better-than-average editor where a proper search-and-replace could be done, or you could select the lines and join them. Notepad++ would be my choice on Windows, probably Bluefish on Linux.
    And a proper word processor may also be able to tidy it up, but the challenge then would be to avoid importing all the formatting overheads that would come with it when copy-and-pasted from the word processor into Thunderbird. Again, Thunderbird's "paste without formatting" might be useful here too.

  • Query in Optimal Coding - Assigning INT TAB to FIELD SYMBOLS dynamically.

    TABLES: tkesk.
    DATA: itkesk type table of tkesk.
    DATA: BEGIN of itab_RP occurs 11,
    tabname type string,
    END of itab_RP.
    DATA : wa_rp like line of itab_Rp,
    wa_onemore like line of itkesk.
    FIELD-SYMBOLS: <fs> LIKE itkesk.
    ITAB_RP-tabname = 'ITKESK'.
    APPEND ITAB_RP.
    LOOP at ITAB_RP into wa_rp.
    <i><b>*How to assign the table itkesk to the field symbol
    *which is available in wa_rp dynamically instead of assigning it directly)</b></i>
    *ASSIGN wa_rp-tabname to <fs>.
    ASSIGN itkesk to <fs>.
       LOOP at <fs> into wa_onemore.
       WRITE : 'hi'.
       endloop.
    ENDLOOP.

    Is this even possible ?
    Thanks
    Mark

  • Flash Pro CS5 Replace Symbol Issue

    In Flash CS5 pro, when I replace a symbol in the library, it seems to break the refresh of the item(s) in the timeline and on the stage.
    For example, if I have a movie clip called "mouse" and modify it in one file, then copy that symbol into another Flash file (either copying it from one library to another, or copying a frame from one timeline to another, etc) it replaces the file....
    ...BUT the timeline layer that item is on turns blank and the item on the stage doesn't update.
    When I scrub the timeline, the object appears and the timeline populates...
    ...BUT if I have applied tweens to the symbol, I can't preview them by scrubbing the timeline.
    Also, none of the symbols used in the file consistently update on the stage or in the timeline.
    If I try to change a tween in the timeline on any object, it doesn't update on the timeline (I can't see the tween).
    Finally, if I publish the file while this issue exists, the object that I replaced does not tween properly.
    In the end, I am forced to save the file, close Flash, and restart. When I restart, the replaced object is there, it tweens correctly, and the file and everything in it functions and its library functions normally.
    I've never had this issue with previous versions of Flash. At times it is simply annoying, at other times it is a serious issue when I have to replace large numbers of symbols in large projects.
    Anyone else had this issue, or have a recommendation for a fix?
    My system is fairly robust... quad core 3.0 ghz, 8gb RAM, 3 x 500gb HDD, Windows 7 64 bit...and I ran Flash Professional CS4 on this same system without any of these issues.
    I have the same issue on my work system, which is a completely different system.
    I tried searching for a solution, but didn't find an issue listed that matched my problem.

    Try file->save-as and save down to a CS4 document. Then try it. I've had a lot of really weird issues with CS5 in the past that saving down to CS4 somehow corrected. Although I use CS5.5 currently. Docs made in CS5 often don't even import into CS5.5 correctly. I need to go in CS5, open it, save down to CS4 and then reopen in CS5.5. There's something about saving down to CS4 that seems to fix things.
    You can always save down to CS4, work in CS4 to make your changes then import it back into CS5 and export it.
    In this world things are too complex and sometimes although it's not ideal, just getting it done for deadline is the real job.

  • Replace Color Dynamically.

    hello everyone.
    I have one square in which i have square of color gray.
    i want to replace this gray color with orange color dynamically.
    can anyone tell me how to do this?

    but i am using below code instead. As my lines are not touching the boundaries so i put small reactangle named mark such that on rotation of square these rectangles hits eachother.
    if(t2.mark.hitTestObject(t1.mark))
               var myColor:ColorTransform = t1.line.transform.colorTransform;
               myColor.color = 0xFF0000;
                t1.line.transform.colorTransform = myColor;
    but this is not working.

  • Creating and deleting symbols dynamically

    I need help with getting this particular function implemented.
    I have 2 buttons with codes which I've added
    //Create button
    $.getJSON("content.JSON")
      .success(
      function(data){
      console.log("incoming data: ", data);
      //console.log("this is current value of var s", template);
      if (s == null)
      $.each(data, function(index, item){
      //var s = sym.createChildSymbol( "template", "content");
      s = sym.createChildSymbol( "template", "content" );
      // Creating the variable that save my new instance of mySymbol
      sym.setVariable("itemContainer"+i, s);
      console.log("item container name", s);
      s.$("title").html( item.item );
      s.$("description").html( item.description );
      s.play(index * -500);
      i++;
      //console.log("'dressbtn' inside was CLICKED");
      else
    //Delete button
    for(var p = 1; p <= i; p++)
    s = sym.getVariable("itemContainer"+p);
    s.deleteSymbol();
    i = 1;
    So the two buttons one will get the items from Json and display them, and the other will clear the symbols created.
    But I've only managed to clear the symbols on stage only once, and after that I'm getting Javascript error in event handler! Event Type = element
    The reason is because I'm trying to make an app that can get information off a json file from a webserver and able to update and display the lastest information in the app. So I've to be able to allow the user to press a button to refresh the page.
    Can anyone shine some light on this?
    Dropbox - test.zip

    Hi,
    Your issues (or troubles) come from your json file. Your json file is not well formed.
    Here is a correct one:
    {"shoes":[
    {"item":"red shoe","description":"prada red shoe"},
    {"item":"black shoe","description":"Black canvas shoe"},
    {"item":"tilith shoe","description":"tilith ballet shoe"},
    {"item":"gold shoe","description":"gold ballet shoe"},
    {"item":"ganma shoe","description":"ganma canvas shoe"}
    Then your buttons code:
    1) mybtn.click:
    //get json information and display
    $.getJSON("content.JSON")
      .success( function(data){
      console.log("incoming data: ", data);
      $.each( data.shoes, function(index, item){
      var s = sym.createChildSymbol( "template", "content");
      s.$("title").html( item.item );
      s.$("description").html( item.description );
      s.play(index * -500);
      } );//each
       } );//success
    2) btn_2.click:
    //deleting shoes (symbols)
    var symbols = sym.getChildSymbols();
    $.each(symbols, function(index, item){
      console.log("symbols on stage: ",item.getSymbolTypeName());
      if (item.getSymbolTypeName() == "template") item.deleteSymbol();
    Download link: test-2 - copie.zip - Box

  • How to dynamically replace variables in SMARTFORM texts based on item data?

    Hi experts,
    I'm currently designing a confirmation of order using Adobe PDF forms. The general layout with tables, pictures and texts was not big deal.
    But one tiny bit doesn't work and I'm becoming more and more desperate about it.
    We need various free texts for our pdf form. I created the texts using smartform texts. Some of these texts need to be slightly dynamic, so I added some dynamic fields in it.
    For example:
         "The material is currently out of stock.You can expect shipping around week &num_week&."
    To replace the dynamic field &num_week& in my interface, I read that I have to name the dynamic field exactly like the corresponding field in my interface. In my case this would be now:
         "The material is currently out of stock.You can expect shipping around week &SLS_PRT_COM-ITEM_DETAIL-ZZ_EXTRAFIELDS-ZZWEEKNUM&."
    To see the text on my form, I added a text object with type 'text module' and the proper textname. Of course I'm able to insert text on my form, save and activate it without problems. But if I want to print the form, nothing happens as the print program exits with an error code.
    After some hours I found out that this problem only occurs if I'm trying to replace the dynamic field with a field from the item table. Using a field from head details or globals like sy-mandt works like a charm.
    So my question is: Is it possible to use item data to replace dynamic fields of a smartform text?
    Greetings and thanks in advance!
    André

    Hi
    Have a look at the links below:
    LiveCycle ES2 * Adobe LiveCycle Designer ES2
    Using floating field in Adobe Forms to display text paragraph with dynamic variables in between
    After adding the floating field it will apeare in the hierarchy pallet above or bellow the text field.
    Good luck
    Shai.

  • Get the ID of a dynamically created symbol from library, INSIDE another symbol.

    Hi everyone,
    I'm trying to get the id from a dynamic created symbol from library.
    When dynamically creating the symbol directly on the stage (or composition level), there's no problem.
    But I just can't get it to work when creating the symbol inside another symbol. 
    Below some examples using both "getChildSymbols()" and "aSymbolInstances" 
    // USING "getChildSymbols()" ///////////////////////////////////////////////////////////////////////// 
    // ON THE STAGE 
    var m_item = sym.createChildSymbol("m_item","Stage");
    var symbolChildren = sym.getChildSymbols(); 
    console.log(symbolChildren[0].getSymbolElement().attr('id')); // ok eid_1391853893203
    // INSIDE ANOTHER SYMBOL
    var m_item = sym.createChildSymbol("m_item", sym.getSymbol("holder").getSymbolElement()); 
    var symbolChildren = sym.getSymbol("holder").getChildSymbols(); // Am i using this wrong maybe?
    console.log(symbolChildren.length) // returns 0 so can't get no ID either
    // USING "aSymbolInstances"" ////////////////////////////////////////////////////////////////////////// 
    // ON THE STAGE
    var m_item = sym.createChildSymbol("m_item","Stage"); 
    console.log(sym.aSymbolInstances[0]); // ok (i guess) x.fn.x.init[1] 0: div#eid_1391854141436
    // INSIDE ANOTHER SYMBOL
    var m_item = sym.createChildSymbol("m_item", sym.getSymbol("holder").getSymbolElement());
    console.log(sym.getSymbol("holder").aSymbolInstances[0]); // Javascript error in event handler! Event Type = element 
    In this post http://forums.adobe.com/message/5691824 is written: "mySym.aSymbolInstances will give you an array with all "names" when you create symbols"
    Could it be this only works on the stage/ composition level only and not inside a symbol? 
    The following methods to achieve the same are indeed possible, but i simply DON'T want to use them in this case:
    1) Storing a reference of the created symbol in an array and call it later by index.
    2) Giving the items an ID manually on creation and use document.getElementById() afterwards.
    I can't believe this isn't possible. I am probably missing something here.
    Forgive me I am a newbie using Adobe Edge!
    I really hope someone can help me out here.
    Anyway, thnx in advance people!
    Kind Regards,
    Lester.

    Hi,
    Thanks for the quick response!
    True this is also a possibility. But this method is almost the same of "Giving the items an ID manually on creation and use document.getElementById() afterwards".
    In this way (correct me if i'm wrong) you have to give it an unique ID yourself. In a (very) big project this isn't the most practical way.
    Although I know it is possible.
    Now when Edge creates a symbol dynamically on the Stage (or composition level) or inside another symbol it always gives the symbol an ID like "eid_1391853893203".
    I want to reuse this (unique) ID given by Edge after creation.
    If created on the stage directly you can get this ID very easy. Like this;
    var m_item = sym.createChildSymbol("m_item","Stage");
    var symbolChildren = sym.getChildSymbols(); 
    console.log(symbolChildren[0].getSymbolElement().attr('id')); // ok eid_1391853893203
    I want to do exactly the same when created INSIDE another symbol.
    var m_item = sym.createChildSymbol("m_item", sym.getSymbol("holder").getSymbolElement());
    Now how can I accomplish this? How can I get the Id of a dynamically created symbol INSIDE another symbol instead of created directly on the stage?
    This is what i'm after.
    Thnx in advance!

  • Read Data from the dynamic Field Symbol with key ?

    Dear All,
    I've  2 dynamic internal tables in the form of field symbols.
    Now,I want to loop the item field symbol, read the header field symbol content and then move the corresponding into a final field symbol.
    How to read the field symbol with key ?
    When I'm trying to give the key clause in the paranthesis it's giving a syntax error.
    Any clues ?
    FYI .....
    * Get the Dynamic Field and Value for the Date/Year and convert it into Year value
      LOOP AT <fs_t_son> ASSIGNING <wa_son>.
        ASSIGN COMPONENT gwa_znrows_def-fieldname OF STRUCTURE <wa_son> TO <fs_year>.
        IF sy-subrc = 0.
          CLEAR gv_string.
          MOVE <fs_year> TO gv_string.
          CLEAR gv_year.
          gv_year = gv_string.
          <fs_year> = gv_year.
        ELSE.
    * When the Date/year Field is not in the Table then -->
    * Get the Dynamic Field and Value
          ASSIGN COMPONENT gwa_znrows_def-kfldname OF STRUCTURE <wa_rson> TO <fs_value>.
    * Populate field for Dynamic Where condition
          CLEAR gv_value.
          CONCATENATE '''' <fs_value> '''' INTO gv_value.
          CONCATENATE gwa_znrows_def-kfldname '=' gv_value INTO gt_where SEPARATED BY space.
          APPEND gt_where.
          CLEAR gt_where.
          READ TABLE <fs_t_rson> ASSIGNING <wa_rson> ( gt_where ).  "Key clause
        ENDIF.  " if sy-subrc = 0.  "Assign
      ENDLOOP.
    Thanks & regards,
    Deepu.K

    TYPES: BEGIN OF line,
             col1 TYPE c,
             col2 TYPE c,
           END OF line.
    DATA: wa TYPE line,
          itab TYPE HASHED TABLE OF line WITH UNIQUE KEY col1,
          key(4) TYPE c VALUE 'COL1'.
    FIELD-SYMBOLS <fs> TYPE ANY TABLE.
    ASSIGN itab TO <fs>.
    READ TABLE <fs> WITH TABLE KEY (key) = 'X' INTO wa.
    The internal table itab is assigned to the generic field symbol <fs>, after which it is possible to address the table key of the field symbol dynamically. However, the static address
    READ TABLE <fs> WITH TABLE KEY col1 = 'X' INTO wa.
    is not possible syntactically, since the field symbol does not adopt the key of table itab until runtime. In the program, the type specification ANY TABLE only indicates that <fs> is a table. If the type had been ANY (or no type had been specified at all), even the specific internal table statement READ TABLE <fs>  would not have been possible from a syntax point of view.

  • Dynamic code [i]replacement[/i]

    Hi all,
    I have seen dynamic code replacement used in Tomcat, Eclipse, jEdit, ... but whenever I go to research how to incorporate it into my applications, I just get a bunch of stuff about Erlang, python, and Java ClassLoaders, which if a class is already loaded don't bother reloading it.
    So does anyone know how I can use "Dynamic Code Replacement" not "Dynamic Code Loading"? (I'm doing stuff with Java WebServer Containers)

    IT works a little something like this.
    If you create a classlaoder to load your "replaceable" classes and ensure that your replaceable classes are not in the classpath (or that your classlaoder does not delegate to its parent bit dangerous security wise)). Then your classloader will load your replaceable classes (It will delegate to its parent but its parent will not find them). Then to reload your classes all you have to do is drop all references to your classloader and create a new classloader. It can then load your "repaced" classes.
    Acutally its not quite that simple. If any live references exist to any classes loaded by your classloader then your classloader will not go "out of scope" as those classes will reference the classloader.
    To do it properly takes good design. Take a look at the link RadcliffePike posted for one (pretty complicated) desgin. I believe that tomcat uses trees of classloaders to allow all the weapps to "live" independently of each other while allowing them to use the classes that are in the common/lib directory (shared jar files)
    matfud

Maybe you are looking for

  • 2 iTunes Accounts, 2 computers, multiple iPads/iPhones/iPods

    My wife and I have several iDevices between the two of us, and we currently share one iTunes account.  She recently received an iPad for work, and needs to set up a separate iTunes account that can be linked to her corporate credit card for business

  • Business scenario configuration

    Dear all How to configure in SAP system for the following scenario 1. Client manufactures a huge material where generally it will be make-to-order with assembly or with out assembly and finished product will deliver to the customer site as per the PO

  • Swing popup to close after X seconds

    How to show an another window (a popup or something) in main swing window which will close after about 10 seconds?

  • Trouble uninstalling Adobe CS2 manually

    Hello, I messed up a bit while uninstalling Adobe CS 2 (I accidentally uninstalled a few items manually before trying to use the uninstaller, which then failed to work and disappeared from the workspace). Using the uninstall guide on the CD-rom, I wo

  • Photo app reboots i4

    When I use any photo app my phone reboots. Help