Check if block is emty

Hello.
Is there a (short or simple) way to check, if the user has entered data into any item in a block, which is in enter-query mode?
Problem.
When the user executes query, i have to check, if he entered data in enter-query mode. If he entered search criteria, then the form executes query one way. When no data is entered, form executes query another way.
How do i check, if there is search criteria in any item in a block (and not using: if item1 is null and item2 is null and ...)?
Thanks.
Message was edited by:
DejanH

hy
could be use following, but i don't know if it go well for you:
Obtaining Query Count Without EXECUTE-ing a Query
FUNCTION query_count (p_block_name VARCHAR2) RETURN NUMBER
IS
cnt NUMBER;
BEGIN
GO_BLOCK(p_block_name);
COUNT_QUERY;
cnt := GET_BLOCK_PROPERTY(p_block_name, QUERY_HITS);
IF FORM_SUCCESS THEN
RETURN (cnt);
ELSE
MESSAGE('Error in getting Query Hits for block '||:SYSTEM.CURRENT_BLOCK);
RAISE FORM_TRIGGER_FAILURE;
END IF;
END;
WHEN-BUTTON-PRESSED trigger
DECLARE
v_cnt NUMBER;
BEGIN
v_cnt := query_count(<detail block name>);
IF (v_cnt = 0) THEN
p_show_alert('No Details exist.');
ELSE
GO_BLOCK(<detail block name>);
EXECUTE_QUERY;
END IF;
END;
Regards

Similar Messages

  • ATP check avoid block other storage location

    Hi Gurus,
    Let's say there is 4000 EA available in storage location 1000, but in the order we enter 5000EA. I don't want to addition 1000 EA block other storage location like 1603/1608, only block own location 1000 waiting for replenishment.
    We defined the storage location in sales order, but still the ATP check will block the stock in other storage location.
    Can I know your idea?
    thanks.

    Hi,
    Couple of notes you can check of;
    Note 547118 - FAQ: Result of ATP calculation
    Note 547512 - FAQ: Customizing of the ATP in R/3 (Question 8).
    Regards

  • How to check & resolve block corruption if no RMAN backup is there?

    *<<+MY Findings+>>*
    to check block corruption :
    (run command)
    select * from v$database_block_corruption;
    DB_VERIFY is useful in these situations:
    When block corruption is expected;
    Forecast any future problems w.r.t. database file/ block corruption;
    When you restore files from a tape. It will help knowing if the first file pulled from tape is corrupt, instead of spending hours to extract all of them.
    to check block corruption
    DBVerify
    C:\>dbv userid=nfadmin/nfadmin file=+DG1/nfdb/datafile/low_s_data.304.782536883 feedback=10000 blocksize=8192
    can use DBMS_REPAIR to detect and repair corrupt blocks in tables and indexes
    BEGIN
    DBMS_REPAIR.admin_tables (
    table_name => 'REPAIR_TABLE',
    table_type => DBMS_REPAIR.repair_table,
    action => DBMS_REPAIR.create_action,
    tablespace => 'USERS');
    DBMS_REPAIR.admin_tables (
    table_name => 'ORPHAN_KEY_TABLE',
    table_type => DBMS_REPAIR.orphan_table,
    action => DBMS_REPAIR.create_action,
    tablespace => 'USERS');
    END;
    Question* :::how to check & resolve block corruption if no RMAN backup is there?

    http://www.oracle.com/technetwork/database/focus-areas/availability/maa-datacorruption-bestpractices-396464.pdf
    http://www.oracle-base.com/articles/misc/detect-and-correct-corruption.php

  • Check physical block size on windows

    Hi All
    how to check physical block size on windows 2008 R2
    got the solution
    thanks
    Edited by: 912919 on 04-Oct-2012 03:16

    912919 wrote:
    G:\app\testuser\product\11.2.0\dbhome_1\BIN>fsutil fsinfo ntfsinfo f:
    NTFS Volume Serial Number : 0x50967d40967d279c
    Version : 3.1
    Number Sectors : 0x0000000046da27ff
    Total Clusters : 0x0000000008db44ff
    Free Clusters : 0x0000000008917ae3
    Total Reserved : 0x0000000000000000
    Bytes Per Sector : 512
    Bytes Per Cluster :               4096Bytes Per FileRecord Segment : 1024
    Clusters Per FileRecord Segment : 0
    Mft Valid Data Length : 0x0000000002b00000
    Mft Start Lcn : 0x00000000000c0000
    Mft2 Start Lcn : 0x0000000000000002
    Mft Zone Start : 0x00000000000c2b00
    Mft Zone End : 0x00000000000cf300
    RM Identifier: F2719D9E-5DAB-11E1-8418-001B21D86903
    Can i create block of 16K for Oracle database 11gI give up.
    Can you?
    Why do you want to create block of 16k for Oracle database?

  • What is the field for checking authorization block in payment card

    Hi experts,
    I am using BAPI_SALESDOCU_CREATEFROMDATA to create debit memo requests.My requirement is to check the checkbox 'authorization block in VA02 ->header->payment cards.But i could not find that field in BAPI as well as in this table.I am picking credit card data from FPLTC table,
    There is one field called checkbox in BAPI.Is it the same field im in search,the what is the corresponding field in FPLTC table.
    Please advice,
    Thanks and regards,
    Meena

    Meena,
    As I recall the Authorization Block field (FPLA-AUST5) is set based on a response code field in field CC_REACT_T.  If you set this value to 'C' (which stands for "Unsuccessful: set authorization lock") then SAP will set FPLA-AUST5 to 'X' in FORM ZAHLUNGSKARTEN_AUTHORISIEREN in program MV45AF0Z_ZAHLUNGSKARTEN_AUTHOR in the following section of code:
    Stop-Flag setzten
          IF DA_XFPLT_AUTH_NEW-REACT = REACT_STOP.
            XFPLA-AUST5 = 'X'.
          ENDIF.
        ENDLOOP.
    Eric Bushman
    [Paymetric|http://www.paymetric.com]

  • F110 Debit Balance Check auto block account

    Hi:
    on F110 , I run debit balance check and execute the and put block.
    Is this really block vendor account or not? I go to FK05 but it not put the block there.
    pls advise.

    Hi Mandy,
    BTE 1820 is used for debit balance check in F110. But after executing it won't put any block in vendor account but it does so in run time when you execute proposal.
    At the stage of proposal, it will analyze as per the logic that you have specified in the BTE and will propose you the payment list.  If you run again the second time, it will analyze afresh based on entries posted in the system at that point of time..so it won't put any permanent block on any Vendor. It is for the scheme of entries posted at that point of time when you are running proposal.
    Hope it helps..
    Regards,
    Kavita

  • Quality check for block stock

    Dear QM experts,
    I want to know which inspection types is suitable for check a material in block stock.
    Here is the case,
    First i used insp type 04 for GR from production. After we got the result that the lot is rejected, then we post the stock into block stock. After that my client want to do quality rechecking with a new inspection lot.
    So, my question is how SAP can support this business process?
    Thanks in advance,
    Helly

    Hi Amol,
    Thanks a lot for ur reply.
    I just wanna make sure.
    If we use 08, is it means that every goods movement will create an inspection lot unless we make a customizing for the movement type with QM not active ?
    Helly

  • Does Import/Export Utility check for Block corruption?

    Hi All,
    Just a quick question I have is does Import/Export Utiligy check for any block corruption while importing or exporting?
    If yes then does it do automatically or we have do set some parameter explicitly.
    I am using oracel version 9.2.0.6.
    Thx in advance.

    Hi yingkuan/kanchan
    Thx for your prompt reply. Still I am not clear as you said that export check for the block corruption error and if there is any it will display the error message in log file. But does it copy corrupted block or skip that block or mark that block as corrupted?
    Thx in advance.
    - Mehul

  • Checking if block has more than 1 record?

    Hi guys,
    I have a form with mutiple data bocks on it and I want to check if one of my datablocks has more than 1 record in it, if so I dont want to do anything, if it does only have 1 I want to do a procedure, what im wanting to know is there anyway i can check if a particular block has more than 1 record in it?
    Any help would be greatly appreciated.
    Thanks

    create a calculated item of type summary with summary-function COUNT. This will give you the number of records in the block.

  • MRBR - fails to check manual block reason code on a mass release.

    Transcaiton MRBR - I need to mass release of invoices but not allow it to release if a manual block.reason is set to a Q.
    The manual block reasons with a Q can only be release by a specific group of users.
    This works when releasing individual invoices, but if you release a mass amount, it does not check the manaul block reason value.

    tested it. you are correct in this. still allowed in NW640/19. found no note in service.sap.com/notes either - you might want to open a call then, M_RECH_SPG does not work when all items are marked.

  • User exit for lower tolerance check and block of invoices

    Hi,
    Is there any user exits or ways to block invoices for their lower limits. Presently, for upper tolerance limits, the invoice is blocked, but for lower tolerance limit only a warning message is displayed.
    Regards,
    Arun Mohan

    Hi,
    I have the similar problem.
    Did you find solution?
    Best regards.

  • Doing a check on blocking in the last few hours - use sysprocesses dmv?

    I want to see blocking that is not only happening now, but has happened in the past few hours.  Additionally, Id like to capture the statement that was causing it.
    Can I use a combination of Sysprocess and DBCC Inputbuffer to get this?  Im building a "logging" DB to capture various metrics about several databases and systems.

    No, you cannot get it that way.
    Consider:
    SQL Server Blocked Process Report Viewer
    Related: Brent Ozar's Locking and Blocking in SQL Server
    Brad McGehee's
    How to Identify Blocking Problems with SQL Profiler
    For production server it is better to use server-side tracing not SQL Profiler:
    http://www.sqlusa.com/bestpractices/createtrace/
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • I am buy used iphone and i want to check it blocked or not

    i want to check my iphone 4 carrier?

    any body tell me i want to check my iphone is unlock or lock

  • Check if the Sales Order is credit block.

    Hello Everyone,
    I have a requirement related to third party sales order and delivery. In the first system, a sales is created and then the PO gets created. Upon the creation of the PO a IDOC gets generated. The inbound IDOC in the other system triggers and a sales order gets created. The requirement is that if sales order in the first system is on credit block then automatically the sales order in the second system should go on delivery block.
    The solution that I have thought is that when the IDOC gets created after PO generation there itself add a flag to IDOC in case of credit block in sales order. BUT HOW TO CHECK CREDIT BLOCK of the SALES ORDER IN THE CUSTOMER EXIT?
    Any help is appreciable.

    Hi Rahul,
    Need some more clarification on why sales order is created in the second system, if it is a third party process ?
    are you creating delivery from the corresponding sales order of second system to replenish sales order of first system ?
    are you using standard IDOC type for creating Sales order from PO ?, if so check the Corresponding Function module which may have user exists
    check Function module : IDOC_OUTPUT_ORDRSP
    At first system, if the sales order is credit block you can restrict creation of PR-->PO in the first system itself, this is a standard Functionality
    This would be easier than looking for user and coding in IDOC function module
    try and revert
    thanks
    santosh

  • How to check blocking locks

    I have a query as to how to check for blocking locks in the database. I am trying to check it from TOAD but the session of TOAD is hanging. I hope, my question is clear.
    Please, help in solving the doubt.
    regards

    Hi user574290,
    Here is other script:
    clear screen
    set serveroutput on
    BEGIN
    dbms_output.enable(1000000);
    for do_loop in (select session_id, a.object_id, xidsqn, oracle_username, b.owner owner,
                    b.object_name object_name, b.object_type object_type
                    FROM v$locked_object a, dba_objects b
                       WHERE xidsqn != 0
                        and b.object_id = a.object_id)
    loop
        dbms_output.put_line('.');
        dbms_output.put_line('Blocking Session   : '||do_loop.session_id);
         dbms_output.put_line('Object (Owner/Name): '||do_loop.owner||'.'||do_loop.object_name);
        dbms_output.put_line('Object Type        : '||do_loop.object_type);
         for next_loop in (select sid from v$lock
                         where id2 = do_loop.xidsqn
                             and sid != do_loop.session_id)
         LOOP
              dbms_output.put_line('Sessions being blocked   :  '||next_loop.sid);
        end loop;          
    end loop;
    END;
    /Best Regards,
    Francisco Munoz Alvarez
    www.oraclenz.com

Maybe you are looking for