cancel
Showing results for 
Search instead for 
Did you mean: 

LDM/PDM generation options

Former Member
0 Kudos

Hi,

I would like to know if it's possible to use extended attributes for defining my PDM generation options.

I want to genereta a PDM model from a LDM and define my index by a extended attribute value and 3 sequence numbers.

Indexs should be generate like <ExtendedAttribute>XXX

By default PK Index name are define by "%Table%_PK", I tried "%EXT_DB2_FASE2::Profile\Model\Extended Attributes\EstDB2%"

Where "EXT_DB2_FASE2" is my .xem file, and "EstDB2" is my extendedattribute.

Is it possible?

Best Regards

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi team,

I already have a response from SAP,

There is a erro, you can track the progress of this problem with the Change Request

http://service.sap.com/sap/support/notes/2140354

Best Regards

Answers (1)

Answers (1)

former_member185317
Active Participant
0 Kudos

Hi Bruno,

Yes, you can use an extended attribute during generation within the PDM. You just have to declare its full name using the %.D:EstDB2% if you are using as part of something like ConstName in the database definition property of a PKey.

HTH,

-Matt C.


Former Member
0 Kudos

Thanks for your answer.

I wrote on PDM Generation Options - Detail -  PK Index Names -> %.D:EstDB2%_PK

But when PowerDesigner generate PDM from LDM, It create a index like __D_ESTDB2__PK.

On my LDM model I assigned ABC value for my Extended atrribute EstDB2

Best Regards

former_member185317
Active Participant
0 Kudos

I did not use it in the generation options. I merely used it as an attached extension to the PDM, as you cannot call extended attributes during the generation options.

Does that make sense?

-Matt C.

Former Member
0 Kudos

Hi Matt,

I saw on documentation the following:

Index: PK index names

Specifies the naming convention for primary keys. You can use the following variables in this and the Key index fields:

  • %TABLE% - Generated code of the table. This is the table code that is generated in the database. It may or may not be truncated if the code contains characters not supported by the DBMS
  • %TNAME%, %TCODE% - Table name and code
  • %TLABL% - Table comment
Default: %TABLE%_PK

Index: AK index names

Specifies the naming convention for alternate keys. You can use the following variables in this field:

  • %REFR% - Generated code of the reference
  • %REFNAME%, %REFRCODE% - Reference name and code
  • %PARENT% - Generated code of the parent table
  • %PNAME%, %PCODE% - Parent table name and code
  • %CHILD% - Generated code of the child
  • %CNAME%, %CCODE% - Child table name and code
  • %PQUALIFIER% - Parent table qualifier
  • %CQUALIFIER% - Child table qualifier

The generated code of a variable is the code defined in the object property sheet, which may be truncated when generated if the code contains characters not supported by the DBMS

Default: %TABLE%_AK

Index: FK index names

Specifies the naming convention for foreign keys, by default %REFR%_FK

So It's not possible to do it!

I am trying with post-transformation in PDM Model on Index Object but PowerDesigner didn´t run the transformation script.

former_member185317
Active Participant
0 Kudos

Hi Bruno,

Using the standard generation options, you can only use the above listed variables, that is correct. If you want to add additional variables, then you may want to use what I did which is an Extended Model Definition on PKEY and changed the PKEY constraint name in the database definition file to use the new attribute you first talked about. You could do this as a post generation transformation too, but you have to run it on the PKey, Reference and/or Index objects accordingly.

If it is a post generation transformation, you have to attach it during the generation because the extended definition on the LDM does not have the exact objects that the PDM does. Also, you need to make sure on the Generation-Detail Tab, that you turn on the Enable Transformations.

HTH,

-Matt C.

Former Member
0 Kudos

Hi Matt,

The problem is that post generation transformation on Index Object is not executed.

If you create a post generation transformation on Index with a output "PostGenerationIndex", PowerDesinger will never write on OutputList.


Best regards