Raise message in Query

Hi Experts
My customer want the ability to select any date upto 12 month window on one of the query.
To achieve this I have implemented the customer exit code in EXIT_SAPLRRS0_001 and also created customer exit variable on calendar day.
After executing the query in BEx designer, the query pop-up with the variable screen and then I have entred the date range for more than 12 months. When i click on check button I am getting blank screen insted of Error message as per the coding.
DATA:lc_diff TYPE i, "Difference between two dates
     lc_datefrom TYPE d,
     lc_dateto TYPE d.
CONSTANTS: c_365(3) TYPE n VALUE '365'.
*Step 1 is used for defaulting values into the Variables
*Previous data declaration is made use of where possible
*though it does not conform to the current naming standards
CASE i_vnam.
  WHEN 'ZV_DAT365'
    IF i_step EQ 1.
      CLEAR w_e_t_range.
      w_e_t_range-low  = sy-datum.
      w_e_t_range-high = sy-datum.
      w_e_t_range-sign = 'I'.
      w_e_t_range-opt = 'BT'.
      APPEND w_e_t_range TO e_t_range.
    ENDIF.
ENDCASE.
*Step 3 is used for checking user inputs. In this step 'I_VNAM' is blank,
*hence CASE statement to check variable name cannot be used.
IF i_step EQ 3. "No 3 is SAP system defined value for I_STEP
*365 Days variable
  READ TABLE i_t_var_range
       WITH KEY vnam = 'ZV_DAT365'
       ASSIGNING <w_i_s_var_range>.
  IF sy-subrc EQ 0.
    lc_datefrom = <w_i_s_var_range>-low.
    lc_dateto = <w_i_s_var_range>-high.
  Calculate the length of user input date range
    lc_diff = lc_dateto - lc_datefrom.
  If this date range is more than 365 days,then error message must be issued.
    IF lc_diff GT c_365.
      MESSAGE e001(00) WITH 'Days in the date range should be less than 365.'(001).
    ENDIF.
  ENDIF.
ENDIF.
Please advise.
Many Thanks in Advance.
Regards
RK

Replace this code with the below mentioned code:
IF lc_diff GT c_365.
MESSAGE e001(00) WITH 'Days in the date range should be less than 365.'(001).
ENDIF.
IF lc_diff GT c_365.
                          CALL FUNCTION 'RRMS_MESSAGE_HANDLING'
                           EXPORTING
                           i_class  = 'RSBBS'
                           i_type   = 'I'
                           i_number = '000'
                           i_msgv1  = ' Days in the date range should '
                           I_MSGV2  = 'be less than 365".
                           raise no_replacement.
ENDIF.
-Neelesh

Similar Messages

  • While Starting Addon - Getting message "Addon Query Timed Out"

    Hi All,
    In the "AddOn Manager" Screen, when i am clicking the "START" button to start my AddOn, after some time it is giving me a message "AddOn Query Timed Out" and setting the status as "Failed", though it has started my AddOn and its working without any problem, but since it has status "Failed" it keeps the "Stop" button disabled, hence i am unable to stop my addon.
    Immediate Response is needed.
    Thanks in Advance.

    Search the forum: this question has been answered many times. See Re: Reg . AddOn Timeout Message is comming but AddOn is still working.

  • WD ABAP: Raise message in popup

    Hi,
    I use the following way to create a popup and I want to raise messages i this popup:
          wd_this->detail_popup = l_window_manager->create_window(
           window_name = 'DETAIL_OVERVIEW'
           button_kind = if_wd_window=>co_buttons_close
           title = title
           message_display_mode = '0'
           close_in_any_case = abap_false
    When I want the message to be displayed in the popup, I use the following way:
      DATA: l_current_controller TYPE REF TO if_wd_controller,
            l_message_manager    TYPE REF TO if_wd_message_manager.
      l_current_controller ?= wd_this->wd_get_api( ).
      CALL METHOD l_current_controller->get_message_manager
        RECEIVING
          message_manager = l_message_manager.
            CALL METHOD l_message_manager->report_t100_message
              EXPORTING
                msgid = '/KYK/OPS_PP'
                msgno = '012'
                msgty = 'W'.
    but nothing happens after this method is called, could anybody explain why?
    Thanks!
    Yuankai
    Message was edited by: Armin Reichert

    hi,
    Try using this if_wd_window_manager instead. the below code works for me:
    data: l_cmp_api type ref to if_wd_component,
         l_window_manager type ref to if_wd_window_manager,
         l_popup type ref to if_wd_window,
         l_text type string_table,
         l_api type ref to if_wd_component.
        l_cmp_api = wd_this->wd_get_api( ).
        l_window_manager = l_cmp_api->get_window_manager( ).
        insert `No Developement Details Involved` into table l_text.
        l_popup = l_window_manager->create_popup_to_confirm(
                       text = l_text
                button_kind = if_wd_window=>CO_BUTTON_OK
               message_type = if_wd_window=>CO_MSG_TYPE_INFORMATION
               window_title = `Status Information`
               WINDOW_WIDTH = `400`
               window_position = if_wd_window=>co_center ).
        l_popup->open( ).
    hope this helps,
    Best Regards,
    Ravikiran.

  • How can i show a raise message?

    Hi...
    I am use JDev 11.1.2.0.0
    How can i show a raise message for the user for validations issues
    and after his message the user can't do any thing.
    thanks...

    HI ,
    You can use your entity level validations for this .For this go to your entity object then select the required attribute ,now at the bottom of the page validation rules for that attribute is given just click on that ,now you can select the validation that you want and give error handling msg also.
    If you want that user cannot move further without filling that field then you can mark that fields as compulsory by selecting true value at its required field in property inspector.

  • How to delete 'crm_order_maintain' FM raised messages in WebUI

    Hi Experts,
       I want to delete messages based on conditions in 'do_prepare_output' method. How to delete 'crm_order_maintain' FM raised messages in WebUI
    Thanks & Regards,
    Nitish

    Hi Dharmakasi,
       Thanks a lot for your reply. I have implemented logic in Badi also. After deleting message in badi even thou  again i am getting error message, transaction in display mode. That's the reason i am deleting error message in bap component. Please find the below badi logic.
    Thanks & Regards,
    Nitish
    * Get Log Handle(s)
         CALL FUNCTION 'CRM_MESSAGES_GET_LOG_HANDLES'
           IMPORTING
             et_log_handle = lt_log_handle.
         LOOP AT lt_log_handle INTO ls_log_handle.
           CALL FUNCTION 'CRM_MESSAGES_SEARCH'
             EXPORTING
               iv_log_handle  = ls_log_handle
             IMPORTING
               et_msg_handle  = lt_msg_handle
             EXCEPTIONS
               appl_log_error = 1
               error_occurred = 2
               OTHERS         = 3.
           IF sy-subrc EQ 0.
             LOOP AT lt_msg_handle INTO ls_msg_handle.
               CLEAR: ls_message.
               CLEAR: ls_msg_info.
               CLEAR: ls_msg.
               CLEAR: lv_ref_object_text.
               CALL FUNCTION 'CRM_MESSAGES_GET_MSG_INFO'
                 EXPORTING
                   is_msg_handle           = ls_msg_handle
    *             IV_GET_CALLER_NAME      =  TRUE
                 IMPORTING
                   es_info                 = ls_msg_info
                   es_msg                  = ls_msg
                   ev_ref_object           = lv_ref_object_text
                 EXCEPTIONS
                   not_found               = 1
                   wrong_context_structure = 2
                   data_error              = 3
                   OTHERS                  = 4.
               IF sy-subrc EQ 0.
                 MOVE-CORRESPONDING ls_msg_info TO ls_message.
                 MOVE-CORRESPONDING ls_msg      TO ls_message.
                 INSERT ls_message INTO TABLE et_message.
               ENDIF.
             ENDLOOP.
           ENDIF.
         ENDLOOP.
         CLEAR: ls_message.
         LOOP AT et_message INTO ls_message WHERE object_name = 'SERVICE_OS'
                                              AND ref_kind    = 'B'
                                              AND msgty       = 'E'
                                              AND msgid       = 'CRM_SERVICE_OS'
                                              AND msgno       = '121'.
           MOVE: ls_message-log_handle TO es_msg_handle-log_handle,
                 ls_message-msgnumber  TO es_msg_handle-msgnumber,
                 ls_message-ref_object TO lv_guid_ref.
           APPEND es_msg_handle TO et_msg_handle.
         ENDLOOP.
    * Reading Item details
         IF lv_guid_ref IS NOT INITIAL.
           CALL FUNCTION 'CRM_ORDERADM_I_READ_OW'
             EXPORTING
               iv_guid        = lv_guid_ref
             IMPORTING
               ev_header_guid = lv_header_guid
             EXCEPTIONS
               item_not_found = 1
               OTHERS         = 2.
           IF sy-subrc EQ 0.
             CALL FUNCTION 'CRM_ORDERADM_I_READ_OB'
               EXPORTING
                 iv_header           = lv_header_guid
               IMPORTING
                 et_orderadm_i_wrk   = lt_orderadm_i
               EXCEPTIONS
                 item_does_not_exist = 1
                 error_occurred      = 2
                 OTHERS              = 3.
             IF sy-subrc EQ 0.
               CLEAR: ls_orderadm_i.
               LOOP AT lt_orderadm_i INTO ls_orderadm_i.
                 REFRESH: lt_osset_n,
                         lt_refobj_n.
                 CLEAR: ls_osset_n,
                        ls_refobj_n,
                        ls_service_os.
                 CALL FUNCTION 'CRM_SERVICE_OS_READ_OB'
                   EXPORTING
                     iv_ref_guid          = ls_orderadm_i-guid
                     iv_ref_kind          = 'B'
                   IMPORTING
                     es_srv_osset_wrk     = ls_service_os
                   EXCEPTIONS
                     entry_does_not_exist = 1
                     error_occured        = 2
                     parameter_error      = 3
                     OTHERS               = 4.
                 IF sy-subrc EQ 0.
                   MOVE: ls_service_os-osset[] TO lt_osset_n[],
                         ls_service_os-ref_guid TO ls_serial-ref_guid.
                   READ TABLE lt_osset_n INTO ls_osset_n INDEX 1.
                   IF sy-subrc = 0.
                     lt_refobj_n[] = ls_osset_n-refobject[].
                     READ TABLE lt_refobj_n INTO ls_refobj_n INDEX 1.
                     IF sy-subrc = 0.
                       MOVE ls_refobj_n-serial_number TO ls_serial-serial_no.
                       MOVE ls_refobj_n-serial_number TO lv_sernum_n.
                       APPEND ls_serial TO lt_serial.
                     ELSE.
                       READ TABLE lt_refobj INTO ls_refobj INDEX 1.
                       IF sy-subrc = 0.
                         MOVE ls_refobj-serial_number TO ls_serial-serial_no.
                         MOVE ls_refobj-serial_number TO lv_sernum_n.
                         APPEND ls_serial TO lt_serial.
                       ENDIF.
                     ENDIF.
                   ENDIF.
                 ENDIF.
               ENDLOOP.
               SORT lt_serial BY serial_no.
               IF lt_serial[] IS NOT INITIAL.
                 LOOP AT lt_serial INTO ls_serial WHERE serial_no EQ lv_sernum_n.
                   CALL FUNCTION 'CRM_STATUS_READ_OW'
                     EXPORTING
                       iv_guid       = ls_serial-ref_guid
                     IMPORTING
                       et_status_wrk = lt_status
                     EXCEPTIONS
                       not_found     = 1
                       OTHERS        = 2.
                   IF sy-subrc EQ 0.
                     READ TABLE lt_status INTO ls_status WITH KEY object_type = 'BUS2000160' " Complaint Item
                                                                  kind = 'B'
                                                                  user_stat_proc = 'CRMCOM_I'.
                     IF sy-subrc EQ 0.
                       IF ls_status-status EQ 'E0004'.
                         lv_comp = lv_comp + 1.
                       ELSE.
                         lv_ncomp = lv_ncomp + 1.
                       ENDIF.
                     ENDIF.
                   ENDIF.
                 ENDLOOP.
                 IF lv_comp GE 1
                AND lv_ncomp LE 1.
                   IF et_msg_handle[] IS NOT INITIAL.
                     LOOP AT et_msg_handle INTO es_msg_handle.
                       CALL FUNCTION 'BAL_LOG_MSG_DELETE'
                         EXPORTING
                           i_s_msg_handle = es_msg_handle
                         EXCEPTIONS
                           msg_not_found  = 1
                           log_not_found  = 2
                           OTHERS         = 3.
                       IF sy-subrc EQ 0.
    * Implement suitable error handling here
                       ENDIF.
                     ENDLOOP.
                   ENDIF.
                 ENDIF.
                 CLEAR: lv_comp, lv_ncomp.
               ENDIF.
             ENDIF.
           ENDIF.
         ENDIF.

  • Oracle Error Code and Message for Query Timeout

    Hi,
    I need to catch the oracle error code and message for query timeout.
    I am using Oracle 9i and could not find any relevant error code/message
    for query timeout in Oracle Error Messages.
    If anyone has encountered such error messages, please let me know the
    Oracle Code or Error message.
    Thanks & Regards,
    Kanjana

    Fly is correct in that Oracle will normally let a query run forever in the absense of a user profile or dbms_resource setting that limits a users (query) resouce usage.
    The errors returned for these condition would probably vary but errors ORA-02092 "exceeded session limit on CPU usage, you are being logged off" and ORA-02093 "exceeded call limit on CPU usage" might be of interest.
    But for distributed queries Oracle does impose a time limit. See Oracle error ORA-02049 "timeout: distributed transaction waiting for lock"
    HTH -- Mark D Powell --

  • How to raise message in table maintance genartor

    Hi,
    I have one Z table . Customer wants to if entry is not found in the table using SM30 then raise message " NO DATA FOUND".
    how to rasie message in table maintace geraror.
    Thanks

    Hi ,
    U will have Function group for TAble maintenence generator where u can do all kind of validations on the data in u r table in
    PBO or PAI of the screens used in TMG.
    Regarsd

  • Updating Tool tip message of Query panel Operators

    I have a requirement to modify the tool tip message of Query panel operators. Currently the following messages are displayed when I hover over the 'CONTAINS' operators for the 'name' field in the query panel - "Operators for Name" & "Contains". I want to replace these messages with custom message. Please let me know if this possible. I understand that I can provide custom message for a 'Custom Operator' . But checking if there is a easier way of doing this.
    Any pointers will be appreciated.

    Hi,
    use the Resource Strings mentioned here http://docs.oracle.com/cd/E28280_01/apirefs.1111/e15862/toc.htm#query and look for how to skin these labels: http://docs.oracle.com/cd/E28280_01/web.1111/b31973/af_skin.htm#autoId10
    Frank

  • Character Limits on Raise Messages

    Hi friends.
    I searched over the web for a while and I coudl not find.
    Whats the limit of characters for raise messages like that:
    Ex: raise_application_error(-20100,XXXXX);
    How many characters could the "XXXXX" pop up?
    Tks a lot for any help

    Hi,
    it is mentioned in the documentation: http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/errors.htm#autoId15 :
    "The error_code is an integer in the range -20000..-20999 and the message is a character string of at most 2048 bytes."
    Herald ten Dam
    http://htendam.wordpress.com

  • Warning Message in query result as 'Notification Number DBMAN 345'

    Hi ,
    I have a warning message while executing the query
    'Diagnosis
    Currently, it cannot be guaranteed that SIDs and master data exists for all characteristic attributes for the DataStore object to be read.
    There is a restriction on a navigation attribute of the listed characteristic in the query. This filters all characteristic values of the master-data bearing characteristic for which there is not yet master data out of the result.
    For performance reasons, this filtering is unavoidable.
    System Response
    Procedure
    In case of doubt, find other restirctions directly on the characteristic values of the characteristics contained in the DataStore object.
    Procedure for System Administration
      Notification Number DBMAN 345  '
    'i am getting this error because of cutomer exit variables  on navigatioanl attributes of  Omaterial'
    I tried supressing it in  RSRT.. but unable to find the message.
    I tried  debugging and assigning enhancement points in  FM  BAL_LOG_MSG_READ.. As it is standard function module its not suggestable to do..
    can we creat custom FM ?? will it be called if we  write code to supress warning message??
    Please let me know how to use  BADI'S  in order to supress the error message that appearing in query result?
    Thanks All.

    Hi,
    The warning is raised due to the following reasons:
      - you have a selection in the filter of a navigation attribute
      - in your DSO you do not use the option "SIDs Generation upon Activation"
    If the option "SIDs Generation upon Activation" is not flagged,
    you may get char.values for an Infoobject in the system not
    having any SIDs. As a result you may see in the report less data as
    expected.
    For example we have Infoobject A with its Nav.attribute B
      Infoobject A   Nav.attribute B
      12             13   ->> has a SID in the X-table
      11             10
      9              13   ->> has no SID in the X-table
    If you define a selection on B =13 in the query, you only get infoobject
    A with key 12 displayed in the result, since only B =13 has a SID
    in the relevant X-table.
    The warning refers to this behaviour and cannot be avoided unless you:
       - flag the option in the ODS-settings
       - or remove the filter defined on 0MATERIAL__xxxx
    Thanks,
    Venkat

  • Supress warning message in Query Analyzer after free characteristic removed

    Hi
    I have a query and several workbooks looking to the same query.
    When I remove a free characteristic from the query (not the cube) I am presented with a warning message when opening Analyzer indicating that the removed field is no longer available on the report.
    Is there any way to supress these warning messages?  I am aware of the option Settings > Supress warnings from server but I would not want to ask every people to do this in the company.  Is there a way I can supress the warning from the query?
    We are running 3.x for this particular query and report.
    Thanks

    Hi,
    In RSRT, you have an option for the suppressing the messages.
    Have a look on the below link -
    http://wiki.sdn.sap.com/wiki/display/BI/SuppressquerymessagesusingRSRT
    Regards,
    Geeta

  • How to display a popup message in query (through process chain)

    Hi Gurus,
    I need your help.
    I have an input query that triggers an event (through a button) and runs a process chain.
    I would like to show a popup message to inform the user when the process chain is over.
    Using function modules I've been able to show popup messages in the workbench, but I want to display this message directly in Bex Analyzer 7.0.
    Thanks
    Gabbo

    Hi,
    I'm also looking for a solution to display a custom message in the Bex Analyser at logon.
    Using function module in the logon user-exit works but only when loggin to the workbench.
    I don't want to use SM02 (which works in both cases) because I need to display a variable message depending on the user.
    If someone has an idea, I'll really appreciate.
    Best regards and happy New Year to all of you.

  • Error Message in Query Filter on attribute of 0MATERIAL filters charac.

    Hi All,
    i have a query with few variables , i used navigational attributes of 0material......
    I am getting the below Warning Message...  Ineed to supress the below Error Message....
    Please let me know the solution...
    Error Message: Filter on attribute of 0MATERIAL filters charac. values without master data
    Diagnosis
    Currently, it cannot be guaranteed that SIDs and master data exists for all characteristic attributes for the DataStore object to be read.
    There is a restriction on a navigation attribute of the listed characteristic in the query. This filters all characteristic values of the master-data bearing characteristic for which there is not yet master data out of the result.
    For performance reasons, this filtering is unavoidable.
    System Response
    Procedure
    In case of doubt, find other restirctions directly on the characteristic values of the characteristics contained in the DataStore object.
    Procedure for System Administration
      Notification Number DBMAN 345 
    Thanks All

    Dear all SAP Gurus,
    we've solved this problem and this is the solution:
    The warning is triggered by the method CL_RSDRV_ODS_QUERY-PROCESS_SFC_WITH_ATR when the BExFlag of the InfoProvider is not set. Using DSOs for direct update there is no change to change the BExFlag. As a result queries based on a DSO for direct update always throw the above mentioned warning when filter-characteristics are attributes.
    Regards, Clemens

  • Warning message in Query "Currency field CCCUR-WAERS will not be filled"

    Hi
    I generated a infoset using table COSP, when I click in generate infoset, sap shows this warning message:
    Compare field group fields with Data Dictionary
    Currency field CCCUR-WAERS will not be filled
    Currency field TKA01-WAERS will not be filled
    How can I fix the value for fields CCCUR-WAERS and TKA01-WAERS in my query ? when I execute the query this dont show the correct values for some fields because waers field.
    Thanks & Regards
    Ramesh Narayanan

    Dear,
    Yeah system shoots this warning because system is unable to get the currency key for the amount in the report, may be because the primary table is unable to provide this information.....better take currency key by joing any other header table....
    Not a big worry
    Regards,
    Chintan Joshi

  • Raised Messages Not Appearing In ByDesign

    Hello everyone,
    Simple question --- I have a message on a custom BO I want to appear in ByDesign should a script successfully run. The message appears with the correct values in the debugger if I have it open, but nothing comes up along the bottom of the screen in ByDesign, whether the debugger's open or not.
    I was under the impression that all I had to do was write:
    raise MessageName.Create("S", <parameter list>);
    And it would appear, but apparently not. The screen in question is the file input screen: I want a message to appear should the file input successfully trigger and run an AfterModify script to completion. Any ideas? Thanks!
    Lewis

    Hi Frederick,
    In order to be able to display synchronous messages in SXI_MONITOR you have to set the following
    parameter in SXMB_ADM.
    Go to SXMB_ADM --> Integration Engine Configuration. Click on 'specific Configuration'.
    Add the following parameter:
    Category: RUNTIME
    Parameter: LOGGING_SYNC
    Value: 1.
    Hope this helps you.
    Carlos

Maybe you are looking for

  • How do I use values form different documents on numbers?

    I have two problems:  When I open an Excel worksheet that has references to other spreadsheets, Numbers automatically turns these cells into formulas with the wrong reference, giving therefore the wrong values.  How do I prevent or change this? I als

  • Traversing the entire nodes of an xml document ?

    Hi, I want to traverse through the entire nodes of an if_ixml_document. which is the best way to do this? Please find the sample document. <text>     <id>          <guid auto="false">                432543254543          </guid>     </id>      <title

  • How to grab value on command and keep it available?

    This should be obvious but I don't see it! I want to grab a value on a wire whenever the user presses a button, and hold that value for use at any time. So for instance I can rezero an instrument when the user presses the button, by grabbing the inst

  • Error 825 in BAPI_CUSTOMER_CHANGEFROMDATA1

    Dear Experts, While executing this customer change from data RFM , i m facing this error. Error 825 Personal address different from company address; change not allow. Earlier i faced other problem like title MR converting to mr and all , i have recti

  • Super mad!!! Security questions are super old! how the heck could I remember the answers??!!

    I am super mad!! I have a new computer, got a new ipod and just added $85 to my Itunes account to buy music and I know my Apple ID and Password yet it tells me after I add all the money I need to remember super old security questions from years ago b