We all know that the sap Hana project is packaged into a delivery unit (abbreviated as du ). According to the "official" development model, especially when the entire team only uses one Hana instance for project development, Hana is still growing, A variety of strange issues may cause the packaged du to fail to be imported in the new environment. The failure error message trace is of little help to developers.
In addition, during the project development process, some teammates will not play cards as expected, and eventually lead to project du unavailability, especially in the case of lack of test resources, many problems cannot be exposed in a timely manner. When you see a full screen error, do you still have confidence and endurance to analyze it? Hana trace? Do you know how to set it?
Here we will sort out some frequently asked questions to give you some inspiration.
View (view) creation without dependence Problem Analysis:
When using hdbview, some friends are used to sticking query statements in the console to hdbview. In addition, when such hdbview is activated separately, it can be successfully activate without any problem. The exported du deployment to the new environment becomes a problem.
When you create a table separately, all referenced tables and views already exist, and activate is successful. In addition, there are basically no successive relationships in the development process. You reference tables and views that always exist. For example, if we call it viewa in the above example, then viewa-> com. sap. Test. Tables: 02_hdb_department_view. During the du import process, Hana will optimize the processing and process the activate sequence of objects, so that it is easy to see that viewa first and COM. SAP. test. tables: 02_hdb_department_view. Du import failed. If no dependence information is added to the view in the entire project, the error is full. How can I start. In addition, the problem is not solved, and the effect cannot be seen. Many people give up analysis...
Solution:
schema="MYSCHEMA";query="SELECT * FROM \"MYSCHEMA\".\"com.sap.test.tables::02_HDB_DEPARTMENT_VIEW\"";depends_on_view=["com.sap.test.tables::02_HDB_DEPARTMENT_VIEW"];
Check depends_on_view and depends_on_table before creating or modifying hdbview. You can write a Python script to check or follow the new Code and run it once before each partner submits the code. You can also rely on the CI environment to quickly report problems. The longer the delay, the more difficult it is to analyze.
When using calculation view to use call, you do not need to analyze the select problem:
Create a calculation view. After activate, a procedure such as package, viewname, and proc will be generated under _ sys_bic. Many partners who "study hard" find this procedure. If you directly call this procedure in another calculation view, it is easier to write the code and the new calculation view is created by him, activate has no problem at all, so I am very happy. I also shared this new discovery with other colleagues.
Once again, the packaged du had a fart. The cause of the problem is the same as above. The calculation view does not display the dependency information. Hana will analyze the code of your object. Calculation view a depends on calculation View B, the premise is that you have to play the cards according to the game rules, you have to use select calculation View B with Parameters
Solution:
vals = SELECT * FROM "_SYS_BIC"."mytest/cv_test_filtergroupid"(placeholder."$$In_Filter_Group_ID$$"=>:In_Filter_Group_ID);
The use of calculation view must use select
The circle dependence problem:
When activate all or du is imported, circular applications appear.
There are two types of circular applications in Hana:
1. Circular application of the object itself
A-> B-> C-> A. This loop rarely happens, but does not mean no.
2. Circular application between object types
This occurs in procedure and hdbprocedure, for example, proca-> hdbprocb-> procc, so that circular applications may occur.
Solution:
dot -Tpdf <file_name> -O
To visualize this information, dot is an open-source free visualization tool, and then finds the place where circular references are made.
For procedure problems, you can upgrade to Hana sp8 or convert to the same object type.
FAQs in SAP Hana development-Multi-team product R & D based on SAP Hana Platform