Skip to Content

Struggling with issue discussed in this thread I was wondering how to extract data types from RFC model dictionary to a new development component. Just simple copy of model dictionary types.

Unfortunately, in NWDS 7.0 right click on data type does not help…

/wp-content/uploads/2009/12/cd1_132689.jpg

So, what if I want use exactly same data types in other development component project, for example Dictionary project, but don’t want to import rfc model? Here is short workaround for this scenario:

Create development component of desired type.

Open your project with rfc model dictionary and find the package of your logical dictionary simple types (click on one of the simple types for example)

/wp-content/uploads/2009/12/cd2_132690.jpg

Now look in your project src folder – on your package path you’ll find xml files with data types definitions: dtsimpletype is for simple type, dtstructure for structure and xlf for internatinalization.

/wp-content/uploads/2009/12/cd3_132691.jpg

Now, you must edit files of data types you want.

Files .dtsimpletype: delete tag DtDataType.LogicalDictionary, for example fo Balmnr remove lines:

<DtDataType.LogicalDictionary>
  <Core.Reference package=”jwozniczak.flight.types” name=”FlightModel” type=”DtLogicalDictionary”/>
</DtDataType.LogicalDictionary>

and replace package in attribute in the root tag <…package=”my.new.pac” …>. You don’t need to do this.

Files .dtstructure: as above, remove DtDataType.LogicalDictionary, change package in the root tag and if you changed package for simple types then change all package attributes in field references tags   

<DtField.ReferencedType>
    <Core.Reference package=”jwozniczak.flight.types” name=”Bapisign” type=”DtSimpleType”/>
</DtField.ReferencedType>

You can make some script for this transformations (like I did), so all this operations take a few seconds.

Next, copy all modified files to your new project to src directory according with package name, so if you changed package to ‘new.pack’ copy files to src/new/pack (or recreate original package, in this example jwozniczak.flight.types). Copy xlf files also.

Reload your project and here you go.

/wp-content/uploads/2009/12/cd4_132692.jpg

All constraints and data check work perfectly.

/wp-content/uploads/2009/12/cd5_132693.jpg

To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

  1. Siarhei Pisarenka
    Hi Jacek

    >what if I want use exactly same data types in other development component project, for example Dictionary project, but don’t want to import rfc model?

    It seems the situation could be resolved in simpler way then you described. If you need to use the data types in another WebDynpro DC you can just establish a reference:

    1. Add the RFC model to new/existing public part in component A. The operation will also include all the types in the public part.
    2. Establish a reference from component B to the public part of component A.

    Anyway the technique and experience you described here is helpful to know.

    BR, Siarhei

    (0) 
    1. Jacek Wozniczak Post author
      Hi, Siarhei, thanks for your answer.

      I got your point but in your case this is not copy – I don’t have access to these types, I cannot for example edit them (assuming that for example I need to use them as a base for new types and I don’t have time to retype all properties like texts, field cosntraints etc.).

      Best regards,
      Jacek

      (0) 

Leave a Reply