How to display a message when no data found in report

Hi all
i have report with few user parameters
when i run the report and no data found then i want a message
Please Guide
thanks And Reagds
Vikas Singhal

Hi,
one solution is to
1) create a summary column CS_COUNT where you count the number of records returned by your query (Function: count, Source:any field of your dataset Reset at:Report)
2) create a text area where you say for example "No records found...", and enclosing it in a frame.
3) Create format trigger for the frame like
IF :CS_COUNT = 0 THEN
return (TRUE);
ELSE
     RETURN (FALSE);
END IF;
OR, if you launch your report from a form and you want a popup message, you can create a before report trigger like:
if :CS_count = 0 then
srw.message(1000, 'your message');
raise srw.program_abort;
return(false);
else
return(true);     
end if;

Similar Messages

  • Message when no data found in set block property

    hi,
    ı use oracle forms 10.1. when ı use the code below
    SET_BLOCK_PROPERTY('MY_BLOCK', DEFAULT_WHERE,     'YEAR=2012') ;
    EXECUTE QUERY;
    if there is records for year 2012 it works fine. Bu if there exists no record ı get message saying no data found. And then it clears the block. I want to clear block with no messages.
    is it possible? thanks...

    Yes. you can add your own message on form level. User ON-MESSAGE trigger and write down the given code :-
    DECLARE
      msgnum NUMBER       := MESSAGE_CODE;
      msgtxt VARCHAR2(80) := MESSAGE_TEXT;
      msgtyp VARCHAR2(3)  := MESSAGE_TYPE;
      ALERT_BUTTON Number;
    BEGIN
      IF msgnum = 40301 then
    --HERE YOU CAN WRITE ONLY NULL-------
    /* SET_ALERT_PROPERTY('ALERT_OK',ALERT_MESSAGE_TEXT,'There are No records available for the Query selected by you  !!! ');
             ALERT_BUTTON := SHOW_ALERT('ALERT_OK');
             RAISE FORM_TRIGGER_FAILURE; */
    null;
    Elsif msgnum = 40355 then
              SET_ALERT_PROPERTY('ALERT_OK',ALERT_MESSAGE_TEXT,msgtxt);
             ALERT_BUTTON := SHOW_ALERT('ALERT_OK');
             RAISE FORM_TRIGGER_FAILURE;
    Elsif msgnum = 40657 then
              SET_ALERT_PROPERTY('ALERT_OK',ALERT_MESSAGE_TEXT,msgtxt);
             ALERT_BUTTON := SHOW_ALERT('ALERT_OK');
             RAISE FORM_TRIGGER_FAILURE;
    elsif msgnum = 40400 then
              message('Operation completed Successfully');
      END IF;
    END;

  • How to display success message when data is changed in the custom tab in MM

    Hi,
    I have added a new custom data tab in the MM01/MM02/MM03 transactions. Whenever I do changes to fields in the custom tab in MM02 transaction, and no changes in the standard tabs, I will get a message stating "No Changes Made".
    But if I do changes in the standard tabs, it works as usual with display of message "Changes to particular material has been done.
    Please let me know, if anyone of you know, how to display the success message if the changes to the custom tab is done.
    Thanks in advance,
    sudhanva

    Hi Sudhanva,
    The exit EXIT_SAPLMGMU_0001 is a function exit that you can use for custom validation but not to add custom tab/screen.
    But the message issued by SAP is not related to this Function Exit.
    If you have used a Screen Exit, then there must be some Function Exits also in the same Enhancement using which you can assign the value of custom fields to/from the standard structure. Thus when the value of any custom field is changed the system can understand that the some changes have been changed and will  not issue the message.
    In case you have used a BADI, there can be other methods in the BADi using whcih you can assign the value of custom fields to/from the standard structure. This might also prevent the message from being displayed.
    I could try giving you further details if you can provide the name of the Enhancement/BADi that you used to add the additional tab.
    Hope this helps.
    Regards,
    Abhisek.

  • How to Display Confirmation message when data is stored in DB ?

    Hello.
    I am persisting user entered data to database table. But I want to display custom message like "Stored successfully" or "Not Stored".
    I am using following approach in my controller and AM impl
    in PFR:
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    OAApplicationModule am = pageContext.getApplicationModule(webBean) ;
    am.invokeMethod("insertDataToDeviceDetailsTable") ;
    in AM Impl :
    public void insertDataToDeviceDetailsTable(){
    getDBTransaction().commit();
    //delegating control to Device Details Page
    How to do it ? and also what is the best way to show messages in this scenario. As in some pages a dialogue box appears and the page become inactive.
    waiting for reply..
    Regards,
    Ajay

    Hi,
    You can pint message after am.invoke method:
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    OAApplicationModule am = pageContext.getApplicationModule(webBean) ;
    am.invokeMethod("insertDataToDeviceDetailsTable") ;
    throw new OAException("Stored successfully", OAException.INFORMATION);
    in AM Impl :
    public void insertDataToDeviceDetailsTable(){
    getDBTransaction().commit();
    --Sushant                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to display error message when writing into Header text of VA02

    Hi All
    I have a requirement. I have a header text 'English' in VA01/VA02 transaction. I need to put a condition that whenever the user log-in is English language, then only he should be able to write text into that HEADER text 'English', else it should not allow the user to write anything.
    Is it possible to be done through any ABAP coding.
    Kindly help
    thanks and regards
    shilpa

    Hi
    Yes u can, but I think it's not easy to understand which language was used to write a text.
    U can use the fm READ_TEXT in order to get the text, but then I don't how u can decide if the text is in English or French or Italian...
    Max

  • Need to change the standard error message when no data found in a window

    Hi All,
    We have a button in our screen, on clicking we show a window with details from a view for the selected record in the screen using master-detail relationship.
    But, if i dont have any data to display, it is giving standard message,
    " FRM-40350 Query caused no records to be retrieved " in a seperate window,
    And if i click on Ok then the window is opening up with no records/data.
    My Requirement is to
    1. I need to show a custom message(some user friendly mesg) instead of standard mesg
    2. And the window should not open at all.
    I tried putting with :system.message_level=5 to suppress the standard mesg. But how we can achieve other two requirements.
    And this should happen at block level only not at form level.
    Please suggest me in this.
    Thanks
    Pavan

    Hi,
    No, I have just put my original code.
    This is what i have tried based on our suggestion.
       BEGIN
              IF event = 'WHEN-BUTTON-PRESSED'
                   --AND cnt <> 0
              THEN  
              GO_BLOCK('XXSCP_GBL_CUST_PEG_V');
          EXECUTE_QUERY;
          l_chr_so := :xxscp_gbl_cust_peg_v.sales_order_number;
          fnd_message.DEBUG('SO:'||l_chr_so);                                                                    
          :parameter.p_excep_detail:='FALSE';
              IF l_chr_so IS NOT NULL
                   THEN
              SHOW_VIEW('XXSCP_GBL_CUST_PEGGING_CON');
              SHOW_VIEW('XXSCP_GBL_CUST_PEGGING_STK');
              app_window.set_window_position('XXSCP_GBL_CUST_PEGGING_WIN',
                                             'CASCADE',
                                             'XXSCP_GBL_EXCEP_DETAILS_WIN');     
          fnd_message.DEBUG('xx');                                                                    
          END IF;                                        
          ELSE
              NULL;
              END IF;
        EXCEPTION
             WHEN OTHERS
             THEN
             NULL;
       END;I can see, its not going to IF conditon, stil the window pops up.
    Thanks
    Pavan

  • How to hide buttons when no data found!!

    Hi All,
    I have created two regions
    1. Serach region
    2. Results region.
    Initally when the page loads by using hidden vaiable i am bale to hide the "results regions" once they clik on that serach button i am displaying the region of results region along with teo more buttons as "export" and "print" buttons.
    It is showing fine when data exists under Reulst region.
    But when no data is return i am displaying the message as "No data found" but along with this it is displaying "export" and "print" buutons.
    This buttons needs to display only when the data exists under Results region.
    Thanks,
    Anoo..

    abhishek8299 wrote:
    Use SQL (Exists) in the condition and write an sql statement there.use this
    SELECT
    1
    FROM form1 MF,bench1 BM,
    participant1 PP,key1 KT
    WHERE MF.ENGAGEMENT_ID=BM.ENGAGEMENT_ID
    AND BM.ENGAGEMENT_ID =PP.ENGAGEMENT_ID
    AND PP.ENGAGEMENT_ID =KT.ENGAGEMENT_ID

  • How to display a message in an audit report?

    hello all,
    i would like to ask how do display a message in an audit report.  here is my code...
    CALL TRANSACTION tcode USING i_bdcdata
                            MODE c_n
                            MESSAGES INTO i_error2.
    IF sy-subrc EQ 0.
    ENDIF.
    CLEAR i_error2.
    LOOP AT i_error2.
      IF i_error2-msgtyp EQ c_e.
        MOVE v_pernr TO i_bdcerror2-pernr.
        MOVE c_infotype TO i_bdcerror2-infty.
        MOVE 'Error' TO i_bdcerror2-msgtype.
    <b>    SELECT SINGLE text
          INTO v_msgtxt
          FROM t100
          WHERE sprsl = i_error2-msgspra
          AND arbgb = i_error2-msgid
          AND msgnr = i_error2-msgnr.
        MOVE v_msgtxt TO i_bdcerror2-msgtxt.</b>
        APPEND i_bdcerror2.
      ENDIF.
    ENDLOOP.
    DESCRIBE TABLE i_bdcerror LINES v_bdcerrors.
    IF v_bdcerrors <> 0.
      SKIP 1.
      WRITE: 'BDC Error Report'.
      SKIP 1.
      WRITE: 'PERNR',
             'INFOTYPE',
             'MESSAGE TYPE',
             'MESSAGE TEXT'.
      ULINE.
      LOOP AT i_bdcerror.
        WRITE: / i_bdcerror-pernr,
               13 i_bdcerror-infty,
               22 i_bdcerror-msgtype,
               35 <b>i_bdcerror-msgtxt</b>.
      ENDLOOP.
    ENDIF.
    the message text that i was getting contains &1, &2 and so on.  how would i be able to replace it with the original value?
    thanks!
    -ann

    After calling the transaction, this is what I do.
    a) Call the function module, <b>MESSAGE_TEXT_BUILD</b> and pass the following values from <b>BDCMSGCOLL</b> or the internal table where you collect the messages.
       i) MSGID
      ii) MSGNR
    iii) MSGV1
      iv) MSGV2
       v) MSGV3
      vi) MSGV4
    There is no need to fetch data using select from table t100.
    It builds the message and returns in MESSAGE_TEXT_OUTPUT which can be then displayed to user.
    Regards,
    Subramanian V.

  • How to display the message along with a value using BBP_CHECK_BADI

    Hi Gurus,
    I need to display a message dynamically when the user create's a shopping cart. I am using Check_badi for this. i.e., I need to display the buyer number and amount left for him dynamically. I am storing both of them in variables and don't know how to display the messages laong with some message " the amount left for <XXXXXX> is <$$$$$$$$>". Can you help me out.
    Thanks,
    Neelima

    Hi,
    you can use the function module 'BBP_PD_MSG_ADD'. This is the function module normally used for the displaying the error messages in SRM.
    See wether you can use already available error messages , use the transaction SE91 , and the message class being BBP_PD

  • How to display list process, when i run sql*loader in c#

    Hello,
    How to display list process, when i run sql*loader in c#. I mean when i run sql*loader from cmd windows, i get list process how many row has been inserted. But when i run SQL*Loader from C#, i can't get process SQL*Loader.
    This is my code:
    string strCmd, strSQLLoader;
    string strLoaderFile = "XLLOAD.CTL";
    string strLogFile = "XLLOAD_LOG.LOG";
    string strCSVPath = @"E:\APT\WorkingFolder\WorkingFolder\sqlloader\sqlloader\bin\Debug\8testskrip_HTTP.csv";
    string options = "OPTIONS (SKIP=1, DIRECT=TRUE, ROWS=1000000,BINDSIZE=512000)";
    string append = "APPEND INTO TABLE XL_XDR FIELDS TERMINATED BY ','";
    string table = "OPTIONALLY ENCLOSED BY '\"' TRAILING NULLCOLS (xdr_id,xdr_type,session_start_time,session_end_time,session_last_update_time,session_flag,version,connection_row_count,error_code,method,host_len,host,url_len,url,connection_start_time,connection_last_update_time,connection_flag,connection_id,total_event_count,tunnel_pair_id,responsiveness_type,client_port,payload_type,virtual_type,vid_client,vid_server,client_addr,server_addr,client_tunnel_addr,server_tunnel_addr,error_code_2,ipid,c2s_pkts,c2s_octets,s2c_pkts,s2c_octets,num_succ_trans,connect_time,total_resp,timeouts,retries,rai,tcp_syns,tcp_syn_acks,tcp_syn_resets,tcp_syn_fins,event_type,flags,time_stamp,event_id,event_code)";
    strCmd = "sqlldr xl/secreat@o11g control=" + strLoaderFile + " LOG=" + strLogFile;
    System.IO.DirectoryInfo di;
    try
    System.Diagnostics.ProcessStartInfo cmdProcessInfo = new System.Diagnostics.ProcessStartInfo("cmd.exe");
    di = new DirectoryInfo(strCSVPath);
    strSQLLoader = "";
    strSQLLoader += "LOAD DATA INFILE '" + strCSVPath.ToString().Trim() + "' " + append + " " + table;
    StreamWriter writer = new StreamWriter(strLoaderFile);
    writer.WriteLine(strSQLLoader);
    writer.Flush();
    writer.Close();
    // Redirect both streams so we can write/read them.
    cmdProcessInfo.RedirectStandardInput = true;
    cmdProcessInfo.RedirectStandardOutput = true;
    cmdProcessInfo.UseShellExecute = false;
    cmdProcessInfo.LoadUserProfile = true;
    //System.Diagnostics.Process.Start("CMD.exe", strCmdLine);
    // Start the procses.
    System.Diagnostics.Process pro = System.Diagnostics.Process.Start(cmdProcessInfo);
    // Issue the dir command.
    pro.StandardInput.WriteLine(strCmd);
    // Exit the application.
    pro.StandardInput.WriteLine("exit");
    //Process[] processlist = Process.GetProcesses();
    //foreach(Process pro in processlist){
    Console.WriteLine("Process: {0} ID: {1}", pro.ProcessName, pro.Id);
    Console.WriteLine(pro.StandardOutput.ReadLine());
    // Read all the output generated from it.
    string strOutput;
    strOutput = pro.StandardOutput.ReadToEnd();
    pro.Dispose();
    catch (Exception ex)
    return;
    finally
    Thanks.

    friend
    sqlldr is an application residing in the OS. procedure runs in the dbms engine.
    you cannot run an os command directly from a procedure or a function or a package .
    If you want to do so you need to use either a daemon process created by a PRO*C program
    or a JAVA stored procedure to do so.
    just refer to previous question forums, you can find the solution. Somebody has already given a solution using
    java to run an OS command . check it out
    prakash
    [email protected]

  • How to display error message in Shopping Cart?

    How to display error message in Shopping Cart and stop the shopping cart for further processing? I try MESSAGE w001(zshop) or MESSAGE e001(zshop). But it is causing run-time error.

    Hi Paul,
    In the DOC_CHECK or DOC_SAVE BADI, you have a global internal table named et_messages. The structure of this table is 'bbp_smessages_badi'. You can append your error message here by inputting the message type, ID and number. The message type is either 'E' for error or 'W' for warning and the number would depend on your message class(ID). You will be able to see the error message on top of the screen, can be a red or yellow highlight depending on your appended message. I don't think creating the error message via the MESSAGE syntax will be successful, maybe this is why you are getting a runtime error.
    Regards,
    Noel

  • Error message when importing data using Import and export wizard

    Getting below error message when importing data using IMPORT and EXPORT WIZARD
    Error 0xc0202009: Data Flow Task 1: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.
    <dir>
    <dir>
    Messages
    Error 0xc0202009: Data Flow Task 1: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.
    An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 11.0"  Hresult: 0x80004005  Description: "Could not allocate a new page for database REPORTING' because of insufficient disk space in filegroup 'PRIMARY'.
    Create the necessary space by dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.".
    (SQL Server Import and Export Wizard)
    Error 0xc0209029: Data Flow Task 1: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR.  The "Destination - Buyer_.Inputs[Destination Input]" failed because error code 0xC020907B occurred, and the error row disposition on "Destination
    - Buyer_First_Qtr.Inputs[Destination Input]" specifies failure on error. An error occurred on the specified object of the specified component.  There may be error messages posted before this with more information about the failure.
    (SQL Server Import and Export Wizard)
    Error 0xc0047022: Data Flow Task 1: SSIS Error Code DTS_E_PROCESSINPUTFAILED.  The ProcessInput method on component "Destination - Buyer" (28) failed with error code 0xC0209029 while processing input "Destination Input" (41). The
    identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.  There may be error messages posted before this with more information
    about the failure.
    (SQL Server Import and Export Wizard)
    Error 0xc02020c4: Data Flow Task 1: The attempt to add a row to the Data Flow task buffer failed with error code 0xC0047020.
    (SQL Server Import and Export Wizard)
    </dir>
    </dir>
    Error 0xc0047038: Data Flow Task 1: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on Source - Buyer_First_Qtr returned error code 0xC02020C4.  The component returned a failure code when the pipeline engine called PrimeOutput().
    The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.  There may be error messages posted before this with more information about the failure.
    (SQL Server Import and Export Wizard)
    Smash126

    Hi Smash126,
    Based on the error message” Could not allocate a new page for database REPORTING' because of insufficient disk space in filegroup 'PRIMARY'. Create the necessary space by dropping objects in the filegroup, adding additional files to the filegroup, or setting
    autogrowth on for existing files in the filegroup”, we can know that the issue is caused by the there is no sufficient disk space in filegroup 'PRIMARY' for the ‘REPORTING’ database.
    To fix this issue, we can add additional files to the filegroup by add a new file to the PRIMARY filegroup on Files page, or setting Autogrowth on for existing files in the filegroup to increase the necessary space.
    The following document about Add Data or Log Files to a Database is for your reference:
    http://msdn.microsoft.com/en-us/library/ms189253.aspx
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • How to display success message in function module

    Hi Experts,
                      I am developing new function module regarding URL finder. As per my requirement ,
                                                 If USER ID is not provided -display SUCCESS MESSAGE and Provide sy-uname.
    how to display success message.if possible can You write the code.
    Thanks
    raju

    Hello,
    We can use an exporting parameter like single character field like 'S' for success and 'E' for error instead of a message.
    Another option is you can use the Tables parameter and populate Return table with error or success message. Return table of type 'BAPIRET2'.
    Hope this might help you!
    Regards,
    MM Jaffer.

  • How create header with user id time date to VC-report's output as display ?

    How create header with user id time date to VC-report's output as display ?
    This info should come from the VC - not all the way from R3-side via FunctionModule/BABI. So only userid, date, time to output as normal text (which is not editable of course). Thanks =)

    Hi ann-mari
    Go through following link may it help u
    Form Item disabled based on portal role
    /people/community.user/blog/2007/01/17/visual-composer-explorations-using-portal-roles-to-influence-ui-element-behavior
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/vc/usingrolestoinfluenceapplication&
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/vc/passingvaluesvia+URL&
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ad182ac7-0a01-0010-4fb8-8a4d217b19c1
    Best Regards
    ````Satish````

  • ApEx 4: after upgrade, "when no data found" message on report not shown

    I have a page that displays a tabular form. Initially, the table is empty, and so I have text in the "when no data found" block of the report attributes.
    After upgrading to ApEx 4, this text is no longer shown when no results are returned. It displays the table header, but no rows. So for some reason, it thinks data is being returned -- even though the table is completely empty. I've tried several permutations, but have not been able to find a workaround.
    I'll try to set up a standalone page, but I can provide a pointer to the existing page on apex.oraclecorp.com on request.
    UPDATE: I think this may be related to the bug I reported on tabular forms.
    Is it possible that the empty, hidden row we are adding now counts as a returned row, even though the SELECT statement returned nothing? And thus the report never thinks that there is no data found? This would also explain why it's displaying the table headers, even though no rows are visible.
    Edited by: kswartz on Jul 8, 2010 12:18 AM

    Interesting. I didn't see anything about this change in behavior in the Release Notes. Did I miss something? It definitely didn't do this in 3.2.
    Overall, I think that's actually a very non-obvious change. Seeing a set of table headers with nothing below it looks to me like a mistake. Why would you ever show headers for something when you have no rows? In fact, I thought that was a bug the minute I saw it. With due respect, I don't think the new design is less desirable from a usability perspective than the old one.
    It also doesn't work as you described regarding the proportions: in my case, the columns in the header row did not match the sizes of the columns as I defined them. Although I didn't place anything beside the tabular form, if I had, it would still alter the layout when "Add Rows" is clicked. If you know what the size of those columns is supposed to be (because they are text fields of size xyz, for instance), why wouldn't you define the header cells to use that information? You won't get it exact most of the time, but you can get close, if they're all text fields of specific width.
    Plus, there's nothing on the Report Attributes tab that indicates the "When No Data Found" option won't apply if you are using a tabular form. The textareas should be disabled -- and at the very least, the on-line help should be mentioning this. It doesn't mention anything about this only applying to standard reports.
    Finally, I think you should also put this in the Release Notes, because this requires changes to any application where someone with a tabular form required this. In one case, that was where I provided instructions to users entering data for the first time. Now I have to move it. (Not a big deal, but it would have been nice to know that in advance.) On another page, I put a JavaScript block in there to submit and automatically add a row, because I wanted there to always be a blank row if nothing had been entered -- and that was the easiest way. Okay, granted, that's probably not something you intended to support, but there was nothing wrong with it, technically. And, again, it's fixed by moving that block to the header instead and testing for the number of rows in the table -- easy, now that you provide JQuery for us -- but still manual migration work.
    Thanks for the explanation.

Maybe you are looking for

  • Can't stop duplicating records

    THE SETUP <br><br>PAGE 1:REPORT: View Error Records<br> This report displays error records in my DBA_PSPR table. <br><br>PAGE 2:Create New<br> On this page I have 1 process running. It creates the new record in my table along with uploading a file.<b

  • Cross platform issues for Pro*C

    Hi!, Is it possible for me to use the C program I got using Pro*C in Win98(I have to use SQLCHECK=SEMANTICS) and make application in a unix(Solaris) machine? Is there any issue that I have to be aware of?(Everything except the SQL part in the .pc fil

  • ILife installation on iMac 10.9.5

    Hi: I've been trying to load iLife 11 on my iMac 10.9.5 in order to use iMovie 11 instead of iMovie 10.  There were errors with the installation.  Any ideas?

  • NVIDIA Dual Monitor not working

    I have two monitors, 1 QNIX 1440p running at 100hz that is properly working, the other, and 1080p Asus at 60hz is running at 1024x768. Here is my xorg.conf # nvidia-settings: X configuration file generated by nvidia-settings # nvidia-settings:  versi

  • C3-01 "UNABLE TO CONNECT TO SERVICE'

    I have bought the C3 01 about two weeks ago. Im with Tmobile, but I don't have a data plan. I use WLAN WiFi for internet connection. Last week I was able to connect to the OVI store (main page-menu- ovi store). I was able to download a couple of free