Tuesday, 28 July 2015

Oracle Apps: How to delete a DFF Context

You cannot delete a DFF Context from the front-end. You can only disable it.
Assume you have created one by mistake and you want to delete that.How to do that ?
  • The segments added to the context can be deleted from the front-end. Delete those first.
  • You can use fnd_descr_flex_contexts_pkg.delete_row to delete the context.
 procedure DELETE_ROW (  
  X_APPLICATION_ID in NUMBER,  
  X_DESCRIPTIVE_FLEXFIELD_NAME in VARCHAR2,  
  X_DESCRIPTIVE_FLEX_CONTEXT_COD in VARCHAR2  
 );  

Ex:-


 begin  
  fnd_descr_flex_contexts_pkg.delete_row(0,'FND_COMMON_LOOKUPS','TEST');  
 end;  

You need to call commit after the above call.

Also make sure that you UnFreeze and Freeze the DFF definition and compile the DFF.

Script to check from backend whether it is deleted:
 select * from FND_DESCR_FLEX_COLUMN_USAGES where application_id = 0 and descriptive_flex_context_code = 'TEST';  
 select * from FND_DESCR_FLEX_COL_USAGE_TL  where application_id = 0 and descriptive_flex_context_code = 'TEST';  
 select * from FND_DESCR_FLEX_CONTEXTS      where application_id = 0 and descriptive_flex_context_code = 'TEST';  
 select * from FND_DESCR_FLEX_CONTEXTS_TL   where application_id = 0 and descriptive_flex_context_code = 'TEST';  

Related Links : Delete a Descriptive Flexfield Context Value


Feel free to point out if anything is missing/wrong in this blog.


No comments:

Post a Comment