Deleting selected record in a multi-record block

I am using Form 6i.
I have two multi-record block viz. BLK_A and BLK_B.
BLK_A has record displayed property set to 4
BLK_B has record displayed property set to 8
Each block has checkbox item.
BLK_A contains records retrieved from table after entering data in selection criteria.
When checked on anyone checkbox of BLK_A, then it displays related information in BLK_B.
But when I uncheck the checkbox of BLK_A, then how to delete records in BLK_B.
Thanks in advance.
Regards,
Vikas

No, absolutely not.
I cannot use this method.
Because if two checkbox is check in BLK_A, then records related to both record in BLK_A will display in BLK_B. If I uncheck any one checkbox of BLK_A, then only records related to that checkbox should be deleted.
If I use your suggestion, then all data will be removed.
Thanks and regards,
Vikas

Similar Messages

  • Deleting selected record in Dynamic Internal table

    Hi Friends,
    I want to delete selected row from a dynamic internal table. The selected entry should be deleted from Adobe and as well as Webdynpro abap.
    Kindly help me how to solve this problem.
    Thanks in advance.
    Regards,
    Phani.

    Hi Matthias,
    Thanks a lot for responding.
    In my adobe i kept a check box to delete the record. It should delete the selected ones. But right now, its deleting one by one.
    I have coded following script for delete button:
    IT_TIME_SHEET --> is my internal table
    G_ROW_STATUS is the field to track the action performed.
    var tlength = xfa.resolveNodes("IT_TIME_SHEET.DATA[*]").length;
    for ( var i=0; i<tlength; i++
    if(xfa.resolveNode("IT_TIME_SHEET.DATA["i"].FLAG").rawValue ==
    1 )
    IT_TIME_SHEET.DATA.instanceManager.removeInstance(i);
    G_ROW_STATUS.rawValue = "DELETE";
    In the Webdynpro abap following code I wrote:
        row_count = 1.
        FIELD-SYMBOLS <wa> TYPE zshr_time_sheet_time.
        LOOP AT it_time_sheet ASSIGNING <wa>.
          <wa>-srl_no = row_count.
          row_count = row_count + 1.
        ENDLOOP.
        last_row = <wa>-srl_no.
          DELETE it_time_sheet WHERE srl_no EQ last_row.
    Suppose if two records checkboxes are selected I can loop at the internal table IT_TIME_SHEET in webdynpro and delete where checkbox is selected.
    But problem is once user deletes records, adobe is deleting only one record and if i delete two records from webdynpro it looks like something wrong for the user.
    Please help me how to solve this problem.
    Regards,
    Phani.

  • How to delete selected records in PSA?

    Hi,
    I want to delete two records from PSA, but in PSA delete option is  disabled, how can i delete two records from PSA,
    is it possible or not,
    Regards,
    Venkat.

    Hi Venkat,
    As already mentioned by Ansel you can use a DTP filter to achieve this.
    In the DTP, on Extraction tab, where it says Filter, click on it in change mode and there it gives you an option to create a routine.
    Write a routine for your logic and execute.
    Regards
    Hemant Khemani

  • Delete Selected Records

    Hi Guys,
    Im trying to update an old form that lets me delete records
    in an access database.
    Im using DW CS3 and am looking for some guidance or a
    tutorial on doing a delete by deleteing records selected with a
    select box..
    If anyone can assist me id be very greatfull.
    Thanks

    Hi Guys,
    Ive made some progress with this and i think its down to how
    im setting the data types.. I found some info on the help and have
    this working on single records now!! but when I choose several
    records with the checkbox's I get the error:
    " ADODB.Command error '800a0d5d' Application uses a value of
    the wrong type for the current operation. "
    So I have looked at the var getting passed by the checkbox's
    and they seem to be passing all the correct values but if I select
    more than 1 at a time to delete it errors out..
    This is the line it errors out on.
    Command1.Parameters.Append
    Command1.CreateParameter("intRecordIDs", 5, 1, -1,
    MM_IIF(Request("checkbox1"), Request("checkbox1"),
    Command1__intRecordIDs & ""))
    I have the DataType set to Double now..
    Thoughts are very welcome.
    Thanks
    W

  • How to delete selected records from process form child form

    Hi,
    I have one child table attached to process form which has 6 columns.
    I have added 3 rows to the child form . if i tried to remove any row from the form always the first record is removing even though it is not selected to remove. I have coded according to Re: Removing from Child Process Form
    Please help me
    thanks in advance

    Can you tell us the code you had written?
    Regards,
    A

  • FETCHING VALUES IN MULTI RECORD BLOCK FROM ANOTHER TABLE USING SELECT STATEMENT.

    Hi,
    I have one multi record block in which i want to fetch values
    (more then one record) from another table using select statement
    IN KEY NEXT ITEM.I am getting following error.
    ORA-01422: exact fetch returns more than requested number of rows
    Thanks in advance.

    In your case I see no reason to use non-database block and to try to populate it from a trigger with a query, instead of using the default forms functionality where you can associate the block and the fields with table, create where clause using bind variables and simply use execute_query() build-in to populate the block. The power of the forms is to use their build-in functionality to interact with the database.
    Also, you can base your block on a query, not on a table and you dynamically change this query using set_block_property() build-in. You can use any dynamic queries (based on different data sources) and you simply need to control the column's data type, the number of the columns and their aliases. Something like creating inline views as a block data source.
    However, you can replace the explicit cursor with implicit one like
    go_block('non_db_block_name');
    first_record();
    FOR v_tab IN (SELECT *
    FROM tab
    WHERE col_name = :variable)
    LOOP
    :non_db_block_name.field1 := v_tab.col1;
    :non_db_block_name.field2 := v_tab.col2;
    next_record();
    END LOOP;

  • How to do it in multi-record block

    Hi all,
    i have 1 text items in a multi-record block number of record displayed 10
    and i have values like 100 , 50, 30 in first 3 records and in 5th record i want to put some value like
    20 then i want to calculate all values like 100 + 50 + 30 +20 = 200 and i want to put the total value in a single record block.
    but my problem is i cannot able to calculate all the value because for the totale value i have to
    write a for loop to loop through the record
    but go_block() is not working in post_change .
    if any solution is there plz suggest.......

    Hi zeeshan
    my problem is i cannot able to calculate all the value because for the total value
    put the total value in a single record block.
    First pls the following...
    Guidelines for Working with Calculated Items Calculated items_
    1- They are display-only control items.
    2-Calculated items cannot be database items.
    3.While you can set a calculated item's Enabled, Mouse Navigate, and Keyboard Navigable properties to Yes,
    you cannot set the Insert Allowed or Update Allowed properties to Yes
    Second Keyword: TOTAL is a reserved oracle key word... pls read the Details...
    go_block() is not working in post_change .well u can use timers but no need for it u can reference block item but first u have to accumulate the values per record in WHEN-VALIDATE-ITEM TRIGGER in the last calculated item which is inserted by the user and assign it to the display item in ur current multi-record block :*block_name.total_item*.. as follow...
    :block_name.total_item := :item1 + .... ; Then u create a second display item > no of records property = 1 , named e.g. final_summarized_totals
    In order to summarize this total values accumulated in the multi-record display item named e.g. block_name.total_item
    Finally using PRE-INSERT , PRE-UPDATE,PRE-DELETE Triggers to assign the value calculated into the display item * block_name.total_item* into the db_item into the previously mentioned Trigger Block-Level Off-course.
    :block_name.total_db_tem := :i:block_name.final_summarized_totals ; Hope this helps...
    Regards,
    Amatu Allah

  • Check box in a multi record block

    I have a multi record block that has a check box. I need to be able to go to the first record on the block, go through each row and check to see if it's selected. I will then get all the rows that were selected and passed it as a parameter in a package.I have already declared a global variable in the package to get all the rows selected.
    Can anyone please help.

    Hi
    This is my solution for your problem. If I understand correctly as you have to post the selected records from form to journal entry (a server operation). What you need to do is in your Oracle Forms multi record block construct a loop which goes from first record to last record of your data block, capture the selected records (wherever the check box is CHECKED ON) into a PL/SQL table structure (PL/SQL table is quite simillar to Oracle Forms RECORD GROUP structure, but more versatile as it can be recognized on the back end too).
    Once you populate the PL/SQL table with the selected record, pass the PL/SQL table itself as parameter to your package.
    Open the PL/SQL table in your destination code and do further processing with those selected records !!
    Hope this will work !!
    MOHAMMED R.QURASHI
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by kay:
    I CANNOT USE A RECORD GROUP. I HAVE TO EVENTUALLY POST THE SELECTED ROWS INTO JOURNAL ENTRIES. I STILL NEED TO BE ABLE TO
    GET ALL THE ROWS SELECTED BY THE USER.CAN I USE A CURSOR IN THE FORM TO GET ALL THE ROWS
    SELECTED?.
    THANKS FOR THE REPLY GANESAN.<HR></BLOCKQUOTE>
    null

  • Multi Record Block Problem

    Hi,
    I have a multi record block with two fields NAME and DATE. On clicking the Save Button a procedure (PROC_BEFORE_SAVE) is called which loops through this block, and deletes empty records.
    PROC_BEFORE_SAVE
    LOOP
         IF :TI_NAME IS NULL THEN
              DELETE_RECORD;
         END IF;
         NEXT_RECORD;
         EXIT WHEN :SYSTEM.LAST_RECORD = 'TRUE';
    END LOOP;
    The proc fails and throws error (Oracle Error Unable to Update Records) only for the case that the first few records are null. Sample data given below.
    Name  -  Date
    NULL  -  NULL
    NULL  -  NULL
    NULL  -  NULL
    AJ  -  10/02/2005
    JA  -  12/12/2004
    AJV  -  12/12/2002
    This happens because it tries to update the NOT NULL field NAME as NULL.
    Could somebody please tell me why this is happening? Is there something wrong with the procedure?
    I am using Oracle Forms 6.0.8.8.0 in Windows 2000 Professional edition.
    Any help would be greatly appreciated.
    Thanks,
    Anoop

    Hi,
    Thanks for the reply. But CLEAR_RECORD also doesn't seem to work.
    Thanks,
    Anoop

  • Query about multi record block

    Abdetu
    Please clarify this
    I have a multi record group on the canvas, which displays 5 records at a time. The block is based on a table. All the items, except 3 items are displayed items.Now in the block I have a list item, in which I have two values "PO" and "TSF".. If user selects PO, associated text items will get enabled and user will be entering the values .. Same is the case with TSF .. And at the end user selects Ok button to save the record to the database
    Now while fetching the records (based on query) ..once the records are fetched, control will be on PO/TSF list box, now the user can either change PO to TSF or TSF to PO ..or he/she may opt not to change also.. If user changes PO to TSF, only that particular record's TSF fields should get enabled .. The problem what I am facing is, when the control comes to PO/TSF list box.. since its multi record block, all the record's PO/TSF list box are getting enabled
    In the sense, if control is in the 1st record of multi record block, only those fields should get enabled, once the user navigates to the text item which is the last of that particular record, then 2nd record should get enabled....
    Can I know the solution
    Regards
    Message was edited by:
    Seshu
    Message was edited by:
    Seshu

    Hello Seshu
    ur case explanation should be in points 1,2,etc as possible leaving extra lines and spaces in between .. and the case should be more clear and summarized like:
    1- I have multi-records data block.
    2- I have a static list item with 2 values eg. (a and b).
    3- Depending on selecting from the list some items r enabled.etc.
    Kindly note that, this will facilitate ur problem to be more readable,recognizable and save time and effort of someone who wants to help u.
    Here comes the confusion:
    Now while fetching the records (based on query)
    The problem what I am facing is, when the control comes to PO/TSF list box.. >since its multi record block, all the record's PO/TSF list box are getting enabled i think with the piece of code i have just posted to u this can't be happened since it disable all the record's PO/TSF.
    if this didn't solve ur problem i suggest either u post ur code to help u or u try to put some validations with :
    if statment inside the loop depending on the list item's values which will enable or disable related items to the list.
    Hope this help u,
    If any Questions pls let me know..
    Regards,
    Abdetu..

  • About populating a non-database item in a multi-records block

    Hi, all
    I have a problem about populating a non-database item in a
    multi-records block. This block is set to database block with a
    controlled item which needs to be populated after query. so I
    create a post-query trigger, but my problem is when the records
    listed in this block are less than 10 ( the record number is set
    to 10), the trigger fires no problem. but when the retrieved
    records are greater than 10, the error message is 'post query
    trigger raised unhandled exception ora 01403'. anyone can help me
    fix this problem?
    Thanks in advance
    Diana

    Diana,
    When you have an unbound item in a block and want to fetch
    some data into it you need to write a post-query trigger.What
    you have done is right.But it seems that u are getting a No data
    found error.I am sure about how u r populating data into that
    field.If u have written a select statement to fetch the data in
    post-query trigger, kindly handle an exception and find out the
    problem.Having a look at ur code(pos-query) would be much more
    helpful for giving a better solution.Try this a let me know.
    Thanks
    Vinod.

  • Delete Multiple record in database block

    hi to all,
    i have one button. what i want if i press this button all the records that i selected from detail blocks will be deleted.
    i used this code but i always received an error : FRM-40102: record must be entered or deleted first.
    DECLARE
    Num_Total_Records NUMBER;
    Num_Loop_I NUMBER;
    BEGIN
    GO_BLOCK(<BLOCK_NAME>);
    FIRST_RECORD;
    LAST_RECORD;
    Num_Total_Records := TO_NUMBER(NAME_IN('SYSTEM.CURSOR_RECORD'));
    FIRST_RECORD;
    FOR Num_Loop_I IN 1..Num_Total_Records LOOP
    IF <CHECKBOX> = 1 THEN
    if <condition> then
    else
    if <condition> then
    else
    end if
    --condition is satisfied...deleted the selected record
    delete_record;
    commit;
    end if
    END IF;
    NEXT_RECORD;
    END LOOP;
    <................................................>
    END;

    baguhan,
    by this if u have selected all records, some records will won;t delete.
    because as poelger said, delete_record will already skip 1 record.
    so instead of the code u gave , its beter to all else portion in the condition and in the else portion gave the next record.
    this is the your code modified
    DECLARE
    Num_Total_Records NUMBER;
    Num_Loop_I NUMBER;
    BEGIN
    GO_BLOCK(<BLOCK_NAME>);
    FIRST_RECORD;
    LAST_RECORD;
    Num_Total_Records := TO_NUMBER(NAME_IN('SYSTEM.CURSOR_RECORD'));
    FIRST_RECORD;
    FOR Num_Loop_I IN 1..Num_Total_Records LOOP
    IF <CHECKBOX> = 1 THEN
    --condition is satisfied...deleted the selected record
    delete_record;
    commit;
    else
    NEXT_RECORD;
    END IF;
    END LOOP;
    <................................................>
    END;
    Regards,
    Manu

  • Delete_allowed property on a multi record block

    Hello!
    I need to modify the property "DELETE_ALLOWED" of
    some records of a multi record block according to
    some conditions (conditions on values of some items of the current record)
    My problem is :
    when I do that in a pre-record trigger
    (set_block_property(block name, delete_allowed, property_false),
    it change it for all records of the block even I make an IF condition on this!!!
    my block is a detail block of a another block!
    Any help please!!!

    Delete_Allowed is a block property, so it is the same for all records in a block. But when you set it in a Pre-Record trigger (following some conditions) then you can or cannot delete only that record ...

  • Validate a Multi Record Block.

    Hello every body-
    Would appreciate your inputs as to how to go about doing this.
    I have a multi record block like below.
    SEQ # THEMES PICK
    1 THEME 1
    2 THEME 2
    3 THEME 3
    4 THEME 4
    5 THEME 5
    6 THEME 6
    The 'PICK' field is a check box, that the user will click on if he needs to select a particular 'THEME'.
    I need to do the following validations ( I will be having a button something like INSERT BUTTON) at the bottom of the multi column block.
    .. Only 3 THEMES are to selected.
    .. If more than 3 THEMES are selected, need to show an alert stating that only 3 THEMES can be selected, allow the user to change selections.
    .. If only 3 THEMES are selected, need to insert the selected THEMES into a table.
    For example, in the above sitation, if the user picks 'THEMES' with SEQ# 2,4,5; then I need to insert the SEQ #, along with the other primary key (which is STUDENT ID) into the table.
    Would really appreciate if any one could let me know how to do this.
    Thanks for your time..

    1) Make a hidden summarized number field called mycounter in the same block. Set the summarized function to sum, block to 'myblock', field to 'mycheckbox', calculation mode to "summary"
    2) Make the checked and unchecked values of the check box 1 = checked and 0 = unchecked. Set the datatype of the checkbox to a number.
    3) In the when-checkbox-changed of the checkbox put this code..
    if :my.mycounter >= 4 then
      message('Error:  May only check 3 or less.');
      :myblock.mycheckbox := 0;
    end if;With this code they wont be able to check more than three rows. This is one piece of your puzzle anyway.
    Message was edited by:
    Mark Reichman

  • Raise form_trigger_failure is not working in multi-record block?

    raise form_trigger_failure is not working in multi-record block.
    Why?
    I am using Form 9i.
    Thanks and regards,
    Vikas

    Here is my code. Workorder_master is single block, workorder_dtls is multi-block.
    This code is written in KEY-NEXT-ITEM of labour_code in workorder_dtls.
    If suspended labour, invalid labour etc. is selected then it should not leave labour_code, but does not happen as I like. What will be the solution?
    DECLARE
    v_count                         NUMBER;
    v_status                    CHAR(1);
    v_workorder_no     VARCHAR2(15);
    v_pass_no                    VARCHAR2(15);
    v_rec_pos                    NUMBER;
    BEGIN
         IF :workorder_dtls.labour_code IS NOT NULL THEN
              v_rec_pos := :SYSTEM.CURSOR_RECORD;
              SELECT COUNT(*) INTO v_count FROM labour_master
                                  WHERE labour_code = :workorder_dtls.labour_code;
              IF v_count > 0 THEN --if labour exist.
                   SELECT status INTO v_status FROM labour_master
                                  WHERE labour_code = :workorder_dtls.labour_code;
                   IF v_status = 'I' THEN--'I' stands for busy.
                        --check if labour is for extension i.e. if labour is working for same workorder
                        SELECT COUNT(*) INTO v_count FROM workorder_dtls
                                            WHERE labour_code = :workorder_dtls.labour_code
                                            AND workorder_no = :workorder_dtls.workorder_no
                                            AND to_dt <= SYSDATE;
                        IF v_count > 0 THEN
                             --if working in same workorder then for extension, then give from_dt, to_dt
                             SELECT MAX(TO_DT)+1 INTO :workorder_dtls.from_dt FROM workorder_dtls
                                                 WHERE labour_code = :workorder_dtls.labour_code
                                                 AND workorder_no = :workorder_dtls.workorder_no
                                                 AND to_dt <= SYSDATE;
                        ELSE
                             --if not working in same workorder then give message.
                             SELECT workorder_no, pass_no INTO v_workorder_no, v_pass_no FROM workorder_dtls
                                                 WHERE labour_code = :workorder_dtls.labour_code
                                                 AND to_dt <= SYSDATE;
                             MESSAGE('This labour is already working through workorder no. '||v_workorder_no||' using pass '||v_pass_no);
                             MESSAGE('This labour is already working through workorder no. '||v_workorder_no||' using pass '||v_pass_no);
                             RAISE FORM_TRIGGER_FAILURE;
                        END IF;
                   ELSIF v_status = 'A' THEN--'A' stands for available.
                        :workorder_dtls.from_dt := SYSDATE;
                   ELSIF v_status = 'H' THEN--'H' stands for help-up.
                             SELECT workorder_no, pass_no INTO v_workorder_no, v_pass_no FROM workorder_dtls
                                                 WHERE labour_code = :workorder_dtls.labour_code
                                                 AND to_dt <= SYSDATE;
                        MESSAGE('This labour has been held-up for not submitting gatepass.');
                        MESSAGE('This labour has been held-up for not submitting gatepass.');
                        RAISE FORM_TRIGGER_FAILURE;
                   ELSIF v_status = 'S' THEN--'S' stands for suspend.
                             SELECT workorder_no, pass_no INTO v_workorder_no, v_pass_no FROM workorder_dtls
                                                 WHERE labour_code = :workorder_dtls.labour_code
                                                 AND to_dt <= SYSDATE;
                        MESSAGE('This labour has been suspended through workorder no. '||v_workorder_no||' using pass '||v_pass_no);
                        MESSAGE('This labour has been suspended through workorder no. '||v_workorder_no||' using pass '||v_pass_no);
                        RAISE FORM_TRIGGER_FAILURE;
                   END IF;
                   IF v_status IN ('A', 'I') THEN
                        :BLK_TEMP_WORKORDER.LABOUR_CODE := :WORKORDER_DTLS.LABOUR_CODE;     
                        GO_BLOCK('WORKORDER_DTLS_IMG');
                        EXECUTE_QUERY(NO_VALIDATE);      
                        GO_RECORD(v_rec_pos);
                        GO_ITEM('WORKORDER_DTLS.FROM_DT');
                        IF :workorder_dtls.from_dt + 180 <= :workorder_master.to_dt THEN
                             :workorder_dtls.to_dt := :workorder_dtls.from_dt + 180;
                        ELSE
                             :workorder_dtls.to_dt := :workorder_master.to_dt;
                        END IF;
                   END IF;
              ELSE --if labour does not exist.
                   MESSAGE('Invalid labour code');
                   RAISE FORM_TRIGGER_FAILURE;
              END IF;
         END IF;
    END;

Maybe you are looking for

  • Can not get Final Cut pro to capture HD footage from Canon HV10

    Ive had soo much trouble with no success, in trying to get footage from my HD camera into Fina cut Pro HD 4.5. I can get normal dv footage when i cahnge the setting s on the camera, and Final cut pro, but HD is not been possible so far.If any one can

  • Download CSV-File from Interactive Report

    Dear all, I want to download a CSV-File from a Interactive report. The content of the Rows in Excel: Erste,"B","C","D","E","F","G","H","I","J","K","L","M","N","O","P" IBC ->,"-","1","2","3","4","5","6","7","8","9","10","11","12","13","14" [...] How c

  • Video Gaming troubles with MacBook and software updates.

    I've got a question again about The Sims 2 for Macs. I've got a MacBook and have had it for almost a year now. I got the Sims 2 for it when I first got it and it has always worked perfectly on the computer. Well a few days ago, I ran a software updat

  • File-xi-rfc scenario

    Hi all, I am working on File-xi-RFC scenario. i have done IR and ID working. Now I have Done test cofiguration there is NO ERROR ......working File is picked .....as mode is delete.......working.. I check in Adapter Monitoring...............there i g

  • DOC reverse.

    Dear all,                         user had reversed two documennts but they ha dnot flagged the item as ok at the item level .At Miro F.I person is having these two mat doc. & these two doc are automatically selectec with yellow line the FI guy says