Delete records which are checked

What is the codings in servlet and jsp  to delete the records which have been checked where status ="To be accounted".

Hi Rajesh,
Case sy-ucomm.
when 'DELETE'.
  loop at itab where checkbox = 'X'.
    delete itab.
  endloop.
endcase.
Please paste ur part of code.
Calling of the Function Module should be given the user command
call function 'REUSE_ALV_LIST_DISPLAY'
    exporting
      I_CALLBACK_PROGRAM      = SY-REPID
      IS_LAYOUT               = IS_LAYOUT
      IT_FIELDCAT             = IT_FIELDCAT
<b>      I_CALLBACK_USER_COMMAND = 'USER_COMMAND'</b>      IT_EVENTS               = IT_EVENTS
      I_SAVE                  = C_ISAVE
    tables
      T_OUTTAB                = IT_OUTPUT
    exceptions
      PROGRAM_ERROR           = 1
      others                  = 2.
  if SY-SUBRC <> 0.
    message id SY-MSGID type SY-MSGTY number SY-MSGNO
            with SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  endif.
Regards
Gopi
Message was edited by: Gopi Narendra

Similar Messages

  • AE: Deleting Initiators which are already tied to request

    Hi All
    Is there a way of deleting initiators which are already tied to requests? We would like clear the system of all initiators if this is not possible is there a way around it! We would like to use attributes assigned to those initiators in new initiators.
    Any assistance will be appreciated!

    Hi there,
    it is possible to delete initiators!
    - find the path the initiator you want to delete is tied to
    - edit the path and check the "detour" box and deactivate the "active" box
    - save the path without an initiator (detours don't need initiators)
    - now you can delete your initiator
    What is not possible is to delete the path (only when deleting the requests with the mentioned script).
    Regards,
    Daniela

  • Deleting items which are cheked in CheckBox

    Hi
    I am deleting some items which are checked by the user in the check box.
    If user checks 3 items and click delete, I should delete all the items which are checked.
    help me in solving this issue.
    Sample code will be very helpful.
    Thanks
    soori

    hi there :))
    in the page u have:
    <f:view>
        <h:form>
            <h:selectManyCheckbox layout="lineDirection" value="#{userBean.result}">
                <f:selectItems value="#{userBean.data}" />
            </h:selectManyCheckbox>
            <h:commandButton value="Submit" action="#{userBean.action}"/>
        </h:form>
    </f:view>UserBean class:
            private String result[];
         private HashMap data;
         public String action() {
              if (result.length > 2) {
                   for (String res : result) {
                        data.remove(res);
              return "";
         public HashMap getData() {
              if (data == null) {
                   data = new HashMap();
                   data.put("1", "1");
                   data.put("2", "2");
                   data.put("3", "3");
                   data.put("4", "4");
                   data.put("5", "5");
              return data;
         public String[] getResult() {
              return result;
         public void setResult(String[] result) {
              this.result = result;
         }in action method u check how many check boxes are clicked and if they`re more then 2 u delete them from the HashMap

  • Deleting files which are offline.

    What is the best way to get Lightroom to delete files which are offline? I don't use lightroom as a database or DAM - for that i use iMatch. I use lightroom only to process the raws and hate to see the thumb files with a question mark on them when they are really not available locally.
    Sometimes i wish lightroom behaves like the photoshop bridge program in that it will display only files that are available but i understand that lightroom does what it does because it also acts as a DAM program - that's why it still keeps the thumb files even though they don't really exist locally. But i don't want to see them if they are not available - is this possible and what's the best way to batch delete all question-marked files? Thank-you. 

    Of course doing as John suggests mean all edits, history, snapshots, collection information, virtual copies are gone, gone, gone.
    As you've said yourself, Lightroom is a database, not an browser and having access to offline files is a reason why people use Lightroom. Missing file handling could be better, but if you want to files on a missing volume, click on the Volume browser to close the folder view. Of course you'll still see the missing files in collection.

  • Selecting records which are greater than or of current week

    Hi I have a table having table structure
    CREATE TABLE OMPPRODUCTION
    LOCATIONID VARCHAR2(200 BYTE) NOT NULL ,
    IPC VARCHAR2(200 BYTE) NOT NULL ,
    PRODUCTIONWEEK VARCHAR2(200 BYTE) NOT NULL ,
    QUANTITY VARCHAR2(2000 BYTE) ,
    PRODUCTIONCODE VARCHAR2(2000 BYTE) ,
    MOULDQUANTITY VARCHAR2(2000 BYTE) ,
    SOURCE VARCHAR2(2000 BYTE) ,
    APPLICATION VARCHAR2(2000 BYTE) ,
    COMMENTS VARCHAR2(2000 BYTE) ,
    TLM DATE ,
    ADSTAT CHAR(1 BYTE) ,
    SID NUMBER(10, 0) ,
    SECURITYLEVEL VARCHAR2(100 BYTE) ,
    CONSTRAINT OMPPRODUCTION_PK PRIMARY KEY ( LOCATIONID , IPC , PRODUCTIONWEEK ) ENABLE
    It has field PRODUCTIONWEEK which is having data as YYYYMMDD.
    I want to select records which are starting from current week(Monday as starting Day).
    eg Current Day is 20120210 so i would select rows having date more than or equal to 20120206.
    Can anyone guide me how it can be achieved ?
    Edited by: MaheshGx on Feb 6, 2012 4:16 PM

    Hi,
    Boneist wrote:
    ... Wow, why so complicated? ...
    So, taking account of the fact your column isn't DATE datatype, this would be more efficient for you;
    select *
    from   ompproduction
    where  trunc(to_date(productionweek,'yyyymmdd'), 'iw') >= trunc(sysdate, 'iw');
    This will be even less complicated and more efficient:
    select *
    from   ompproduction
    where  to_date(productionweek,'yyyymmdd') >= trunc(sysdate, 'iw');However, given that OP is stuck with a VARCHAR2 column, I would suggest:
    SELECT *
    FROM   ompproduction
    WHERE  productionweek     >= TO_CHAR ( TRUNC (SYSDATE, 'IW')
                                     , 'yyyymmdd'
    ;Instead of calling TO_DATE for every row in the table, this calls TO_CHAR only once.
    Also, when there is invalid data (which is very likely when using a VARCHAR2 column to store dates), this will not raise an error.
    OP: Note that this only works because the sort order of your VARCHAR2 column corresponds to the sort order you want. If February 6, 2012 were stored as '02/06/2012' or '06-FEB-2012', then you'd have to use TO_DATE on every row.
    Boneist's main point is right.
    Dates belong in DATE columns. If you're getting the data from a file, convert the strings to DATEs when the table is populated.

  • Query to ignore the records which are 6 months older

    I need a query to ignore the records which are 6 months older . my table is having a column named quote_date . I need to ignore the records whose quote date is 6 months older . Can any one help me in this regard.
    thanks in advance
    rakesh

    Hi:
    SELECT *
      FROM table_name
    WHERE MONTHS_BETWEEN (SYSDATE, quote_date) > 6HTH
    Saad,

  • Displaying the records records which are coming more than once

    hi
    create table temp(comp_id int,branch_id int);
    comp_id | branch_id
    ---------+-----------
    1000 | 1
    1000 | 1
    1000 | 2
    1000 | 2
    1000 | 3
    2000 | 1
    2000 | 1
    2000 | 2
    2000 | 3
    how can i write a query which displays the records records which are coming more than once on the basis of fields comp_id and branch_id. e.g. 1000 | 1 should be displayed because it is coming more than once. 1000 | 3 should not be, because it has a single entry.

    select comp_id, branch_id, count(*)
    from temp
    group by comp_id, branch_id
    having count(*)>1
    Please note this forum is not a SQL class and it is not the place to have your homework done.
    Sybrand Bakker
    Senior Oracle DBA

  • Batch Delete: Deleting Records which I don't own

    Hi
    I have performed a batch delete of activities from an activity list.
    The process deleted only the records which I owned, which was about half.
    The remaining half are owned by 2 other users, and I am unable to establish how to batch delete the remaining records.
    Any assistance would be appreciated.
    Cheers
    Jason

    Jason,
    Only the Owner of an activity can delete it, you could try mass updating those activities so that you own them, then delete them.
    You'll also get a better response if you post these types of questions in the Administration forum.
    regards
    Alex

  • Best approach to delete records that are not in the source table anymore.

    I have a situation where I need to remove records from dimensions that are not in the source data anymore. Right now we are not maintaing history, i.e. not using SCD but planning for the next release. If we did that it would be easy to figure the latest records. The load is nightly and records are updated and new added.
    The approach that I am considering is to join the dimension tables the the sources on keys and delete what doesn't join. However, is there perhaps some function in OWB that would allow to do this automatically on import so it can be also in place for the future?
    Thanks!

    Bear in mind that deleting dimension records becomes problematic if you have facts attached to them. Just because this record is no longer in the active set doesn't mean that it wasn't used historically, and so have foreign key constraints on it in your database. IF this is the case, a short-term solution would be to add an expiry_date field to the dimension and update the load to set this value when the record disappears rather than to delete it.
    And to do that, use the target dimension as a source table, outer join it to the actual source table on the natural key, and so your update will set expiry_date=nvl(expiry_date,sysdate) to set to sysdate if this record has not already been expired on all records where the outer join fails.
    Further consideration: what do you do if the record is re-inserted into the source table? create a new dimension key? Or remove the expiry date?
    But I will say that I am not a fan of deleting records in most circumstances. What do you do if you discover a calculation error and need to fix that and republish historical cubes? Without the historical data, you lose the ability to do things like that.

  • Can we export the records which are failed on an validation

    Hi
    My Question is after a validation is run on an record in the data manager,I like to extract the records from Data Manager,with the validation success(Tick) and failed(X) column which is generated by the system for each validation.
    As the validation fields in the Data manager are system fields , is it possible to extract ?, is there any other workaround for this.
    As in my system there are 10 validations which are grouped in to a validation group.when i run the validation group, i want to take a report kind of recordswith the validation Name Fields (tick) and (x) in to an excel or any format.
    Regards
    Sowseel.

    Hello Sowseel.
    In DM FreeFormSearch you have expression field - you can use it for create filter. and than export all selected records.
    You can create special field and use assignment with similar as you validation rule
    Assignment wil put expression result to that field (in fact - validation result)
    Then you can extract records with validation result.
    Regards
    Kanstantsin Chernichenka

  • How to select records which are added during last week

    I have a scenerio in which I have a person dimension, which includes all the information about the person. I want to take two extracts out of it. One is monthly and one is on weekly basis. In the monthly I am just taking data for that particular month and then joining it with the Fact table. It is simple and I have already done it. I am having trouble for doing it on weekly basis of the current month, what I want to do is after the 1st week I want to select the new persons which were added (delta) during the 1st week. In the end of 2nd week I want to select those records which were added during 2nd week and so on for all the 4 weeks. e.g.
    Day
    8     The person’s which were added during 1st – 7th
    15     The person’s which were added during 8th – 14th
    23     The person’s which were added during 15th – 22nd
    31     The person’s which were added during 23rd – 31st
    Any suggestions will be appriciated please. Thanks

    A few steps arem required
    1) when inserting or updating a record in the target table set wk and mth IND to 'N'
    2) when running the week load after loading the data in the proper target end table
    set the wk ind to 'N' where wk_ind = 'Y'
    3) when running the month load after loading the data in the proper target end table
    set the wk ind to 'N' where mth ind = 'Y'
    did this help ?
    DJ

  • Deleting Child records which are not associated to any parent

    Hi
    We have seen that in the application though the Activty records has been deleted the child records like sample dropped and the roduct details has remained in the system. This happened cos in R18 when contact was deleted activty got deleted but the Activity child records remained in the application.
    we found that child records are present by looking into record utilization.
    Wanted to know if there is any way to delete these child records from teh application cos we are unable to query for them from UI as well as via webservices.
    any pointers would be helpful.
    -MR

    There is not a reporting subject area or folder available on Books. The workaround we employed was to create a field on the entity that was assigned books and that field was checked when the books were assigned. We are using web services to assign books and the web services also updates the field "Books Assigned". This gives us a way of reporting on that field to see those records without book assigned.

  • IR Report to update filtered records that are checked - How To

    Hi,
    (APEX 4.0 on 10g)
    Simply stated, I have a IR Report with the followng
    select
    APEX_ITEM.CHECKBOX(1,empid,DECODE(selected_flag,'Y','CHECKED','') AS SELECTED,
    ename,
    job,
    selected_flag
    FROM emp
    ORDER BY 1
    The Interactive Report returns a 1000 records and none of the rows are selected (i.e. selected_flag is not 'Y'; I filter the report for last name = 'SMITH' which returns 100 rows.
    How do I refer to those or updated the SELECTED_FLAG of the 100 rows with the last name of 'SMITH' to 'Y'?
    Thanks in advance for your response.

    Hi,
    I don't know... it might be too late... but I came across this Problem too.
    The trick is to select the the value of the primary key instead of the checkbox value...
    something like this ...
    select apex_item.checkbox(1, pn_modulid, decode
    (V_SOMEVALUE 'J', 'checked', 'unchecked')) as "V_SOMEVALUE"
    and...
    apex_item.hidden(9,pn_modulid||',1:'||nvl(V_VALUE,'N')||',.... as checks
    in the IR.
    And then in the Process one can do something like this....
    nid NUMBER;
    nanz NUMBER;
    ncount NUMBER;
    vsql VARCHAR2 (32676);
    vvar VARCHAR2 (100);
    vvarray VARCHAR2 (1000);
    TYPE reccheckboxen IS RECORD (
    n_id NUMBER,
    v_varray VARCHAR2 (1000),
    v_varrayneu VARCHAR2 (1000)
    TYPE tapcheckboxen IS TABLE OF reccheckboxen
    INDEX BY BINARY_INTEGER;
    tcheckboxen tapcheckboxen;
    begin
    --this is the value of my array from the hidden select...
    FOR ds IN 1 .. apex_application.g_f09.COUNT
    LOOP
    vvarray := apex_application.g_f09 (ds);
    nid := SUBSTR (vvarray, 1, INSTR (vvarray, ',') - 1);
    tcheckboxen (nid).n_id := nid;
    tcheckboxen (nid).v_varray :=
    SUBSTR (vvarray, INSTR (vvarray, ',') + 1);
    tcheckboxen (nid).v_varrayneu :=
    REPLACE (tcheckboxen (nid).v_varray, 'J', 'N');
    END LOOP;
    FOR c IN 1 .. 7
    LOOP
    vsql :=
    'begin :ncount := '
    || 'apex_application.g_f'
    || LPAD (c, 2, '0')
    || '.count; END;';
    EXECUTE IMMEDIATE vsql
    USING OUT ncount;
    FOR v IN 1 .. ncount
    LOOP
    vsql :=
    'begin :vvar := '
    || 'apex_application.g_f'
    || LPAD (c, 2, '0')
    || '('
    || v
    || '); END;';
    EXECUTE IMMEDIATE vsql
    USING OUT vvar;
    tcheckboxen (vvar).v_varrayneu :=
    REPLACE (tcheckboxen (vvar).v_varrayneu,
    c || ':N',
    c || ':J'
    END LOOP;
    END LOOP;
    IF tcheckboxen.COUNT > 0
    THEN
    FOR verg IN tcheckboxen.FIRST .. tcheckboxen.LAST
    LOOP
    IF tcheckboxen.EXISTS (verg)
    THEN
    IF tcheckboxen (verg).v_varray <>
    tcheckboxen (verg).v_varrayneu
    THEN
    vsql :=
    'Update Table
    set value = :01 where pn_modulid = :id';
    EXECUTE IMMEDIATE vsql
    USING vvalue, id;
    END IF;
    END IF;
    END LOOP;
    END IF;
    end;
    I had 7 Checkboxes to check in my report.
    Works fine.... ;-)

  • Start Routine logic to delete records which do not satisfy a condition

    Hello,
    Iam trying to code a start routine to delete the records from the source_package if a certain set of conditions are not met.
    It is failing at the last statement.
    Pls help.
    Thanks
    Jagadish
    code is as follows..
    LOOP AT SOURCE_PACKAGE assigning <SOURCE_FIELDS>.
    IF not (
    ( <SOURCE_FIELDS>-/BIC/ZCLSD_DT BETWEEN <SOURCE_FIELDS>-/BIC/ZWEEKOF
    AND <SOURCE_FIELDS>-/BIC/ZNONWKOF )
      AND
      ( <SOURCE_FIELDS>-/BIC/ZCLSD_DT IS  INITIAL )
    DELETE SOURCE_PACKAGE FROM <SOURCE_FIELDS>.
    (is failing at the delete statement.)
    ENDIF.
    ENDLOOP.

    Thanks Pratap,
    I used an internal table to load the records and used a delete statement out side the LOOP.
    By using a Work Area assignment instead of the Source_fields, The delete statement is giving me an error saying "Conversion of Numeric Value to type Object is not valid".
    Here is the code I have modified...
       TYPES: BEGIN OF LINE,
                WO(6) type c,
              END OF LINE.
       DATA: WA TYPE LINE,
             ITAB TYPE TABLE OF LINE.
    LOOP AT SOURCE_PACKAGE assigning <SOURCE_FIELDS>.
    IF NOT (
    ( <SOURCE_FIELDS>-/BIC/ZCLSD_DT BETWEEN <SOURCE_FIELDS>-/BIC/ZWEEKOF
        AND <SOURCE_FIELDS>-/BIC/ZNONWKOF
      AND
      <SOURCE_FIELDS>-/BIC/ZAPRD_DT IS NOT initial )
    Append <SOURCE_FIELDS>-/BIC/ZWO_NBR to itab.
    ENDIF.
    ENDLOOP.
    loop at itab into WA.
    DELETE SOURCE_PACKAGE where /bic/ZWO_NBR = WA-wo.
    endloop.

  • VSB1N--Deleting items which are in status 'Processed with errors.'

    Hi Friends,
    There is one issue which needs your guidance,
    In SAP there is an transaction called VSB1N where all our incoming SBI invoices gets received. When an SBI is received it can end up in either 1."Processed without errors" or 2. "Processed with errors". If the SBI ends up in the second state it requires a manual correction and then it can be processed again so it ends up in state one.
    The issue here is with number 2 mentioned above, i.e. "Processed with errors". Some of the items do not belong to this list & will not be corrected. So what client want is to delete them and here is where the problem gets in, they cannot be deleted.
    Is there any way to have these items deleted?
    Many Thanks!
    Sadanand.

    Check the following notes:-
    a)  Note 371489 - SBWAP: Posting step terminates
    b)  Note 557344 - Processing step ends with errors
    c)  Note 1605859 - FAQ: Processing step in SD self-billing procedure
    G. Lakshmipathi

Maybe you are looking for

  • I am trying to get my word doc's to fit PDF pages correctly

    I have a website and I rely on my opt-in email lists when people sign-up for my reports that are sent out in PDF form. I write the reports in a 2007 word doc. and save them into a PDF but the pages don't save as a full page sometimes it only takes up

  • How can I stop Foxfire from automatically loading when I turn on my computer that runs on Windows Vista?

    Foxfire automatically loads when I boot up my computer after all the other essential programs boot up. I'd like to know how to disable the start-up menu link that allows the program to load up when the computer first starts up because the Foxfire bro

  • MSS Team Calendar - Direct Report

    Dear All, We are on EP7 and using the web dynpro Team Calendar. The client have requested that in one of the view, it only display the direct employee for the manager (A002 relationship). Anybody knows how to configure the "evaluation path" and the "

  • Flash Installer hangs up at 25% on download in installer after launching installer

    I have removed all Flash previous versions. I'm on a Macbook air, Yosemite. I'm trying to install flash current V17 installer. It launches the installer and hangs are 25%. I've run the uninstaller, I've removed the plug in from Libraray and the Flash

  • Macbook Pro - Liquid keyboard damage

    Help! Have a macbook pro 2011 and the keyboard is broken! I think liquid may have gotten in there but havent done anything drastic to it like drop it into a bath or anything only think a small amount when i tried to clean it! When i press the enter b