Skip to Content

SQLScript: Read DDIC tables

Hello Experts,

we use table UDFs for our calculation views and I would like to know how to read from BW DDIC tables within these scripts. I see them only in the schema of BW system e.g. "SAPD50" so that I can read the hierarchy table of info object 0COMP_CODE with "SAPD50"."/BI0/HCOMP_CODE". But I can't transport the script this way, because "SAPD50" changes its name to "SAPT50" in the test and "SAPP50" in the prod system.

Is it possible to create an own schema for table /BI0/HCOMP_CODE or is there another system schema where I can access these kind of tables?

Best regards
Martin Lehmann

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    Feb 28 at 08:32 PM

    In case you are working with XS Classic you can define a Default Schema in the function header. This default schema is then used in case you use an object in the function body without a schema. This default schema must be an authoring schema to which a physical schema is mapped. With that the authoring schema stays constant, but is mapped to different physical schemas on your systems. Documentation: Map Authoring Schema to the Physical Schema

    In case you are using XS Advanced you can use a synonym pointing to your table. Depending on the deployment target the synonym configuration must be provided, at deployment point of time, pointing to schema in which the object is available. If you are directly specify the schema name within the synonym configuration or if you are using a logical schema (pointing to the schema) within the synonym configuration is your decision.

    Add comment
    10|10000 characters needed characters exceeded