on 07-29-2010 6:37 PM
Hi Xperts,
Front-end dynamic validation, we have a requirement, would have to get the "MDM field width" using MDM Java API and we need to check with user input value length for that Field.
Case.
Suppose, we have MDM Field > Address, type "TEXTu201D and width/size "10".
Portal User > Entered length of 15 char for that field.
You will be appreciate, if you can provide the sample code and MDM WebDynPro API u2013JAVA
Thank you
Bala
Hi bala ,
Just try this.
*com.sap.mdm.extension
Class MetadataManager*
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
FixedWidthTextFieldProperties textField = ( FixedWidthTextFieldProperties) fProp
int lengthField = textField . getWidth()
now you can check yr length with portal field length.
please revert with yr results.
Thanks,
Sudhanshu
Edited by: Sudhanshu Agarwal on Jul 29, 2010 11:51 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.