Dynamically checking ID's in a dynamically built table problem ??

Im creating a table dynamically using JSP and Javascript....
its a basic loop that goes through 5 iterations...as follows
what is happening here is it dynamically in the body creates my
table and when it hits the the row that has i = 1 or i = 3
it puts out a checkbox on the table....the code between the <%
and %> is the jsp portion..this runs on a server....I have two strings CheckBox1 and CheckBox3 which get assigned to two different table rows id's ...so for the first row the table gets created with no checkbox strictly text for the second row it has a checkbox and the forth row has one...
now what I want the code to do...is if the user hits a button on my page...
I want to call a javascript function that will go thru the rows and determine
if it has a checkbox and if so....if that checkbox is checked off. The called function obviously will not know the exact id at the time...since this is built dynamically sometimes I will have CheckBox0 containing a checkbox...Ct will all depend on the data...is there a way to check whether a row has an id
and if so what that id is..and also if it is a checkbox and finally if its checked off ????
<%! String checkString1 = null;
String stringInt = null;
String checkBoxText = "CheckBox";
int x = 0;%>
<% for(int i = 0;i < 5; i++)
{%>
<%stringInt = (new Integer(i)).toString();
checkString1 = checkBoxText + stringInt;
String[] stringnames = new String[2]; %>
<tr class="checkboxtext" id=chkb1>
<td width=100 valign="top" nowrap >
Corporates</td>
<td width=60 valign="top" >202
</td>
<td width=100 valign="top" >111021AC5R</td>
<td width=190 valign="top" nowrap class="displaytext">
BRIT TELECOM PLC </td>
<td width=85 valign="top" align=right>12/15/01
</td>
<td width=70 valign="top" align=right>8M</td>
<td width=70 valign="top" align=right >$105.5000</td>
<td width=100 valign="top" nowrap align=right>
12.5000</td>
<% if(i ==1 | i ==3)
{%>
<%stringnames[x] = checkString1;
System.out.println("your checkstring value is " + checkString1);
System.out.println("your mmmy value is " + stringnames[x]);
x = x + 1;
%>
<td width=200 valign="top" id=na1 onMouseOver="tryonmouseover(this)"; onMouseOut="nd();">Needs Approval
</td>
<td width=20 valign="top" ><Input type="checkbox" value="OFF" Name="check1" id=<%= checkString1 %> onclick="checkboxclickunclick(this)");" onMouseOver="tryonmouseover(this)"; onMouseOut="nd();">
<%}
else
{%>
<td width=200 valign="top" class="displaytext">Executed
</td>
<td width=20 valign="top" class="displaytext">N/A</td>
<%}%>
</td>
</tr>
<%}%>
</table>
further down is this code...
<td width="33%" align=center ><INPUT TYPE="BUTTON" VALUE="Approve all" id=apprall onclick="window.approveall()" class=actionbutton</td>
which will call approveall(). This is the function that I want to go
thru the table rows....and determine if there is a checkbox and whether it was checked off ???? Thanks for any help .....

I'm not sure myself how to do what you're asking for, but using DOM (Document Object Model) you can gain access to all objects of an HTML document. You should be able to give your table an id and then access all the rows of the table using JavaScript and DOM.
Or, you could probably just find an easier way to accomplish what you're asking for. Maybe just use the JavaScript onClick event to append your values to the query string, or whatever it is that you're trying to do.

Similar Messages

  • Perform static and dynamic check together on a customer?

    Hello All,
    Is it possible to perform static and dynamic check together on a customer?
    I believe standard SAP does not allow both options together.
    The scenario is: My client has customer who orders products 1 year in advance and create sales order with a future delivery date. The customer might have balance due on their account which is close to the credit limit. As a result the sale order should be blocked as if the automatic credit check is "Static". This would allow our customer service to call the customer and arrange for the payments.
    Then 11 months later, a dynamic check should be performed on the customer to make sure the past due is under the credit limit. If the past due is over credit limit, the sales order must be blocked for delivery as if the credit check was "Dynamic" with 30 days horizon. This would again give our customer service time to settle the payment with the customer.
    If anyone has implemented such a scenario, can you please give me an overview of how you did it?
    Thanks very much in advance and Text Removed.
    With Regards,
    AM
    Edited by: Lakshmipathi on Nov 13, 2010 9:23 AM
    Please dont include this text

    Static and Dynamic Cannot be Performed together. They are mutually exclusive events.
    Credit check can be performed either at Sale order level or at Delivery / PGI Level.
    FCV3 is a good report to see whether a customer would fail a credit check. ( suitable for your customer service )
    Coming to your Point , Assuming that the customer is eligible for a Credit of 50 Lacs. Now the Customer has placed an order for 60 Lacs. We set the Customer credit checking at  order level . The Customers Sale order would get blocked.
    The Customer service  will follow up for the payment and see to it that it is made. Assume the customer has made a payment for 70 Lacs.
    Now let us have a look at the account statement of the customer.
    Account Statement :     Customer Cr :  70 Lacs.   Dr   :  0.  ( because no delivery and invoice  so far has been made )  
    So we are supposed to deliver the Material worth value of 60 Lacs.
    The First sale order worth 60 Lacs has been unblocked in VKM3. Now at the time of Delivery level why would you want to chekc the Credit limit again ? It has already passed the credit check.
    It is not necessary to check credit limit . Because you have already performed the same at the order level.
    Now the customer has come again and raised another sale order for 80 Lacs. The System would block him.
    The system will never block the Previous delivery which you are, due for delivery  to the customer.
    If we keep on checking the Credits without delivering we would end up only raising in Sale orders and no Delivery to the Customer  at all. The Debit side of his account will always be 0.
    So i donot think Static and dynamic is needed . you can go for either Static or Dynamic.

  • Dynamic check box creation in selection screen

    Hello,
    I am trying to put up some check boxes dynamically in a selection screen. The number: of check boxes required and the 'checkbox label text' is to be retrieved from a database table. I have retrieved all these values in AT SELECTION-SCREEN OUTPUT event. But, I dont know how to create check box parameters using these dynamic values.  Please help..

    hi Giffin,
    Create a program with name 'Z_13317_DYN_CHKBOX' and paste the following code in it. Also make ensure that an include with name 'Z_13317_DYN_INCL' is not existing earlier because this program will be overwritten each and everytime.
    Z_13317_DYN_CHKBOX will take an integer as an input. After giving input, click on the button on selection screen.
    Suppose, if you have given 3 as input and if you have clicked the button, then 3 checkboxes will be generated on your selection screen.
    REPORT  Z_13317_DYN_CHKBOX.
    types :begin of t_itab1,
            line(72),
           end of t_itab1.
    data: incl type table of t_itab1 with header line.
    parameters: p_tab type i,
                p_frst type c no-display.
    selection-screen begin of line.
    selection-screen: pushbutton 2(20) but1 user-command cli1.
    selection-screen end of line.
    include z_13317_dyn_incl if found.
    initialization.
    at selection-screen output.
      if p_frst = ' '.
        p_frst = 'X'.
        perform crt_dyn_incl.
      endif.
    at selection-screen.
      case sy-ucomm.
        when 'CLI1'.
        perform crt_dyn_incl.
      endcase.
    *&      Form  crt_dyn_incl
    *       text
    form crt_dyn_incl .
      perform populate_incl.
      perform del_incl.
      insert report 'Z_13317_DYN_INCL' from incl.
      commit work.
      submit z_13317_dyn_chkbox via selection-screen with p_frst = p_frst.
    endform.                    " crt_dyn_incl
    *&      Form  del_incl
    *       text
    form del_incl .
      call function 'RS_DELETE_PROGRAM'
        exporting
         program                          = 'Z_13317_DYN_INCL'
         suppress_checks                  = 'X'
         suppress_popup                   = 'X'
         with_cua                         = ' '
         with_documentation               = ' '
         with_dynpro                      = 'X'
         with_includes                    = ' '
         with_textpool                    = ' '
         with_variants                    = ' '
      if sy-subrc <> 0.
      endif.
    endform.                    " del_incl
    *&      Form  populate_incl
    *       text
    form populate_incl .
      data: v_cnt type n.
      do p_tab times.
        v_cnt = v_cnt + 1.
        incl-line = 'parameters: '.
        concatenate incl-line 'p_chk' v_cnt into incl-line.
        concatenate incl-line 'as checkbox.' into incl-line separated by space.
        append incl.
        clear incl.
      enddo.
    endform.                    " populate_incl
    Regards,
    Sailaja.

  • How do you dynamically check if all member children are missing?

    Hi All,
    How do you dynamically check if all member children are missing?
    e.g. the below line does not work because you cannot directly use member sets in an IF statement.
    IF ((@CHILDREN ("Profit")==#MISSING))
    If I explicitly list all children in the IF statement, it will work, but there is alot of hardcoding.
    Thanks in advance.
    Darren

    Hi All,
    We have a BSO app and we need to query the account without aggregating the data..
    We have 4 accounts sitting under Profit:
    Profit
         A001
         A002
         A003
         A004
    @SUM (@DESCENDANTS ("Profit")) works fine, but we also need to sum the accounts for the parent member of the current business that is evaluated, I have tried @SUM (@DESCENDANTS ("Profit")->@PARENT ("Business")) but this does not work.
    This however works...
    @SUM(
    @PARENTVAL("Business","A001"),
    @PARENTVAL("Business","A002"),
    @PARENTVAL("Business","A003"),
    @PARENTVAL("Business","A004"))
    Is there a dynamic method to add the parent values together?
    Cheers,

  • 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

  • Dynamic check box

    Hi I need help from all java expertise, I need to create dynamic check boxes. table have the customer name, one customer have multiple locations, on selection of customer name, all the locations should be displayed with chek box option, so that the user will allocate some rebate or ajustment to a particular location. How to achive this. any help will be appericiated
    thanks

    Lets assume that you got your customer information and everything is stored in a ResultSet rs
    The value of the radio buttons in this case will be the customer name but you can change it
    to whatever you want that way you can get the parameter accordingly to do your updates.
    <%
    ResultSet rs = ....... ;
    for( int n = 1; n <= rs.size(); n++ )
    while (rs.next()) {
    String custName = rs.getString("CUSTOMER_NAME");
    String custLoc = rs.getString("CUSTOMER_LOCATION");
    %>
    <tr>
    <td BGCOLOR="#FFFFCE" valign="top" align="left"><input type="radio" name="radioButton" value="<%=custName%>"> </td>
    <td BGCOLOR="#FFFFCE" valign="top" align="left"><%=custName%> </td>
    <td BGCOLOR="#FFFFCE" valign="top" align="left"><%=custLoc%> </td>
    </tr>
    <% } // end while loop
    } // end for loop
    %>
    </table>

  • Apex with dynamic check box....

    hi to all:
    i have report emp.it contain data like eno,ename,sal,record .
    example:eno ename sal record
    100 a 100
    200 b 3000 going on...
    using this column i am making report by using apex and report contain one submit button also.
    1)in this report i am creating dynamic check box depend on eno..see my coding
    declare
    str varchar2(3000);
    begin
    str:='select htmldb_item.CHECKBOX(10,eno,DECODE(record,1,''CHECKED'')) "SELECT" ,eno,ename,sal ,record from emp where 1=1';
    return str;
    end;
    2)in process created after  submit
    iam created pl/code like ..this code for
    declare
    i number;
    str varchar2(2000);
    emp_id number;
    begin
    FOR i in 1..HTMLDB_APPLICATION.G_F10.count
    LOOP
    IF HTMLDB_APPLICATION.G_F10(i) is not null then
    SELECT htmldb_application.G_F10(i) INTO emp_id from dual;
    --insert into my_log values(emp_id);commit;
    update emp set record=1 where eno=emp_id ;
    commit;
    else if HTMLDB_APPLICATION.G_F10(i) is null then
    update emp set record=0 where eno=emp_id ;
    commit;
    else
    null;
    end if;
    end loop;
    end;
    my requirenent:
    a)if check box checked then -update -record column -1
    b)if check box uncked then -update - record column -0
    in process coding--
    eno alway is not null only..
    so i want to do check box with update the record column..like this
    a)if check box checked then -update -record column -1
    b)if check box uncked then -update - record column -0
    pls give solution.
    output i want like this example:
    chebox eno ename sal record
    checked(X) 100 a 300 1
    checked(x) 200 b 300 1
    next time i am trying to make uncheck first row like
    chebox eno ename sal record
    unchecked 100 a 300 0
    checked(x) 200 b 300 1

    Hi VKR,
    Please try this,
    <cfform name="frmTest"  format="Flash" action="test.cfm" method="post"  >
    <cfscript>
        qryCountry = queryNew("Country,CountryID");   
          queryAddRow(qryCountry);  
          querySetCell(qryCountry, "Country", "India");  
          querySetCell(qryCountry, "CountryID", "1");  
          queryAddRow(qryCountry);  
          querySetCell(qryCountry, "Country", "England");
           querySetCell(qryCountry, "CountryID", "2");    
          queryAddRow(qryCountry);  
          querySetCell(qryCountry, "Country", "Kenya");
           querySetCell(qryCountry, "CountryID", "3");      
    </cfscript>   
        <cfformgroup type="repeater"  query="qryCountry">                       
            <cfinput type="checkbox" value="{qryCountry.currentItem.CountryID}" name="chk" Label="{qryCountry.currentItem.Country}">                               
        </cfformgroup>
        <cfinput type="submit" name="submit" width="100" value="Submit"  >
    </cfform>
    Hope this will help

  • Static, dynamic check???

    Dear all experts,
    Could you explain in details why an organization may want to turn on static check that creates a warning message when a customer exceeds its credit limit, but the status block is set onl when the dynamic check exceeds the customer's limit?
    Thanks.
    Lokisandra

    Dear Lokisandra,
    your question is not clear but I will try to address it.
    I am sure you have checked settings in OVA8 , if not please check.
    Explanation to your query,
    First of all it is not possible to have static and dynamic check carried out seperatly for the same customer in same document type, If thats what you mean. ??????
    *But different document types like OR or CS  may carry out differnt credit check depending upon setting maintained in VOV8 Check credit limit Tab. for sales order OR you will have automatic credit check "D", there in OVA8 it can have static or dynamic credit check with block or warning message depending upon the settings.
    but for Cash sale you dont need to check credit limit, customer is paying by cash but just to bring it to the notice of the person booking the order you can have "A" in VOV8 to just carry out credit check and warning.
    Settings OVA8
    As you are aware that Credit control, takes following organizational objects in consideration during Automatic credit control.
    Credit control area, Risk category , Document credit grp.
    In any Organization there are customers with high risk and some customer with no risk at all. you would not like to have same credit settings for all the customers irrespective of their payment promptness. In this case for high risk customer you can set up block either static or dynamic credit check.
    For no risk customer you will have warning message set up but you may not want to block the order again irrespective of Static or dynamic credit check.
    Hope that helps
    Regards,
    Paresh kolte

  • Dynamic ALV: but with globally available dynamic table type

    Hello,
    I would like to create a dynamic node for a ALV and dynamic table types to fill and the ALV.
    The ALV data can be changed so I need to read it again.
    I have read all the threads about dynamic node create and i have no problem with it. I can create a structure and a table dynamically. thats also no issue for me.
    But. I fill the ALV data in a method and read it in another method to save the changes in a data base table.
    Thats also no problem
    So where i need your help? I currently create the dynamic table and structure in both methods. That works, but why do the same thing twice?
    I cant figure out by myself how to create a dynamic table/structure in a global way, so the dynamic table/structure is created once and then available in the whole WD4A view.
    I tried is with a class type in se24 with reference to CL_ABAP_STRUCTDESCR but I cant make that run, because to access the type I created an attribute in se24 with reference to the class type that I now try in instance and fill in the method. But ABAP thinks that my attribute is not compatible anymore.
    Any idea how to make a dynamic table globally available? That must be an ABAP god who can answer this question, hehe. So imagin me falling on my knees for the one who has an answer that really works
    Kind regards,
    Hendrik

    This doesn't seem too difficult really. For a dynamic table you just need to declare the internal table as TYPE REF TO DATA.
    Just more this declaration to the attributes of your Component Controller. So for instance in my component controller I have an attribute called i_data with the RefTo column checked and the associated type = DATA.
    So now I could do the following:
      create data wd_this->idata type table of (tablename).
    Or however you are dynamically creating the table - maybe with TYPE HANDLE instead.
    The point is that your dynamic table is now global to your entire component and you can read and write to it from different methods.
    Is this what you were looking for?  Without knowing more about your existing coding, it is difficult to say more.

  • Dynamic IF statement...like dynamic where clause...

    Hi,
    I know how to do a dynamic where clause by putting (varname) like shown below -
    select * from cust_mstr where (varname).
    Can I do it something like this in IF statement.
    if (varname).
    endif.
    The varname will have different conditions.
    Your help will be greately appreciated.
    Regards,
    Sume

    Hello Sume,
    I would try to use an approach using ranges:
    DATA:
      gv_material TYPE matnr.
    gv_material = '292-392-392-202'.
    IF gv_material = '292-392-392-202'.
      WRITE: / `Static check:`, gv_material, `matches!`.
    ELSE.
      WRITE: / `Static check:`, gv_material, `doesn't match!`.
    ENDIF.
    PERFORM dynamic_check
                USING
                   gv_material
                   'I'
                   'EQ'
                   '292-392-392-202'
                   space.
    PERFORM dynamic_check
                USING
                   gv_material
                   'I'
                   'CP'
                   '*292*'
                   space.
    PERFORM dynamic_check
                USING
                   gv_material
                   'I'
                   'CP'
                   '*ABC*'
                   space.
    *&      Form  dynamic_check
    FORM dynamic_check USING pv_value    TYPE clike
                             pv_sign     TYPE ddsign
                             pv_option   TYPE ddoption
                             pv_low      TYPE string
                             pv_high     TYPE string.
      DATA lr_range TYPE RANGE OF string.
      DATA ls_range LIKE LINE  OF lr_range.
      ls_range-sign   = pv_sign.
      ls_range-option = pv_option.
      ls_range-low    = pv_low.
      ls_range-high   = pv_high.
      APPEND ls_range TO lr_range.
      IF pv_value IN lr_range.
        WRITE: / `Dynamic check matches: `, pv_value, ls_range-sign, ls_range-option, ls_range-low, ls_range-high.
      ELSE.
        WRITE: / `Dynamic check doesn't match:`, pv_value, ls_range-sign, ls_range-option, ls_range-low, ls_range-high.
      ENDIF.
    ENDFORM.                    "dynamic_check
    For values of SIGN and OPTION check the values of the domains used in the data elements of the parameters of form dynamic_check.
    Output is like:
    Static check:                292-392-392-202    matches!
    Dynamic check matches:       292-392-392-202    I EQ 292-392-392-202
    Dynamic check matches:       292-392-392-202    I CP *292*
    Dynamic check doesn't match: 292-392-392-202    I CP *ABC*
    Edited by: Alejiandro  Sensejl on Aug 11, 2010 8:23 PM:
    Unfortunately I don't know why the code-tag isn't working, I sent a mail to SCN tech-team about this... Sorry, but you have to copy the code somehow to have a look at it

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

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

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

  • How will check the space taken by a single table in a tablespace ?

    How will check the space taken by a single table in a tablespace ?
    dba_segments is giving the same values even if I truncate the table?
    Pls reply

    I need to know how can we find out the size of the table in the tablespace.use user_segments (bytes) column.
    How much bytes it has taken ?value from user_segments, bytes column
    If u delete records will the space be used for another table in same tablespace?No, it keep the space in the same table for future usage.
    How can we free that space ?truncate or drop the table and reduce the size from tablespace, if you want to reclaim the space from the tablespace, OS level.
    Jaffar

  • I need to add check whether 21 fields of a internal table are empty or not.

    Hello,
    I need to add check whether 21 fields of a internal table are empty or not.How can we write a code for the same wand what would be the correct syntax for it.
    I tried entering all the fields in the IF loop with AND condition but its giving syntax error.Perhaps this is because the lenght of the IF condition would be more than the allowed one.

    Hi,
    After the select quiery.
    If not itab is initial.
    Message 'Table is not empty'    type 'I'.
    Endif.
    Regards,
    Jagadish.

  • An unexpected error occurred processing your request. Check the logs for details and correct the problem.

    Hi All,
    I am configuring RSS Viewer webpart to SP 2013. 
    But i am getting an error "An unexpected error occurred processing your request. Check the logs for details and correct the problem."
    I looked for solution of this error. i got to know, we need to set proxy server in web.config file.
    So, in order to resolve this i put the following set of code in web.config and save the file
    <system.net>
        <defaultProxy>
          <proxy usesystemdefault="True" proxyaddress="http://myproxyserver" bypassonlocal="True" />      
        </defaultProxy>
      </system.net>
    But, still i am getting the error. 
    What could be the problem now. 
    Any help is much appreciated. 
    Thanks,
    Rakesh

    Hi Rakesh,
    According to your description, my understanding is that you got an error when you used RSS viewer web part in SharePoint 2013.
    The RSS viewer web part uses authentication delegation and is using the current user's credentials to access the proxy. However, the RSS viewer only supports anonymous and Kerberos authentication. So if you are using NTLM authentication, the RSS viewer will
    not be able to authenticate the user through the proxy. More information, please refer to the link:
    http://kalsing.blogspot.com/2007/11/troubleshooting-rss-viewer-web-part.html
    Also see:
    http://blogs.technet.com/b/sharepointdse/archive/2007/04/13/fun-with-rss.aspx
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • How can I take check box in particular cell of the table in smartforms??

    Hi experts,
       pls tell me how can I take check box in particular cell of the table in smartforms??
    It is not interactive form.
    I hv taken small windows as check boxes.but i think it is not a proper solution....give me another solution...

    Hi,
    first create text for a particular cell.
    In that we have a  text editor  in that text editor we have symbols in include menu.
    whatever the symboll u want to put to ur cell . just assign it.
    please check it. if it helpful reward points.
    regards,
    satish.

Maybe you are looking for

  • Installing nntpgrab from the AUR

    Hi guys I hope you can help me. I tried to install nntpgrab from the AUR using pacaur. However, after some compiling process I get the following error: mkdir: cannot create directory '/-gtk-target': Permission denied ==> ERROR: A failure occurred in

  • Quick question DVI vs VGA

    I'm getting a mini and I intend to use it on my 46" Panni. I still have an empty HDMI slot but my TV also has a VGA slot as well. Since I have to buy a cable adapter does it matter which direction I take VGA or HDMI? One other bit of info, my tv is 1

  • Elements 11 - endless MAC pinwheel on loading a file

    Any solution to the endless pinwheel in 11 Editor (updates installed)?  I load a previously created PSD file, move a few layers around and the endless pinwheel appears.  Have to Force Quit. MAC OSX 10.8.3 

  • Create non-printing text?

    Can text in Pages be marked as non-printing? If not, is there a work around? Thank you.

  • Reg:- Auxiliary materials for Fleet objects

    Hi Gurus/Friends Here i have an issue reg the Assignment of Auxiliary materials to the Fuel types. I did testing with assigning the materials in Testing but ..... Can i know the assignment of Auxiliary materials to the fuel types is done   separately