cancel
Showing results for 
Search instead for 
Did you mean: 

Error message display

Former Member
0 Kudos

Hi,

I need to trigger a message in ESS on basis of user  F4 help selection. We need to restrict few values in F4 help in certain conditions. For this  I have used this code :

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


     IF <LS_SELECTION>-TPROG EQ 'KHPL' .
           CALL METHOD LO_MESSAGE_MANAGER->REPORT_ERROR_MESSAGE
             EXPORTING
               MESSAGE_TEXT              = ermsg
*              SHOW_AS_POPUP             = 'X' .
*              CANCEL_NAVIGATION         = 'X'.
           EXIT.
         ENDIF.

REPORT_ERROR_MESSAGE     is being called when debugging. But no error message is triggered, control goes to exit and if I remove the EXIT control goes to next statement and no error message is getting triggered in either conditions.

When I moved the same code to method for REVIEW button it's working! I need help to know if I am missing something.

Regards,

Amitesh Prashar

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member215344
Contributor
0 Kudos

Hi Amitesh,

Are you triggering this error in OVS Call back method or something ?

Try to get the context element of your node and then raise an attribute error message rather than the above one. You have to pass the context element and the attribute name for calling attribute error.

Thanks,

Ajay Bose

Former Member
0 Kudos

Hello Ajay,

I was triggering error message in OVS call back method.

As mentioned it is working when I am checking its value in next called method. But I wanted to trigger message at the time of wrong selection itself, while if I put the check in next method it is accepting the wrong value and then triggering message at next level.

So is it possible to flag error message in OVS method such that selection value doesn't populate the field value? If it is, can u give me some example.

Regards,

Amitesh Prashar

former_member215344
Contributor
0 Kudos

Hi Amitesh,

Raise the error message and then clear your node values if user has selected any invalid input. In that case user will see the error message also and the input field also won't be filled with incorrect values.

Thanks,

Ajay Bose