This is a simple but very useful search to find the table name for a storable class in BRM. It is many times a difficult job specially in highly customized environments. Execute the following query by connecting to the BRM database :
SQL> select dof.SM_ITEM_NAME from dd_objects_t do,dd_objects_fields_t dofwhere do.OBJ_ID0=dof.OBJ_ID0 and do.NAME like '<CLASSNAME>' and dof.SM_ITEM_NAME not like ':%' and dof.SM_ITEM_NAME not like 'au_%'
Replace the <CLASSNAME> with the exact class for which you want to search the table, e.g.
SQL> select dof.SM_ITEM_NAMEfrom dd_objects_t do,dd_objects_fields_t dof where do.OBJ_ID0=dof.OBJ_ID0 and do.NAME like '/service' and dof.SM_ITEM_NAME not like ':%' and dof.SM_ITEM_NAME not like 'au_%'
Similarly, we can search the storable class name from the table name. Use the following query :
SQL> select dof.SM_ITEM_NAME,do.name from dd_objects_t do,dd_objects_fields_t dof where do.OBJ_ID0=dof.OBJ_ID0 and dof.SM_ITEM_NAME like 'account_t'
Following query can be used to find the storable classes where a BRM field is used:
select do.name from dd_objects_t do,dd_objects_fields_t dof where dof.field_name ='<FIELD_NAME>' and do.obj_id0=dof.obj_id0;
e.g.,
select do.name from dd_objects_t do,dd_objects_fields_t dof where dof.field_name ='PIN_FLD_ITEM_NO' and do.obj_id0=dof.obj_id0;
SQL> select dof.SM_ITEM_NAME from dd_objects_t do,dd_objects_fields_t dofwhere do.OBJ_ID0=dof.OBJ_ID0 and do.NAME like '<CLASSNAME>' and dof.SM_ITEM_NAME not like ':%' and dof.SM_ITEM_NAME not like 'au_%'
Replace the <CLASSNAME> with the exact class for which you want to search the table, e.g.
SQL> select dof.SM_ITEM_NAMEfrom dd_objects_t do,dd_objects_fields_t dof where do.OBJ_ID0=dof.OBJ_ID0 and do.NAME like '/service' and dof.SM_ITEM_NAME not like ':%' and dof.SM_ITEM_NAME not like 'au_%'
Similarly, we can search the storable class name from the table name. Use the following query :
SQL> select dof.SM_ITEM_NAME,do.name from dd_objects_t do,dd_objects_fields_t dof where do.OBJ_ID0=dof.OBJ_ID0 and dof.SM_ITEM_NAME like 'account_t'
Following query can be used to find the storable classes where a BRM field is used:
select do.name from dd_objects_t do,dd_objects_fields_t dof where dof.field_name ='<FIELD_NAME>' and do.obj_id0=dof.obj_id0;
e.g.,
select do.name from dd_objects_t do,dd_objects_fields_t dof where dof.field_name ='PIN_FLD_ITEM_NO' and do.obj_id0=dof.obj_id0;
From key word is missing in above Query.
ReplyDeleteselect dof.SM_ITEM_NAME,do.name from dd_objects_t do,dd_objects_fields_t dof where do.OBJ_ID0=dof.OBJ_ID0 and dof.SM_ITEM_NAME like 'account_t'
Regards
KVC
You got it ... :)
ReplyDelete