cancel
Showing results for 
Search instead for 
Did you mean: 

Exit without validation

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.

Former Member
0 Kudos

I think my question is not clear. I dont want any validation check on all attributes when a particular button is clicked. Something like we have MODULE AT EXIT COMMAND in R/3 dialog.

Former Member
0 Kudos

Change the method type to "Validation Independent" from default method type of "Standard".

Regards

Rohit Chowdhary

Former Member
0 Kudos

Idont see any option to make it validation independent?

Former Member
0 Kudos

hi,

Could you explain your requirement in a bit detail ?

Thanx.

former_member40425
Contributor
0 Kudos

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

Former Member
0 Kudos

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

Answers (2)

Answers (2)

Former Member
0 Kudos

That solved - making action as validation independent.

But i need to do one more thing - clear the messages in the action.

Thanks.

Former Member
0 Kudos

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