Urgent Help in JSP for multiple records update

I have a Order Placement form for the dealers. Here they place their orders online and submit the form. The details they enter are stored in Orders table in a database. This order is sent for processing. This is an external operation for the users of our products.
This table has two extra fields AccptNo and DelDate, which are filled in by the Admin of the Stores Dept of our company. The Admin then logs in and views the new orders. He sees the new orders displayed in the following format. The data shown is from the Orders table.
He is then reqd to just fill in the Accpt No and Del Date against the requisite Order.
Having finished filling up all the details he clicks the Submit button which updates the Orders table. i.e the existing records are updated with the accptno and del dates or rather the records are overwritten.
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
</head>
<body>
<p><b><font size="3" face="Arial Unicode MS" color="#FF0000">Orders - Admin
Page.</font></b></p>
<b><font size="2" face="Verdana" color="#0000FF">
Following are the new pending orders.</font></b>
<form method="POST" action="updtOrd.jsp">
<div align="center">
<center>
<table border="1" cellspacing="0" width="68%" bordercolor="#000080">
<tr>
<td width="13%" align="center"><font size="2" face="Arial Unicode MS"><b>Dealer
Id</b></font></td>
<td width="11%" align="center"><font size="2" face="Arial Unicode MS"><b>Product</b></font></td>
<td width="13%" align="center"><font size="2" face="Arial Unicode MS"><b>Quantity</b></font></td>
<td width="10%" align="center"><font size="2" face="Arial Unicode MS"><b>Value</b></font></td>
<td width="53%" align="center"><font size="2" face="Arial Unicode MS"><b>Acceptance
No.</b></font></td>
<td width="53%" align="center"><font size="2" face="Arial Unicode MS"><b>Delivery
Date</b></font></td>
</tr>
<tr>
<td width="13%"><font size="2" face="Verdana">d0116033</font></td>
<td width="11%"><font size="2" face="Verdana">ABC</font></td>
<td width="13%"><font size="2" face="Verdana">100</font></td>
<td width="10%"><font size="2" face="Verdana">100000</font></td>
<td width="53%"><input type="text" name="T1" size="20"></td>
<td width="53%"><input type="text" name="T6" size="20"></td>
</tr>
<tr>
<td width="13%"><font size="2" face="Verdana">d0116065</font></td>
<td width="11%"><font size="2" face="Verdana">XYZ</font></td>
<td width="13%"><font size="2" face="Verdana">160</font></td>
<td width="10%"><font size="2" face="Verdana">16000</font></td>
<td width="53%"><input type="text" name="T2" size="20"></td>
<td width="53%"><input type="text" name="T5" size="20"></td>
</tr>
<tr>
<td width="13%"><font size="2" face="Verdana">d0116058</font></td>
<td width="11%"><font size="2" face="Verdana">PQR</font></td>
<td width="13%"><font size="2" face="Verdana">300</font></td>
<td width="10%"><font size="2" face="Verdana">3000000</font></td>
<td width="53%"><input type="text" name="T3" size="20"></td>
<td width="53%"><input type="text" name="T4" size="20"></td>
</tr>
<tr>
<td width="153%" colspan="6">
<p align="center"><input type="submit" value="Submit" name="B1"></td>
</tr>
</table>
</center>
</div>
</form>
</body>
</html>
I hope this makes the scene clear still you may eat my head for more clarifications but please help me.
Can mail me at [email protected]
ThanQ

Name your textfields for accetance number and del date as your primary key that must be dealer id in your case.
You can do this by writing <input type=text name=<%=<something>%>>
Then you can get all the parameters in jsp to which you are going to submit your request by using function getParameterNames(). That will return you all the primary keys posted as name of your textfield. Then get the parameter value from parameter name and run the sql.

Similar Messages

  • Help needed in PL/SQL for updating the column for multiple records

    Hi,
    I am new to PL/SQL and need some help. What is the most effiecient way to update some field in a table as I may need to update thousands of records. I have a coulmn groupid can have multiple records tied to it. All the records attached to some groupid have a priority field also.
    How can I update the prorityfield value for all the groupids in a profiecient way. Here is a sample data
    GroupId     Priority
    1            1
    1            2
    1            3
    1            4
    1            5
    2            1
    2            2
    2            3
    3            1Here I have three groups 1, 2, 3. Now if any group contains only one record the priority remains same e.g. groupid=3 on top. If any group contains more than one record e.g. groupid=1 & 2 I want to re-arrange the priority fields e.g. If I want to update groupid=1 now if I change the priority of 2 to 5 (make it the last) I want to rearrange the remaing records priority i.e. if 2 becomes 5 as I have 5 rows for groupid=1 then 5 becomes 4, 4 becomes 3, 3 becomes 2 and 1 remains the same.
    Same wya if I want to make the priority 1 to 3 for groupid=2 then need 2 to become 1 and 3 to become 2 etc....
    Any help is appreciated.
    Thanks

    Hi,
    You don't need PL/SQL to do this (though you can put the following in PL/SQL if you want to):
    UPDATE     table_x
    SET     priority = CASE
                   WHEN  groupid     = 1
                   AND   priority = 2
                        THEN  5
                   WHEN  groupod     = 1
                   AND   priority     BETWEEN 3 AND 5
                        THEN  priority - 1
                   WHEN  groupid = 2
                   THEN
                        CASE
                             WHEN  prioity = 1
                             THEN  3
                             ELSE  priority - 1
                        END
                 END
    WHERE     groupId          IN (1, 2)
    AND     (     priority     BETWEEN 2 AND 5
         OR     groupid          = 2
         );There are lots of different techniques that can reduce your coidng: for example, the nested CASE statement used for groupid=2 above.
    You could do several smaller UPDATEs (for example, one just for groupid=1). Execution will be slower, but coding and testing will be faster.
    You could make the "magic numbers" 2 (for groupid=1) and 1 (for groupid=2) variables, even outside of PL/SQL.
    If you need more help, post the information that Satyaki requested.

  • Need help to solve update querry for multiple records.

    Could any of you please provide update querry for the following scenario.
    Requiremnt:
    1. Update the UNIQUE_ID of record ( same Identifier and Identifier_code
    where END_Date is not null) with the UNIQUE_ID of the record (( same  Identifier and Identifier_code
    where END_Date  is null).
    2. If More than one NULL in END_date then update UNIQUE_ID with max(EFFective_Date) of UNIQUE_ID
    Source  data
    UNIQUE_ID
    Identifier
    Identifier_code
    EFFective_Date
    END_Date
    1
    777
    abc
    2/14/2014 11:15
    2/28/2014 9:00
    1
    777
    abc
    2/21/2014 9:00
    3/7/2014 9:02
    2
    777
    abc
    2/28/2014 9:00
    3/14/2014 9:02
    2
    777
    abc
    3/7/2014 9:02
    3/14/2014 9:02
    2
    777
    abc
    3/14/2014 9:02
    NULL
    5
    888
    xyz
    2/14/2014 11:15
    2/28/2014 9:00
    5
    888
    xyz
    2/21/2014 9:00
    3/7/2014 9:02
    5
    888
    xyz
    2/28/2014 9:00
    3/14/2014 9:02
    6
    888
    xyz
    3/7/2014 9:02
    NULL
    7
    888
    xyz
    3/14/2014 9:02
    NULL
    OutPUT .
    UNIQUE_ID
    Identifier
    Identifier_code
    EFFective_Date
    END_Date
    2
    777
    abc
    2/14/2014 11:15
    2/28/2014 9:00
    2
    777
    abc
    2/21/2014 9:00
    3/7/2014 9:02
    2
    777
    abc
    2/28/2014 9:00
    3/14/2014 9:02
    2
    777
    abc
    3/7/2014 9:02
    3/14/2014 9:02
    2
    777
    abc
    3/14/2014 9:02
    NULL
    7
    888
    xyz
    2/14/2014 11:15
    2/28/2014 9:00
    7
    888
    xyz
    2/21/2014 9:00
    3/7/2014 9:02
    7
    888
    xyz
    2/28/2014 9:00
    3/14/2014 9:02
    7
    888
    xyz
    3/7/2014 9:02
    NULL
    7
    888
    xyz
    3/14/2014 9:02
    NULL
    Thanks in advance.

    Hi Vikash,
    This query will not produce results as per requirement:
    Try it with following data
    Insert into @TempTABLE values (1,777,'abc','2/14/2014 11:15','3/14/2014 9:02')
    Insert into @TempTABLE values (1,777,'abc','2/21/2014 9:00','3/14/2014 9:02')
    Insert into @TempTABLE values (2,777,'abc','2/28/2014 9:00','3/14/2014 9:02')
    Insert into @TempTABLE values (2,777,'abc','3/7/2014 9:02','3/14/2014 9:02')
    Insert into @TempTABLE values (2,777,'abc','3/14/2014 9:02',NULL)
    Insert into @TempTABLE values (5,888,'xyz','2/14/2014 11:15','3/14/2014 9:02')
    Insert into @TempTABLE values (5,888,'xyz','2/21/2014 9:00','3/14/2014 9:02')
    Insert into @TempTABLE values (5,888,'xyz','2/28/2014 9:00','3/14/2014 9:02')
    Insert into @TempTABLE values (7,888,'xyz','3/7/2014 9:02',NULL)
    Insert into @TempTABLE values (6,888,'xyz','3/14/2014 9:02',NULL)
    as per the problem statement, all records having 888,'xyz' should be updated with 6 not 7 as max effective date is associated with 6 not 7.
    Ashutosh
    Nope.
    can you check the original post first. It clearly states output as having 7 as id for all the records with 888,xyz
    also your above posted sample data is different from original sample data as you've dates jumpled up for the records with ids 6 and 7
    Please see the illustration for original sample data
    --sample table for illustration
    declare @t table
    (UNIQUE_ID int,Identifier int,Identifier_code varchar(100),EFFective_Date datetime ,END_Date datetime)
    --populate original sample data
    INSERT @t ([UNIQUE_ID], [Identifier], [Identifier_code], [EFFective_Date], [END_Date]) VALUES (1, 777, N'abc', CAST(0x0000A2D200B964F0 AS DateTime), CAST(0x0000A2E0009450C0 AS DateTime))
    INSERT @t ([UNIQUE_ID], [Identifier], [Identifier_code], [EFFective_Date], [END_Date]) VALUES (1, 777, N'abc', CAST(0x0000A2D9009450C0 AS DateTime), CAST(0x0000A2E70094DD60 AS DateTime))
    INSERT @t ([UNIQUE_ID], [Identifier], [Identifier_code], [EFFective_Date], [END_Date]) VALUES (2, 777, N'abc', CAST(0x0000A2E0009450C0 AS DateTime), CAST(0x0000A2EE0094DD60 AS DateTime))
    INSERT @t ([UNIQUE_ID], [Identifier], [Identifier_code], [EFFective_Date], [END_Date]) VALUES (2, 777, N'abc', CAST(0x0000A2E70094DD60 AS DateTime), CAST(0x0000A2EE0094DD60 AS DateTime))
    INSERT @t ([UNIQUE_ID], [Identifier], [Identifier_code], [EFFective_Date], [END_Date]) VALUES (2, 777, N'abc', CAST(0x0000A2EE0094DD60 AS DateTime), NULL)
    INSERT @t ([UNIQUE_ID], [Identifier], [Identifier_code], [EFFective_Date], [END_Date]) VALUES (5, 888, N'xyz', CAST(0x0000A2D200B964F0 AS DateTime), CAST(0x0000A2E0009450C0 AS DateTime))
    INSERT @t ([UNIQUE_ID], [Identifier], [Identifier_code], [EFFective_Date], [END_Date]) VALUES (5, 888, N'xyz', CAST(0x0000A2D9009450C0 AS DateTime), CAST(0x0000A2E70094DD60 AS DateTime))
    INSERT @t ([UNIQUE_ID], [Identifier], [Identifier_code], [EFFective_Date], [END_Date]) VALUES (5, 888, N'xyz', CAST(0x0000A2E0009450C0 AS DateTime), CAST(0x0000A2EE0094DD60 AS DateTime))
    INSERT @t ([UNIQUE_ID], [Identifier], [Identifier_code], [EFFective_Date], [END_Date]) VALUES (6, 888, N'xyz', CAST(0x0000A2E70094DD60 AS DateTime), NULL)
    INSERT @t ([UNIQUE_ID], [Identifier], [Identifier_code], [EFFective_Date], [END_Date]) VALUES (7, 888, N'xyz', CAST(0x0000A2EE0094DD60 AS DateTime), NULL)
    --do the update
    UPDATE t
    SET UNIQUE_ID = MaxID
    FROM
    SELECT MAX(CASE WHEN END_DATE IS NULL THEN UNIQUE_ID END) OVER (PARTITION BY Identifier,Identifier_code) AS MaxID,UNIQUE_ID
    FROM @t
    )t
    WHERE UNIQUE_ID <> MaxID
    AND MaxID IS NOT NULL
    --now check the output
    SELECT * FROM @t
    The output is as below
    UNIQUE_ID Identifier Identifier_code EFFective_Date END_Date
    2 777 abc 2014-02-14 11:15:00.000 2014-02-28 09:00:00.000
    2 777 abc 2014-02-21 09:00:00.000 2014-03-07 09:02:00.000
    2 777 abc 2014-02-28 09:00:00.000 2014-03-14 09:02:00.000
    2 777 abc 2014-03-07 09:02:00.000 2014-03-14 09:02:00.000
    2 777 abc 2014-03-14 09:02:00.000 NULL
    7 888 xyz 2014-02-14 11:15:00.000 2014-02-28 09:00:00.000
    7 888 xyz 2014-02-21 09:00:00.000 2014-03-07 09:02:00.000
    7 888 xyz 2014-02-28 09:00:00.000 2014-03-14 09:02:00.000
    7 888 xyz 2014-03-07 09:02:00.000 NULL
    7 888 xyz 2014-03-14 09:02:00.000 NULL
    Now compare it with original output and you'll find they're the same
    UNIQUE_ID Identifier Identifier_code EFFective_Date END_Date
    2 777 abc 2/14/2014 11:15 2/28/2014 9:00
    2 777 abc 2/21/2014 9:00 3/7/2014 9:02
    2 777 abc 2/28/2014 9:00 3/14/2014 9:02
    2 777 abc 3/7/2014 9:02 3/14/2014 9:02
    2 777 abc 3/14/2014 9:02 NULL
    7 888 xyz 2/14/2014 11:15 2/28/2014 9:00
    7 888 xyz 2/21/2014 9:00 3/7/2014 9:02
    7 888 xyz 2/28/2014 9:00 3/14/2014 9:02
    7 888 xyz 3/7/2014 9:02 NULL
    7 888 xyz 3/14/2014 9:02 NULL
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Multiple record update extension issue (felixone

    I just purchased the Multiple Records at Once Extension by
    Felixone. I have put it to good use but have noticed an issue with
    it. PHP MySQL.
    I am using Dreamweaver 8 with the Repeat Region behaviour,
    and the Recordset Navigation Bar, along with the extension to
    update multiple values at once from a recordset.
    If there are more records than can be displayed on the first
    page of navigation. E.g. Showing records 1-10 of 15, when doing a
    multiple table update (in this case changing a single value from 0
    to 1 and vice versa) a MYSQL error comes up. The operation is still
    completed but it doesn't go to the page specified after the update
    in the extension, but stays on the current page with the following
    error at the top:
    You have an error in your SQL syntax. Check the manual that
    corresponds to your MySQL server version for the right syntax to
    use near '' at line 1
    In the mean time, to overcome the issue, I am able to display
    all records on a single page, however once the records build up it
    won't be acceptable to have a potentialy very long list of records
    when I would like to display only 15 at a time.
    Has anyone had any experience of this, and if so would you be
    willing to help me. I have emailed felixone but I need this sorting
    out ASAP.
    Notice I have changed the show results to 5000, as going into
    the repeat region behaviour and saying 'show all' would not do
    anything. It always put it back to ten.

    Thank you Anurag,
    I have already the db created ,
    My question is how best to get the users local time
    availability into the
    database, what is the best method to use, should I use list
    menus, etc, has
    any one had to do this in a project before.
    and then when some one comes to my site i want them to be
    able to compare
    the time stored with the time of the site users country
    locally using an if
    else statement. i am using asp vb and sql server
    regards
    kenny
    "Anurag" <[email protected]> wrote in message
    news:e58mta$kbg$[email protected]..
    > Well basically first you have to collect:
    > a, the users phone number
    > b, the "display times"
    >
    > and store those values in a database - don't even think
    about NOT using
    > one
    >
    > Then you simply check when the page is called whether
    the current time
    > is within the display time...
    >
    > Oh, btw you probably have to think about which time you
    are talking about:
    >
    > the mobile phone owner's local time, the viewer's local
    time, your
    > server time...
    >
    > That should do the trick...
    >
    > Anurag
    >
    >
    >
    > twocans wrote:
    >> hello,
    >> I am looking to give my user a "show my phone
    number" option to show his
    >> mobile phone number online and at selected times by
    that user, I need to
    >> create a page that will allow my user to apply this
    as best and as easy
    >> as
    >> possible, my users are unaversial based. how best
    can I do this, is thre
    >> a
    >> snippet out there that anyone knows that may help. I
    am willing to pay if
    >> any one knows of such suitable code.
    >>
    >> regards
    >>
    >> kenny
    >>
    >>

  • Multiple record update in TABLE Control.

    Hi All,
    I m developing dialog program with table control.
    I want to know how to update multiple records through the table control if user selects more than one.
    Also depending on some condition i want to change the status of one reocrd and not the column as a display field and won't be editable. I have tried with loop at screen and modify screen, but it is showing the whole column as display only.
    ANy solution let me know

    Hi,
    pls chk this standard pgms.
    for examples on table control
    demo_dynpro_tabcont_loop
    demo_dynpro_tabcont_loop_at
    RSDEMO_TABLE_CONTROL
    chk a sample code.
    DATA :BEGIN OF int_table OCCURS 0,
           fld1 TYPE ztable-fld1,
            fld2 TYPE ztable-fld2,
            fld3 TYPE ztable-fld3,
            chk(1),
          END OF int_factor.
    *write the blow code in PAI
    LOOP AT int_table WHERE chk = 'X'.
    *modify the data base table
    MODIFY ztable FROM  int_table. "from header
    clear int_table
    ENDLOOP.
    regards
    Anver

  • Header line missing for multiple records in the Receiver Email.

    I have a file to email scenario
    I see the content in mapping has proper output with all the HDRs and ITMS. but when it comes throught the receiver it is missing the HDRs.
    Source
    HDR1***   ITM1***  ITM2****
    HDR2***   ITM1***  ITM2***ITM3**
    The email Body looks like the following:
    HDR1***   ITM1***  ITM2***ITM1**  ITM2***ITM3*
    I am missing the HDR for the subsequent recodrs and the subsequent items are shown as if they are the items of the first HDR1. I checked the Mapping the mapping output and it looks good, but when i actually get the email i see it missing susequent HDRs.

    When I was at a client on 11.5.10, I ended up creating a personalization on the Requisitions screen.
    If someone created a requisition with 2 ship to orgs, it raised an error.
    It was not full proof but it was deemed satisfactory by the client.
    You can consider personalization or you can modify the requisition approval workflow to include the check for multiple ship-to condition.
    Hope this helps
    Sandeep Gandhi
    Independent Techno-functional Consultant

  • Alv report for multiple record insertion

    hi,
    i'm new to abap. i'm using alv report for record display and insertion. how can i insert multiple records from alv to my table??

    well that can be achieved only by running BDC inside alv report to enter the entries.and in that too you can append or edit single entries only
    reward if useful
    regards
    vivek

  • Update trigger syntax for multiple collumn update

    Hi
    I would like to create an update trigger that updates 3 collumns in another table.
    This works for one collumn:
    CREATE OR REPLACE TRIGGER DBNAME.Update_EVENT
    BEFORE UPDATE
    ON DBNAME.DB_EVENTS
    REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    DECLARE
    BEGIN
    UPDATE DB_EVENT_LOG ELOG
    SET
    COMPLETION_EVENT = :NEW.COMPLETION_EVENT
         WHERE :OLD.RECORD_ID = ELOG.RECORD_ID ;
    EXCEPTION
    WHEN OTHERS THEN
    -- log the error and re-raise
    RAISE;
    END ;
    but this does not work for multiple collumns:
    CREATE OR REPLACE TRIGGER DBNAME.Update_EVENT
    BEFORE UPDATE
    ON DBNAME.DB_EVENTS
    REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    DECLARE
    BEGIN
    UPDATE DB_EVENT_LOG ELOG
    SET
    (COMPLETION_EVENT
    , COMPLETION_DT_TM
    , COMPLETED_BY)
    =
    (:NEW.COMPLETION_EVENT
    , :NEW.COMPLETION_DT_TM
    , :NEW.COMPLETED_BY)
         WHERE :OLD.RECORD_ID = ELOG.RECORD_ID ;
    EXCEPTION
    WHEN OTHERS THEN
    -- log the error and re-raise
    RAISE;
    END ;
    What am i doing wrong?

    Try selecting from DUAL:
    SQL> CREATE TABLE emp_test AS SELECT * FROM emp
    Table created.
    SQL> CREATE OR REPLACE TRIGGER emp_trg
       AFTER UPDATE
       ON emp
       FOR EACH ROW
    BEGIN
       UPDATE emp_test
          SET (sal, comm) = (SELECT :NEW.sal,
                                    :NEW.comm
                               FROM DUAL)
        WHERE empno = :NEW.empno;
    END;
    Trigger created.
    SQL> UPDATE emp
       SET sal = 5000,
           comm = 5000
    WHERE empno = 7369
    1 row updated.
    SQL> SELECT empno,
           sal,
           comm
      FROM emp_test
    WHERE empno = 7369
         EMPNO        SAL       COMM
          7369       5000       5000

  • ADI not working for multiple records

    Hi,
    We currently have an issue with ADI. The ADI we have produces an MS Word letter based on a custom view and custom integrator.
    On the person form, when I query for an employee and the resultset is 1 our ADI is working fine and the letter/word document is generated.
    When the query returns more than one employee, the Web ADI errors. It does not download any records into the excel file and then when it tries to open the word document it asks for Header Record Delimiters?
    In the excel document I get a Run-Time error '5922' Method 'Run' of object '_Application' failed.
    Is there a setting that only restricts ADI to return one row from this form?
    Any help would be greatly appreciated.
    Many thanks
    Martin

    Hi,
    We currently have an issue with ADI. The ADI we have produces an MS Word letter based on a custom view and custom integrator.
    On the person form, when I query for an employee and the resultset is 1 our ADI is working fine and the letter/word document is generated.
    When the query returns more than one employee, the Web ADI errors. It does not download any records into the excel file and then when it tries to open the word document it asks for Header Record Delimiters?
    In the excel document I get a Run-Time error '5922' Method 'Run' of object '_Application' failed.
    Is there a setting that only restricts ADI to return one row from this form?
    Any help would be greatly appreciated.
    Many thanks
    Martin

  • How to produce xsd for  multiple record with header

    Hi
    I tried with native format builder but that's of no use for me
    I have a flat file like this
    0+022+
    1+012+
    2+022+
    2+032+
    1+021+
    2+025+
    5+036+
    I need a schema for repeating records. My record starts for each 0 and ends for 5
    0=header 1=page 2=word 5=end
    Can somebody help me please.
    for now I have this schema but I get more number of xml elements than the data when I transform in bpel
    Also When i parse, as my records end with + {eol}, I get + at the end of the last element, how to get rid of that
    <?xml version="1.0" encoding="US-ASCII"?>
    <schema xmlns="http://www.w3.org/2001/XMLSchema"
    xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
    xmlns:tns="http://www.oracle.com/ias/processconnect"
    targetNamespace="http://www.oracle.com/ias/processconnect"
    elementFormDefault="qualified" attributeFormDefault="unqualified"
    nxsd:stream="chars" nxsd:version="NXSD" nxsd:validateNxsd="true">
    <element name="PFW16">
    <complexType>
    <sequence>
    <element ref="tns:Header" nxsd:conditionValue="0"/>
    <element ref="tns:Pager" nxsd:conditionValue="1" maxOccurs="unbounded"/>
    <element ref="tns:Tail" nxsd:conditionValue="5" />
    </sequence>
    </complexType>
    </element>
    <!--Header Record -->
    <element name="Header" type="tns:HeaderType"/>
    <complexType name="HeaderType">
    <sequence>
    <element name="RecordTypeIndicator" type="string"
    nxsd:style="terminated" nxsd:terminatedBy="+"/>
    <element name="VersionNumber" type="string"
    nxsd:style="terminated" nxsd:terminatedBy="${eol}"/>
    </sequence>
    </complexType>
    <!-- Pager Record -->
    <element name="Pager" type="tns:PagerRecordType"/>
    <complexType name="PagerRecordType">
    <sequence>
    <element name="RecordTypeIndicator" type="int"
    nxsd:style="terminated" nxsd:terminatedBy="+"/>
    <element name="VersionNumber" type="string"
    nxsd:style="terminated" nxsd:terminatedBy="${eol}"/>
    <element name="words">
    <complexType>
    <sequence>
    <element name="Detail-Item" minOccurs="1"
    maxOccurs="unbounded">
    <complexType>
    <group ref="tns:WordsRecord"
    nxsd:conditionValue="2"/>
    </complexType>
    </element>
    </sequence>
    </complexType>
    </element>
    </sequence>
    </complexType>
    <group name="WordsRecord">
    <sequence>
    <element name="RecordTypeIndicator" type="int"
    nxsd:style="terminated" nxsd:terminatedBy="+"/>
    <element name="VersionNumber" type="string"
    nxsd:style="terminated" nxsd:terminatedBy="${eol}"/>
    </sequence>
    </group>
         <element name="Tail" type="tns:EndType"/>
    <complexType name="EndType">
    <sequence>
    <element name="RecordTypeIndicator" type="string"
    nxsd:style="terminated" nxsd:terminatedBy="+"/>
    <element name="VersionNumber" type="string"
    nxsd:style="terminated" nxsd:terminatedBy="${eol}"/>
    </sequence>
    </complexType>
    </schema>

    You can get value into variable using a simple select sql line.
    Create a variable -> go to refreshing tab -> add sql code there with proper schema.
    Use variable in package in refresh variable mode.
    You are done . Enjoy.

  • TcDataSet for Multiple Records

    Hi,
    I am trying to write one custom adapter to fetch some values from OIM database using sql query
    That sql query returns multiple records.
    I am using tcdataset APIs to get values. However I am able to write the code when it returns 1 value
    What is the method of tcDataSet can be used when it returns multiple rows.
    Pls suggest.It would be great if you could send some used code snippet.
    Thanks!!

    JRS wrote:
    Hi,
    I am trying to write one custom adapter to fetch some values from OIM database using sql query
    That sql query returns multiple records.
    I am using tcdataset APIs to get values. However I am able to write the code when it returns 1 value
    What is the method of tcDataSet can be used when it returns multiple rows.
    Pls suggest.It would be great if you could send some used code snippet.
    Thanks!!
    tcDataSet dataSet = new tcDataSet();
    dataSet.setQuery(this.oDataProvider, strCheckQuery);
    dataSet.executeQuery();
    for(int i=0;dataSet.getRowCount() i++){
         dataset.gotoRow(i);
    }

  • Use of LIKE in where clause of select statement for multiple records

    Hi Experts,
    I have a account number field which is uploaded from a file. Now this account numbers uploaded does not match fully with sap table account numbers but it contains all of the numbers provided in the file mostly in the upright positions.
    For example in file we have account number as 2ARS1 while in sap table the value is 002ARS1.
    And i want to fetch data from sap table based on account number uploaded. So, i am trying to use LIKE with for all entries but its not working as mentioned below but LIKE is not working with FOR ALL ENTRIES.
    data : begin of t_dda occurs 0,
            dda(19) type c,
           end of t_dda.
    data : begin of t_bukrs occurs 0,
            bukrs type t012k-bukrs,
           end of t_bukrs.
    data : dda type t012k-bankn,
           w_dda type t012k-bankn.
    CONCATENATE '%'
                             '2ARS1'
                     INTO  W_DDA.
    MOVE W_DDA TO T_DDA-DDA.
    APPEND T_DDA.
    CLEAR T_DDA.
    free t_bukrs.
    SELECT BUKRS
      FROM T012K
      into TABLE t_bukrs
        for all entries in t_dda
    WHERE BANKN like t_dda-dda.
    Can anybody suggest what should i use to get the data for multiple account numbers using one select statement only instead on using SELECT UP TO 1 ROWS in LOOP....ENDLOOP ?
    Thanks in advance,
    Akash

    Hi,
    yes, For All entries won't work for LIKE with '%  '.
    I think the other alternative is go for Native SQL by writing sub-query
    sample code is here:
    data: begin of i_mara occurs 0,
              matnr like mara-matnr,
              matkl like mara-matkl,
           end of i_mara.
    exec sql.
    select matnr, matkl from mara where matnr in (select matnr from marc) and matnr like '%ma' into :i_mara
    endexec.
    loop at i_mara.
    write:/ i_mara-matnr, i_mara-matkl.
    endloop.
    hope u got it.
    regards
    Mahesh
    Edited by: Mahesh Reddy on Jan 21, 2009 2:32 PM

  • Bapi_po_create is not creating Purchase Orders for multiple records in file

    Hi All.
    iam trying to create contracts and Purchase Orders  In me21n,me31k .
    here iam using bdc for contract creation against services and using bapi_po_create for PO Creations.
    in this process i could create contracts and POs for the first record in the file but for second record bapi_po_create couldnt create POs and the return table in bapi says
    1.document contains no items.
    2.no services or limits have been maintained.
    wil be waiitng for  r great answer.
    bye.
    regards.
    seeta.

    Hi Seeta Ram,
    Did you pass the table PO_ITEM_SCHEDULES to BAPI_PO_CREATE with the coresponding Item numbers for each item in the table PO_ITEMS?
    Regards,
    Vitz.

  • Bdc session is not working for multiple records

    Hello Experts
    we have written abdc for f-27 using the session method.it is working fine for one record but if we supply mulite records it
    is giving the error, like bseg-wbter( ie amount which comes in the second screen) is not found in screen 1.
    ie the first screen.The bdc is working fine for one record in notepad.after completing the first record it goes to
    second record and in the first screen itself it says amount field not found in screen 1. But
    actually this field comes in second screen.
    my flat file is like this..
    10.10.2008     DA     9641     10.10.2008     1     IND     TEST          31     10001     320.21     10.10.2008     01     120021     345.94
    10.10.2008     DA     9641     10.10.2008     1     IND     TEST          31     10001     560.22     10.10.2008     01     120021     231.94

    please kindly see my program..
    LOOP AT itab.
        REFRESH itabbdc.
        PERFORM bdc_dynpro      USING 'SAPMF05A' '0100' 'X'.
        PERFORM bdc_field       USING 'BDC_CURSOR' 'RF05A-NEWKO'.
        PERFORM bdc_field       USING 'BDC_OKCODE' '/00'.
        PERFORM bdc_field       USING 'BKPF-BLDAT'  itab-bldat.
        PERFORM bdc_field       USING 'BKPF-BLART'  itab-blart.
        PERFORM bdc_field       USING 'BKPF-BUKRS'  itab-bukrs.
        PERFORM bdc_field       USING 'BKPF-BUDAT'  itab-budat.
        PERFORM bdc_field       USING 'BKPF-MONAT'  itab-monat.
        PERFORM bdc_field       USING 'BKPF-WAERS'  litab-waers.
        PERFORM bdc_field       USING 'BKPF-XBLNR'  itab-xblnr.
        PERFORM bdc_field       USING 'FS006-DOCID' itab-docid.
        PERFORM bdc_field       USING 'RF05A-NEWBS' itab-newbs.
        PERFORM bdc_field       USING 'RF05A-NEWKO' itab-newko.
        PERFORM bdc_dynpro      USING 'SAPMF05A' '0302' 'X'.
        PERFORM bdc_field       USING 'BDC_CURSOR' 'RF05A-NEWKO'.
        PERFORM bdc_field       USING 'BDC_OKCODE' '/00'.
        PERFORM bdc_field       USING 'BSEG-WRBTR'  itab-wrbtr.
        PERFORM bdc_field       USING 'BSEG-ZFBDT'  itab-zfbdt.
        PERFORM bdc_field       USING 'RF05A-NEWBS' itab-newbs2.
        PERFORM bdc_field       USING 'RF05A-NEWKO' itab-newko2.
        PERFORM bdc_dynpro      USING 'SAPMF05A' '0301' 'X'.
        PERFORM bdc_field       USING 'BDC_CURSOR' 'BSEG-WRBTR'.
        PERFORM bdc_field       USING 'BDC_OKCODE'  '=BU'.
        PERFORM bdc_field       USING 'BSEG-WRBTR'  itab-wrbtr2.
       PERFORM bdc_load USING 'F-27' itabbdc.
      ENDLOOP.
    *&      Form  open_session
          text
    -->  p1        text
    <--  p2        text
    FORM session_start .
      CALL FUNCTION 'BDC_OPEN_GROUP'
        EXPORTING
          client = sy-mandt
          group  = 'F-27DA'
          keep   = 'X'
          user   = sy-uname.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    "session_start
    FORM bdc_load USING tcode TYPE sytcode
                           bdcdata LIKE itabbdc.
      CALL FUNCTION 'BDC_INSERT'
        EXPORTING
          tcode     = tcode
        TABLES
          dynprotab = itabbdc.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.

  • Update statement for multiple records

    i have table a and table b
    common col in both the tables is emp_id
    in table b i have district_id
    which i want to update in table a.... column district_id for all the employees
    how to write update statement for this
    Edited by: user10873676 on Oct 17, 2011 8:00 AM

    Based on your current description, we have something like this...
    SQL> create table a (emp_id number)
      2  /
    Table created.
    SQL>
    SQL> create table b (emp_id number, district_id number)
      2  /
    Table created.
    SQL>
    SQL> insert into a (emp_id)
      2  select rownum from dual connect by rownum <= 10
      3  /
    10 rows created.
    SQL>
    SQL> insert into b (emp_id, district_id)
      2  select rownum, 10-rownum from dual connect by rownum <= 10
      3  /
    10 rows created.
    SQL>
    SQL> update b
      2  set district_id = 1
      3  /
    10 rows updated.
    SQL>
    SQL> select * from a;
        EMP_ID
             1
             2
             3
             4
             5
             6
             7
             8
             9
            10
    10 rows selected.
    SQL> select * from b;
        EMP_ID DISTRICT_ID
             1           1
             2           1
             3           1
             4           1
             5           1
             6           1
             7           1
             8           1
             9           1
            10           1
    10 rows selected.Which I'm sure is NOT what you want as the update on table b has nothing to do with table a, and we have no idea what the district_id should be updated with.

Maybe you are looking for

  • APPLICATIONS DELETING THEMSELVES IN FRONT OF MY EYES

    I am an idiot. Strap in folks. If you only want the problem, not how I got there, skip to paragraph 3. I've been teaching myself html, php, css, etc... and I got in over my head when I tried to get safari to open a .php file saved locally (works fine

  • My ipod is asking my to connect to itunes and restore. what do i do?

    I was using my iPod and it went blank all of a sudden and re started. But after the apple logo appears it shows a connect to iTunes sign. My only option is to restore. But i have no back up.

  • What's the right mac for Final Cut Studio?

    Hi, I am a cameraman who wants to start learning final cut pro 5 to at first get a dvd together of my work (about 10 mins)and then maybe do some professional editing down the line. I am a bit lost with what mac I need to run studio on as I'm hearing

  • UnsatisfiedLinkError -- ifjapi90.dll not found

    Dear JDev Team, Could you please help with a small problem. I'm trying to run a class which in turn uses JDAPI provided by oracle. During initialisation it fails to load a library "ifjapi90". I have changed the java.library.path and sun.boot.library.

  • Anyone having trouble with iCloud mail?

    I noticed I couldn't connect to mail from my iPad. Then I checked my iPhone with the same result. Then I tried connecting from my iMac. Still couldn't connect. Then I went to iCloud.com. I could get to contacts and calendar, but not mail. First notic