‎2014 Sep 26 6:01 PM
When running code inspector for an ABAP class in a customer system, code inspector returns the following error:
Message Code 0040
Program <progname> cannot be tested according to system settings. A possible cause for this is that an SAP program is being checked in a customer system. Note, the following rule applies after a change in the source code: For test purposes (except for security checks), the system setting is ignored for one week.
The class is in a customer namespace (not owned by SAP).
I could not find any documentation of this and am not sure what the real root cause is. What system setting is this referring to? What is the impact of this?
‎2014 Sep 26 6:57 PM
This is happening because the program that you are trying to do the check has a customer reserved namespace. Check the view V_TRNSPACE in SM30.
Regards,
Felipe
‎2014 Sep 26 6:57 PM
This is happening because the program that you are trying to do the check has a customer reserved namespace. Check the view V_TRNSPACE in SM30.
Regards,
Felipe
‎2014 Sep 27 12:00 AM
Felipe, thanks for the quick response.
I don't really see the connection to the namespace setting in view V_TRNSPACE. What specific setting would cause this error message? Also, we had done these checks in another system at the same customer and did not see this particular error message.
Regards, Theo
‎2014 Sep 27 12:07 AM
After writing my above response I found this help text snippet:
In customer systems, only customer programs can be checked (in most cases).
Here, SAP programs can be checked only up to one week after a source code
change. This supports corrections to SAP programs in customer systems. An
exception to this are the security checks. These cannot be used to check any SAP
programs in customer systems.
I am in a customer system and this is a customer program. So I still don't understand the system behavior. The namespace role is set as P (Producer), as opposed to C for SAP delivered namespaces. However, the "development license" field is empty, could that be causing the issue?
‎2014 Sep 27 12:49 AM
Yes, I believe that it is the cause, If you put a break point in the function module TRINT_READ_NAMESPACE and execute maybe you'll find the reason or at least force the execution via debug.
Regards,
Felipe
‎2014 Sep 27 12:57 AM
In my system 7.02 sp11, it is not checking the license, only if the role is P.
‎2014 Sep 27 1:31 AM
No - I tried setting ES_NAMESPACE_INFO-LICENSE_OK to 'X' in debugging, but that did not make a difference.
‎2014 Sep 27 1:42 AM
what is the value for ls_namespace_info-role ?
Go to report CL_SLIN_PLUGIN_CONTEXT========CCIMP (local class) and find the line if trnRole = 'P'. return. endif. Check what is the value of trnRole. If it is not 'P' then you will get that message, otherwise you will be able to execute the check.
‎2014 Sep 29 6:31 PM
‎2014 Sep 29 7:02 PM
So, if you want to perform the check you'll have to debug after the fm TRINT_READ_NAMESPACE and discover where the message is being raised.
Maybe it is not your case but you can also check this note https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/sno/ui_entry/entry.htm?param=69765F6D6F6465...
Regards,
Felipe
‎2014 Sep 29 8:41 PM
Hi Felipe,
thanks so much for pointing out note 1850958. That told me where to debug. I noticed a check against registered namespaces in method if_satc_ac_namespace_registry~is_object_check_enabled, calling if_satc_ac_namespace_registry~is_namespace_check_enabled( namespace ).
That's where it goes wrong, because the particular customer namespace is not in the list (internal table F_REGISTERED_NAMESPACES).
I changed the return code for the check against this internal table to 0, and then the check is executed.
Function module TR_VALID_NAMESPACE_LIST is called in method get_productive_namespaces to fill this internal table, and it does not return the customer namespace. This may bring us back to the earlier observation that in V_TRNSPACE the development license key is missing. Or maybe reason is that "Repair License" is populated for the name range. That may really be the root cause, because the function module returns standard customer namespace /0CUST/ where both keys are empty (but type P as well).
Regards, Theo
‎2014 Sep 29 8:46 PM
I'm pretty sure now it is the repair license - only role P namespaces are returned where the repair license is not filled.
‎2014 Sep 29 8:51 PM
Great then, seems that the challenge now is how to fill that field. 😃
‎2014 Sep 29 9:16 PM
All right, final answer after my final debugging: the license check fails (FM TRINT_READ_NAMESPACE_FROM_PAT). So solution is to enter correct development license key in V_TRNSPACE.
However, the system is not the original system of the checked development object. This may explain why only the Repair License key is filled and not the Development License key. In other words, you can only do code inspections in the original system of the customer namespace object.
Not sure if this is really intended behavior - this may very well be a defect.
Felipe, thanks again for your great help.
Message was edited by: Theo Zimmermann