Getting values from the dynamically created textboxes

Hello,
I am developing one jsp page using struts. In the page i m
dynamically adding some rows with 2 textboxes in each row. and
after entering data into those rows , user clicks on save button
and page is submitted. I want to capture all this data of dynamically
added rows so that i can enter those rows into DB.
how can i acheive this using struts?.
Have anyone had tried doing it?. Please help.
Thanx in advance
Deepali Naik

U can do something like......
class MatrixData{
public myMethod(){
Arraylist list_of_rows=new Arraylist ();
JTextBox 11=new JTextBox (); // matrix position (1,1)
JTextBox 12=new JTextBox ();// matrix position (1,2)
addRow(new RowData(11,12)
public addRow(RowData data){
list_of_rows.add(data);
class RowData{
Arraylist txtBoxList=new Arraylist ();
public JTextBox getOne(){
return txtBoxList.get(0);
public JTextBox getTwo(){
return txtBoxList.get(1);
public setOne(JTextBox comp){
txtBoxList.add(comp);
public setTwo(JTextBox comp){
txtBoxList.add(comp);
Hope it helps.
Best Regards
Mohit

Similar Messages

  • Help needed in getting values from the dynamically created text boxes

    Hello,
    I am developing one jsp page using struts. In the page i m
    dynamically adding some rows with two text boxes in each row. and after entering data into
    those textboxes , user clicks on save button and page is submitted.
    I want to capture all this data of dynamically added
    rows so that i can enter those rows into DB.
    how can i acheive this using struts?.
    Have anyone had tried doing it?. Please help.
    Thanx in advance
    Deepali Naik

    Hi,
    1. If you give these textBoxes the same name, then in your action you can call request.getParameterValues(paramName) - it returns String[ ] of values.
    2. You can give form textBox names like "name"+index or something like this in <logic:iterate> tag
    Good luck!

  • Failed to get schema from the dynamic feed (example.php).

    Hi,
    I've been trying to get the schema from an exported xml file
    ex. example.php
    (using Developer Toolbox).
    But it keeps saying "
    Failed to get schema from the dynamic feed (example.php)."
    Any help?
    Thanks
    Wald

    Here's the file:
    data.php, I can see it
    correctly in the browser except of the style information that are
    missing.
    Code:
    <?php require_once('../Connections/example.php'); ?>
    <?php
    // Load the XML classes
    require_once('../includes/XMLExport/XMLExport.php');
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType,
    $theDefinedValue = "", $theNotDefinedValue = "")
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue)
    : $theValue;
    $theValue = function_exists("mysql_real_escape_string") ?
    mysql_real_escape_string($theValue) :
    mysql_escape_string($theValue);
    switch ($theType) {
    case "text":
    $theValue = ($theValue != "") ? "'" . $theValue . "'" :
    "NULL";
    break;
    case "long":
    case "int":
    $theValue = ($theValue != "") ? intval($theValue) : "NULL";
    break;
    case "double":
    $theValue = ($theValue != "") ? "'" . doubleval($theValue) .
    "'" : "NULL";
    break;
    case "date":
    $theValue = ($theValue != "") ? "'" . $theValue . "'" :
    "NULL";
    break;
    case "defined":
    $theValue = ($theValue != "") ? $theDefinedValue :
    $theNotDefinedValue;
    break;
    return $theValue;
    mysql_select_db($database_example, $example);
    $query_data = "SELECT * FROM example";
    $data = mysql_query($query_data, $example) or
    die(mysql_error());
    $row_data = mysql_fetch_assoc($data);
    $totalRows_data = mysql_num_rows($data);
    // Begin XMLExport data
    $xmlExportObj = new XMLExport();
    $xmlExportObj->setRecordset($data);
    $xmlExportObj->addColumn("Name", "Name");
    $xmlExportObj->addColumn("Damage", "Damage");
    $xmlExportObj->addColumn("Speed", "Speed");
    $xmlExportObj->addColumn("Level", "Level");
    $xmlExportObj->addColumn("Details", "Details");
    $xmlExportObj->addColumn("Type", "Type");
    $xmlExportObj->addColumn("Source", "Source");
    $xmlExportObj->addColumn("Location", "Location");
    $xmlExportObj->addColumn("Date", "Date");
    $xmlExportObj->addColumn("Price", "Price");
    $xmlExportObj->addColumn("Skill", "Skill");
    $xmlExportObj->addColumn("Constitution", "Constitution");
    $xmlExportObj->addColumn("Intelligence", "Intelligence");
    $xmlExportObj->addColumn("Wisdom", "Wisdom");
    $xmlExportObj->addColumn("Strength", "Strength");
    $xmlExportObj->addColumn("Member", "Member");
    $xmlExportObj->addColumn("Image", "Image");
    $xmlExportObj->setMaxRecords("ALL");
    $xmlExportObj->setDBEncoding("ISO-8859-1");
    $xmlExportObj->setXMLEncoding("ISO-8859-1");
    $xmlExportObj->setXMLFormat("NODES");
    $xmlExportObj->setRootNode("Category");
    $xmlExportObj->setRowNode("Type");
    $xmlExportObj->Execute();
    // End XMLExport data
    ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=utf-8" />
    <title>example</title>
    <link href="css.css" rel="stylesheet" type="text/css"
    />
    </head>
    <body>
    </body>
    </html>
    <?php
    mysql_free_result($data);
    ?>
    Thanks again

  • Get value from the array based on the HashCode

    public static void runJoin(int[][] t1,int[][] t2)
         PrintWriter out=null;
         int rows = 1000;
         int cols = 7;
         int [][] myTable3 = new int[rows][cols];
         int x = 0;
         System.out.print("Running HashJoin:Method loads the "+
         "smaller table in the memory and applies a hashing function "+
         "to common column and stores it in another table. "+
         "The larger table is then read from the file. "+
         "The same hashing function is applied to Col n of the table and a       matching record in the first table is looked up. A match will create a row in Table 3. ");          
    //Apply hashing function to smaller table and store it in the memory.
              Integer[] It2 = new Integer[t2.length];
              int [] hashCodest2 = new int[t2.length];
              Hashtable ht = new Hashtable();
              for(int i =0; i <t2.length;i++){
                   It2[i] = new Integer(t2[0]);
                   hashCodest2[i] = It2[i].hashCode();
                   ht.put(new Integer(hashCodest2[i]),It2[i]);
              //Larger table get hashcodes
              Integer It1[] = new Integer[t2.length];
              int [] hashCodest1 = new int[t2.length];          
              for(int j =0; j <t1.length;j++){
                   It1[j] = new Integer(t1[j][4]);
                   hashCodest1[j] = It1[j].hashCode();               }
              //Based on the hashcode get the value from the Table2;
              try{
    out = new PrintWriter( new FileOutputStream( "c:\\HashJoinTable.txt" ) );
              Enumeration e = ht.keys();
                   while(e.hasMoreElements())
    //How do I get the value from the array based on the HashCode? Do I need to do a loop here???                         
    hashCodes1.get(e.nextElement());           
              }catch(Exception e){}

    ok I got it......
              //Apply hashing function to smaller table and store it in the memory.
              Integer[] It2 = new Integer[t2.length];
              int [] hashCodest2 = new int[t2.length];
              Hashtable ht = new Hashtable();
              for(int i =0; i <t2.length;i++){
                   It2[i] = new Integer(t2[0]);
                   hashCodest2[i] = It2[i].hashCode();
                   ht.put(new Integer(hashCodest2[i]),It2[i]);
              //Larger table get hashcodes and compare
              Integer It1[] = new Integer[t2.length];
              int [] hashCodest1 = new int[t2.length];          
              Hashtable ht2 = new Hashtable();
              for(int j =0; j <t1.length;j++){
                   It1[j] = new Integer(t1[j][4]);
                   hashCodest1[j] = It1[j].hashCode();               
                   ht2.put(new Integer(hashCodest1[j]),It1[j]);
              //Based on the hashcode get the value from the Table2;
              try{
    out = new PrintWriter( new FileOutputStream( "c:\\HashJoinTable.txt" ) );
              Enumeration e = ht.keys();
              Integer t3[] = new Integer[t2.length];
                   while(e.hasMoreElements())
                        t3[x] = (Integer) ht2.get(e.nextElement());                
                        x++;
              }catch(Exception e){}

  • To get the input values from the dynamic tables and save in the SAPdatabase

    HI EXPERTS,
    I AM NEW TO WEB DYNPRO ABAP. MY QUERY IS HOW TO GET THE VALUES THE USER ENTERS IN THE DYNAMIC TABLE AND SAVE THE SAME IN THE SAP DATABASE. I HAVE CREATED THE TABLES BUTTON EVERYTHING BUT I DONT KNOW THE CODE HOW TO DO. PLEASE HELP ME OUT.

    >
    vadiv_maha wrote:
    > HI EXPERTS,
    >
    > I AM NEW TO WEB DYNPRO ABAP. MY QUERY IS HOW TO GET THE VALUES THE USER ENTERS IN THE DYNAMIC TABLE AND SAVE THE SAME IN THE SAP DATABASE. I HAVE CREATED THE TABLES BUTTON EVERYTHING BUT I DONT KNOW THE CODE HOW TO DO. PLEASE HELP ME OUT.
    hi,
    1 there is one property OnAction of the button...
    2 So, in this event handler,you have to read the context node to which ur table is binded
    3 use the code wizard
    control+f7
    , and use the method
    get_static_attribute_table
    4 now u have got the vaues in internal table,so now as pointed in the previous reply, you can use the
    Update
    or
    Modify
    statement...
    regards,
    Amit

  • Get value from select list created using htmldb_item.SELECT_LIST_FROM_LOV

    I have created a tabular form using the HTMLDB_ITEM functions and now in the javascript, I need to determine the value in another column created using the SELECT_LIST_FROM_LOV function and then set the value under certain circumstances. Unfortunately, I do not know the correct syntax. My Javascript function is being called properly, I am just unable to get or set the field.
    I am calling my javascript function from another column on the tabular form passing in the current row number and f09 is my column.
    Below is my code. Unfortunately, none of the below are working.
    function f_setCurrency(a_row)
    var l_Currency = html_GetElement('f09_'+a_row);
    html_SetSelectValue(l_Currency, 2);
    alert(html_GetSelectValue(l_Currency ));
    alert($x(l_Currency).value);
    alert($x('f09_'+a_row).value);
    alert($v('f09_'+a_row));
    alert($x('f09_'+a_row).innerHTML);
    }

    Brian,
    This example:
    http://htmldb.oracle.com/pls/otn/f?p=31517:176
    and this example:
    http://htmldb.oracle.com/pls/otn/f?p=31517:160
    may help you.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • How to get values from the page excpet pagecontext.getparameter

    i have a requirement wherein i am passing paramteres from the "submit" button.but the problem being that,i have multiple rows in my page.what is happening is that my "submit" button is passing the values of the previous row,instead of the current row.this is i think because "commit" gets called later and params are passed before it.
    how do i solve this problem
    or if i can get to get paramteres in a advance table layout,i l be able to achieve my requirement.beacuse in advance table layout,i am not able to do pagecontext.getparameter("---" of the item

    thanks guys,
    i did try working with row refrence but it returns a null only.
    my requirement was that i had update functionality as well as "add new rows" on the same advtbl bean.an whenevr i click on "add new row" and submit,i was always gettin the parameters for the previous row.
    now,i have got a workaround to that,by having a radio button to select rows to update and whenever i click on "add new rows" ,i disable the radio button,and get the handle based on the value from radio group.
    but still row refrence dint work for me.i will appreciate if sum1 can send me the code

  • Formatting value in the dynamically created table

    Hi,
    I have created table dynamically.
    In that, if the columns going to be number datatype,
    <af:convertNumber pattern="##########"/> , i want to apply this pattern,
    if the column going to be date,
    <af:convertDateTime pattern="DD/mm/yyyy" /> , i want to apply this pattern.
    Code Snippet for dynamically created UI table,
    <af:table rows="#{bindings.DynamicVO.rangeSize}"
    fetchSize="#{bindings.DynamicVO.rangeSize}"
    emptyText="#{bindings.DynamicVO.viewable ? 'No data to display.' : 'Access Denied.'}"
    var="row" rowBandingInterval="0"
    value="#{bindings.DynamicVO.collectionModel}"
    selectedRowKeys="#{bindings.DynamicVO.collectionModel.selectedRow}"
    selectionListener="#{bindings.DynamicVO.collectionModel.makeCurrent}"
    rowSelection="single" id="t1">
    <af:forEach items="#{bindings.DynamicVOIterator.attributeDefs}" var="def">
    <af:column headerText="#{def.name}" sortable="true" rendered="#{def.hints.displayHint!='Hide'}"
    sortProperty="#{def.name}" id="hisc1">
    <af:outputText value="#{row[def.name]}" id="othis1">
    </af:outputText>
    </af:column>
    </af:forEach>
    </af:table>
    How to apply the pattern for the ouput text dynammically depending on the data type.
    My Jdeveloper version is 11.1.1.3.0
    Reg,
    vini

    Any help on the above scenario?

  • Getting values from the table control to the program

    Hi Gurus,
    i created a program for sales order creation to transfer order creation and to insert multiple values i defined my own selection screen by inserting table control before that the code executed succesfully but after inserting the table control it is not creating any documents
    code before inserting table control:-
    REPORT  zcl120_sales_n_delivery.
                      SALES DOCUMENT CREATION
    PARAMETERS: p_auart TYPE auart OBLIGATORY.
    PARAMETERS: p_vkorg TYPE vkorg OBLIGATORY.
    PARAMETERS: p_vtweg TYPE vtweg OBLIGATORY.
    PARAMETERS: p_spart TYPE vtweg OBLIGATORY.
    PARAMETERS: p_sold TYPE kunnr OBLIGATORY.
    PARAMETERS: p_ship TYPE kunnr OBLIGATORY.
    *ITEM
    PARAMETERS: p_matnr TYPE matnr OBLIGATORY.
    PARAMETERS: p_menge TYPE kwmeng OBLIGATORY.
    PARAMETERS: p_plant TYPE werks_d OBLIGATORY.
    PARAMETERS: p_itcat TYPE pstyv OBLIGATORY.
    DATA DECLARATIONS.
    DATA: v_vbeln LIKE vbak-vbeln.
    DATA: header LIKE bapisdhead1.
    DATA: headerx LIKE bapisdhead1x.
    DATA: item LIKE bapisditem OCCURS 0 WITH HEADER LINE.
    DATA: itemx LIKE bapisditemx OCCURS 0 WITH HEADER LINE.
    DATA: partner LIKE bapipartnr OCCURS 0 WITH HEADER LINE.
    DATA: return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
    DATA: lt_schedules_inx TYPE STANDARD TABLE OF bapischdlx
    WITH HEADER LINE.
    DATA: lt_schedules_in TYPE STANDARD TABLE OF bapischdl
    WITH HEADER LINE.
    HEADER DATA
    header-doc_type = p_auart.
    headerx-doc_type = 'X'.
    header-sales_org = p_vkorg.
    headerx-sales_org = 'X'.
    header-distr_chan = p_vtweg.
    headerx-distr_chan = 'X'.
    header-division = p_spart.
    headerx-division = 'X'.
    headerx-updateflag = 'I'.
    partner-partn_role = 'AG'.
    partner-partn_numb = p_sold.
    APPEND partner.
    partner-partn_role = 'WE'.
    partner-partn_numb = p_ship.
    APPEND partner.
    item-material = p_matnr.
    item-plant = p_plant.
    item-target_qty = p_menge.
    item-target_qu = 'ST'.
    item-item_categ = p_itcat.
    APPEND item.
    itemx-updateflag = 'I'.
    itemx-material = 'X'.
    itemx-plant = 'X'.
    itemx-target_qty = 'X'.
    itemx-target_qu = 'X'.
    itemx-item_categ = 'X'.
    APPEND itemx.
    Fill schedule lines
    lt_schedules_in-itm_number = '000010'.
    lt_schedules_in-sched_line = '0001'.
    lt_schedules_in-req_qty = p_menge.
    APPEND lt_schedules_in.
    Fill schedule line flags
    lt_schedules_inx-itm_number = '000010'.
    lt_schedules_inx-sched_line = '0001'.
    lt_schedules_inx-updateflag = 'X'.
    lt_schedules_inx-req_qty = 'X'.
    APPEND lt_schedules_inx.
    Call the BAPI
    CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA1'
      EXPORTING
        sales_header_in     = header
        sales_header_inx    = headerx
      IMPORTING
        salesdocument_ex    = v_vbeln
      TABLES
        return              = return
        sales_items_in      = item
        sales_items_inx     = itemx
        sales_schedules_in  = lt_schedules_in
        sales_schedules_inx = lt_schedules_inx
        sales_partners      = partner.
    LOOP AT return WHERE type = 'E' OR type = 'A'.
      EXIT.
    ENDLOOP.
    IF sy-subrc = 0.
      WRITE / return-message.
      WRITE: / 'Error in creating document'.
    ELSE.
      COMMIT WORK AND WAIT.
      WRITE: / 'Document ', v_vbeln, ' created'.
    ENDIF.
                      DELIVERY ORDER CREATION
    *PARAMETERS: p_vbeln LIKE vbak-vbeln.
    DATA: BEGIN OF t_vbap OCCURS 0,
            vbeln LIKE vbap-vbeln,
            posnr LIKE vbap-posnr,
            kwmeng LIKE vbap-kwmeng,
            matnr  LIKE vbap-matnr,
            werks  LIKE vbap-werks,
          END OF t_vbap.
    DATA: t_request TYPE STANDARD TABLE OF bapideliciousrequest
          WITH HEADER LINE.
    DATA: t_created TYPE STANDARD TABLE OF bapideliciouscreateditems
          WITH HEADER LINE.
    DATA: t_return TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE.
    SELECT vbeln posnr kwmeng matnr werks
           INTO TABLE t_vbap
           FROM vbap
           WHERE vbeln = v_vbeln
    LOOP AT t_vbap.
      t_request-document_numb = t_vbap-vbeln.
      t_request-document_item = t_vbap-posnr.
      t_request-quantity_sales_uom = t_vbap-kwmeng.
      t_request-id = 1.
      t_request-document_type = 'A'.
      t_request-delivery_date      = sy-datum.
      t_request-material = t_vbap-matnr.
      t_request-plant = t_vbap-werks.
      t_request-date = sy-datum.
      t_request-goods_issue_date = sy-datum.
      t_request-goods_issue_time = sy-uzeit.
      APPEND t_request.
    ENDLOOP.
    CALL FUNCTION 'BAPI_DELIVERYPROCESSING_EXEC'
      TABLES
        request      = t_request
        createditems = t_created
        return       = t_return.
    READ TABLE t_return WITH KEY type = 'E'.
    IF sy-subrc = 0.
      MESSAGE e208(00) WITH 'Delivery creation error'.
    ENDIF.
    COMMIT WORK.
    READ TABLE t_created INDEX 1.
    WRITE: /  'Delivery Number : ',
             t_created-document_numb.
                      CREATE TRANSFER ORDER
    DATA: w_tanum TYPE ltak-tanum.
    CALL FUNCTION 'L_TO_CREATE_DN'
      EXPORTING
        i_lgnum                          = '010'
        i_vbeln                          = t_created-document_numb
    IMPORTING
       e_tanum                          = w_tanum
    EXCEPTIONS
       foreign_lock                     = 1
       dn_completed                     = 2
       partial_delivery_forbidden       = 3
       xfeld_wrong                      = 4
       ldest_wrong                      = 5
       drukz_wrong                      = 6
       dn_wrong                         = 7
       squit_forbidden                  = 8
       no_to_created                    = 9
       teilk_wrong                      = 10
       update_without_commit            = 11
       no_authority                     = 12
       no_picking_allowed               = 13
       dn_hu_not_choosable              = 14
       input_error                      = 15
       OTHERS                           = 16
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    COMMIT WORK AND WAIT.
    WRITE: / 'Transfer order number',
           w_tanum.
    Code after inserting table control:-
    REPORT  zcl120_sales_n_delivery.
                      SALES DOCUMENT CREATION
    DATA: p_auart TYPE auart .
    DATA: p_vkorg TYPE vkorg .
    DATA: p_vtweg TYPE vtweg .
    DATA: p_spart TYPE vtweg .
    DATA: p_sold TYPE kunnr .
    DATA: p_ship TYPE kunnr .
    *ITEM
    data:
    begin of it_item occurs 0,
       p_matnr TYPE matnr,
       p_menge TYPE kwmeng,
       p_plant TYPE werks_d,
       p_itcat TYPE pstyv,
    end of it_item.
    DATA DECLARATIONS.
    DATA: v_vbeln LIKE vbak-vbeln.
    DATA: header LIKE bapisdhead1.
    DATA: headerx LIKE bapisdhead1x.
    DATA: item LIKE bapisditem OCCURS 0 WITH HEADER LINE.
    DATA: itemx LIKE bapisditemx OCCURS 0 WITH HEADER LINE.
    DATA: partner LIKE bapipartnr OCCURS 0 WITH HEADER LINE.
    DATA: return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
    DATA: lt_schedules_inx TYPE STANDARD TABLE OF bapischdlx
    WITH HEADER LINE.
    DATA: lt_schedules_in TYPE STANDARD TABLE OF bapischdl
    WITH HEADER LINE.
    DATA:
      W_COUNTER TYPE I,
      IT_NUM(6) TYPE C value '000010',
      IT_LINE(4) TYPE C value '0001'.
      CALL SCREEN 100.
    HEADER DATA
    header-doc_type = p_auart.
    headerx-doc_type = 'X'.
    header-sales_org = p_vkorg.
    headerx-sales_org = 'X'.
    header-distr_chan = p_vtweg.
    headerx-distr_chan = 'X'.
    header-division = p_spart.
    headerx-division = 'X'.
    headerx-updateflag = 'I'.
    partner-partn_role = 'AG'.
    partner-partn_numb = p_sold.
    APPEND partner.
    partner-partn_role = 'WE'.
    partner-partn_numb = p_ship.
    APPEND partner.
    loop at it_item.
    CLEAR ITEM.
    item-material = it_item-p_matnr.
    item-plant = it_item-p_plant.
    item-target_qty = it_item-p_menge.
    item-target_qu = 'ST'.
    item-item_categ = it_item-p_itcat.
    APPEND item.
    W_COUNTER = W_COUNTER + 1.
    endloop.
    DO W_COUNTER TIMES.
    itemx-updateflag = 'I'.
    itemx-material = 'X'.
    itemx-plant = 'X'.
    itemx-target_qty = 'X'.
    itemx-target_qu = 'X'.
    itemx-item_categ = 'X'.
    APPEND itemx.
    ENDDO.
    Fill schedule lines
    LOOP AT IT_ITEM.
    CLEAR lt_schedules_in.
    lt_schedules_in-itm_number = IT_NUM.
    lt_schedules_in-sched_line = IT_LINE.
    lt_schedules_in-req_qty = IT_ITEM-p_menge.
    APPEND lt_schedules_in.
    IT_NUM = IT_NUM + 10.
    IT_LINE = IT_LINE + 1.
    ENDLOOP.
    IT_NUM = '000010'.
    IT_LINE = '0001'.
    Fill schedule line flags
    LOOP AT IT_ITEM.
    CLEAR lt_schedules_inx.
    lt_schedules_inx-itm_number = IT_NUM.
    lt_schedules_inx-sched_line = IT_LINE.
    lt_schedules_inx-updateflag = 'X'.
    lt_schedules_inx-req_qty = 'X'.
    APPEND lt_schedules_inx.
    IT_NUM = IT_NUM + 10.
    IT_LINE = IT_LINE + 1.
    ENDLOOP.
    Call the BAPI
    CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA1'
      EXPORTING
        sales_header_in     = header
        sales_header_inx    = headerx
      IMPORTING
        salesdocument_ex    = v_vbeln
      TABLES
        return              = return
        sales_items_in      = item
        sales_items_inx     = itemx
        sales_schedules_in  = lt_schedules_in
        sales_schedules_inx = lt_schedules_inx
        sales_partners      = partner.
    LOOP AT return WHERE type = 'E' OR type = 'A'.
      EXIT.
    ENDLOOP.
    IF sy-subrc = 0.
      WRITE / return-message.
      WRITE: / 'Error in creating document'.
    ELSE.
      COMMIT WORK AND WAIT.
      WRITE: / 'Document ', v_vbeln, ' created'.
    ENDIF.
                      DELIVERY ORDER CREATION
    *PARAMETERS: p_vbeln LIKE vbak-vbeln.
    DATA: BEGIN OF t_vbap OCCURS 0,
            vbeln LIKE vbap-vbeln,
            posnr LIKE vbap-posnr,
            kwmeng LIKE vbap-kwmeng,
            matnr  LIKE vbap-matnr,
            werks  LIKE vbap-werks,
          END OF t_vbap.
    DATA: t_request TYPE STANDARD TABLE OF bapideliciousrequest
          WITH HEADER LINE.
    DATA: t_created TYPE STANDARD TABLE OF bapideliciouscreateditems
          WITH HEADER LINE.
    DATA: t_return TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE.
    SELECT vbeln posnr kwmeng matnr werks
           INTO TABLE t_vbap
           FROM vbap
           WHERE vbeln = v_vbeln
    LOOP AT t_vbap.
      t_request-document_numb = t_vbap-vbeln.
      t_request-document_item = t_vbap-posnr.
      t_request-quantity_sales_uom = t_vbap-kwmeng.
      t_request-id = 1.
      t_request-document_type = 'A'.
      t_request-delivery_date      = sy-datum.
      t_request-material = t_vbap-matnr.
      t_request-plant = t_vbap-werks.
      t_request-date = sy-datum.
      t_request-goods_issue_date = sy-datum.
      t_request-goods_issue_time = sy-uzeit.
      APPEND t_request.
    ENDLOOP.
    CALL FUNCTION 'BAPI_DELIVERYPROCESSING_EXEC'
      TABLES
        request      = t_request
        createditems = t_created
        return       = t_return.
    READ TABLE t_return WITH KEY type = 'E'.
    IF sy-subrc = 0.
      MESSAGE e208(00) WITH 'Delivery creation error'.
    ENDIF.
    COMMIT WORK.
    READ TABLE t_created INDEX 1.
    WRITE: /  'Delivery Number : ',
             t_created-document_numb.
                      CREATE TRANSFER ORDER
    DATA: w_tanum TYPE ltak-tanum.
    CALL FUNCTION 'L_TO_CREATE_DN'
      EXPORTING
        i_lgnum                          = '010'
        i_vbeln                          = t_created-document_numb
    IMPORTING
       e_tanum                          = w_tanum
    EXCEPTIONS
       foreign_lock                     = 1
       dn_completed                     = 2
       partial_delivery_forbidden       = 3
       xfeld_wrong                      = 4
       ldest_wrong                      = 5
       drukz_wrong                      = 6
       dn_wrong                         = 7
       squit_forbidden                  = 8
       no_to_created                    = 9
       teilk_wrong                      = 10
       update_without_commit            = 11
       no_authority                     = 12
       no_picking_allowed               = 13
       dn_hu_not_choosable              = 14
       input_error                      = 15
       OTHERS                           = 16
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    COMMIT WORK AND WAIT.
    WRITE: / 'Transfer order number',
           w_tanum.
    *&SPWIZARD: DECLARATION OF TABLECONTROL 'TAB_CON1' ITSELF
    CONTROLS: TAB_CON1 TYPE TABLEVIEW USING SCREEN 0100.
    *&SPWIZARD: OUTPUT MODULE FOR TC 'TAB_CON1'. DO NOT CHANGE THIS LINE!
    *&SPWIZARD: UPDATE LINES FOR EQUIVALENT SCROLLBAR
    MODULE TAB_CON1_CHANGE_TC_ATTR OUTPUT.
      DESCRIBE TABLE IT_ITEM LINES TAB_CON1-lines.
    ENDMODULE.
    *&      Module  STATUS_0100  OUTPUT
          text
    module STATUS_0100 output.
       SET PF-STATUS 'MENU'.
    SET TITLEBAR 'xxx'.
    endmodule.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    module USER_COMMAND_0100 input.
    IF SY-UCOMM EQ 'START'.
    LEAVE to screen 0 .
    ENDIF.
    endmodule.                 " USER_COMMAND_0100  INPUT
    *&      Module  APPEND_IT_ITEM  INPUT
          text
    module APPEND_IT_ITEM input.
    APPEND IT_ITEM.
    CLEAR IT_ITEM.
    endmodule.                 " APPEND_IT_ITEM  INPUT
    plz help me where the error is

    Hi,
    Do same as suggested by Ramesh. Add one user command button after clicking that do the looping and call new screen.
    Ashven.

  • Passing variables from a dynamically created textinput in AS2?

    Hey everyone,
    I have a contact form in my flash file with name/email/message fields which a user can fill out and then click send, which passes these to a php script which then emails the information that they entered. This works fine when the text inputs are manually placed on the stage and all the information is passed to the php script and emailed to me. I am just updating it so the textinputs are created via AS2 so that I can style them more easily etc. This is fine however when created via script they no longer get passed to my php file. I am creating the textinput using the following code (which works fine):
    var my_fmt:TextFormat = new TextFormat();
    my_fmt.bold = false;
    my_fmt.font = "Arial";
    my_fmt.color = inputcol;
    contact_form.createTextField("contact_name", getNextHighestDepth(),112.6, 27, 174, 20);
    contact_form.contact_name.wordWrap = true;
    contact_form.contact_name.multiline = false;
    contact_form.contact_name.border = true;
    contact_form.contact_name.borderColor = inputcol;
    contact_form.contact_name.type = "input";
    contact_form.contact_name.setNewTextFormat(my_fmt);
    contact_form.contact_name.text = "";
    FYI I am creating this outside the movieclip containing the form (called contact_form) and then adding it into that mc specifically because I thought this may be necessary as doing it within the mc itself (using this.createTextField....) didn't work, however both seem to have the same effect.
    I am then doing various checks on the input box contents (to make sure it's not empty etc), this also works fine and gives me the relevant error if it is empty so it's accessing it correctly. I then use the following code to submit the variables and check_status checks the success/failure of the php script and alerts the user accordingly:
    loadVariables("http://www.makeaportfolio.com/send_email.php?flashmo=" + random(1000), this, "POST");
    message_status.text = "sending....";
    var interval_id = setInterval(check_status, 400);
    This works fine however does not pick up the value of the dynamically created text input (however does pick up all the text inputs that are manually added to the stage). I am rather confused as to why it's not picking this up and am not sure how I set it to do so, i would be immensely grateful if someone could point me in the right direction?
    Thanks so much for your help as ever,
    Dave

    Hi kglad,
    I'm sorry but i still don't understand what you mean? They are all text inputs which are defined in AS2 (you can see the code in my first post), the values (inputtext.text) are surely set by the user when they enter information into the input boxes. Accessing these works fine within my flash file, they just don't get passed to my php file. I got round this by manually creating duplicate textinputs on the stage for each dynamically created textinput which are all hidden, then assigning the values of the dynamically created inputs to the manually created inputs before loading the php file. This works fine as it picks up the manually placed inputs as local. I assume it's something to do with the scope of the dynamically created inputs but I cannot work out how you would ensure they would be picked up as even when you explicitly create them within the relevant mc it doesn't pick them up. As I say i've managed to get it working in a rather convoluted way which is good but would be most interested to understand why the other method doesn't work.
    Thanks so much for your help,
    Dave

  • How to get values from an IFrame...

    Hi everyone. I have come to a complete stop i my project and need to ask the following: How do i get the values from an IFrame.
    Situation: I have a main.jsp page that contains an IFrame(data.jsp). Data.jsp is basically made up of a bunch of checkboxes. The state of these boxes(checked or unchecked) is determined and set by a JAVA program and the results are then stored in a StringBuffer. Contents of Stringbuffer could look something like this: <tr><input type='checkbox' name='box0' CHECKED></tr>.
    The StringBuffer in then presented in the IFrame(data.jsp) like so: <%=res.getInfo()%>
    The user should be able to check or uncheck the boxes from the main.jsp page then when pressing a submit button the changes should be stored in a DBase.
    After the submit button have been pressed i go into my Servlet's doPost() method for some basic processing. This is were the problem starts. I usally use HttpServletRequest.getParameter(String param) to get values from the main.jsp page. But these checkboxes are stored in the IFrame, so how do i go about to retrieve the values from data.jsp from the doPost() method or in some other way maybe. This is quite urgent and i hope that i have explained the scenario in enough detail.
    Any help would be greatlly apritiated.
    Best regards
    Peter

    Hello
    Just try this link
    http://www.faqts.com/knowledge_base/view.phtml/aid/13758/fid/53
    HTH

  • Get values from dynamic form items

    Hi All,
    I create a dynamic form with text input component
    private function buildForm():void{
                    var numberOfColumns:Number = 5
                    var formItem:FormItem = new FormItem();
                    var hBox:HBox = new HBox();
                    for(var i:Number=0; i< numberOfColumns; i++) {
                        var formInput:TextInput = new TextInput();
                        formInput.text = "test";
                        formInput.id = "txt_" +i;
                        hBox.addChild(formInput);
                    formItem.addChild(hBox);
                    loansForm.addChild(formItem);
    I can see the text input components, update the values.
    How can I get the updated values from the input components?
    I try  this["txt_" + i].text  but not working. It's not finding the component with the dynamic value.
    Any ideas?
    Thanks
    Johnny

    Hi,
    Here is the related thread, u will get some help
      http://forums.adobe.com/message/3075226
    Thanks and Regards,
    Kanchan Ladwani | [email protected] | www.infocepts.com

  • How to get multiple values from the list

    I've a list of an item which I queried it from the database. I also created a button that will takes a selected items from the list when it was clicked. I used javabean to get the data from database.
    <%     // clicked on Select District Button
    Vector vselectedDistrict = new Vector();
    Vector vdistrictID = new Vector();
    String tmpSelectDistrict = "";
    tmpSelectDistrict = request.getParameter("bSelectDistrict");
    if(tmpSelectDistrict != null)
         // get multiple values from the list
         String[] selectedDistrict = request.getParameterValues("usrTDistrict");
         vselectedDistrict.clear();
         vdistrictID.clear();
         if((selectedDistrict != null) && (selectedDistrict.length != 0))
                             for(int i=0;i<selectedDistrict.length;i++)
                   vselectedDistrict.addElement(selectedDistrict);           
              vdistrictID = dbaseInfo.getcurrentDistrictID(nstate,vselectedDistrict);
              for(int i=0;i<vdistrictID.size();i++)
                   out.println("district = " + selectedDistrict[i]);                         out.println("district ID= " + vdistrictID.get(i).toString());
    %>
    // get vdistrict from the database here......
    <select name="usrTDistrict" size="5" multiple>
    <%     for(int i = 0; i< vdistrict.size(); i++)
    %>
         <option value="<%=vdistrict.get(i).toString()%>"><%=vdistrict.get(i).toString()%></option>
    <%
    %>          
    </select>
    <input type="submit" name="bSelectDistrict" value="Select District">
    Lets say the item that i selected from the list is 'Xplace' and I clicked on the Select District button,
    what I got is this error message:
    org.apache.jasper.JasperException: Unable to convert string 'Xplace' to class java.util.Vector for attribute usrTDistrict: java.lang.IllegalArgumentException: Property Editor not registered with the PropertyEditorManager
    So where is going wrong and what the message means?. Any help very much appreciated. Thanks

    These are just guesses that might hopefully steer you in directions you haven't looked in yet.
    I presume you used triangle brackets (< >) to avoid having the Jive Forum think it was the "italics" tag?
    Are you certain this: dbaseInfo.getcurrentDistrictID(nstate,vselectedDistrict);
    expects a Vector as its second parameter? And returns a Vector?
    I don't believe you've shown how you use the javabean, or its code? Perhaps it should be rewritten to accept an array of strings instead of a Vector?

  • Need help Take out the null values from the ResultSet and Create a XML file

    hi,
    I wrote something which connects to Database and gets the ResultSet. From that ResultSet I am creating
    a XML file. IN my program these are the main two classes Frame1 and ResultSetToXML. ResultSetToXML which
    takes ResultSet & Boolean value in its constructor. I am passing the ResultSet and Boolean value
    from Frame1 class. I am passing the boolean value to get the null values from the ResultSet and then add those
    null values to XML File. When i run the program it works alright and adds the null and not null values to
    the file. But when i pass the boolean value to take out the null values it would not take it out and adds
    the null and not null values.
    Please look at the code i am posing. I am showing step by step where its not adding the null values.
    Any help is always appreciated.
    Thanks in advance.
    ============================================================================
    Frame1 Class
    ============
    public class Frame1 extends JFrame{
    private JPanel contentPane;
    private XQuery xQuery1 = new XQuery();
    private XYLayout xYLayout1 = new XYLayout();
    public Document doc;
    private JButton jButton2 = new JButton();
    private Connection con;
    private Statement stmt;
    private ResultSetToXML rstx;
    //Construct the frame
    public Frame1() {
    enableEvents(AWTEvent.WINDOW_EVENT_MASK);
    try {
    jbInit();
    catch(Exception e) {
    e.printStackTrace();
    //Component initialization
    private void jbInit() throws Exception {
    //setIconImage(Toolkit.getDefaultToolkit().createImage(Frame1.class.getResource("[Your Icon]")));
    contentPane = (JPanel) this.getContentPane();
    xQuery1.setSql("");
    xQuery1.setUrl("jdbc:odbc:SCANODBC");
    xQuery1.setUserName("SYSDBA");
    xQuery1.setPassword("masterkey");
    xQuery1.setDriver("sun.jdbc.odbc.JdbcOdbcDriver");
    contentPane.setLayout(xYLayout1);
    this.setSize(new Dimension(400, 300));
    this.setTitle("Frame Title");
    xQuery1.setSql("Select * from Pinfo where pid=2 or pid=4");
    jButton2.setText("Get XML from DB");
    try {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    catch(java.lang.ClassNotFoundException ex) {
    System.err.print("ClassNotFoundException: ");
    System.err.println(ex.getMessage());
    try {
    con = DriverManager.getConnection("jdbc:odbc:SCANODBC","SYSDBA", "masterkey");
    stmt = con.createStatement();
    catch(SQLException ex) {
    System.err.println("SQLException: " + ex.getMessage());
    jButton2.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(ActionEvent e) {
    jButton2_actionPerformed(e);
    contentPane.add(jButton2, new XYConstraints(126, 113, -1, -1));
    //Overridden so we can exit when window is closed
    protected void processWindowEvent(WindowEvent e) {
    super.processWindowEvent(e);
    if (e.getID() == WindowEvent.WINDOW_CLOSING) {
    System.exit(0);
    void jButton2_actionPerformed(ActionEvent e) {
    try{
    OutputStream out;
    XMLOutputter outputter;
    Element root;
    org.jdom.Document doc;
    root = new Element("PINFO");
    String query = "SELECT * FROM PINFO WHERE PID=2 OR PID=4";
    ResultSet rs = stmt.executeQuery(query);
    /*===========This is where i am passing the ResultSet and boolean=======
    ===========value to either add the null or not null values in the file======*/
    rstx = new ResultSetToXML(rs,true);
    } //end of try
    catch(SQLException ex) {
    System.err.println("SQLException: " + ex.getMessage());
    ======================================================================================
    ResultSetToXML class
    ====================
    public class ResultSetToXML {
    private OutputStream out;
    private Element root;
    private XMLOutputter outputter;
    private Document doc;
    // Constructor
    public ResultSetToXML(ResultSet rs, boolean checkifnull){
    try{
    String tagname="";
    String tagvalue="";
    root = new Element("pinfo");
    while (rs.next()){
    Element users = new Element("Record");
    for(int i=1;i<=rs.getMetaData().getColumnCount(); ++i){
    tagname= rs.getMetaData().getColumnName(i);
    tagvalue=rs.getString(i);
    System.out.println(tagname);
    System.out.println(tagvalue);
    /*============if the boolean value is false it adds the null and not
    null value to the file =====================*/
    /*============else it checks if the value is null or the length is
    less than 0 and does the else clause in the if(checkifnull)===*/
    if(checkifnull){ 
    if((tagvalue == null) || tagvalue.length() < 0 ){
    users.addContent((new Element(tagname).setText(tagvalue)));
    else{
    users.addContent((new Element(tagname).setText(tagvalue)));
    else{
    users.addContent((new Element(tagname).setText(tagvalue)));
    root.addContent(users);
    out=new FileOutputStream("c:/XMLFile.xml");
    doc = new Document(root);
    outputter = new XMLOutputter();
    outputter.output(doc,out);
    catch(IOException ioe){
    System.out.println(ioe);
    catch(SQLException sqle){

    Can someone please help me with this problem
    Thanks.

  • From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

    From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

    Hi,
    Use NVL or COALESCE:
    NVL (col_a, col_b)
    Returns col_a if col_a is not NULL; otherwise, it returns col_b.
    Col_a and col_b must have similar (if not identical) datatypes; for example, if col_a is a DATE, then col_b can be another DATE or it can be a TIMESTAMP, but it can't be a VARCHAR2.
    For more about NVL and COALESCE, see the SQL Language manual: http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions119.htm#sthref1310
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

Maybe you are looking for

  • Error when saving image

    When I try and save my image a pop-up comes up saying "Could not save as "/Users/.../Jewett9copy.jpg" because the disk is not available."  Does that mean my computer disk is too full or what?  This happened last night but then it ended up saving and

  • Auto po creation after save sales order.

    Hi, Experts, A s per  my business requirement, We have mapped configuratin for auto PR creation at a time of order if stock not available, But system not create automatic PO after save sales order. I want to crate Automatic PO after save sales order,

  • Comments in operational review

    Hi All, We have been struggling with the functionality of being able to include comments when creating Operational Reviews in SSM7.5. This functionality is critical for our scorecards as it allows users to see what the Reasons for Variance is as well

  • My iPad (4th gen) is stuck in one orientation. It will change if locked, rotated, and unlocked, but not on the fly. I have tried restarting multiple times.

    I have a fourth gen iPad that's a few weeks old. It is stuck in whichever orientation I unlock it in, and will not rotate on the fly. I've tried restarting multiple times. I've tried toggling the side-switch to screenlock or mute, on/off, with no suc

  • SLA or Pipeline Alert Monitoring

    At Oracle Service Bus I have define sla alert rules and I can monitor at the administrator console if there is any violation. Can I monitor the details like timestamp , the alert name, alert severity, service etc.. and every time a violation occurs t