cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

PowerDesigner: Displaying target mapping in source model report

RWZI
Discoverer
0 Kudos
621

Hi,

I've been trying to get the target model entitie(s) a source model entity is mapped to to show up in a source model report. I've made this mapping from the target to the source. Now I want to display information about what target entity a source entity is mapped to in the source model report. This information is visible under the source entity's dependencies tab (target classifier mappings) and also picked up by the impact and lineage analysis, so SAP PowerDesigner knows there is a link. However, whenever I try to get this target classifer mapping to show up in a report, the spaces remain blank. Is there any way to display where a source entity is mapped to in the source model's report?

 

Thanks in advance!

View Entire Topic
Ondrej_Divis
Contributor
0 Kudos

Unfortunately, there is no such thing that you could use right away in your report. When you create new mappings, ONLY THE TARGET model is modified. There are no changes in source model(s). Content of the Dependencies tab is calculated on-the-fly, meaning its content will disappear after you close the target model. There is no appropriate property or collection in the PD metamodel that holds this information on the source side of mappings.

Knowing what is written above, you have to customize PD a little bit to show the information about target objects in your source model report.

If you are ok with just simple textual list of your target entities, you can use extended attribute. Or you can even create your own list similar to the list you can see on the Dependencies tab (but usable in your reports). Here are some PROs and CONs of both options.

Extended attribute
- needs to be filled by user-invoked method
- you need to write that method
- all the target models must be opened when running the method
+ such data will remain in the source model even after closing the target models
- information about target objects can be outdated if you forget to update it regularly
- duplicates your metadata accross models

Your own collection
- you need to write the filling method
- works only when all the target models are open
- duplicates your metadata accross models
+ can be better structured than textual list in extended attribute
+ can contain shortcuts to your target entities so you have more options what to do with it in your report

Both options will need some advanced knowledge of PD and better specification of your needs so the best option can be chosen.

If you need more help with this, please contact me on LinkedIn.
Ondrej Divis

GeorgeMcGeachie
Active Contributor
0 Kudos
Ondrej - if your script opens the Model (and all Target Models) via the Repository, would all of the source and target objects be available?
Ondrej_Divis
Contributor
0 Kudos
George, yes, it will be available. But it makes sense to do it this way only in case of a few (and quite small) models. If you have higher tens or even hundreds of models, the time consumption during mass checkout can be enormous.
Ondrej_Divis
Contributor
0 Kudos
And you can do the same (scripted opening of all target models) even without repository. Model knows, where the its target models are. But this works only from target models to source models. The other direction doesn`t work this way, because source models don`t contain a single information about its targets. Might sound a bit confusing. When we talk about "Target Models", I mean collection inside PD which is NAMED "Target Models", however it doesn`t say anything about the direction of the mappings. So the Target Models collection in your target model often contains list of the source models of your mappings. And your source models might not even contain Target Models collection...
RWZI
Discoverer
0 Kudos
Thank you Ondrej (and George for the model opening through scripting idea)! I'll try to get an extended attribute or collection going.