ABAP: Create UI element dynamically

Hello,
I have a need create a UI element (dropDown, inputField, etc.) dynamically.
How would I approach this problem? What classes correspond to this?
Thank you.

This topic has been covered quite nicely in a series of weblogs by Thomas Szuecs:
/people/thomas.szcs/blog/2005/12/28/dynamic-programming-in-web-dynpro-abap--introduction-and-part-i-understanding-ui-elements
/people/thomas.szcs/blog/2006/01/03/dynamic-programming-in-web-dynpro-abap--part-ii-handling-viewelements
/people/thomas.szcs/blog/2006/02/22/dynamic-programming-in-web-dynpro-abap--part-iii-aggregations-and-ddic-binding-of-viewelements

Similar Messages

  • How to create Invisible Element Dynamically?

    Dear All,
    I am trying to create a Form dynamically and for aligment prupose i need to create one InvisbleElement also dynamically.But i dont know why that is not reflecting in the Screen .The code is deploying properly without error but the Invisible Element is not getting created .The code i used is
    IWDInvisibleElement Invis1=(IWDInvisibleElement)view.createElement(IWDInvisibleElement.class,null);
    Invis1.setEnabled(true);
    Invis1.setVisible(WDVisibility.VISIBLE);
    thetransparent.addChild(Invis1);
    Can anyone please tell me if i need to set any property or if the method i am creating is wrong .Please guide me in the correct way.
    Thanks and Regards,
    Nishita Salver

    Hi,
    check "Dynamic Programming" part in below library file
    http://help.sap.com/saphelp_nw70/helpdata/EN/0f/f08841e3af1609e10000000a155106/frameset.htm
    or else,
    still you are getting Problem, create any other ui element and set its visibility to false. (dont know how far it will help you)
    regards,
    Pradeep
    Edited by: pradeep bondla on Jun 25, 2008 3:20 PM

  • Create multiple elements dynamically at one time

    Hi,
    I need to create some links dynamically.
    Below is my code... but I need to know instead of multiple steps.. is there a way to create dynamic elements together using one method itself....  or once i create the elements can i embed all these links together in the view?
      lr_lta = cl_wd_link_to_action=>new_link_to_action(
      id = 'LNK_CREATE'
      on_action = 'ON_NAVIGATE'
      text = 'Create'
      view = lr_view ).
      cl_wd_matrix_data=>new_matrix_data( element = lr_lta ).
      lr_container->add_child( the_child = lr_lta ).
      lr_lta = cl_wd_link_to_action=>new_link_to_action(
      id = 'LNK_HISTORY'
      on_action = 'ON_NAVIGATE'
      text = 'Hitory'
      view = lr_view ).
      cl_wd_matrix_data=>new_matrix_data( element = lr_lta ).
      lr_container->add_child( the_child = lr_lta ).
    Any help will be grateful.
    Regards and Thanks
    Tenzin

    Hi,
    This is a sample code for doing it using loop.
    I just refined the code to make it most amenable to your requirement.
    The code gives two different links at the same time with two different actions.
    method WDDOMODIFYVIEW .
    IF first_time eq abap_true.
    data lr_ref type ref to cl_wd_link_to_action.
    data lr_cont_ref type ref to cl_wd_uielement_container.
    data lr_layo_ref type ref to cl_wd_flow_data.
    data lv_times type i value 2.
    data lv_count type i value 1.
    lr_cont_ref ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
    do lv_times times. "decide how many times you want the link
    case lv_count.     "decide what link to action with what action should be defined
    when 1.
    CALL METHOD cl_wd_link_to_action=>new_link_to_action
       EXPORTING
         enabled             = ABAP_TRUE
         image_first         = ABAP_TRUE
         on_action           = 'First_Action'
         text                = 'First Link' "to display 'Gangtok' when clicked
       receiving
         control             = lr_ref
       CALL METHOD cl_wd_flow_data=>new_flow_data
       EXPORTING
         element                = lr_ref
       receiving
         control                = lr_layo_ref
    CALL METHOD lr_cont_ref->add_child
      EXPORTING
        index     = 1   "this is to set link to action in first place
        the_child = lr_ref
    When 2.
      CALL METHOD cl_wd_link_to_action=>new_link_to_action
       EXPORTING
         enabled             = ABAP_TRUE
         image_first         = ABAP_TRUE
         on_action           = 'Second_Action' "to display 'Kolkata' when clicked
         text                = 'Second Link'
       receiving
         control             = lr_ref
      CALL METHOD cl_wd_flow_data=>new_flow_data
       EXPORTING
         element                = lr_ref
       receiving
         control                = lr_layo_ref
    CALL METHOD lr_cont_ref->add_child
      EXPORTING
        index     = 2   "this is to set the link to action in 2nd place
        the_child = lr_ref
    endcase.
    lv_count = lv_count + 1.
    enddo.
    endif.
    endmethod.
    Regards,
    Prosenjit.
    Edited by: prosenjit chaudhuri on Feb 16, 2009 12:48 PM

  • Create UI elements dynamically in AppleScript Studio?

    I'd like to create an applescript studio app that can create UI elements (radio buttons, checkboxes, etc) dynamically based on certain other criteria. I've been writing applescripts for a while but am somewhat new to applescript studio, so I don't know where to look for this, other than here. Any help would be greatly appreciated.

    that's what I thought. Unfortunately I'd like to have the ability to have no prior knowledge of what UI elements are needed, and call them into being at any time. So I'm gonna infer that that just isn't possible.
    Related question: can I set up a UI element, let's say a checkbox, and dynamically tell the UI element how many checkboxes I need and what their names/values should be? Or once again do I need to have prior knowlege of how many checkboxes I need?

  • Creating text elements dynamically by program

    Hi all,
    Do you know how I can create text symbols or selection texts dynamically by program? (calling a FM or editing a table?)
    What's the table for text elements?
    Thanks in advance,
    Mathieu

    Hi,
    Not sure of FM. But programically u can do.
    Check the statement
    INSERT TEXTPOOL PROGRAM FROM TAB LANGUAGE
    SY-LANGU.
    This creates the text elements in the specifies program and in specified language.
    Not only text elements but also list headings u can create.
    Check below sample code given by SAP.
    DATA: PROGRAM(8) VALUE 'PROGRAM',
          TAB LIKE TEXTPOOL OCCURS 50 WITH HEADER LINE.
    TAB-ID = 'T'. TAB-KEY = SPACE.  TAB-ENTRY = 'Sales'.
    APPEND TAB.
    TAB-ID = 'I'. TAB-KEY = '200'.  TAB-ENTRY = 'Tax'.
    APPEND TAB.
    TAB-ID = 'H'. TAB-KEY = '001'.  TAB-ENTRY = 'Name   Age'.
    APPEND TAB.
    TAB-ID = 'S'. TAB-KEY = 'CUST'. TAB-ENTRY = 'Customer'.
    APPEND TAB.
    TAB-ID = 'R'. TAB-KEY = SPACE.  TAB-ENTRY = 'Test program'.
    APPEND TAB.
    SORT TAB BY ID KEY.
    INSERT TEXTPOOL PROGRAM FROM TAB LANGUAGE SY-LANGU.
    eg:TAB-ID = 'I'.                 For Text elements
    TAB-KEY = '200'.             Text element number
    TAB-ENTRY = 'Tax'.        Actual text
    But use it only for new developments. Bucause it may overwrite the existing texts.
    Thanks,
    Vinod.
    Edited by: Vinod Reddy Vemuru on Aug 8, 2008 2:48 PM

  • Hiding an UI element dynamically in webdynpro ABAP

    Hi Gurus,
      I want to hide a Interactive form UI element dynamically at run time. Please let us know how to proceed with this and provide the code for this, which will be helpful.
    Thanks
    Rahul

    hi ,
    bind the VISIBLE property of the UI element with  a context attribute created in the CONTEXT tab. This context attribute should be of type WDUI_VISIBILITY
    u can refer this code
    wd_context->set_attribute( name = '<attribute name>' value = if_wdl_core=>visibility_visible )." to make it visible.
    wd_context->set_attribute( name = '<attribute name>' value = if_wdl_core=>visibility_none ). "to make it invisible
    regards,
    Amit

  • Prob in displaying the dynamically created ui elements on click of a button

    hi all
    i created 1 inputfield, 2 buttons & i wrote the following code in wddomodifyview() of view.
    IWDInputField inf1=(IWDInputField)view.createElement(IWDInputField.class,"inf1");
        inf1.bindValue("Student.name");
        IWDButton but1=(IWDButton)view.createElement(IWDButton.class,"button1");
        but1.setText("Button1");
        IWDButton but2=(IWDButton)view.createElement(IWDButton.class,"button2");
        but2.setText("Button2");
        IWDTransparentContainer tc=(IWDTransparentContainer)view.getElement("TransparentContainer");
         tc.addChild(inf1);
        tc.addChild(but1);
        tc.addChild(but2);
         IWDButton button1= (IWDButton) view.getElement("button1");
         IWDAction theAction=wdThis.wdCreateAction(IPrivateDynCompView.WDActionEventHandler.DISPLAY,"");
                        but1.setOnAction(theAction);
                             IWDParameterMapping bm1 = button1.mappingOfOnAction();
                             bm1.addParameter("id", "b1");
                   IWDButton button2= (IWDButton) view.getElement("button2");
                   IWDParameterMapping bm2 = button1.mappingOfOnAction();
                   bm1.addParameter("id", "b2");
    and i wrote the following code in onactiondisplay()
    if (id.equals("b1"))
         wdContext.currentStudentElement().setName("First Button Clicked");
         else
         wdContext.currentStudentElement().setName("Second Button Clicked");
    when i run the application, the following error is displaying.....
    The initial exception that caused the request to fail, was:
       com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: View: Cannot add element with duplicate ID "inf1" of type com.sap.tc.webdynpro.clientserver.uielib.standard.impl.InputField
        at com.sap.tc.webdynpro.progmodel.view.View.addElement(View.java:481)
        at com.sap.tc.webdynpro.progmodel.view.ViewElement.<init>(ViewElement.java:43)
        at com.sap.tc.webdynpro.progmodel.view.UIElement.<init>(UIElement.java:188)
        at com.sap.tc.webdynpro.clientserver.uielib.standard.impl.AbstractInputField.<init>(AbstractInputField.java:143)
        at com.sap.tc.webdynpro.clientserver.uielib.standard.impl.InputField.<init>(InputField.java:71)
        ... 35 more
    com.sap.tc.webdynpro.services.exceptions.WDCreationFailedException: Cannot create view element implementation com.sap.tc.webdynpro.clientserver.uielib.standard.impl.InputField
         at com.sap.tc.webdynpro.progmodel.view.ViewElementFactory.createElement(ViewElementFactory.java:75)
         at com.sap.tc.webdynpro.progmodel.view.View.createElement(View.java:89)
         at com.sap.dynactions.DynCompView.wdDoModifyView(DynCompView.java:140)
         at com.sap.dynactions.wdp.InternalDynCompView.wdDoModifyView(InternalDynCompView.java:240)
         at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.doModifyView(DelegatingView.java:78)
         at com.sap.tc.webdynpro.progmodel.view.View.modifyView(View.java:190)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.doModifyView(ClientComponent.java:398)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.modifyView(ClientApplication.java:679)
         at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.handleActionEvent(WebDynproMainTask.java:381)
         at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:649)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:59)
         at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:248)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:154)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:116)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:55)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:95)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:160)
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
         at com.sap.tc.webdynpro.progmodel.view.ViewElementFactory.createElement(ViewElementFactory.java:65)
         ... 30 more
    Caused by: com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: View: Cannot add element with duplicate ID "inf1" of type com.sap.tc.webdynpro.clientserver.uielib.standard.impl.InputField
         at com.sap.tc.webdynpro.progmodel.view.View.addElement(View.java:481)
         at com.sap.tc.webdynpro.progmodel.view.ViewElement.<init>(ViewElement.java:43)
         at com.sap.tc.webdynpro.progmodel.view.UIElement.<init>(UIElement.java:188)
         at com.sap.tc.webdynpro.clientserver.uielib.standard.impl.AbstractInputField.<init>(AbstractInputField.java:143)
         at com.sap.tc.webdynpro.clientserver.uielib.standard.impl.InputField.<init>(InputField.java:71)
         ... 35 more
    pls tell me how to run this application without errors.....
    thanks & regards,
    vila.

    Hi Vila,
    Issue here is you are trying to create Input field with already used id "inf1" in first line of code
    IWDInputField inf1=(IWDInputField)view.createElement(IWDInputField.class,"inf1");
    Please change it to
    IWDInputField inf1=(IWDInputField)view.createElement(IWDInputField.class,"inf2");
    and correspondingly line
    tc.addChild(inf2);
    Your code will work.
    Please note that you should follow....following code style in wdDoModifyview
    if(firstTime)
    //dynamic view elements creation

  • ABAP to XML Transformation Dynamic Element Generation

    Hi all,
    I have created a deep structure and used simple transformation in XSLT Tool to create XML file. But I would like to generate some elements dynamically. Desired XML output is in the attachments.
    There is a way to do that if had used XSLT Program instead of simple transformation (dynamic xml nodes using xslt - Stack Overflow) but XSLT Program does not create fields from structures automatically like simple transformation.
    So, is there any way to do that using simple transformation ?
    Thanks.

    The error is related to your web browser software or release, because it can't support utf-16 xml file (for example, IE 6 doesn't support it).
    Your output file contains <?xml version="1.0" encoding="utf-16"?> in your ECC 6 system because your SAP system is Unicode, and you used a variable of character type behind RESULT XML. When it's character, SAP converts the XML into SAP code page. If you use a byte type behind RESULT XML, SAP doesn't convert, and you'll get the XML data in the encoding of the transformation (defined here: <xsl:output encoding="ISO-8859-1" ...).
    I guess you have choosen ISO-8859-1 because your 4.7 system issued a file with that encoding.
    So, the only thing you have to do, in the call transformation statement, is to store the result into a table of X255 (instead of table of CHAR2048).
    Edited by: Sandra Rossi on Jul 6, 2010 4:14 PM CET:
    You must also download using filetype = 'BIN'

  • How to create an UI element dynamically on action in drop down?

    Hi,
    How to create an UI element dynamically on action of selecting a value from the  drop down?
    help out with the steps i need to follow..

    Hi,
    <u><i><b>Dynamic UI Element creation</b></i></u>
    We can create it only in the WD Modify View.
    Get the instance for the Root UI Element Container.
    Create the UI element Ex: Input Field, Text View etc.
    Bind the UI Element to the Attribute Value.
    Now bind the UI Element to the Root UI Element Container.
              IWDTransparentContainer root =(IWDTransparentContainer)view.getRootElement();
              IWDDropdownByIndex DdbName = (IWDDropdownByIndex)view.createElement(IWDDropdownByIndex.class,"DdbName");
              IWDDropdownByIndex DdbAge = (IWDDropdownByIndex)view.createElement(IWDDropdownByIndex.class,"DdbAge");
              IWDDropdownByIndex DdbGender = (IWDDropdownByIndex)view.createElement(IWDDropdownByIndex.class,"DdbGender");
              IWDNode Mad =wdContext.getChildNode("Person",0);
              IWDAttributeInfo NameAtt = Mad.getNodeInfo().getAttribute("Name");
              IWDAttributeInfo AgeAtt = Mad.getNodeInfo().getAttribute("Age");
              IWDAttributeInfo GenderAtt = Mad.getNodeInfo().getAttribute("Gender");
              DdbName.bindValue(NameAtt);
              DdbAge.bindValue(AgeAtt);
              DdbGender.bindValue(GenderAtt);
              root.addChild(DdbName);     
              root.addChild(DdbAge);
              root.addChild(DdbGender);
    <u><i><b>Dynamic Action Creation</b></i></u>
    Create the Action in the Action tab.
    Create a Button.
    Get the reference for the created action (Through the Event Handler).
    Bind the Action to the Button.
    Bind the Button to the Root UI element Container.
    IWDButton ButGo = (IWDButton)view.createElement(IWDButton.class,"ButGo");
    IWDAction ActGo = wdThis.wdCreateAction(IPrivateStartView.WDActionEventHandler.GO,"Click");
    ButGo.setOnAction(ActGo);
    root.addChild(ButGo);
    Now write the required code for the Event Handler that is associated with the Action.
    //@@begin onActionGo(ServerEvent)
        IWDNode Mad = wdContext.getChildNode("Person",0);
         wdComponentAPI.getMessageManager().reportSuccess(Mad.getCurrentElement().getAttributeAsText("Name"));
         wdComponentAPI.getMessageManager().reportSuccess(Mad.getCurrentElement().getAttributeAsText("Age"));
         wdComponentAPI.getMessageManager().reportSuccess(Mad.getCurrentElement().getAttributeAsText("Gender"));
    //@@end
    Regards
    SURYA

  • How to create internal table dynamically based on a table entry

    hi Experts,
      I have table yprod_cat. It has product categories.
      In my ABAP program I need to create internal table dynamically based on the number of entries in the table.
      For example:
      If the table has 3 entries for product category
      1. Board
      2. Micro
      3. Syst
    Then create three (3) internal tables.
    i_board
    i_micro
    i_syst
    How can we do this? Any sample code will be very usefull
    Thanks & Regards
    Gopal
    Moderator Message: No sample codes can be given. Please search for them or work it!
    Edited by: kishan P on Jan 19, 2011 4:22 PM

    Our APEX version is 4.2We are using below SQL query to display radio groups dynamically..
    SELECT APEX_ITEM.RADIOGROUP (1,deptno,'20',dname) dt
    FROM dept
    ORDER BY 1;
    Created a form using SQL type and given abouve SQL query as source.. But when we run the page, there were no radio groups displayed in the page..
    Below is the output of the query..
    <input type="radio" name="f01" value="10" />ACCOUNTING
    <input type="radio" name="f01" value="20" checked="checked" />RESEARCH
    <input type="radio" name="f01" value="30" />SALES
    <input type="radio" name="f01" value="40" />OPERATIONS
    >
    If Tabular Form:
    Edit Region > Report Attributes > Edit Column > Change the Column type to "Standard Report Column"
    If normal Page Item:
    Edit Page Item > Security > Escape special characters=No.
    Pl read the help on that page item to understand the security risk associated with =NO.
    Cheers,
    Edited by: Prabodh on Dec 3, 2012 5:59 PM

  • How to create  some columns dynamically in the report designer depending upon the input selection

    Post Author: ekta
    CA Forum: Crystal Reports
    how  to create  some columns dynamically in the report designer depending upon the input selection 
    how  export  this dynamic  report in (pdf , xls,doc and rtf format)
    report format is as below:
    Element Codes
    1
    16
    14
    11
    19
    10
    2
    3
    Employee nos.
    Employee Name
    Normal
    RDO
    WC
    Breveavement
    LWOP
    Sick
    Carers leave
    AL
    O/T 1.5
    O/T 2.0
    Total Hours
    000004
    PHAN , Hanh Huynh
    68.40
    7.60
    76.00
    000010
    I , Jungue
    68.40
    7.60
    2.00
    5.00
    76.00
    000022
    GARFINKEL , Hersch
    66.30
    7.60
    2.10
    76.00
    In the above report first column and the last columns are fixed and the other columns are dynamic depending upon the input selection:
    if input selection is Normal and RDO then only 2 columns w'd be created and the other 2 fixed columns.
    Can anybody help me how do I design such report....
    Thanks

    Hi Developer life,
    According to your description that you want to dynamically increase and decrease the numbers of the columns in the table, right?
    As Jason A Long mentioned that we can use the matrix to do this and put the year field in the column group, amount fields(Numric  values) in the details,  add  an filter to filter the data base on this column group, but if
    the data in the DB not suitable to add to the matrix directly, you can use the unpivot function to turn the column name of year to a single row and then you can add it in the column group.
    If there are too many columns in the column group, it will fit the page size automatically and display the extra columns in the next page.
    Similar threads with details steps for your reference:
    https://social.technet.microsoft.com/Forums/en-US/339965a1-8cca-41d8-83ef-c2548050799a/ssrs-dataset-column-metadata-dynamic-update?forum=sqlreportings 
    If your still have any problem, please try to provide us more details information, such as the data structure in the DB and the table structure you are currently designing.
    Any question, please feel free to let me know.
    Best Regards
    Vicky Liu

  • Xsl:element: generate name of element dynamic

    Hi everybody,
    in the target structure I have to create elements dynamically.
    But this does not work:
         <xsl:template name="process-message">
              <!-- params: pattern, role -->
              <xsl:variable name="ELEMENTNAME">
              <xsl:value-of select="anyNode"/>
              </xsl:variable>
              <xsl:element name="($ELEMENTNAME)"> // HERE IS THE ERROR
                   <xsl:apply-templates mode="text"/>
              </xsl:element>
         </xsl:template>
    Any ideas?
    Regards Mario

    Hi Prateek,
    thanks.
    Does not work.
    Regards Mario

  • Create Radio button dynamically in Table column.

    HI All
       I have used following code to create radio button dynamically. but it's getting dump saying that Could not find attribute STATUS. 
    Here STATUS is the attribute of the node in View context. But why this dump is coming. 
    Please correct me if any thing worng.
      DATA: lr_radio TYPE REF TO cl_wd_radiobutton.
      DATA: lr_containr TYPE REF TO cl_wd_transparent_container.
      DATA: lr_data TYPE REF TO cl_wd_flow_data.
      IF first_time = abap_true.
        lr_containr ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
        lr_radio = cl_wd_radiobutton=>new_radiobutton(
        view = view
        id = 'RADIO'
        text = 'Enroll'
        bind_selected_key = 'STATUS'
        key_to_select = 'STATUS' ).
        lr_data = cl_wd_flow_data=>new_flow_data( element = lr_radio ).
        lr_radio->set_layout_data( lr_data ).
        lr_containr->add_child( lr_radio ).
      ENDIF.
    Thank you very much
    Ram

    Hi Rama,
    I solved it.check this code.
    i think u did mistake in creating radio button you are not passing the 
    BIND_KEY_TO_SELECT
      instead you are passing KEY_TO_SELECT.
    data:lr_column2 type ref to cl_wd_table_column,
         lr_radio type ref to cl_wd_radiobutton.
       lr_column2 = obj_table->get_column(
                   id         = 'TABLE1_PLANETYPE'
    *              INDEX      = INDEX
    lr_radio = cl_wd_radiobutton=>new_radiobutton(
    *      BIND_ENABLED        = BIND_ENABLED
           BIND_KEY_TO_SELECT  = 'STATUS'
    *      BIND_KEY_VISIBLE    = BIND_KEY_VISIBLE
    *      BIND_READ_ONLY      = BIND_READ_ONLY
           bind_selected_key   = 'STATUS'
    *      BIND_STATE          = BIND_STATE
    *      BIND_TEXT           = BIND_TEXT
    *      BIND_TEXT_DIRECTION = BIND_TEXT_DIRECTION
    *      BIND_TOOLTIP        = BIND_TOOLTIP
    *      BIND_VISIBLE        = BIND_VISIBLE
    *      ENABLED             = ABAP_TRUE
    *      EXPLANATION         = EXPLANATION
           ID                  = 'RAD1'
    *      KEY_TO_SELECT       = KEY_TO_SELECT
    *      KEY_VISIBLE         = KEY_VISIBLE
    *      ON_SELECT           = ON_SELECT
    *      READ_ONLY           = READ_ONLY
    *      STATE               = E_STATE-NORMAL
           TEXT                = 'Test'
    *      TEXT_DIRECTION      = E_TEXT_DIRECTION-INHERIT
    *      TOOLTIP             = TOOLTIP
    *      VIEW                = VIEW
    *      VISIBLE             = E_VISIBLE-VISIBLE
    lr_column2->set_table_cell_editor( the_table_cell_editor = lr_radio  ).
    Thanks,
    Suman

  • Can we create internal table dynamically ? how?

    hi to all experts,
                           can we create internal table dynamically ? how?plz explain me with an example.Anybody with good example  will be rewarded.it was asked in an interview what the answer for it

    HI
    Yes you can create
    see this
    /people/rich.heilman2/blog/2005/07/27/dynamic-internal-tables-and-structures--abap
    JUST USE THIS CODE AND DO THE ESSENTIAL CHANGES ACCORDING TO YOU
    STEP: 1 - get backend field catalog (currently displayed alv)
    CLEAR: tl_fieldcatalog. REFRESH: tl_fieldcatalog.
    CALL METHOD w_grid->get_backend_fieldcatalog
    IMPORTING
    et_fieldcatalog = tl_fieldcatalog.
    STEP: 2 - create a new fieldcatalog for dynamic internal table
    CLEAR: sl_fieldcatalog.
    CLEAR: t_outtab_fieldname. REFRESH: t_outtab_fieldname.
    CLEAR: tl_fieldcatalog_new. REFRESH: tl_fieldcatalog_new.
    CLEAR: t_download_fieldname. REFRESH: t_download_fieldname.
    CLEAR: t_download_fieldheading. REFRESH: t_download_fieldheading.
    LOOP AT tl_fieldcatalog INTO sl_fieldcatalog.
    STEP: 2.1 - populate data in T_OUTTAB_FIELDNAME
    APPEND sl_fieldcatalog-fieldname TO t_outtab_fieldname.
    STEP: 2.2 - populate TL_FIELDCATALOG_NEW & T_DOWNLOAD_FIELDNAME
    IF sl_fieldcatalog-no_out EQ ''.
    IF sl_fieldcatalog-fieldname NE 'STATUS'
    OR sl_fieldcatalog-fieldname NE 'MESG_STATUS'
    OR sl_fieldcatalog-fieldname NE 'ZLOCK'
    OR sl_fieldcatalog-fieldname NE 'T_PLANT'
    OR sl_fieldcatalog-fieldname NE 'T_CSR'.
    If field is COMM_PLANT, change its length
    IF sl_fieldcatalog-fieldname EQ 'COMM_PLANT'.
    sl_fieldcatalog-outputlen = 1800.
    sl_fieldcatalog-intlen = 1800.
    sl_fieldcatalog-dd_outlen = 1800.
    ENDIF. "comm_plant
    sl_fieldcatalog_new = sl_fieldcatalog.
    APPEND sl_fieldcatalog_new TO tl_fieldcatalog_new.
    APPEND sl_fieldcatalog-fieldname TO t_download_fieldname.
    APPEND sl_fieldcatalog-scrtext_l TO t_download_fieldheading.
    CLEAR: sl_fieldcatalog, sl_fieldcatalog_new.
    ENDIF.
    ENDIF.
    ENDLOOP.
    STEP: 3 - create dynamic internal table
    FREE: ref_download.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
    EXPORTING
    I_STYLE_TABLE =
    it_fieldcatalog = tl_fieldcatalog_new
    IMPORTING
    ep_table = ref_download
    E_STYLE_FNAME =
    EXCEPTIONS
    generate_subpool_dir_full = 1
    OTHERS = 2
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    ASSIGN ref_download->* TO <ft_download>.
    CREATE DATA ref_wa LIKE LINE OF <ft_download>.
    ASSIGN ref_wa->* TO <fs_download>.
    STEP: 4 - populate data in dynamic internal table
    LOOP AT t_outtab INTO wa_outtab.
    LOOP AT t_download_fieldname.
    ASSIGN COMPONENT t_download_fieldname OF STRUCTURE
    <fs_download> TO <fs_download_field>.
    IF t_download_fieldname-field EQ 'COMM_PLANT'.
    STEP: 4.1 - get long text from database table
    CLEAR: wal_table.
    SELECT SINGLE * FROM zshaven_plnt_txt
    INTO wal_table
    WHERE vbeln = wa_outtab-vbeln
    AND posnr = wa_outtab-posnr
    AND del_no = wa_outtab-del_no
    AND del_itm = wa_outtab-del_itm.
    IF sy-subrc EQ 0.
    STEP: 4.2 - break long-text into separate lines
    CLEAR: tl_text. REFRESH: tl_text.
    SPLIT wal_table-plant_comm
    AT '~'
    INTO TABLE tl_text.
    STEP: 4.3 - Combine these separate lines with space in
    between two lines
    CLEAR: wal_text, final_text.
    LOOP AT tl_text INTO wal_text.
    IF final_text IS INITIAL.
    final_text = wal_text.
    ELSE.
    CONCATENATE final_text '-' wal_text
    INTO final_text.
    REPLACE '-' WITH ' ' INTO final_text.
    ENDIF.
    ENDLOOP.
    STEP: 4.4 - move long text to work-area
    <fs_download_field> = final_text.
    ENDIF. "subrc
    ELSE. "t_download_fieldname
    READ TABLE t_outtab_fieldname
    WITH KEY field = t_download_fieldname-field.
    ASSIGN COMPONENT t_outtab_fieldname-field OF STRUCTURE
    wa_outtab TO <fs_outtab_field>.
    <fs_download_field> = <fs_outtab_field>.
    ENDIF.
    ENDLOOP.
    STEP: 4.5 - Move data from work-area to dynamic internal table
    APPEND <fs_download> TO <ft_download>.
    CLEAR: <fs_download>.
    ENDLOOP.
    STEP: 5 - download
    CALL FUNCTION 'DOWNLOAD'
    EXPORTING
    filename = 'C:\zshaven.xls'
    filetype = 'DAT'
    filetype_no_show = 'X'
    filetype_no_change = 'X'
    TABLES
    data_tab = <ft_download>
    fieldnames = t_download_fieldheading
    EXCEPTIONS
    invalid_filesize = 1
    invalid_table_width = 2
    invalid_type = 3
    no_batch = 4
    unknown_error = 5
    gui_refuse_filetransfer = 6
    customer_error = 7
    OTHERS = 8.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.

  • Is it possible to let Labview create displays himself dynamically?

    the number of displays can´t be fixed right now.
    i want to create a huge number of display by using a menu "create a new display". everyone should show another value from a global variable (Array).
    So i don´t want to use static elements - if i would do so, i had to create about 80 digital displays, 20 analog display and a few graphs. But i don´t need them every time - sometimes i need 3 digital and 15 analog displays, another time i need 60 digital an no analog displays. i only want to create 3 foundamental dislays and use them very often with different properties and pointers to the global variable!
    Is this possible?
    Thanks a lot...

    I have in many applications done this by using the picture control. Jean-Pierre first suggested an excellent approach to this in this link.
    http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=506500000008000000A33B0000&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0&USEARCHCONTEXT_INCLUDE_0=Ben+picture&USEARCHCONTEXT_INCLUDE_S=0&UPostedFromTimeSearchArg_0=8&UPostedFromTimeSearchArg_1=3&UPostedFromTimeSearchArg_2=2000&UPostedFromTimeSearchArg_S=4&UPostedToTimeSearchArg_0=4&UPostedToTimeSearchArg_1=9&UPostedToTimeSearchArg_2=2004&UPostedToTimeSearchArg_S=4&USEARCHCONTEXT_TIER_0=2&USEARCHCONTEXT_TIER_S=0
    You can use the "Invoke Node" to get the image of a control. If you combine this method with events configured for the picture control, you can simul
    ate normal LV objects.
    This method takes a bit bit of work, but it does allow the GUI to be taylored as your end user requires.
    You do not have to re-code all of the normal behaviour of your control elements. When a clcik is detected on a simulated device, a real LV FP object can be made visable and moved from its off-screen location to where the user clicked, and key-focus transfered. The user then interacts with the LV object that is on top of the the picture if it.
    It is not easy, but it works great!
    So as to:
    "Is it possible to let Labview create displays himself dynamically?"
    YES!
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

Maybe you are looking for

  • Signature again- personal Curve 3G thinks it is in an enterprise?

    Hi I am trying to change the signature in my 9300 Curve 3G. I use Gmail / GoogleSync. I must have set the email sig at some time, but now cannot find how to adjust it. I have also just bee upgraded (ugh!) from OS 5 to OS 6 (and HATE it, BTW). Howver,

  • Account constantly getting disabled

    Every 3 or 4 days, I get a message saying that my account has been disabled for security reasons and have to reset my password. Why does this keep happening? Is someone attempting to guess my password, causing the lockout? If someone is trying to acc

  • Unknown object in ABAP Dictionary

    Hello In st04 in  "Missing tables and indexes" are many  indexes have reported unknown "Unknown object in ABAP Dictionary". This is because indexex are created directly in DB. Is there a way to solve this problem? We have db : oracle 10.2.04 and sap

  • UNIQUE constraint but with a condition?

    Hi! Is it possible to define a unique constraint in a table which would apply only under a condition (depending on row content only) ? For example: CREATE TABLE example   pk number,   a number,   b number,   c VARCHAR2(10),   x number The constraint

  • Iview for photo album and vidoes

    Hi All, Cane we display photo albums and vidoes in the EP 7.0 ehp1.If we can what will be the steps please help. Thanks in advance Basu