Dynamic cast at runtime (Here we go again! )

Hy folks,
today I read so many entries about dynamic casting. But no one maps to my problem. For a lot of them individual alternatives were found. And so I hope...
Ok, what's my problem?
here simplified:
I have a HashMap with couples of SwingComponents and StringArray[3].
The SwingComponents are stored as Objects (they are all JComponents).
The StringArray comprised "the exact ClassName" (like "JButton" or "JPanel"),
"the method, who would be called" (like "addItemListener")
and "the ListenerName" (like "MouseMotionListener" or "ActionListener")
At compiletime I don't know, what JCommponent gets which Listener.
So a JPanel could add an ItemListener, another JPanel could add
a MouseListener and an ActionListener.
I get the description of the GUI not until runtime.
The 'instanceof'-resolution is not acceptable, because there are above 50 listener. If I write such a class, I would write weeks for it, and it will be enormous.
Now, my question
I get the class of the Listenertype by
Class c=Class.forName(stringArray[2]);
and the method I'll call
java.lang.reflect.Method method=component.getClass().getDeclaredMethod(s[1],classArrayOfTheParameter[]); //the parameter is not important here
And I have a class, who implements all required ListenerInterfaces: EHP
Now I wish something like this
method.invoke((JPanel)jcomponent,(c)EHP);
Is there anybode, who can give me an alternative resolution
without instanceof or switch-case ?
Greatings egosum

I see, your right. Thanks. This problem is been solved.
But a second problem is, that jcomponent can be every Swing-Object.
I get the swing-component as Object from the HashMap . And I know
what it is exactly by a String.
What I need here is
method.invoke(("SwingType")swingcomponentObject,Object[] args);
I know, that this doesn't exist. Here my next question
Can I take an other structure than HashMap, where the return value
is a safety type (and not an Object). Or there are some other hints
about similar problems and there resolutions?
I don't like to write 50 (or even more than 50) "instanceOf"-instructions or "equal"-queries. And I'm not really interested in the whole set of java swing elements existing.
I appreciate all the help I can get.
With regards egosum

Similar Messages

  • Dynamic class casting during runtime

    I'm reading parameters for my application from the configuration file. Then in the code I should dynamically during the runtime make class cast:
    (instead of having String in the code, I should cast the object to the class that was
    defined in the configuration file.)
    String tmp = (String) object;
    Could somebody provide an example how can I do this? I have understood I could use reflection API for this problem.

    I am not sure that I understand what you are asking correctly, but it might be something that bothered me some time ago.
    My problem was that I wrote names of Classes (as Stings) into a file, and later wanted to be able to initialize a specific object of the class based on String names that were read from that file.(sorry if this is confusing).
    I was programing a Chess simulator. All figures were subclasses of the class Figure, and were named Peon, Queen...)
    I wanted to make a new Peon object, for every "Peon" String that was read from the file, and to make an new Queen object for every "Queen" in the file and so on.
    I used something like this:
    String objectName = in.readUTF(); //or some other way to get a String
    Figure f = (Figure) Class.forName(objectName).newInstance(); Class.forName(String name) returns a object of class Class that represents all objects of type name.
    And invoking .newInstance() gives you a new object of the class that is being represented by the object of class Class that you invoked .newInstance() on.
    Sorry - migth be confusing again but i think it is correct.
    This call to .newInstance() calls the default no-argument constructor...
    There is no way to call a argument containing constructor with .newInstance()

  • Dynamic casting

    hello all (happy new year!),
    i am trying to dynamically cast a class that is only known at runtime from the configuration file that is parsed during startup.
    the code is as follows:
    ArrayList classes = new ArrayList();
    ... (parsing)
    classes = JAFSaxParserInstance.getClasses();
    Iterator it = classes.iterator();
    while (it.hasNext())
      Object next = it.next();
      Class appToLoad = Class.forName(next.toString());
      Method instanceMethod = getInstanceMethod(appToLoad);
      Object frame = instanceMethod.invoke(null,null);
      Component[] components = new Component[MAX];
      components = ((UNKNOWN_CLASS) frame).getContentPane().getComponents();
    }without the ability to discover the class from which i have just called a getInstance() method, i seem unable to retrieve all the components of the JFrame subclass (i get a ClassCastException). for my purposes, all of the UNKNOWN_CLASSes will be subclasses of JFrame, but without explicitly being able to cast it (frame) exactly, i cannot extract the components.
    is there any way to dynamically cast such objects at runtime? by this i mean i cannot use switch statements b/c the classes are unknown prior to runtime.
    thanks!

    point well taken. i've probably designed my application wrong if it's this difficult, but let me try to explain what it is i'm trying to do.
    i had previously created a swing application whose central class (bootstrap initialized by a separate class with a main method) is a subclass of JFrame using the GridBagLayout manager. now, since more related gui applications are to be built, i thought it would be nice to build an application framework into which i could insert each standalone application into a JTabbedPane pane of the framework application.
    the application framework has the same structure as my previous application. a bootstrap main method class initializes the main application frame which builds a contentPane which contains a JTabbedPane. as this application framework frame is initializing, it parses an xml file which contains the data pertaining to each class and my DynamicLoader class attempts to load/initialize and add each class into a separate tab in the main application frame. that's where the problem arises since i don't know the exact class that will be loaded--only the xml file contains that information.
    i've read a few things about implementing interfaces in order to get around the inability to cast types at runtime, but am not too sure of how that might work.
    let me know if seeing some more of the code would help or if there's anything i should clarify.
    thanks!

  • My daughter forgot her password and now her ipod touch is disabled.  When I connect it to itunes it does not come up on the screen as a device.  What can I do to get her itouch working again?

    My daughter forget her password and now her ipod touch is disabled.  Red message says to connect to itunes.  When I do connect to itunes, the device is not recognized and then a message comes on the screen that says it is locked and to enter the password to access it.  I cannot access the password and since itunes does not recognize the device, it does not come up on the list on the left, i cannot reset it.  What do I need to do so she can use her ipod touch again?   Thanks

    Place the iOS device in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased.
    iOS: Wrong passcode results in red disabled screen        
    If recovery mode does not work try DFU mode.
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings

  • How to generate a PDF 417 Barcode by assigning a dynamic value at runtime?

    PDF 417 Barcode Description given in the Livecycle Designer 8.2
    : PDF 417 Non-Scriptable Barcode. Value must be assigned to this barcode at design time, and this barcode will not update after form object value changes.
    And my question is how to generate a PDF 417 Barcode by assigning a dynamic value at runtime?

    All the information you described points to the problem that reports seems can't generate to a file which already exist. You can verify that by simply doing
    r30run32 C:\AC_REPORT.REP DESTYPE = FILE DESFORMAT = PDF BATCH = YES' desname=c:\temp\ac_report.pdf
    several times. If first time the report is successfully generated in c:\temp\ac_report.pdf, but not the second, third time, then it looks like there is a bug on reports r30run32 executable.
    You may try to find any latest patch for Reports 3.0 to see if patch can solve you problem. But keep in mind Reports 3.0 is de-supported, you are better to move to 6i or 9i reports.
    Thanks,
    -Shaun

  • How to create dynamic room in runtime execution?

    Hello All,
    Can you please suggest me how can I create dynamic room in runtime execution? I do not want to create fixed room from the room consol. I want to create a new room & also delete it after work complete in runtime execution.
    thanks,
    krish

    Hi Krish,
    If you are using your own server to do ExternalAuthentication, then you can
    user server to server API's to do that. Please refer to Server2Server apps
    in the SDK's sample apps folder.
    Else you might have to use AccountManager with room
    owner credentials. But the Server2Server aprroach is highly recommended.
                    private var acctMgr:AccountManager = new AccountManager();
                    acctMgr.accountURL = m_accountURL;
                    acctMgr.authenticator = authenticator;
                    acctMgr.addEventListener(AccountManagerEvent.LOGIN_SUCCESS, authenticateSuccess);
                    //acctMgr.addEventListener(AccountManagerEvent.LOGIN_FAILURE, authenticateFailure);
                    //acctMgr.addEventListener(AccountManagerEvent.ACCESS_ERROR, onAuthenticationAccessError);
                    public function authenticateSuccess(event:AccountManagerEvent):void {
                       acctMgr.addEventListener(AccountManagerEvent.ROOM_DELETE, onRoomDelete);
                       acctMgr.deleteRoom(name, template);
                    public function onRoomDelete(event:AccountManagerEvent):void {
    Thanks
    Arun

  • Private inheritance and dynamic cast issue

    Hello. I am hitting a problem combining private inheritance and dynamic casting, using Sun Studio 12 (Sun C++ 5.9 SunOS_sparc Patch 124863-01 2007/07/25):
    I have three related classes. Let's call them:
    Handle: The basic Handle class.
    DspHandle. Handle implementation, able to add itself to a Receiver.
    IODriver. Implemented in terms of DspHandle, It is the actually instantiated object.
    Consider the following code. Sorry, but I've tried my best trying to minimize it:
    #include <iostream>
    using namespace std;
    class Handle {
    public:
    virtual ~Handle() {};
    class Receiver {
    public:
    void add(Handle &a);
    class DspHandle : public Handle {
    public:
    virtual ~DspHandle() {};
    void run(Receiver &recv);
    class IODriver : private DspHandle {
    public:
    void start(Receiver &recv) {
    DspHandle::run(recv);
    void DspHandle::run(Receiver &recv) {
    cout << "Calling Receiver::add(" << typeid(this).name() << ")" << endl;
    recv.add(*this);
    void Receiver::add(Handle &a) {
    cout << "Called Receiver::add(" << typeid(&a).name() << ")" << endl;
    DspHandle d = dynamic_cast<DspHandle>(&a);
    cout << "a= " << &a << ", d=" << d << endl;
    int main(int argc, char *argv[]) {
    Receiver recv;
    IODriver c;
    c.start(recv);
    Compiling and running this code with Sun Studio 12:
    CC -o test test.cc
    ./test
    Calling Receiver::add(DspHandle*)
    Called Receiver::add(Handle*)
    a= ffbffd54, d=0
    The dynamic cast in Receiver::add, trying to downcast Handle to DspHandle, fails.
    This same code works, for example with GNU g++ 4.1.3:
    Calling Receiver::add(P9DspHandle)
    Called Receiver::add(P6Handle)
    a= 0xbfe9c898, d=0xbfe9c898
    What is the reason of the dynamic_cast being rejected. Since the pointer is actually a DspHandle* , even when it is part of a private class, shouldn't it be downcastable to DspHandle? I think that perhaps the pointer should be rejected by Receiver::add(Handle &a) as it could be seen as a IODriver, that can't be converted to its private base. But since it's accepted, shouldn't the dynamic_cast work?
    Changing the inheritance of IODriver to public instead of private avoids the error, but it's not an option in my design.
    So, questions: Why is it failing? Any workarround?
    Best wishes.
    Manuel.

    Thanks for your fast answer.
    But could you please provide a deeper answer? I would like to know where do you think the problem is. Shouldn't the reference be accepted by Receiver:add, since it can only be seen as a Handle using its private base, or should the dynamic_cast work?
    Aren't we actually trying to cast to a private base? However, casting to private bases directly uses to be rejected in compile time. Should the *this pointer passed from the DspHandle class to Receiver be considered a pure DspHandle or a IODriver?
    Thanks a lot.

  • Linkification (any version) does not work with FF9.0.1. Here we go again! Same old problem. Why don't you guys develop a permanent fix??!!! Don

    Here we go again. Same old problem with FF updates. FF9.x.x will not allow clickable internet links. They are dead when typed. ALL IE versions have clickable links BUILT IN! Why can't you do it??? Don't blame it on "third party add on incompatiblity." It's not their fault. It is YOUR fault for not including it. Do not blame users either.
    xpi files are not compatible with FF9.x.x even when dragged on to it

    '''''Linkification''''' was not developed by Mozilla.
    *The third party developer appears to have abandoned the Add-on (no longer updates it).
    *The last update available on the Mozilla Firefox Add-ons site ( https://addons.mozilla.org/en-US/firefox/addon/linkification/ ) was made compatible only through Firefox 3.6.x
    *The developer posted version 1.3.9 on his/her own site which was made compatible through Firefox 4
    *'''''Read the comments section on the Add-ons page for suggestions.'''''
    **I would NOT download from another site as you do not know what you might be getting.
    **You can install the following and force compatibility in Add-ons > Extensions
    ***https://addons.mozilla.org/en-US/firefox/addon/add-on-compatibility-reporter/?src=ss
    **Under "Reviews", click "See all ###user reviews". The suggestion ''by marwn098 on November 11, 2011'' is the only one that I would recommend.
    ***Link to that suggestion --> https://addons.mozilla.org/en-US/firefox/addon/linkification/reviews/321220/
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
    Not related to your question, but...
    You may need to update some plug-ins. Check your plug-ins and update as necessary:
    *Plug-in check --> http://www.mozilla.org/en-US/plugincheck/
    *'''''Adobe Shockwave for Director Netscape plug-in''''': [https://support.mozilla.org/en-US/kb/Using%20the%20Shockwave%20plugin%20with%20Firefox#w_installing-shockwave Installing ('''''or Updating''''') the Shockwave plugin with Firefox]
    *Adobe PDF Plug-In For Firefox and Netscape: [https://support.mozilla.org/en-US/kb/Using%20the%20Adobe%20Reader%20plugin%20with%20Firefox#w_installing-and-updating-adobe-reader Installing/Updating Adobe Reader in Firefox]
    *Shockwave Flash (Adobe Flash or Flash): [https://support.mozilla.org/en-US/kb/Managing%20the%20Flash%20plugin#w_updating-flash Updating Flash in Firefox]
    *'''''Next Generation Java Plug-in for Mozilla browsers''''': [https://support.mozilla.org/en-US/kb/Using%20the%20Java%20plugin%20with%20Firefox#w_installing-or-updating-java Installing or Updating Java in Firefox]

  • Dynamic casting of Method.invoke() return

    Can anyone clue me in on how to cast the return of Method.invoke() based on Method.getReturnType() or whatever else might work dynamically....that is without knowing which method until runtime?
    Thanks,
    Brad

    Thanks for helping me get a grip....makes perfect sense, I guess I was just wondering how far you could take the runtime decisions thing.
    Can I say that, ( and it seems obvious but... ), programatic flexibility and runtime decision making can only be taken so far - and has to be made in the context of certain presumptions at compike time.
    I can see that in implementing the:
    <jsp: setParameter name="myBean" property="*" />
    Presumptions are made that the values passed to
    the bean setter methods will be String objects and that the
    values returned from the:getter methods using:
    <jsp: getProperty name="myBean" property="whaterver" />
    will also be String objects.
    Reality check?
    Thanks again,
    Brad

  • Create dynamic table at runtime and bind it with ViewObject

    Hi everyone.
    I have the following task.
    I need to create a multiple ViewObjects at runtime (using different constructed sql queries) and then bind ViewObjects with created (also in runtime) tables.
    Tables are to be created on PanelTabbed component. Each tab contains one table.
    So the problem - is there a way to perform this task?
    A portion of code:
    ApplicationModule am = ADFUtils.getApplicationModule("AppModule");
    ViewObjectImpl vo = null;
    if (am.findViewObject("SQLVo") != null)
    am.findViewObject("SQLVo").remove();
    System.out.println("object removed!");
    vo = am.createViewObjectFromQueryStmt("vo", "select ...");
    RichTable newTable = new RichTable();
    newTable.setVar("row");
    newTable.setVarStatus("rowStat");
    RichShowDetailItem newDetItem = new RichShowDetailItem();
    newDetItem.setText("New Detail");
    newTable.setInlineStyle("width:100%;height:180px");
    newTable.setRowSelection("single");
    DCBindingContainer dcBindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    String iterBindingName = vo.getName() + "Iterator";
    JUIteratorBinding iterBinding =
    (JUIteratorBinding)dcBindings.findIteratorBinding(iterBindingName);
    if (iterBinding != null) {
    dcBindings.removeIteratorBinding(iterBindingName);
    BindingContext bcc = (BindingContext)JSFUtils.resolveExpression("#{data}");
    iterBinding =
    new JUIteratorBinding(bcc.findDataControl("AppModuleDataControl"), vo);
    String ctrlBindingName = vo.getName() + "Binding";
    FacesCtrlHierBinding clonedHierBinding =
    (FacesCtrlHierBinding)dcBindings.findCtrlBinding(ctrlBindingName);
    if (clonedHierBinding != null) {
    dcBindings.removeControlBinding(ctrlBindingName);
    =======================================
    Please, look here!
    What's the best practices to create a new FacesCtrlHierBinding?
    What a parameter _nodeBindings (type JUCtrlHierTypeBinding[]) should be?
    =======================================
    clonedHierBinding =
    new FacesCtrlHierBinding(null,
    iterBinding,
    new String[]{
    "BUILDING_ID"
    // "BUILD_NAME",
    // "FUNCTIONALITY_NAME",
    // "CITY_NAME",
    // "STREET_NAME",
    // "FLOORS"
    _nodeBindings
    dcBindings.addControlBinding(ctrlBindingName, clonedHierBinding);
    newTable.setValue(clonedHierBinding.getCollectionModel());
    for (int g=0; g < vo.getAttributeCount(); g++){
    RichColumn col = new RichColumn();
    col.setId("c" + Integer.toString(g));
    col.setHeaderText(vo.getAttributeDef(g).getProperty(AttributeHints.ATTRIBUTE_LABEL).toString());
    ValueExpression valExp =
    facesContext.getApplication().getExpressionFactory().createValueExpression(facesContext.getELContext(),
    "#{row." + vo.getAttributeDef(g).getName() + "}",String.class);
    RichOutputText text = new RichOutputText();
    text.setId(vo.getAttributeDef(g).getName() + "txt");
    text.setValueExpression("value", valExp);
    col.getChildren().add(text);
    newTable.getChildren().add(col);
    newDetItem.getChildren().add(newTable);
    myBean.panelTabbed.getChildren().add(newDetItem);
    ...

    Shay, good day!
    You answer is good, but - it use only one dynamic view (and one table, iterator and FacesModel).
    I have task like topic started have - i need to create some unknows numbers of ViewObject (created by demad) and i must have a FacesModel for each created ViewObject.
    How can we do it?

  • Dynamic radio button fields do not display again after form is saved

    Hello,
    I have a group of radio button questions within a dynamic form that display additional questions based on the answer.
    So for the question "Is there a basement?" if the user indicates yes, there is a basement, additional questions are displayed to gather more information about the basement. If the user indicates no, then those questions do not appear.
    Everything works beautifully in the form. However, when the form is saved and then re-opened, the additional questions do not appear in the form. So the structure goes from this:
    To this:
    The users must toggle the radio buttons to make those questions reappear...and when they do reappear, they have maintained whatever answer the user indicated before saving.
    I'm not sure why this is happening...does anyone have any advice?
    Thank you,
    Theresa

    Hi,
    Thanks so much for your response! I am using Designer 8.2.1.
    I just played around with more of my form...this seems to happen whenever I am working with a hidden subform that is displayed when the user clicks a button (or selects the appropriate radio button). I have a couple of other places within my form where this occurs.
    Here is an example of the script on one of those buttons:
    var intNewIndex = form1.construction_type.const_type_repeat.instanceManager.count-1; 
    form1.construction_type.resolveNode("const_type_repeat[" + intNewIndex + "]").percentage.presence="visible";
    const_type_repeat.instanceManager.addInstance(true);
    The script on the radio button is:
    if (basementyes.rawValue == 4){secondwd.sump.presence ="visible"
      secondwd.sumpradio.sumpyes.presence ="visible"
      secondwd.sumpradio.sumpno.presence ="visible"
    else {secondwd.sump.presence = "hidden"
      secondwd.sumpradio.sumpyes.presence = "hidden"
      secondwd.sumpradio.sumpno.presence ="hidden"
    I am pretty new at this so it might be something obvious...thanks again for your help!

  • Content Presenter | Dynamic Queries at runtime ??

    Hello All,
    We have a use case where we need to build a dynamic query as part of our content presenter task flows. We have been able to achieve this for pages created at design time (in JDeveloper) using the CMIS queries and EL. The following excerpt from a page def file will tell you how we achieved this.
    <parameter id="datasourceType" value="${'dsTypeQueryExpression'}"/>
    <parameter id="datasource"
    value="${'SELECT * FROM ora:t:IDC:GlobalProfile WHERE ora:p:xRegionDefinition = \'RD_TRAINING\' and ora:p:xLanguage=\''}${langBean.selectedLang}${'\''}"/>
    This works as expected.
    Now we are trying to achieve the same behavior for content presenter task flows added to pages at run time.
    We selected "Data Source" as "Result of a query", but we are not able to evaluate an EL under the "Additional Query Filters" section. We have to give hard coded strings for these filters to work.
    Any idea how we can create a "dynamic" content presenter at run time??
    Thanks,
    Prashant

    Hi Yannick,
    I think I wasn't clear with my problem statement. Let me try again.
    When I give the EL in the pageDef, the page works as expected at run time.....no issues here. Maybe if I encounter the bug that you mention, I will use the workaround ...thanks for this.
    The problem I am facing is when I add a content presenter task flow to a page at run time and try to configure it (using the 3 step wizard ...select content ....set content source as ‘Result of a query’ ...select template...preview)
    How do I give something dynamic here in my query? EL's are not getting evaluated here.
    Regards,
    Prashant

  • How to assign dynamic image at runtime or on Button Action to a Image UI

    Hi,
         Please let me know is it possible to assign Dynamic Images to Image UI element in a Visual Composer applications. Using Image Manager it is possible, but in my case Image Source i.e URL comes from ABAP RFC, so is it possible to assign Image at runtime.
        Please do let me know is it possible or not, If yes please do share your opinions.
    I am able to show image using HTML Page by passing URL at runtime to HTML page but here, I cant control the Image width & height.
       I am checking for possibility of using some script to manage width & height.
       Thanks a Ton.
    Regards
    Tushar

    Hi,
         Any inputs for the Query? Atleast, If I get some hint, will do to proceed....
    Regards
    Tushar Shinde

  • Problem during dynamic casting

    Hi Guys,
    Need you help
    Situation is like this �.I have a function which accept the Sting parameter
    Which is actually a full name of class �.using reflection I created the class and object
    Now I want to cast this newly created object to their original class type
    Code is somehow like this
    Public void checkThis (String name) throws Exception{
    Class c = Class.forName(name.trim());
    Object o = c.newInstance();     
    System.out.println(" class name = " + c.getName());
    throw ()o; //// here I want to cast this object to their orginal class type
    I tried throw (c.getName())o;
    But it is not working
    }

    You are trying to do the impossible, for example, this just doesn't work:
    String classname = ...
    Class cls = Class.forName(classname);
    Object obj = cls.newInstance();
    classname x = (classname) obj; //??? There is no way to name this legal syntax!Solution: you must statically know an interface or superclass for the dynamic class:
    Runnable r = (Runnable) obj;
    new Thread(r).start(); //etcOr work with the Object reference, using reflection to apply methods, etc.
    Message was edited by:
    DrLaszloJamf

  • Create Dynamic Structure at Runtime via ALV-Methods!

    Hi Experts,
    i try to create at the ABAP Runtime a new Structure.
    FOR EXAMPLE: I have a internal Table "database" and i dont know their Structure or Typ.
    MY Question: How can i get the structuretype for this internal Table "database" ??
                                    I thought that it is possible with ALV-Methods, but i dont find the right way.
    First Step:       I must get the structure of this internal Table.
    Second Step: I must create a workarea/ line of this internal Table, that i can work row for row with the table.
    Have someone an code example for me, because iám very confused about this Problem.
    With kind regards.
    Ersin Tosun

    Hello,
    For this specific requirement, SAP has provided RTTI class.
    Below is a code snippet for your ready reference. In this example we're trying to get the structure of the dynamic table <ITAB> whose structure is not defined till run-time.
    TYPE-POOLS: abap.
    PARAMETERS: p_table TYPE tabname.
    DATA: dref TYPE REF TO data.
    FIELD-SYMBOLS <itab> TYPE STANDARD TABLE.
    CREATE DATA dref TYPE STANDARD TABLE OF (p_table).
    ASSIGN dref->* TO <itab>.
    DATA: go_tab_descr TYPE REF TO cl_abap_tabledescr,
          go_struc_descr TYPE REF TO cl_abap_structdescr,
          wa_comp TYPE abap_compdescr.
    go_tab_descr ?= cl_abap_tabledescr=>describe_by_data( <itab> ).
    CHECK sy-subrc = 0.
    go_struc_descr ?= go_tab_descr->get_table_line_type( ).
    LOOP AT go_struc_descr->components INTO wa_comp.
      WRITE: / wa_comp-name.
    ENDLOOP.
    I must create a workarea/ line of this internal Table, that i can work row for row with the table.
    Sorry i missed the Step 2:
    FIELD-SYMBOLS: <itab> TYPE STANDARD TABLE,
                   <wa> TYPE ANY,
                   <val> TYPE ANY.
    LOOP AT <itab> ASSIGNING <wa>.
      LOOP AT go_struc_descr->components INTO wa_comp.
    *   To access the components of the structure dynamically
        ASSIGN COMPONENT wa_comp-name OF STRUCTURE <wa> TO <val>.
      ENDLOOP.
    ENDLOOP.
    BR,
    Suhas
    Edited by: Suhas Saha on Nov 18, 2010 7:26 PM

Maybe you are looking for

  • How can we sort up currency field in alv grid??

    Hi GUrus, Can any one suggest me how to sort the currency field in alv grid...Please help me out of this issue.. Thanks in advance!!! regards, Kranthi.

  • How to stop iphone 4s from putting a space after the second digit, when entering a text number from the keypad

    How do I stop the iphone 4s from putting a space after the second digit, when entering a text number from the keypad. Entering a text number on the key pad like 61998 comes out on the screen as 61 998 and the sms fails to go.

  • Re: Fail to recover the cisco ios 3560

    Dear Stephen, yesterday i was succeeded to upgrade the flash. after the upgradtion it gives me a message File "xmodem:" successfully copied to "flash:c3560-ipbase-mz.122-25.SEB4.bin" !--- If the Xmodem file transfer fails for some reason, restart the

  • Having trouble installing Final cut pro from Final cut studio 2

    hi, I have just recently got a new mac pro and first installed Logic Studio and all it's components. I just tried to install Final cut studio 2 and all it's components. I was able to install most of the components - Live type, cinema tools etc but no

  • Creativ Zen Dead Fore

    Well after 3 months whit my Creativ Zen 8gb. It have been dead for 2 days. It frezzed on a file transfer when i moved files into my player. It was still giving away the blue light but was unable to start it or enter the rescure/recovery mode. So i us