on 01-06-2010 10:44 AM
Hi Gurus,
My scenario is like this:
I m validating a field ( selct options ) in wdbeforeaction event..
If the vbeln is wrong I m raising a error message..
But again when I do f4 help and select the correct vbeln.. it validates in the wdbeforeaction evnt.
But the earlier message which was raised cab be still seen on the top of view..
How do I make this error message exist only when wrong..
Best Regards,
Navin fernandes.
Hi
Try this code before displaying the success message for selecting the correct vbeln value.
after using this code include your success message.
* 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->clear_messages
* EXPORTING
* including_permanent_msg = ABAP_FALSE
* only_permanent_msg = ABAP_FALSE
.
Regards
Arun.P
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Otherwise try with this.
if you are checking the value in the inputfield by an event handler ie:selecting a value and clicking on the submit button.
Get the selected value of the inputfield which has come from f4 help and check it like this
select * from ekko into table itab where ebeln eq ebeln.
if sy-subrc eq 0.
display succes message
else
display warning message.
endif.
Regards
Arun.P
Hi ,
My code is as follows:
IF LWA_KUNNR1-LOW IS NOT INITIAL.
***
SELECT SINGLE KUNNR
FROM KNA1
INTO LV_KUNNR
WHERE KUNNR = LWA_KUNNR1-LOW.
IF SY-SUBRC <> 0.
CALL METHOD lo_message_manager->report_error_message
EXPORTING
message_text = 'Customer Number Invalid'
VIEW = 'SELSCREEN_VIEW'.
is_permanent = abap_false. " Give your error text here
wd_comp_controller->gv_fire = 'X'.
ELSE.
wd_comp_controller->gv_fire = ' '.
CALL METHOD lo_message_manager->CLEAR_MESSAGES(
exporting
INCLUDING_PERMANENT_MSG = abap_false
).
Best Regards,
navin fernandes
hi ,
ur method WDDOBEFOREACTION validates ur input which u have entered ,
so u r correct in the way u r validating in this methood.WDDOAFTERACTION is the method for non specific operations before navigation .
the sequence shud be
WDDOMODIFY->WDDOINIT->WDOBEFOREACTION->WDDOAFTERACTION->WDDOEXIT
regards,
amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do the validation in WDDOAFTERACTION EVENT.
This will solve your problem.
Regards,
Pramod
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.