SAP Knowledge Base Article - Preview

2628608 - Using the CreateComparisonHelper() via Vbscript how to compare specific object types - SAP PD

Symptom

  • Error when using VBScript function CreateComparisonHelper is not returning the expected results.
  • The goal is to compare "Table" objects.
  • Customer is trying to compare two models with a code similar to:

set p = openmodel("C:\\Users\\user.name\\Desktop\\Temp\\TEST.pdm")
set dom = openmodel("C:\\Users\\user.name\\Desktop\\Temp\\OraPDM.pdm")

' Create the comparison helper and show comparison results in the output

Dim Cmpr, Idx, DiffKind, OldObject, NewObject, MemberPublicName, OldValue, NewValue, Str
Set Cmpr = p.CreateComparisonHelper(dom)

' Parameter the comparison option, should be called before lauch Compare action
Cmpr.SetClassComparable "*", FALSE
Cmpr.SetClassComparable "Table", TRUE

output cstr(Cmpr.GetDifferencesCount()) " differences found"
for Idx = 0 to Cmpr.GetDifferencesCount()
Cmpr.GetDifferenceInformation Idx, DiffKind, OldObject, NewObject, MemberPublicName, OldValue, NewValue
Str = "Difference " cstr(Idx) " is:"
Str = Str " Kind=" Cstr(DiffKind)

[TRUNCATED]


Read more...

Environment

  • SAP PowerDesigner (PD) 16.6
  • DBMS: Oracle 11g

Product

SAP PowerDesigner 16.6

Keywords

SetPropertyComparable, VB script, compare object , KBA , BC-SYB-PD , PowerDesigner , How To

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.