‎2019 Jul 18 4:40 PM
I have a public static method in a class which has a returning variable of type BOOLE ('X' for true, ' ' for false). I want to store the negation of the value returned by this method into a variable lv_result (type c length 1). Is this possible without the use of a third variable?
Ideally I'm roughly looking for something as follows:
LV_RESULT = ( NOT cl_class_api=>method (EXPORTING iv_var = lv_var) ).
‎2019 Jul 18 4:47 PM
Use boolc or xsdbool:
LV_RESULT = xsdbool( abap_false = cl_class_api=>method( EXPORTING iv_var = lv_var) ).(if the method returns false then it gives true, and if the method returns true then it gives false)
‎2019 Jul 18 4:47 PM
Use boolc or xsdbool:
LV_RESULT = xsdbool( abap_false = cl_class_api=>method( EXPORTING iv_var = lv_var) ).(if the method returns false then it gives true, and if the method returns true then it gives false)
‎2019 Jul 18 5:14 PM
Apart from abap_false in place of false, this seems perfect.
‎2019 Jul 18 6:21 PM