cancel
Showing results for 
Search instead for 
Did you mean: 

error msg dump issue?

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

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.....

Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

You can use report_error_message and try out..

Priya

Former Member
0 Kudos

hi

as i want to lock user to proceed further,so want to use raise_error_message only,otherwise report_error_message gives the message,but not prevent the user to go further.

Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
0 Kudos

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