cancel
Showing results for 
Search instead for 
Did you mean: 

How to extract field name, length, descrip & field type out of repository

Former Member
0 Kudos

How can I extract field name, length, descrip & field type out of repository? Or is it possible?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Victor,

To get any info about any field you should know the code of that field that we specify in console while creating field.

Using this code you will get property whatever you defined in consloe.

RepositorySchemaEx repositoryschema= MetadataManager.getInstance().getRepositorySchema(usrCtx);

where usrctx is usersession context that you create to access yr repository

FieldProperties fProp = repositoryschema.getField(tableName,fieldCode);

where tablename is tablecode in which field belong

field code is code of field that you define in console for that field

if you check with frop then it will show the general properties like type etc.

suppose yr field of type text field then you can acces all properties that is coomon as well that is respective to text type field.

FixedWidthTextFieldProperties textField = ( FixedWidthTextFieldProperties) fProp

if you have other field type then that use thta properties . you will get in java api docs on help.sap.com whatever the properties MDM supporting.

Hope ot helps you get the solution

thanks,

sudhanshu

former_member205403
Active Contributor
0 Kudos

Hi Victor,

If you are looking to extract this data in some text or excel format, then unfortunately it is not possible using any standard MDM function.

But When you export repository schema, it will give you all the field properties, but this XML will be difficult to read.

I am not sure, but you can give a try by checking database schema if you can get this information from database. I will also try and will let you know if i find anything good.

Best Regards,

Shiv

Former Member
0 Kudos

Hi Victor

The MDM repository schema can be exported and then we can use tools like Altova, Liquid XML for converting this xml schema to excel, atleast we can view the schema.

thanks-Ravi