cancel
Showing results for 
Search instead for 
Did you mean: 

Re-mapping Schema - Hana/ S4

SarathSunny1
Participant
0 Kudos

Hi Experts,

Really needed some info on the below.

Current Scenario:

SAP ECC --> SLT (Schema: PRODECC) --> SAP HANA database, and calculation views are built on the tables replicated through PRODECC

New Scenario:

We are moving to S/4 Hana, and would like to re-use the calculation views till we gradually update to CDS views

Question:

In S/4 Hana, if the tables are put in a different schema ( May be : PRODS4), Is there any way to re-map all the existing calculation views to point to the new schema? instead of manually going in to each and changing the schema for every table projection?

Accepted Solutions (0)

Answers (2)

Answers (2)

Cocquerel
Active Contributor
0 Kudos

Good practice is to never refer directly to physical schema name in your design-time objects.

Just to complete Florian answer, after changing the schema mapping, you will need to redeploy objects to take the change into account :

- For XS Classic, you can do it via HANA Studio. Select the Calculation Views in content repository and choose menu "Redeploy"

- For XS Advanced, it is a bit more tricky as there is no UI to do it via menu. Redeploying the last mtar file will also not work as only changed objects are redeployed as no design-time has changed, nothing will be redeployed. The solution is do it via SQLScript using the LIST_DEPLOYED and MAKE HDI APIs. With LIST_DEPLOYED, you can get a list of all design-time objects in your HDI container. Then, you can execute the MAKE procedure on the following objects (.hdbsynonym, .hdbsynonymconfig and .hdiconfig).

SarathSunny1
Participant
0 Kudos

Thank you Michael for the detailed info.

For XS Classic, as also added to Florian's comment, would it be possible to use Schema mapping/redeploy within the same system? For example, if we want to re-point all the tables within Dev system for all the existing calculation views from schema DEV300 to DEV310.

Got a good idea now about re-mapping during transports.

Cocquerel
Active Contributor

Yes Sarath, the primary use case of using schema mapping is to avoid issue when transporting Calculation Views from dev to Qual and then Production while the schema name where are the tables differs from one system to an other. In this use case, the schema mapping is automatically taken into account at the time the transport (there is no manual redeployment to perform).

In your use case, you would change the schema mapping in a system where the Calculations Views are already existing. In this use case, after changing the schema mapping, you will need to trigger a manual redeployment of your Calculation Views for the schema mapping change to be taken into account.
Regards,
Michael

SarathSunny1
Participant
0 Kudos

Thank you Michael

pfefferf
Active Contributor
0 Kudos

Depending on if you are using XS Classic or XS Advanced you can try to reach your goal with following:

- XS Classic: Schema Mapping (Map Authoring Schema to the Physical Schema - SAP Help Portal)

- XS Advanced: Using a logical schema (Logical Schema Definition (.hdblogicalschema) - SAP Help Portal)

SarathSunny1
Participant
0 Kudos

Thank you Florian.

For XS Classic, Is Schema mapping used only during transport to another system?

For example, if in Dev system itself, for all the existing calculation views, if I need to point the tables to a different schema ( DEV300 to DEV310), would that be possible?