on 04-21-2009 3:26 PM
Hi All.
I want to have a button on my screen like an R/3 button of type E where even if user has entered wrong values in a field, no automatic field validation check should take place, and I can go out on pressing of a button.
Is it possible?
Thanks in adv
hi,
If you dont want automatic validation, you can Deactivate the same.
In The context which is binded to your input field, change the property Input Help from Automatic to Deactivate.
Thanx.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I want automatic validation, but not when Exit button is pressed.
Then it shoudl allow the users to go back without validating field contents.
I saw in message manager, there is something called R_TRANSPORT_MESSAGES which holds the error. I am not able to clear it.
Another thing i saw while debugging is that it checks if action is validating or not. How can I make the action attached to Exit button Not validating?
Thanks in adv.
hi,
try using set_attribute_value_help method of if_wd_context_node. This method will deactivate your value help and i hope you would be able to proceed.
data lo_nd_info type if_wd_context_node_info.
lo_nd_info = lo_nd->get_node_info( ).
CALL METHOD lo_nd_info->set_attribute_value_help
EXPORTING
name = 'ATTR1' " Your attribute Name
value_help_mode = '101' " Valid value help mode - Deactivated.
Hi Aishi,
Put the following code in WDDOBEFOREACTION.
data lo_api_controller type ref to if_wd_view_controller.
data lo_action type ref to if_wd_action.
lo_api_controller = wd_this->wd_get_api( ).
lo_action = lo_api_controller->get_current_action( ).
if lo_action is bound.
case lo_action->name.
when 'EXIT'. " Suppose Action name for Your exit button is EXIT
wd_this->fire_exit_plg(
). " DO coding here what you want to do . here i m navigating to another view by firing plug. If you want to close the application by pressing exit button then you can code here for the same.
endcase.
endif.
endmethod.
I hope it helps.
Regards,
Rohit
Sorry, my mistake. Its type of the action which you have to change and not the method.
Create the button -> create the associated action with the button for example - "EXIT".
Go to action's tab and then select validation independent from the dropdown for action "EXIT".
Hope this clarifies.
Regards
Rohit Chowdhary
That solved - making action as validation independent.
But i need to do one more thing - clear the messages in the action.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Aishi,
Have you written your validation code in WDDOBEFOREACTION ?
If so, comment the code from WDDOBEFOREACTION and put the same code in the action of the button where you want the validation to occur, whereas for your Exit button directly navigate to the next view ( without validating ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
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.