I noticed that ZCX_SAPLINK=>ERROR_MESSAGE would not return the actual
message in the following example:
try.
raise exception type zcx_saplink
exporting
textid = zcx_saplink=>error_message
msg = 'My error message'
catch zcx_saplink into lo_err.
lv_txt = lo_err->get_text( ).
write: / lv_txt.
endtry.
the lv_txt would be empty.
The reason:
SAPlink recreates attributes of type SOTR_CONC. However, when the
publicSection is inserted into the report the newly created SOTR_CONC
values are overwritten.
I commented out the publiSection, protectedSection and privateSection
INSERT REPORT to fix the described problem. This fix is a bit rough
but it is better than overwriting the new SOTR_CONC values.
The changed code can be found here:
http://code.google.com/p/saplink-unit-tests/source/browse/#svn/trunk/saplink-test
You can download a test class here:
http://code.google.com/p/saplink-unit-tests/source/browse/trunk/slqa/tests/ZSLQA_TEST_CLASS/test-objects/CLAS_ZSLQA_TO_CLASS_0003.slnk
Use the raw file and install the class in your system.
This test program should demonstrate the problem:
REPORT ZEVPTEST01.
data lv_msg type string.
data lo_evp type ref to ZSLQA_TO_CLASS_0003.
start-of-selection.
create object lo_evp.
lv_msg = lo_evp->get_publ_text( ).
write : / 'publ:', lv_msg.
lv_msg = lo_evp->get_prot_text( ).
write : / 'prot:', lv_msg.
lv_msg = lo_evp->get_priv_text( ).
write : / 'priv:', lv_msg.
=======
If you have SAPlink with the SOTR_CONC fixed the output of the program
should be as follows.
publ: public
prot: protected
priv: private
If the SOTR_CONC problem is not fixed you should get:
publ:
prot:
priv:
=======
Most likely the ZCX_SAPLINK class is installed incorrectly in your
system due to the SOTR_CONC problem.
You can reinstall the ZCX_SAPLINK class from here:
http://code.google.com/p/saplink-unit-tests/source/browse/trunk/saplink-test/CLAS_ZCX_SAPLINK.slnk
For other SAPlink patches, please visit my SAPlink Wish List page
here: http://code.google.com/p/saplink-unit-tests/wiki/SAPlinkToDo
This message is also stored at http://code.google.com/p/saplink-unit-tests/wiki/SAPlinkToDoSotrConc
I hope I find some time this weekend to try your patch and also to dig
deeper into SAPlink Unit Test.
Best regards
Gregor