Search This Blog

Monday, February 18, 2013

DFF Deletion API


DFF Deletion API:

DECLARE
CURSOR C1 IS
SELECT DESCRIPTIVE_FLEX_CONTEXT_CODE, DESCRIPTIVE_FLEXFIELD_NAME, APPLICATION_ID
FROM FND_DESCR_FLEX_CONTEXTS
WHERE DESCRIPTIVE_FLEXFIELD_NAME = 'XXXXXXXXXXXXXX';
BEGIN
FOR V1 IN C1
LOOP
FND_DESCR_FLEX_CONTEXTS_PKG.DELETE_ROW (
  V1.APPLICATION_ID,
  V1.DESCRIPTIVE_FLEXFIELD_NAME,
  V1.DESCRIPTIVE_FLEX_CONTEXT_CODE);
END LOOP;
END;

-----------

DECLARE
CURSOR C1 IS
SELECT APPLICATION_COLUMN_NAME,DESCRIPTIVE_FLEX_CONTEXT_CODE,DESCRIPTIVE_FLEXFIELD_NAME,APPLICATION_ID
FROM FND_DESCR_FLEX_COLUMN_USAGES
WHERE DESCRIPTIVE_FLEXFIELD_NAME = 'XXXXXXXXXXXXXX';
BEGIN
FOR V1 IN C1
LOOP
FND_DESCR_FLEX_COL_USAGE_PKG.DELETE_ROW (
  V1.APPLICATION_ID,
  V1.DESCRIPTIVE_FLEXFIELD_NAME,
  V1.DESCRIPTIVE_FLEX_CONTEXT_CODE,
  V1.APPLICATION_COLUMN_NAME);
END LOOP;
END;

-----------

DECLARE
CURSOR C1 IS
SELECT DESCRIPTIVE_FLEXFIELD_NAME,APPLICATION_ID
FROM FND_DESCRIPTIVE_FLEXS
WHERE DESCRIPTIVE_FLEXFIELD_NAME = 'XXXXXXXXXXXXXX';
BEGIN
FOR V1 IN C1
LOOP
FND_DESCRIPTIVE_FLEXS_PKG.DELETE_ROW (
  V1.APPLICATION_ID,
  V1.DESCRIPTIVE_FLEXFIELD_NAME);
END LOOP;
END;

No comments:

Post a Comment