Skip to Content
avatar image
Former Member

error msg dump issue?

hi

i am having a issue in using the method raise_error_message.

I am using it for displaying a msg if the customer is locked.

currently if my system has locked a customer & i try to access it through,its give me the msg for user locked by user name.

but now i am facing a problem,if the some other user has locked the customer & me or any other system try to access the same customer,than this raise_error_message gives the dump & error message is not raised.

below is my code:

CALL FUNCTION 'ENQUEUE_EZMDAP_OCM'

EXPORTING

mode_zmdap_stat_hist = 'E'

  • MANDT = SY-MANDT

kunnr = ls_cr_gen_data-kunnr

  • X_KUNNR = ' '

  • _SCOPE = '2'

  • _WAIT = ' '

  • _COLLECT = ' '

EXCEPTIONS

foreign_lock = 1

system_failure = 2

OTHERS = 3

.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 into lv_msgtxt.

  • get message manager

DATA lo_api_controller TYPE REF TO if_wd_controller.

DATA lo_message_manager TYPE REF TO if_wd_message_manager.

lo_api_controller ?= wd_this->wd_get_api( ).

CALL METHOD lo_api_controller->get_message_manager

RECEIVING

message_manager = lo_message_manager.

  • report message

CALL METHOD lo_message_manager->raise_error_message----<dump coming here for WebDynpro Exception

EXPORTING

message_text = lv_msgtxt.

Edited by: Vipin on Nov 9, 2009 3:39 PM

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Nov 09, 2009 at 10:15 AM

    Hi,

    You can use report_error_message and try out..

    Priya

    Add comment
    10|10000 characters needed characters exceeded

    • Hi,

      you can even do in the following way..

      CALL FUNCTION 'ENQUEUE_EZLOCK_PCT'
       EXPORTING
         MODE_ZRM_C_CV_OPEC       = 'E'
         MANDT                    = SY-MANDT
         USERID                   = LV_USERID
         LANG                     = LV_LANG
      *   INDEX1                   =
      *   X_USERID                 = ' '
      *   X_LANG                   = ' '
      *   X_INDEX1                 = ' '
      *   _SCOPE                   = '2'
      *   _WAIT                    = ' '
      *   _COLLECT                 = ' '
       EXCEPTIONS
         FOREIGN_LOCK             = 1
         SYSTEM_FAILURE           = 2
         OTHERS                   = 3
                .
      
      
      CALL METHOD lo_message_manager->report_t100_message
            EXPORTING
              msgid =  sy-msgid
              msgno =  sy-msgno
              msgty =  sy-msgty
              p1    = sy-msgv1
              p2    = sy-msgv2
              p3    = sy-msgv3.

      Using this you can even catch the exceptions thrown by the FM

      Hope this helps you.

      Priya

  • avatar image
    Former Member
    Nov 09, 2009 at 10:30 AM

    I guess you are not handling the errors thrown by the above FM....

    Before the raise error is called, that FM is throwing an exception i guess....

    Try to read the lock entires for that application/customer.....

    Add comment
    10|10000 characters needed characters exceeded