How to process records in a block without navigating (forms45)

Hi.
I use multi-record block with check boxes to allow operator select row they want to update. How can I process this task? Do I have to use:
First_Record;
loop
when../*record doesn't exist */... exit;
If /*checkbox selected */ then process_record
end if
Next_Record
end loop
But after that I have to navigate to the row I was before and I don't know how to do it.
Or maybe (it would be much better) there is some way to silently process all rows in a block without employing the navigation process. Any advice?
Thanks,
Gregor

DECLARE
currentRecord number := get_block_property('YourBlock', CURRENT_RECORD);
BEGIN
First_Record;
loop
when../*record doesn't exist */... exit;
If /*checkbox selected */ then process_record
end if
Next_Record
end loop
go_record(currentRecord);
END;

Similar Messages

  • How to display total in a block without total showing up in relevant detail block

    Hi there,
              I create a worksheet, including two block, one of which have detail information with multiple characts and one key figure, another block only have sumerization information takes one cell, which is summarized key figure for that detail information block.
             I implement this summary cell with formula 'GETDATA', but it is only effective after I show total for detail block.
            such as for detail block:
                         employee_no,  wage type,  earning_amount.
                         overall result                        total for earning_amount
            for summary block:
                         summary of earning_amount for all employees in the detail block.
    please tell me how to display summary block without pulling in overall result for detail block.
    Many Thanks,

    Hi bo zhang,
    This can be a work around
    As Michael Tocik suggested
    goto components tab, right click on data source and select copy
    do not insert cross tab
    then use the formula for DS_2 like
    =SAPGetData("DS_2","earning_amount","employee_no=TOTAL")
    this should work.
    and if you do any drill down for DS_1, the above total will not chnage because that is dependent on DS_2
    Hope it helps
    Best Regards,
    Subhash

  • How do I enable an ad blocker, without downloading a seperate one?

    I have been getting a lot of adds when shopping on Amazon, which I didn't get before. I would like to enable an ad blocker without downloading one, but I am not opposed to downloading a free one that's good. I'm tired of constantly clicking on the close button (and one doesn't have the close button).

    Adblock Edge: https://addons.mozilla.org/en-US/firefox/addon/adblock-edge/
    Adbpock Plus: https://adblockplus.org

  • How to process records one by one(not in parallel) with LSMW(BAPI)

    We loaded a batch of records (around 800) in lsmw with biz object method(BAPI).
    The records were processed in parallel and this caused some locking issue.
    Is there any way to make sure the records in LSMW with biz object method(BAPI) are processed one by one to avoid this kind of locking issue.
    Any reply is appreciated.

    Hi,
    I think there must be something to increase the lead time so that locking doesn't happen and it should be either part of customizing or can be coded,not sure exactly what code as in SAP GUI Scripting also there is a way to increase the lead time to avoid the locking issues.
    Regards,
    Rahul

  • Update a block without navigating to it.

    I have a table with several integers in it and a Form that reads the table. The Form has to translate the integers into things the user wants to see, so I hide the actual database field, do a translation into the user friendly string and display it in a display item. In some cases 0 means OFF, 1 means ON, in other cases I have to do a calculation to convert the integer into a float, I use a formula in these cases. This is all very easy and straight forward.
    The problem is that a query puts the cursor into my database connected block but the formulas do not calculate and display until I navigate into the display block. I wrote a when-new-record-instance trigger on my database block to jump to the display block and then back. That seems kind of ugly and besides I just want display items in my display, I don't want anyone to navigate to them, the user can't directly update the table. Is there a better way to cause the display block to be updated when the database block is?

    Hi,
    did you try :blockname.itemname to assign values to teh fields?
    Frank

  • How to find out the current number of rows in a form without navigation

    Hi.
    Is there any way to count the rows in a form (block) without navigation to the last record?
    I am modifying CUSTOM.pll and have to count the rows before user commits changes.
    All records are new in this case. Can anyone halp me? Thanks.
    Regards
    Tomáš

    Magoo wrote:
    no, such a block-property ^unfortunately^ does not exists.
    you can just go to to the block, call the last_record build-in and find out, where the cursor is.
    But with this you call restrictred procedures and their are not everywhere allowed ...
    If you execute a query on a block, may not all records getting retrieved from database.
    For this forms does not know, how many records are really in the block and
    for this there is no build-in like get_block_property ( records_count ).It does exist indeed. GET_BLOCK_PROPERTY('BLOCK',QUERY_HITS);
    Of course, this will return the number of records that would get fetched to the block (based on the where condition), but not the records with NEW status (i.e new records which are not yet committed).
    -Arun

  • Error in ST05 - trace record pair error block. How to resolve/tackle issue?

    Hello,
    Someone approached me last week in asking me how to resolve an issue in ST05. Basically I used the transaction to filter "inclusive VBPA".
    The error is ....
    Internal error - trace record pair error block 8 link no. 0
    Message no. 0S 026
    Diagnosis
        Each SQL statement is described by two SQL trace records that have the
        same link number. In this case, there are at least three records with the
        same link number.
        The system outputs the number of the block in which the third SQL trace
        record was found, as well as the link number of the records.
    System response
        Program processing continues after the message is displayed. The system
        processes all of the trace records. You should assume, however, that the
        SQL trace in this case is not displayed correctly.
    Procedure
    You cannot correct this error yourself. If you can reproduce the error,
    contact the SAP Hotline.
    SQL trace list editing terminated after 6 errors
    While using the trace I am executing the program that selects VBPA once and, I am assuming, as it goes through the BAPI BAPI_SALESORDER_CHANGE used to unblock a delivery block. I am guessing the problem or source is from the BAPI but do you guys have other insights in what is causing this issue?
    Thanks again, hope to hear from you soon, and good day.

    Our ERP LIVE Production around 11am all users encountered cannot generate print record from the submit new request. see below errorFor production issues, please log a SR.
    ORA-00060: Deadlock detected. More info in file /u/oracle/PROD/db/tech_st/11.1.0/admin/PROD_tailindb/diag/rdbms/prod/PROD/trace/PROD_ora_4026.trc.
    ORA-00060: Deadlock detected. More info in file /u/oracle/PROD/db/tech_st/11.1.0/admin/PROD_tailindb/diag/rdbms/prod/PROD/trace/PROD_ora_4026.trc.
    ORA-00060: Deadlock detected. More info in file /u/oracle/PROD/db/tech_st/11.1.0/admin/PROD_tailindb/diag/rdbms/prod/PROD/trace/PROD_ora_4026.trc.Please see these docs.
    OERR: ORA 60 "deadlock detected while waiting for resource" [ID 18251.1]
    What to do with "ORA-60 Deadlock Detected" Errors [ID 62365.1]
    Thanks,
    Hussein

  • How to add a record in document library without upload file.

    Hi,
    how to add a record in document library without upload file?
    Is it possible? I want to create a folders in Document Library but inside folders i do not want to upload a file instead of just i want to create a record. I will map my local file path to the records.
    Can anyone help me on it?
    Thanks & Regards
    Poomani Sankaran

    Hello Sankaran,
    document library is to upload documents, without document you will not be able to add a record or Item to it.
    for your requirement you can use a list and enable folders within the list and maintain the local path of the file as an item in list.
    http://www.sharepointbriefing.com/spconfig/article.php/3834951/Enable-the-New-Folder-Creation-Option-in-SharePoint-Custom-Lists.htm
    My Blog- http://www.sharepoint-journey.com|
    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful

  • How to process each records in the derived table which i created using cte table using sql server

    I want to process each row from the CTE table I created, how can I traverse from first row to second row and so on....
    how to process each records in the derived table which i created using  cte table using sql server

    Ideally you would be doing a set based processing rather than traversing row by row as thats more efficient. To answer it specific to your scenario we may need more info. Can you explain with some sample data your exact requirement?
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • How to enter a material on SO without a Material Master Record?

    Hi guys,
    Pls help me 2 flowing problem:
    1. How to enter a material on SO without a Material Master Record? And all case need to enter a material on SO without a Material Master Record.
    2. How to use customer material number if there isn't Master Data
    Thanks

    Hi Friend,
    I dont think we can go with a sales order with a material without material master record.
    But there are some cases where in we can create a sales order by entering a material which does not have a material master.
    1. Through material determination
    You can create a material determination for a material (1234) which exists in sap by a material(XYZ) which does not; For example in VB11 you can create a material determination for a material 1234 ( exists in sap) through a material XYZ which does not exists in sap.
    While creating the sales order when you enter the material XYZ is not give any error and automatically determine the material 1234 which exists.
    2. Text material
    We can create a order/quote by directly entering a text in the material description and without entering the material. This the case for text material wherein text item category will be determined.
    Please let me know if this help you. Else kindly elaborate the scenario.  
    Abhishek

  • How to display records into a non table base block..

    Hi,
    Can anybody help me how to display records into a non table base block....
    Find below is my coding but it only display the last record in the first line
    in the block.
    PROCEDURE CREATE_CARTON_QUESTION IS
    CURSOR car_c IS
    select /*+ rule */ question_id, question_description
    from WHOP.QADB_QUESTIONS
    where question_category = 'Carton'
    and question_active_flag = 'Y';
    v_found VARCHAR2(10);
    v_status boolean;
    v_error      varchar2(150);
    v_count number;
    car_r car_c%rowtype;
    begin
    begin
    select count(*) into v_count
    from WHOP.QADB_QUESTIONS
    where question_category = 'Carton'
    and question_active_flag = 'Y';
         exception
         when no_data_found then
         v_count := 0;
    end;
    if v_count > 0 then
    for car_r in car_c loop
    ---populating carton questions
    :la_carton.carton_question_id     := car_r.question_id;
    :la_carton.carton_question_answer     := 'N';
    :la_carton.carton_error_details     := null;
    :la_carton.attribute2          := car_r.question_description;
    end loop;
    end if;
    end;
    Thanks in advance.
    Regards,
    Jun

    Hi SNatapov,
    Thanks for you reply but still I get this error...
    FRM-40737 Illegal restricted procedure GO_BLOCK in WHEN-VALIDATE-ITEM trigger.
    Please note that I call that program unit in the last field of my control block inside when-validate-item trigger the questions should be display in la_carton block which is my non-base table block.
    Find below is the code....
    begin
    go_block('la_carton');
    first_record;
    for car_r in car_c loop
    ---populating carton questions
    :la_carton.carton_question_id := car_r.question_id;
    :la_carton.carton_question_answer := 'N';
    :la_carton.carton_error_details := null;
    :la_carton.attribute2 := car_r.question_description;
    next_record;
    end loop;
    end;
    Hoping you can help me this problem...
    Thanks in advance.
    Regards,
    Jun

  • How to loop through records in a block

    How do I get the count of records in a data block after the EXECUTE_QUERY?
    If I want to manually insert or update records into the table from the datablock how do I loop thru' records in the block.?
    Also for 'WHERE' clause of update statement is there anyway to tie up the rowid to the current row in the form.

    Use get_block_property('block',QUERY_HITS).
    For the second question :
    Set the properties of block to be INSERT_ALLOWED=FALSE,UPDATE_ALLOWED=FALSE, next do:
    go_block('block');
    first_record;
    set a local handler of errors
    loop
    next_record;
    end loop;
    when others then
    catch the error "Record must be inserted first...'
    For the third question set the DML Returning Value = Yes in property palette of the block and access the rowid as
    declare
    rowid_ rowid;
    begin
    rowid_:=:block.rowid;
    end;
    HTH

  • How to get the total record in the block before save them

    Hello,
    I need to recalculate the amout for all records in one block before saving them.
    How can I get it?
    Thanks for your helping

    You write a loop, something like this:
    Go_block('B1');
    If not form_success then
      Raise Form_Trigger_failure;
    End if;
    First_Record;
    If not form_success then
      Raise Form_Trigger_failure;
    End if;
    Loop
      If :system.record_status in('CHANGED','INSERT') then
        -- modify the record here--
      End if;
      Exit when :System.Last_Record = 'TRUE';
      Next_Record;
    End Loop;
    First_Record;But be very careful-- If your block can fetch a large number of rows, (over 100), this loop can take a long time, and you should not use this method. The loop will continue fetching more rows from the database until all rows satisfying the query are retrieved.

  • How can i get no. of records in a block?

    How can i get no. of records in a block?
    please advise me................

    if you are looking for the number of records a block can display then use get_block_property -> RECORDS_DISPLAYED, if looking for the number of records the last query returned use get_block_property -> QUERY_HITS
    KK

  • How to Save Multiple Records In Data Block

    Hi All,
    I Have Two Blocks --> Control Block,Database Block
    Please Any Idea How to Save Multiple Records In Data Block when User changed Data in Control Block.
    Thanks For Your Help
    Sa

    Now i have to use each record of control block(ctl_blk) as where condition in data base block(dat_blk)and display 10 records from database table.>
    Do you want this coordination to be automatic/synchronized or only when the user clicks a button or something else to signal the coordination? Your answer here will dicate which trigger to put your code in.
    As to the coordination part, as the user selects a record in the Control Block (CB), you will need to take the Key information and modify the Data Block's (DB) "DEFAULT_WHER E" block property. The logical place to put this code is the CB When-New-Record-Instance (WNRI) trigger. You code will look something like the following:
    /* Sample WNRI trigger */
    /* This sample assumes you do not have a default value in the BLOCK WHER E property */
    DECLARE
       v_tmp_dw    VARCHAR2(250);
    BEGIN
       v_tmp_dw := ' DB_Key_Column1 = '||:CONTROL.Key_Column1||' AND DB_Key_Column2 = '||:CONTROL.Key_Column_2;
       Set_Block_Property('DATA_BLOCK', DEFAULT_WHER E, v_tmp_df);
       /* If you want auto coordination to occur, do the following */
       Go_Block('DATA_BLOCK');
       Execute_Query;
       /* Now, return to the Control Block */
       Go_Block('CONTROL_BLOCK');
    END;
    The Control block items are assigned with values in Form level (Key_exeqry).If your CD is populated from a single table, it would be better to create a Master - Detail relationship (as Abdetu) describes.
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

Maybe you are looking for

  • Backing up and restoring library to and from external HD

    Newbie to iTunes since I got my iPhone. I'm asked periodically to back up my library to CDs. Can I back up per my question, and in the event of the unthinkable total crash of my Mac can I restore from the external HD? Is there a method to do this or

  • Why is my mac mini slower performance after upgrade to OS X Mavericks.

    Since I updated my standard mac mini mid 2011 ( CPU I5 2.5 GHz , 4 GB 1333 DDR3, AMD Radeon HD 6630 256 MB DDR5 , 500 GB harddrive 5400 ) to OS X Mavericks it starts up slower , operates slower when working on it and shuts down slower then when OS X

  • The column on the far left that showed my iPhone setup and options is missing. How do I get it back.

    I Had to reinstall iTunes. Now the column on the far left that showed my iPhone, setups, options and the like is missing. How do I turn it back on?

  • Video and Data files together

    I never had this request before! How do you (steps please) import and burn a Video file along with PDF files together in DVDSP that when opening the DVD on their computer they will be able to download the PDFs? I very much would appreciate an answer.

  • HELP--Storage problem

    Hi! My i-Pod is brand new. I installed software and starting putting songs on it...no problem, right. I have a 4 gb and only able to store about 200 songs! What is up with that? The songs are average in length and my storage on the i-pod itself says