‎2013 Jul 29 10:30 AM
Hi experts!
I'm using the cl_gui_cfw=>set_new_ok_code method to set a new ok code within an event handler for a toolbar function (cl_gui_toolbar). Unfortunately it's not possible to set the function type of the new ok code, like 'E' = Exit-Command. Therefore I can't use a toolbar button like the cancel button (F12) in the sap gui. Does anybody know how to set a new ok code with a function type within an event handler for a toolbar function.
Thanks in advance!
Regards,
Viktor
‎2013 Jul 29 10:35 AM
To work your case I have an alternate way.
Raise some other ok_code (non-error) and call the routine which is being called if the Error ok_code is set.
‎2013 Jul 29 11:03 AM
‎2013 Jul 29 12:17 PM
Hi Kishore,
the problem is: there is a dynpro with some fields and a toolbar control (cl_gui_toolbar). The toolbar contains a close button for the dynpro. The close button works fine except one case: if the user has an invalid input in a dynpro field and want to leave the dynpro (without correction of invalid input), then the close button doesn't work. Therefore some dynpro fields have a convertion exit maintained in the screen painter and if the value of a field is invalid, the convertion exit sends an error message and interrupts the pai execution. The only way to handle this is the use of an ok code with the type 'E'=Exit-Command. But that is not possible with the method set_new_ok_code.
Cloud you please describe a litte bit more how can your proposal help in my case?
Thanks and regards,
Viktor
‎2013 Jul 30 2:25 AM
Hi Viktor,
i dont think you can achieve this, coz the exit type 'E' can be only set in GUI.