Check Box in Webdynpro

Hi,
I am working on checkbox in webdynpro. I hav 2 views. In the first view I hav 4 check boxes. In the second voew I hav one text box. If the check box is checkd and the submit button is pressed then the corresponding value of check box should get display in Second view. This is my requirement.
But for this what are the methods I need to use.....to know which check box is checked...and to set the corresponding checkbox value to the text box?
Regards
Sandeep Reddy

The Same Node create in Component control and Drag and Drop to create Context Mapping to View1 and View2.
on the Submit Button Event Handler using code wizard navigate to next view
in the InBound plug Event Handler of the View2 put the code
data: lr_node type ref to if_wd_context_node.
data: lr_elem type ref to if_wd_context_element.
data: lt_elem type WDR_CONTEXT_ELEMENT_SET.
data: ls_elem type <node_type>.
lr_node = wd_context->get_child_node( '<node_name>' ).
lt_elem = lr_node->get_elements( ).
loop at lt_elem into lr_elem.
  if lr_elem->is_selected( ) eq abap_true.
this record is selected
    lr_elem->get_static_attributes( importing static_attributes = ls_elem ).
ls_elem structure will have the selected check box
fill your input field binded context attribute here.
endif.
endloop.

Similar Messages

  • How to disbale a group of checkboxes when i select one check box WEBDYNPRO

    Hi Friends,
    Can any body help me how to disbale a group of checkboxes when i select one check box WEBDYNPRO Abap
    Also can any body tell me how to handle chain endchain type of scenario in WEBDYNPRO Abap
    Thank you..
    Sai

    Hi
    In the context tab , create 2 context attributes ca_attr1 and ca_attr2   of type WDY_BOOLEAN under a context node cn_node
    now in ur Layout , bind the ENABLE property of CheckBoxGroup UI Element with this attribute ca_attr1
    bind the ENABLE property of CheckBox UI Element with this attribute ca_attr2
    create a action for ur Checkbox , for the OnToggle property of ur checkbox
    in OnactionToggle , check if ca_attr2 is 'X' , set ca_attr2 to ' ' ( for disable)
    this can be done by code wizard , press control +f7 and use read/set context attributes , use get_attribute and set_attribute methods
    // if ca_attr2 is 'X'
    DATA lo_nd_cn_node TYPE REF TO if_wd_context_node.
        DATA lo_el_cn_node TYPE REF TO if_wd_context_element.
        DATA ls_cn_node TYPE wd_this->element_cn_node .
        DATA lv_attr  LIKE ls_city-ca_attr2.
        lo_nd_node = wd_context->get_child_node( name = wd_this->wdctx_ca_attr).
    *   get element via lead selection
        lo_el_cn_node = lo_nd_cn_node->get_element(  ).
    *   get single attribute
        lo_el_cn_node->get_attribute(
          EXPORTING
            name =  `CA_ATTR2`
          IMPORTING
            value = lv_attr ).
    // if lv_attr2 is 'X' , use set_attribute method for ca_attr1
    IF lv_Attr EQ 'X' .
    DATA lo_nd_cn_node TYPE REF TO if_wd_context_node.
        DATA lo_el_cn_node TYPE REF TO if_wd_context_element.
        DATA ls_cn_node TYPE wd_this->element_cn_node .
        DATA lv_attr  LIKE ls_city-ca_attr.
    *   navigate from <CONTEXT> to <CN_VISIBLE> via lead selection
        lo_nd_node = wd_context->get_child_node( name = wd_this->wdctx_ca_attr).
    *   get element via lead selection
        lo_el_cn_node = lo_nd_cn_node->get_element(  ).
    *   set single attribute
        lo_el_cn_node->set_attribute(
          EXPORTING
            name =  `CA_ATTR1`
            value = ' ').
    ENDIF.
    regards,
    amit

  • Check box in ALV in Webdynpro

    Hi Experts,
    I have a requirement to display check boxes as the first column of the ALV,  now at any point of time if the user selects one check box i have to get all the corresponding data of that row and display it at a different location, Can you let me know how i can identify when the check box is checked and how can i identify the row that is selected?
    Also when the standard select all button is pressed all the check boxes should be automatically checked , how do i handle this.
    Thanks in Advance.

    Hi Anvesh,
    At what particular point of time do you want to look out for checked checkboxes? You can say have a button which the user clicks up on to look out for changes in the ALV's data after checking his desired checkboxes.
    Say suppose you have a button then within this buttons event handler you should call the DATA_CHECK method of the ALV. This method would scan the ALV for any changes in data. If anything has changed (any checkbox checked) then the system raises the event ON_DATA_CHECK.
    Below is the coding inside my buttons action handler ONACTIONCHECK_ALV_DATA
    method ONACTIONCHECK_ALV_DATA .
      DATA: l_ref_INTERFACECONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE .
      l_ref_INTERFACECONTROLLER =   wd_This->wd_CpIfc_My_Alv( ).
      l_ref_INTERFACECONTROLLER->Data_Check( ).
    endmethod.
    So if the user has checked any checkboxes then the ALV's data would have changed & so the system would have raised the ON_DATA_CHECK event. So create an event handler method for the event ON_DATA_CHECK. The framework does pass a parameter WDEVENT as input to this particular method. If you check the properties of this WDEVENT parameter in debugging mode, you would see that it has a PARAMETERS table. Now within this table you have another parameter R_PARAM.
    Double click on R_PARAM and you can see various attributes present among which you also have:
    IF_SALV_WD_TABLE_DATA_CHECK~T_MODIFIED_CELLS
    This table would contain the indexes of the rows in which the data has changed. (where the checkbox has been checked) So you can pass this index to read the data from the context node using a normal get_static_attributes call.

  • . How to put Check box in every row in Table

    Hi Friends,
    I have one doubt in Webdynpro with java. How to put Check box in every row in Table?
    For Exam My requirement is I am getting BAPI from ECC System. So I have to go given input details in first view and output details in SecondView. So in Second View I will taken Table that data will displayed in rows. I need each and every row first I need check box.
    Here Select Check Box of particular row then click GetData button.  That row data will be displayed in one popup window.
    In table suppose 6 rows available in table. Every Row first Check box available.
                             empid, name, sal  ,firstname, last Name
                             empid, name, sal  ,firstname, last Name
                             empid, name, sal  ,firstname, last Name 
    How to put Check box in every row in Table?  can you send any examples applications
    Regards
    Vijay

    Hi Friend,
    When we are getting BAPI From ECC System. that BAPI Have nodes and Attribues...in under node we can't create "CheckBox"
    attribute.
    So i am doing like this.I am create on Checbox attribue out side of Node. Check Box data type is boolean.
    next i am creating table ( that table having rows and columns) Right click on table-->Click on Insert GroupedColumn->again right click on nsert GroupedColumn---> Here Select Check Box.
    Okay...here i am getting one problem. i have got Check boxes .But i am select check box in  first row. that time all check boxes will be selected.
    i need select first row check box that only first row will be selected suppose i selected second row check box that only second will be selected.
    i need this can u help me....
    Regards
    Vijay

  • Hide the travel check box in MSS team view in SAPHCM

    Hi All,
    How to hide the Travel check box in the above diagram.client don't want the travel functionlaity.
    Please help me out here.
    Regards,
    Kiran

    As mentioned in the specified thread
    You can enhance the Webdynpro component: HRESS_C_LEA_TEAM_CALENDAR
    View :V_TEAM_CALENDAR
    To remove the color in the calender enhance the method BIND_CALENDAR_DATA_NEW
    delete the record from "wd_this->gt_new_cal_entries" where  legend id  = "TRAVEL"
    To remove the legend color enhance the method PARSE_XML
    delete the record from "wd_this->gt_new_legends" where  legend id  = "TRAVEL"
    Or  Deactivate the BADI implementation HRMSS_TEAMCALE_TRAVEL_IMPL  in SPRO
    Employee Self-Service (Web Dynpro ABAP) -> Service-Specific Settings ->Team Calendar ->BAdI: Team Calendar Enhancement with Additional Information
    Regards,
    Jyothi

  • How to enable/disable check boxes in a table.

    hi Gurus,
    i am new to webdynpro for abap.
    the problem i have is.
    i have a table with two columns. first one is a check box column and the second one is a value field. the table is populated with data(second field only) upon pressing some button.
    while populating data i want to make check box field/row ticked and disabled when second field row value is 'X' . if not leave the check box row/field enabled and unticked ( if i want i can tick the check box later). hope you guys me. this is sort of urgent. please reply with some code.
    thanks in advance.
    Sree

    Hi
    Issue what i am facing is,i want to display column of CHECKBOXes in my ALV.
    for that i declare atrribute of type CHECKBOX.
    And i write the following code.
    lr_column_settings ?= l_value.
    lt_columns = lr_column_settings->get_columns( ).
    loop over table - in each loop another column can be modified
    LOOP AT lt_columns INTO ls_column.
    IF ls_column-id = 'CHK_BOX'.
    CREATE OBJECT lr_chk_box
    EXPORTING
    checked_fieldname = ls_column-id.
    lr_chk_box->set_read_only( ABAP_FALSE ).
    lr_chk_box->set_read_only_fieldname( 'ALV_FINAL_STATUS' ).
    ls_column-r_column->set_cell_editor( lr_chk_box ).
    even i cant able to get checkbox in my ALV.
    IT is displaying as general field.
    Regards,
    Ravi

  • Re: Retrieving data from the check box group.....

    Hi all,
    I am new to webdynpro Java. I'm facing a problem while retrieving data from the check box group..
    I've taken a simple type "Status" and Node with value attribute named status and set the property of that attribute as the simple type. This attribute is bound to the checkboxgroup.The cardinality of the Node is 0..n
    But i am unable to read the checked items of the group.
    Please help me out in solving my problem........

    Hi,
    Use the following
    for (int x=0; x< wdContext.nodeTest().size(); x++)
         if( wdContext.nodeTest().isMultiSelected(x) )
                     // Selected Element
              IWDNodeElement nodeElement = wdContext.nodeTest().getElementAt(x);
               nodeElement.setAttributeValue("<Your Attribute> ", <Value>);
              //Ex setting value for attribute called Name
              nodeElement.setAttributeValue("Name", "Test");
    Regards
    Ayyapparaj

  • Dynamic Check Box Error

    Hi All,
            I have created Dynamic UI Checkbox which is creating dynamic checkboxes based on the database Table fields.
    Here is my code in Start View
    // This file has been generated partially by the Web Dynpro Code Generator.
    // MODIFY CODE ONLY IN SECTIONS ENCLOSED BY @@begin AND @@end.
    // ALL OTHER CHANGES WILL BE LOST IF THE FILE IS REGENERATED.
    package com.titan.retailauditreport;
    // IMPORTANT NOTE:
    // ALL IMPORT STATEMENTS MUST BE PLACED IN THE FOLLOWING SECTION ENCLOSED
    // BY @@begin imports AND @@end. FURTHERMORE, THIS SECTION MUST ALWAYS CONTAIN
    // AT LEAST ONE IMPORT STATEMENT (E.G. THAT FOR IPrivateStartView).
    // OTHERWISE, USING THE ECLIPSE FUNCTION "Organize Imports" FOLLOWED BY
    // A WEB DYNPRO CODE GENERATION (E.G. PROJECT BUILD) WILL RESULT IN THE LOSS
    // OF IMPORT STATEMENTS.
    //@@begin imports
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.ResultSetMetaData;
    import com.sap.tc.webdynpro.clientserver.uielib.standard.api.IWDCheckBox;
    import com.sap.tc.webdynpro.clientserver.uielib.standard.api.IWDTransparentContainer;
    import com.sap.tc.webdynpro.progmodel.api.IWDNode;
    import com.sap.tc.webdynpro.progmodel.api.IWDNodeElement;
    import com.sap.tc.webdynpro.progmodel.api.IWDNodeInfo;
    import com.sap.tc.webdynpro.progmodel.api.IWDUIElement;
    import com.titan.retailauditreport.wdp.IPrivateStartView;
    //@@end
    //@@begin documentation
    //@@end
    public class StartView
    Logging location.
      private static final com.sap.tc.logging.Location logger =
        com.sap.tc.logging.Location.getLocation(StartView.class);
      static
        //@@begin id
        String id = "$Id$";
        //@@end
        com.sap.tc.logging.Location.getLocation("ID.com.sap.tc.webdynpro").infoT(id);
    Private access to the generated Web Dynpro counterpart
    for this controller class.  </p>
    Use <code>wdThis</code> to gain typed access to the context,
    to trigger navigation via outbound plugs, to get and enable/disable
    actions, fire declared events, and access used controllers and/or
    component usages.
    @see com.titan.retailauditreport.wdp.IPrivateStartView for more details
      private final IPrivateStartView wdThis;
    Root node of this controller's context. </p>
    Provides typed access not only to the elements of the root node
    but also to all nodes in the context (methods node<i>XYZ</i>())
    and their currently selected element (methods current<i>XYZ</i>Element()).
    It also facilitates the creation of new elements for all nodes
    (methods create<i>XYZ</i>Element()). </p>
    @see com.titan.retailauditreport.wdp.IPrivateStartView.IContextNode for more details.
      private final IPrivateStartView.IContextNode wdContext;
    A shortcut for <code>wdThis.wdGetAPI()</code>. </p>
    Represents the generic API of the generic Web Dynpro counterpart
    for this controller. </p>
      private final com.sap.tc.webdynpro.progmodel.api.IWDViewController wdControllerAPI;
    A shortcut for <code>wdThis.wdGetAPI().getComponent()</code>. </p>
    Represents the generic API of the Web Dynpro component this controller
    belongs to. Can be used to access the message manager, the window manager,
    to add/remove event handlers and so on. </p>
      private final com.sap.tc.webdynpro.progmodel.api.IWDComponent wdComponentAPI;
      public StartView(IPrivateStartView wdThis)
        this.wdThis = wdThis;
        this.wdContext = wdThis.wdGetContext();
        this.wdControllerAPI = wdThis.wdGetAPI();
        this.wdComponentAPI = wdThis.wdGetAPI().getComponent();
      //@@begin javadoc:wdDoInit()
      /** Hook method called to initialize controller. */
      //@@end
      public void wdDoInit()
        //@@begin wdDoInit()
    //          IWDNodeInfo node=wdContext.getNodeInfo().addChild("DynamicNode",null,true,true,false,false,false,true,null,null,null);
    //         IPrivateStartView.INodeAElement ele=wdContext.createNodeAElement();
    //         wdContext.nodeNodeA().addElement(ele);
    //         IWDNodeInfo multiplenode=wdContext.nodeNodeA().getNodeInfo();
    //         IWDNodeInfo multipleinfo=multiplenode.addChild("MultiNode",null,true,true,false,false,false,true,null,null,null);
    //          multiplenode.addAttribute("roles", "ddic:com.sap.dictionary.string");
    //          multipleinfo.addAttribute("roles", "ddic:com.sap.dictionary.string");
    //          IWDNodeElement elem;
         //IWDNodeInfo node=wdContext.getNodeInfo().addChild("DynamicNode",null,true,true,false,false,false,true,null,null,null);
         //node.addAttribute("BrandID");
        ResultSet rs=null;
        ResultSetMetaData rsmd=null;
        Connection con=null;
        PreparedStatement pst=null;
        String status="SELECT BrandMaster.BrandID,BrandMaster.BrandName FROM BrandMaster WHERE BrandMaster.BrandID=?";
        try{
             Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
             wdComponentAPI.getMessageManager().reportSuccess("Driver Loaded");
             con=DriverManager.getConnection("jdbc:odbc:Pankaj");
             wdComponentAPI.getMessageManager().reportSuccess("Connected");
             pst=con.prepareStatement(status);
             pst.setInt(1,1);
             rs=pst.executeQuery();
             wdComponentAPI.getMessageManager().reportSuccess("Query Fired");
             rsmd=rs.getMetaData();
             int ttlcolumns=rsmd.getColumnCount();
             wdComponentAPI.getMessageManager().reportSuccess("Populating Data1");
              IWDNodeInfo node=wdContext.getNodeInfo().addChild("DynamicNode",null,true,true,false,false,false,true,null,null,null);
              //node.addAttribute("BrandID","BrandID:com.titan.retailauditreport");
              node.addAttribute("BrandID",);
             while(rs.next())
                  wdComponentAPI.getMessageManager().reportSuccess("Populating Data");
    //               IWDNode node1=wdContext.nodeNodeA().getChildNode("MultiNode",IWDNode.NO_SELECTION);
    //               IWDNodeElement elem=wdContext.nodeNodeA().createElement();
    //               node1.addElement(elem);
                   IWDNode node1=wdContext.getChildNode("DynamicNode",0);
                   IWDNodeElement ne1=node1.createElement();          
                   for(int i=1;i<=ttlcolumns;i++)
                        if(i==1)
                             //elem.getBrandID(rs.getString(i));
                             String s1=rs.getString(i);
                             ne1.getAttributeValue("BrandID"+s1);
                        else if(i==2)
                             //elem.getBrandName(rs.getString(i));
                             //String BN=setBrandName((rs.getString(i)));
                             String s2=rs.getString(i);
                             ne1.getAttributeValue("BrandName"+s2);
                   rs.close();
                   pst.close();
                   con.close();
                   wdComponentAPI.getMessageManager().reportSuccess("Resources Closed");
         catch(Exception e)
              wdComponentAPI.getMessageManager().reportException("Error  "+e,true);
        //@@end
      //@@begin javadoc:wdDoExit()
      /** Hook method called to clean up controller. */
      //@@end
      public void wdDoExit()
        //@@begin wdDoExit()
        //@@end
      //@@begin javadoc:wdDoModifyView
    Hook method called to modify a view just before rendering.
    This method conceptually belongs to the view itself, not to the
    controller (cf. MVC pattern).
    It is made static to discourage a way of programming that
    routinely stores references to UI elements in instance fields
    for access by the view controller's event handlers, and so on.
    The Web Dynpro programming model recommends that UI elements can
    only be accessed by code executed within the call to this hook method.
    @param wdThis Generated private interface of the view's controller, as
           provided by Web Dynpro. Provides access to the view controller's
           outgoing controller usages, etc.
    @param wdContext Generated interface of the view's context, as provided
           by Web Dynpro. Provides access to the view's data.
    @param view The view's generic API, as provided by Web Dynpro.
           Provides access to UI elements.
    @param firstTime Indicates whether the hook is called for the first time
           during the lifetime of the view.
      //@@end
      public static void wdDoModifyView(IPrivateStartView wdThis, IPrivateStartView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
        //@@begin wdDoModifyView
        if(firstTime)
              IWDTransparentContainer theGroup= (IWDTransparentContainer)view.getElement("RootUIElementContainer");
              theGroup.createLayout(com.sap.tc.webdynpro.clientserver.uielib.standard.api.IWDMatrixLayout.class);
              theGroup.destroyAllChildren();
              IWDUIElement uiElement = null;
             IWDCheckBox icb=(IWDCheckBox)view.createElement(IWDCheckBox.class,"CheckB");
              //IWDAttributeInfo info = wdContext.getNodeInfo().getChild("NodeA").getChild("MultiNode").getAttribute("roles");
              icb.bindChecked("DynamicNode.BrandID");
              uiElement=icb;
              theGroup.addChild(uiElement);
        //@@end
    The following code section can be used for any Java code that is
    not to be visible to other controllers/views or that contains constructs
    currently not supported directly by Web Dynpro (such as inner classes or
    member variables etc.). </p>
    Note: The content of this section is in no way managed/controlled
    by the Web Dynpro Designtime or the Web Dynpro Runtime.
      //@@begin others
      //@@end
    But iam not able to add attribute in the statement
    int ttlcolumns=rsmd.getColumnCount();
             wdComponentAPI.getMessageManager().reportSuccess("Populating Data1");
              IWDNodeInfo node=wdContext.getNodeInfo().addChild("DynamicNode",null,true,true,false,false,false,true,null,null,null);
              //node.addAttribute("BrandID","BrandID:com.titan.retailauditreport");
              node.addAttribute("BrandID",);
    its throwing an error
    Error:com.sap.tc.webdynpro.services.exceptions.WDTypeNotFoundException: type Boolean not found
    Is that my database connectivity code ?
    Can anybody plz help me out?
    i
    Thanks and Regards
    Santosh Saraf

    Hi,
        It didnt work.So i changed my coding,Iam able to get checkbox.
    Here is my code
      public static void wdDoModifyView(IPrivateStartView wdThis, IPrivateStartView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
        //@@begin wdDoModifyView
        IWDMessageManager msgMngr=wdThis.wdGetAPI().getComponent().getMessageManager();
         if(firstTime)
              //IWDTransparentContainer theGroup= (IWDTransparentContainer)view.getElement("RootUIElementContainer");
              IWDTransparentContainer theGroup= (IWDTransparentContainer)view.getElement("TransparentContainer");
              theGroup.createLayout(com.sap.tc.webdynpro.clientserver.uielib.standard.api.IWDMatrixLayout.class);
              theGroup.destroyAllChildren();
              //IWDUIElement uiElement = null;
              //IWDUIElement uiElement1 = null;
              IWDUIElement uiElementnew = null;
              //IWDCheckBox icb2=(IWDCheckBox)view.createElement(IWDCheckBox.class,"CheckA");
              //IWDCheckBox icb1=(IWDCheckBox)view.createElement(IWDCheckBox.class,"CheckB");
              //icb1.setText("Checkbox1");
              //icb2.setText("Checkbox2");
              Connection con=null;
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con=DriverManager.getConnection("jdbc:odbc:Pankaj");
    Statement st=con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
    ResultSet rs=st.executeQuery("select * from BrandMaster");
    int count=0;
    while(rs.next())
         count++;
    msgMngr.reportSuccess(""+count);
    rs.beforeFirst();
    IWDNodeInfo node=wdContext.getNodeInfo().addChild("DynamicNode",null,true,true,false,false,false,true,null,null,null);
    node.addAttribute("BrandID","ddic:com.sap.dictionary.boolean");
    while(rs.next())
         IWDNode node1=wdContext.getChildNode("DynamicNode",0);
         IWDNodeElement ne1=node1.createElement();
         ne1.setAttributeValue("BrandID",new Boolean(true));
         //ne1.getAttributeValue("BrandID"+rs.getString(2));
         IWDCheckBox icbnew=(IWDCheckBox)view.createElement(IWDCheckBox.class,"Checknew");
         icbnew.setText(rs.getString(2));
         icbnew.bindChecked("DynamicNode.BrandID");
         uiElementnew=icbnew;
         theGroup.addChild(uiElementnew);
    msgMngr.reportSuccess(""+count);
    catch(Exception e)
              //IWDAttributeInfo info = wdContext.getNodeInfo().getChild("NodeA").getChild("MultiNode").getAttribute("roles");
    //          icb1.bindChecked("DynamicNode.BrandID");
    //          icb2.bindChecked("DynamicNode.BrandID");
    //          uiElement=icb1;
    //          uiElement1=icb2;
    //          theGroup.addChild(uiElement);
    //          theGroup.addChild(uiElement1);
              try
              {if(con!=null)
    con.close();
              catch(Exception e)
        //@@end
    The following code section can be used for any Java code that is
    not to be visible to other controllers/views or that contains constructs
    currently not supported directly by Web Dynpro (such as inner classes or
    member variables etc.). </p>
    Note: The content of this section is in no way managed/controlled
    by the Web Dynpro Designtime or the Web Dynpro Runtime.
      //@@begin others
      //@@end
    But now the problem is i need to have five dynamic checkboxes based on my tablebut iam getting only one check box with the first value of a column in a table(First Row).
    I want to display all the five rows,even if iam giving the rs.next in while loop.
    Here ia my table structure
    Master Table
    BrandID      BrandName
    1             abc
    2             def
    3             ghi
    4             jkl
    5             mno
    Iam getting the only one checkbox with abc as text,i want all the five rows checkbox.
    Plz help me out in this regard
    Thanks and Regards
    Santosh Saraf

  • Check box group

    Hi experts,
    I am new to webdynpro, i want to add one more check box in a check box group,
    can anyone help me,(but default it is coming 3)
    thanks in advance

    Hi,
        if it is limiting to three what you can do is create a two views with three check boxs each and create a view conatiner element in one view and embed the second view inside the view conatiner element.
    so by doing this you can have more than three checkbox
    cheers

  • How to make enable UI elements Check box

    Hi ,
    I am creating UI elements Check box in a view dynamically at runtime.
    But its is in uneditable mode.(gray out)
    my Code:
    IWDCheckBox cb1 = (IWDCheckBox)view.createElement (IWDCheckBox.class,optdetials[1]);
    cb1.setText(optdetials[2]);                    
    root.addChild(cb1);
    Now my problem is how to make this check box enable.
    and aslo tell me how to create Radio button dynamically.
    Thanks
    Ravi

    Hi Ravi,
    Go through the following
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/developing%20web%20dynpro%20user%20interfaces.pdf
    Follow the below steps:
    1. Create a ValueAttribute "ChkGroup" and following valueattributes under the above valueattribute
    check (boolean)
    text  (string)
    2. Type the following in init() method
    IPrivate<<VIEW>>.IChkGroupElement ele=wdContext.createChkGroupElement();
    ele.setCheck(true);
    ele.setText("1");
    wdContext.nodeChkGroup().addElement(ele);
    IPrivate<<VIEW>>.IChkGroupElement ele1=wdContext.createChkGroupElement();
    ele1.setCheck(true);ele1.setText("11");
    wdContext.nodeChkGroup().addElement(ele1);
    3. Write the following in wdDoModifyView() method
    IWDCheckBoxGroup grp1=(IWDCheckBoxGroup)view.createElement(IWDCheckBoxGroup.class,null);
    grp1.bindTexts("ChkGroup.text");
    grp1.bindEnabled("ChkGroup.check");
    <<Container>>.addChild(grp1);
    Regards, Anilkumar
    Message was edited by:
            Anilkumar Vippagunta

  • Hou to bind a char value of bapi to check box of a UItableelement

    Hi all,
          I have a bapi which returns a table where one of the field is char(1), I should bind this field with a check box in the UItableelement. When i try to change the celleditor to check box it raises an error as select an attribute of type boolean. how to solve it.
    Also if we can change the char data type to boolean in the bapi table my problem is solved.
    Thanks in advance.
    problem solving reply is awarded.

    Don't do this in method wdDoModifyView() but in a controller method, e.g. an event handler.
    Create a context attribute "TableVisibility" of type com.sap.ide.webdynpro.uielementdefinitions.Visibility (designtime simple type, not Java native type).
    Bind property Table.visible to this attribute.
    In the event handler, write something like
    void on<Event)(...)
      if (<table-should-be-invisible>)
        wdContext.currentContextElement().setTableVisibility(WDVisibility.NONE);
      else
        wdContext.currentContextElement().setTableVisibility(WDVisibility.VISIBLE);
    Armin

  • How to display another window by using Check box

    Hi Friends,
    I have one doubt in Webdynpro with java. How to display another window by using Check box?
    For Exam My requirement is I am getting BAPI from ECC System. So I have to go given input details in first view and output details in Second View. So in Second View I will taken Table that data will displayed in rows. each and every row first check box is available.
    Here Select Check Box of particular row then click Edit button. That row data will be displayed in one popup window.
    empid, name, sal ,firstname, last Name
    empid, name, sal ,firstname, last Name
    empid, name, sal ,firstname, last Name
    Suppose I have to select check box in First Row Click on EDIT button That row data will be displayed in another popup window here customer will change details depending up requirement click on SAVE Button that update data will saved in ECC System.
    How to display another window by using Check box?
    Regards
    Vijay

    Hi Vijay
    Your question is not clear enough to give an answer. Do you have some difficulties with the code for opening a popup-window? There are many-many examples in the forum how to open/close a popup.
    Or you do not know how to bind the popup opening with clicking a check box? Just put the code in the onSelect event handler of the check box.
    BR, Siarhei
    Edited by: Siarhei Pisarenka on Mar 11, 2010 10:55 AM

  • Step by step process to add Radio Buttons and Check boxes in a view

    Hi,
    Could somone give me the steo by step process for adding the Radio Buttons and Check boxes in a view.
    Regards
    Hrudaya Raju

    https://www.sdn.sap.com/irj/sdn/articles-topic?rid=/webcontent/uuid/7082f9fc-070d-2a10-88a2-a82b12cea93c
    https://www.sdn.sap.com/irj/sdn/webdynpro-elearning
    https://help.sap.com/javadocs/NW04S/current/wd/index.html
    https://help.sap.com/javadocs/NW04S/current/wd/com/sap/tc/webdynpro/clientserver/uielib/standard/api/IWDCheckBox.html
    https://help.sap.com/javadocs/NW04S/current/wd/com/sap/tc/webdynpro/clientserver/uielib/standard/api/IWDCheckBoxGroup.html
    https://help.sap.com/javadocs/NW04S/current/wd/com/sap/tc/webdynpro/clientserver/uielib/standard/api/IWDRadioButtonGroupByIndex.html
    https://help.sap.com/javadocs/NW04S/current/wd/com/sap/tc/webdynpro/clientserver/uielib/standard/api/IWDRadioButtonGroupByKey.html
    Armin

  • Alv check boxes

    Wanna have a check box in my alv.
    have a boolean field 'CHECKBOX' in my context.
    but how to display the check box in my table now?

    Hi,
    This is ramkumar now i am in  Webdynpro abap area.I want to insert the check box in the first column of the ALV table for this i wrote the code in WDMODIFY in the view.
    method WDDOMODIFYVIEW .
    DATA: l_ref_cmp_usage TYPE REF TO if_wd_component_usage.
    l_ref_cmp_usage =   wd_this->wd_cpuse_alv_checkbox( ).
    IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
      l_ref_cmp_usage->create_component( ).
    ENDIF.
    DATA: l_ref_interfacecontroller TYPE REF TO iwci_salv_wd_table .
    l_ref_interfacecontroller =   wd_this->wd_cpifc_alv_checkbox( ).
      DATA:
        l_value TYPE REF TO cl_salv_wd_config_table.
      l_value = l_ref_interfacecontroller->get_model( ).
    DATA: lt_columns           TYPE          salv_wd_t_column_ref,
          ls_column            TYPE          salv_wd_s_column_ref,
          lr_checkbox TYPE REF TO cl_salv_wd_uie_checkbox,
          lr_column_settings TYPE REF TO if_salv_wd_column_settings.
        *     Set checkbox
            lr_column_settings ?= l_value.
            lt_columns = lr_column_settings->get_columns( ).
    LOOP AT lt_columns INTO ls_column.
      CASE ls_column-id.
        WHEN 'ENABLED'.
          CREATE OBJECT lr_checkbox
            EXPORTING
              checked_fieldname = ls_column-id.
          ls_column-r_column->set_cell_editor( lr_checkbox ).
      ENDCASE.
    ENDLOOP.
    endmethod.
    Embeded the view in window and embeded the ALV component view in viewUIcontainerelement.and tested,but i am getting the runtime error Data no longer available when SALV_WD_TABLE GET_MODEL called  kindly help me inthe same.

  • How to print Check Box in smartform

    HI,
      How to print check box in smartforms. I am using Include Sap Symbol but in the print it is coming as #. Do we need to do any setting like we do for barcode?
    Thanks
    Raghavendra

    hi,
    u can print a check box in different ways.. by inserting symbols and making window as check box..
    once go through the thread u will get to k now differnt ways
    putting checkboxes in smartform?
    Please Close this thread.. when u r problem is solved. Reward all Helpful answers
    Regards
    Naresh Reddy K

Maybe you are looking for

  • Error in PL/SQL block..

    Hi Im facing an error in the following code.. Cant trace it out. /* Formatted on 2009/10/21 22:09 (Formatter Plus v4.8.8) */ DECLARE    latest_task_id    NUMBER;    task_name_em7      VARCHAR2 (50);    select_flag_em7    NUMBER        := 1;    ds_cou

  • Problems with applications installed in my E61i

    Hi all, I have encountered a problem that is whenever I off my phone and turn it back on, all third-party applications installed in my memory card don't work anymore except those installed in the phone memory, and I have to re-install everything ever

  • Cannot see Private Workareas after Import in a New Instance

    Hi guys, I followed the procedure you recommended in the designer 9i installation guide about migrating/upgrading the repository and It seems I missed something: -I made an export of my repository owner with the RAU in Oracle Database 8.1.7 with Rep.

  • ITunes doesn't send my workout data to nikeplus anymore

    Hi, Did anyone face the same problem? It's really frustrating. My nano synced to iTunes successfully. I can see the last workout data on Nike+iPod page. But, it doesn't even try to send data to nikeplus. I did it many times without any trouble. Norma

  • Image won't display after uploaded

    I created a text gif and inserted it into the page.  Then entered the URL info etc...  However, after being uploaded the image isn't there.  There is no box with a red thing in it like what appears when the image is not in the correct folder..... jus