on 10-25-2013 6:04 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.