create_descriptive_flex_field_dff_in_custom_form.docx

28
7/23/2019 Create_Descriptive_Flex_Field_DFF_In_Custom_Form.docx http://slidepdf.com/reader/full/createdescriptiveflexfielddffincustomformdocx 1/28 Flexfields are required whenever an additional information is required in Oracle Form. For complete knowledge in Descriptive Flexfield please visit http://oracle.anilpassi.com/descriptive-flexfield-basics-in-oracle-apps.html This Training Article will focus on Creating DFF in a Custom Form.  ame !ender DO" # st DFF $ nd DFF !ender is % Note &n this Form ' (ser enter ame ' !ender' DO". # st DFF depends upon !ender if %)%ale* then DFF will be invoked with +egments !,%' Occupation' ountr. &f F)Female* then +egment will be 012O(1' Occupation' ountr. $ nd DFF will Depend on ountr of # st DFF. 3o accomplish this we need to follow the following +teps #. reate a table with olumn like 0ttribute4categor )for DFF representation* and 0ttribute#' 0ttribute$ )For 5alue entered in DFF *' its not mandator to use these  ames but is a good practice and also recommended b Oracle. 1egister this ustom table with 0pps using 0D4DD package . $. 1egister DFF with 0pps 6. reate a Form which will ontain DFF. 7. 1egister this Form with 0pps STEP 1 : 3his +tep is further divided into following +teps a. reate ustom 3able in ustom +chema  b. !rant permission to 0+ user c. 0dd omments to olumns )!ood ractice*. d. reate +nonm in 0+ 0ddres s +tate it !ender is F !,% Occupatio n ountr 012O(1 Occupatio n ountr

Upload: bvbrahmam

Post on 13-Apr-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

7/23/2019 Create_Descriptive_Flex_Field_DFF_In_Custom_Form.docx

http://slidepdf.com/reader/full/createdescriptiveflexfielddffincustomformdocx 1/28

Flexfields are required whenever an additional information is required in Oracle Form.For complete knowledge in Descriptive Flexfield please visithttp://oracle.anilpassi.com/descriptive-flexfield-basics-in-oracle-apps.html 

This Training Article will focus on Creating DFF in a Custom Form. ame

!ender

DO"

#st

DFF $nd

DFF

!ender is %

Note

&n this Form ' (ser enter ame ' !ender'DO".#

stDFF depends upon !ender if %)%ale*

then DFF will be invoked with +egments!,%' Occupation' ountr. &f F)Female*then +egment will be 012O(1'Occupation' ountr.$

ndDFF will Depend on ountr of #

stDFF.

3o accomplish this we need to follow the following +teps

#. reate a table with olumn like 0ttribute4categor )for DFF representation* and0ttribute#' 0ttribute$ )For 5alue entered in DFF *' its not mandator to use these ames but is a good practice and also recommended b Oracle.1egister this ustom table with 0pps using 0D4DD package .

$. 1egister DFF with 0pps6. reate a Form which will ontain DFF.7. 1egister this Form with 0pps

STEP 1 :

3his +tep is further divided into following +tepsa. reate ustom 3able in ustom +chema b. !rant permission to 0+ user c. 0dd omments to olumns )!ood ractice*.d. reate +nonm in 0+

0ddress +tateit

!ender is F!,%Occupatio

n ountr

012O(1 Occupation ountr

7/23/2019 Create_Descriptive_Flex_Field_DFF_In_Custom_Form.docx

http://slidepdf.com/reader/full/createdescriptiveflexfielddffincustomformdocx 2/28

e. 1egister table with 0pps using 0D4DD akagef. 1egister olumn with 0pps (sing 0D4DD ackage.

a. Create a Custom Table in Custom Schema.

CREA TE TABLE XX_XX_DFF 

(NAME VARCHAR2(100),

GENDER VARCHAR2(1),

DOB DATE,

ATTRIBUTE_CATEGORY1 VARCHAR2(100),

ATTRIBUTE_CATEGORY2 VARCHAR2(100),

ATTRIBUTE1

VARCHAR2(100),

ATTRIBUTE2 VARCHAR2(100),ATTRIBUTE3 VARCHAR2(100),

ATTRIBUTE4 VARCHAR2(100),

ATTRIBUTE5 VARCHAR2(100),

ATTRIBUTE6 VARCHAR2(100),ATTRIBUTE VARCHAR2(100))

 b. Grant ermission to APPS user

GRANT ALL ON XX_XX_DFF TO A!!"

c.A!! Comments to Columns "Goo! Practice#.

COMMENT ON COLUMN XX_XX_DFF#ATTRIBUTE1 I" $GYM$%

COMMENT ON COLUMN XX_XX_DFF#ATTRIBUTE2 I" $BEAUTY !ARLOUR$% 

COMMENT ON COLUMN XX_XX_DFF#ATTRIBUTE3 I" $OCCU!ATION$% 

COMMENT ON COLUMN XX_XX_DFF#ATTRIBUTE4 I" $COUNTRY$% 

COMMENT

ON COLUMN XX_XX_DFF#ATTRIBUTE5 I" $ADDRE""$%  COMMENT ON

COLUMN XX_XX_DFF#ATTRIBUTE6 I" $CITY$%

COMMENT ON COLUMN XX_XX_DFF#ATTRIBUTE I" $"TATE$%

COMMENT ON COLUMN XX_XX_DFF#ATTRIBUTE_CATEGORY1 I" $D&'&* + G&&$% 

COMMENT ON COLUMN XX_XX_DFF#ATTRIBUTE_CATEGORY2 I" $D&'&* + C+-./$%

d.Create S$non$m in APPS

CREA TE "YNONYM XX_XX_DFF FOR XXBL#XX_XX_DFF

e. %egister table with As using AD&DD Pa'age

7/23/2019 Create_Descriptive_Flex_Field_DFF_In_Custom_Form.docx

http://slidepdf.com/reader/full/createdescriptiveflexfielddffincustomformdocx 3/28

BEGIN

AD_DD#REGI"TER_TABLE($FND$,$XX_XX_DFF$,$T$)% 

END%

f. %egister Column with As (sing AD&DD Pac'age.

BEGINAD_DD#REGI"TER_COLUMN($FND$,$XX_XX_DFF$,$NA ME$,1,$VARCHAR2$,100,$N$,$N$)%

AD_DD#REGI"TER_COLUMN($FND$,$XX_XX_DFF$,$GENDER$,2,$VA RCHAR2$,1,$N$,$N$)%

AD_DD#REGI"TER_COLUMN($FND$,$XX_XX_DFF$,$DOB$,3,$DATE$,,$N$,$N$)%

AD_DD#REGI"TER_COLUMN($FND$,$XX_XX_DFF$,$ATTRIBUTE_CATEGORY1$,4,$VARCHAR2$,

 

100,$N$,$N$)%

AD_DD#REGI"TER_COLUMN($FND$,$XX_XX_DFF$,$ATTRIBUTE_CATEGORY2$,5,$VA

RCHAR2$, 100,$N$,$N$)%

AD_DD#REGI"TER_COLUMN($FND$,$XX_XX_DFF$,$ATTRIBUTE1$,6,$VA

RCHAR2$,100,$N$,$N$)% 

AD_DD#REGI"TER_COLUMN($FND$,$XX_XX_DFF$,$ATTRIBUTE2$,,$VA

RCHAR2$,100,$N$,$N$)% AD_DD#REGI"TER_COLUMN($FND$,$XX_XX_DFF$,$ATTRIBUTE3$,,$VARCHAR2$,100,$N$,$N$)%

 

AD_DD#REGI"TER_COLUMN($FND$,$XX_XX_DFF$,$ATTRIBUTE4$,,$VA

RCHAR2$,100,$N$,$N$)% 

AD_DD#REGI"TER_COLUMN($FND$,$XX_XX_DFF$,$ATTRIBUTE5$,10,$VARCHAR2$,100,$N$,$N$)% AD_DD#REGI"TER_COLUMN($FND$,$XX_XX_DFF$,$ATTRIBUTE6$,11,$VARCHAR2$,100,$N$,$N$)%

 

AD_DD#REGI"TER_COLUMN($FND$,$XX_XX_DFF$,$ATTRIBUTE$,12,$VA

RCHAR2$,100,$N$,$N$)% 

END%

STEP 2 :%egister DFF with As

Na)igation Path : Alication De)eloer Fle*fiel! Descriti)e %egister

F+ 1*. DFF XX_DFF_GENDER

 Application :A''.+ O7&. L/

Name 8 XX_DFF_GENDER

Title 8 XX_DFF_GENDER

Description 8 D&'&* + G&&

Table Application 8 A''.+ O7&. L/

Table Name 8 XX_XX_DFF

Structure Column 8 ATTRIBUTE_CATEGORY1

Context Prompt 8 C+.&9.V-& (!&** ":&)

N o t e : Title should be Unique as it is required to Query the Flexfield

for creation or updation of Segments (Mentioned Below with

Segment)

7/23/2019 Create_Descriptive_Flex_Field_DFF_In_Custom_Form.docx

http://slidepdf.com/reader/full/createdescriptiveflexfielddffincustomformdocx 4/28

N+; C< + B-..+ Column C=&< only

ATTRIBUTE1, ATTRIBUTE2, ATTRIBUTE3, ATTRIBUTE4

#&GYM, !ARLOUR, O-'.+, C+-./#

7/23/2019 Create_Descriptive_Flex_Field_DFF_In_Custom_Form.docx

http://slidepdf.com/reader/full/createdescriptiveflexfielddffincustomformdocx 5/28

N+; C&.& "&>?&.*

Na)igation Path : Alication De)eloer Fle*fiel! Descriti)e Segment

@-&/ .=& F&9& / !&**> F11 C+'/ .=& T.& XX_DFF_GENDER  T.& &# (A* *-**& +:&, T.& * &-& .+ & U-&)

1# U&&& F&9& D&.+ / U=&<> .=& =&<+9

F&&& F&9& D&.+#

2# C=&< "/=+& ;.= R&&&& F& C=&<+9 (=&R&&&& F& * +. -)

3# E.& 8+<?&#.&?_?& + /+- F+? (C & & .&+& +? * &.&) R&&&& F&#

4# C+.&9. F& V-&*

Code N ame  D escription  Enabled 

F F F&?& =&

M M M& =&

(G+ D. E&?&.* * &-. C+.&9. F& :-&)

7/23/2019 Create_Descriptive_Flex_Field_DFF_In_Custom_Form.docx

http://slidepdf.com/reader/full/createdescriptiveflexfielddffincustomformdocx 6/28

R&&&& F& C+. 8XX_XX_DFF#GENDER

(8BLOC_NA ME#ITEM_NAME)# I. ; < .=& G&& & + ?/ F+? &'&> -'+ .=& :-& &.&& . ; *=+; .=& DFF#

Context Field Values.

M/ 1*. DFF ; *=+; 3 &*

GYM, O-'.+, C+-./ ;=& G&& * M

!ARLOUR, O-'.+, C+-./ ;=& G&& * F#

A/ "&>?&.* &.& -& Global Data Elements; ;/* & :+<&

;.= .=& DFF# "& O-'.+ C+-./ & +??+ .=&&+& I ?

'-..> .=&? G+ D. E&?&.*#& *+ =&:& .=* / &.> "&>?&. O-'.+ C+-./+ +.= C+.&9. F& V-& M F, &:> G+ D. E&?&.* *B<#

C< G+ D. E&?&.* .=& < "&>?&.* T#

I :& !& O-'.+ C+-./ "&>?&.* -& . ;== ?&*

;=&.=& .=& G&& * M + F# 1*. DFF ; ;/* *=+; .=&*& .;+ &*#

7/23/2019 Create_Descriptive_Flex_Field_DFF_In_Custom_Form.docx

http://slidepdf.com/reader/full/createdescriptiveflexfielddffincustomformdocx 7/28

N-?& 8 1 (A/ U-& N-?& &&.&&) N?& 8 O-'.+C+-? 8 ATTRIBUTE3 (T=* ?&* ;=& /+- *:& /+- . .=&:-& !& -& O-'.+ ; *.+& A..-.&3 +-? +-*.+? .& XX_XX_DFF )#

D*'/& 8C=&< E& 8C=&<

N-?& 8 2 (A/ -?& & &.&& +.=& .=& 1 ;== * &/U*&) N?& 8 C+-./C+-? 8 ATTRIBUTE4 (T=* ?&* ;=& /+- *:& /+- . .=&:-& !& -& C+-./ ; *.+& A..-.&4 +-? + -*.+?.& XX_XX_DFF

)#

V-& "&. 8 XX_COUNTRY

D*'/& 8 C=&<E& 8C=&< (!&** ":&)

C&.> V-&"&. XX_COUNTRY

!& .=& -*+ C+-./ !&** .=& B-..+ V-& "&.# A F+? ; &*'/& # Y+- *+ &.& V-& "&. +?A''.+ D&:   A''2345.3+( V.+ "&.

7/23/2019 Create_Descriptive_Flex_Field_DFF_In_Custom_Form.docx

http://slidepdf.com/reader/full/createdescriptiveflexfielddffincustomformdocx 8/28

V-& "&. N?& 8 XX_COUNTRYM9?-? "& 20V.+ T/'& 8

I&'&&. (!&** ":&)

N+; '-..> :-& .+ .=* V-& "&.#

A''.+ D&:&+'& A''.+ V.+ V-&*

 Value Translated Value Description EnablI I I =&<

U U U =&<

U"A U"A U"A =&<

7/23/2019 Create_Descriptive_Flex_Field_DFF_In_Custom_Form.docx

http://slidepdf.com/reader/full/createdescriptiveflexfielddffincustomformdocx 9/28

Context Field Values+.#

M ?&* U*& =* &.& G&& * M .=& .=& "&>?&.* &.& -&

.=* ; & :+<& +> ;.= .=& G+ D. E&?&.* "&>?&.*!& .=& -*+ + M < "&>?&.*

N-?& 1

N?& 8 GYMC+-? 8 ATTRIBUTE1D*'/& 8 C=&<E& 8 C=&<

(!&** ":&)

7/23/2019 Create_Descriptive_Flex_Field_DFF_In_Custom_Form.docx

http://slidepdf.com/reader/full/createdescriptiveflexfielddffincustomformdocx 10/28

Context Field Values+.#

F?&* U*& =* &.& G&& * F .=& .=& "&>?&.* &.& -&

.=* ; & :+<& +> ;.= .=& G+ D. E&?&.* "&>?&.*

!& .=& -*+ + F < "&>?&.*

N-?& 1

N?& 8 !ARLOUR

C+-? 8 ATTRIBUTE2

(!&** ":&)

7/23/2019 Create_Descriptive_Flex_Field_DFF_In_Custom_Form.docx

http://slidepdf.com/reader/full/createdescriptiveflexfielddffincustomformdocx 11/28

 T =&& 1*. DFF * &>*.&& A''*

N+; F+ 2 DFF ;== D&'&* + C+-./ ?&.+& 1*. DFF#

Na)igation Path : Alication De)eloer Fle*fiel! Descriti)e %egister

 Application :A''.+ O7&. L/

Name 8 XX_DFF_COUNTRY

Title 8 XX_DFF_COUNTRY

Description 8 D&'&* + C+-./

Table Application 8 A''.+ O7&.

L/ Table Name 8 XX_XX_DFF

Structure Column 8 ATTRIBUTE_CATEGORY2

Context Prompt 8 C+.&9.

V-& (!&** ":&)

7/23/2019 Create_Descriptive_Flex_Field_DFF_In_Custom_Form.docx

http://slidepdf.com/reader/full/createdescriptiveflexfielddffincustomformdocx 12/28

C< C+-? B-..+ C=&< only

ATTRIBUTE5, ATTRIBUTE6, ATTRIBUTE

I& A&**, C./, "..& +? .& XX_XX_DFF

7/23/2019 Create_Descriptive_Flex_Field_DFF_In_Custom_Form.docx

http://slidepdf.com/reader/full/createdescriptiveflexfielddffincustomformdocx 13/28

N+; C&.& "&>?&.*

Na)igation Path : Alication De)eloer Fle*fiel! Descriti)e Segment

@-&/ .=& F&9& / !&**> F11 C+'/ .=& T.& XX_DFF_COUNTRY  T.& &#

1# U&&& F&9& D&.+ / U=&<> .=& =&<+9F&&& F&9& D&.+#

2# C=&< "/=+& ;.= R&&&& F& C=&<+9 (=& R&&&&F& * +. -)

3# E.& 8+<?&#.&?_?& + /+- F+? (C & & .&+& +? * &.&) R&&&& F&#

4# C+.&9. F& V-&*

Code N ame  D escription  Enabled 

I I I =&<(G+ D. E&?&.* * &-. C+.&9. F& :-&)

7/23/2019 Create_Descriptive_Flex_Field_DFF_In_Custom_Form.docx

http://slidepdf.com/reader/full/createdescriptiveflexfielddffincustomformdocx 14/28

F+ G+ D. E&?&.*

N-?& 1

N?& 8 A&**C+-? 8 ATTRIBUTE5D*'/& 8C=&< E& 8C=&<

(!&** ":&)

7/23/2019 Create_Descriptive_Flex_Field_DFF_In_Custom_Form.docx

http://slidepdf.com/reader/full/createdescriptiveflexfielddffincustomformdocx 15/28

F+ C+.&9. F& V-& * India

N-?& 2N?& 8 "..&

C+-? 8 ATTRIBUTE

V-& "&. 8 XX_"TA TED*'/& 8 C=&<E& 8 C=&<

N-?& 1

N?& 8 C./

C+-? 8 ATTRIBUTE6V-& "&. 8 XX_CITIE"D*'/& 8 C=&<E& 8 C=&<

(!&** ":&)

7/23/2019 Create_Descriptive_Flex_Field_DFF_In_Custom_Form.docx

http://slidepdf.com/reader/full/createdescriptiveflexfielddffincustomformdocx 16/28

7/23/2019 Create_Descriptive_Flex_Field_DFF_In_Custom_Form.docx

http://slidepdf.com/reader/full/createdescriptiveflexfielddffincustomformdocx 17/28

V-& "&. XX_"TA TE

N+; &.> V-&* + V-& "&. XX_STATE

A''.+ D&:&+'& A''.+ V.+ V-&*

 Value Translated Value Description Enabled

D&= D&= D&= =&U.. !&*= U.. !&*= U.. !&*= =&

U..<= U..<= U..<= =&

7/23/2019 Create_Descriptive_Flex_Field_DFF_In_Custom_Form.docx

http://slidepdf.com/reader/full/createdescriptiveflexfielddffincustomformdocx 18/28

V-& "&. XX_CITIE"

 T=* V-& "&. * D&'&&. V-& "&. + :-&*&. XX_"TA TE#

V-& "&. N?& 8 XX_CITIE"M9?-? "& 20V.+ T/'& 8

D&'&&. C< E.

I+?.+ B-..+

I&'&&. V-&*&. 8 XX_"TA TED&'&&. D&-. V-& 8 N&;D&= D&*'.+ 8 N&;D&= (!&** ":&)

7/23/2019 Create_Descriptive_Flex_Field_DFF_In_Custom_Form.docx

http://slidepdf.com/reader/full/createdescriptiveflexfielddffincustomformdocx 19/28

7/23/2019 Create_Descriptive_Flex_Field_DFF_In_Custom_Form.docx

http://slidepdf.com/reader/full/createdescriptiveflexfielddffincustomformdocx 20/28

N+; !-..> V-&* .+ .=* V-& "&.#

N:>.&

A''.+ D&:&+'& A''.+ V.+ V-&*

7/23/2019 Create_Descriptive_Flex_Field_DFF_In_Custom_Form.docx

http://slidepdf.com/reader/full/createdescriptiveflexfielddffincustomformdocx 21/28

B/ !&**> U! D+; A+;, Y+- '-. :-& + &&.I&'&&. V-&#

I&'&&. V-& 8 U!

 V alue Enable

A> =&<A= =&<B* =&<

G =&<

N+ =&<

!&** D+; A+;, N&9. V-& + I&'&&. V-& "&.(XX_"TA TE) ;

& D*'/&#I&'&&. V-& 8 U..<=

+alue Enable

A- =&<H; =&<M-**+& =&<N. =&<

7/23/2019 Create_Descriptive_Flex_Field_DFF_In_Custom_Form.docx

http://slidepdf.com/reader/full/createdescriptiveflexfielddffincustomformdocx 22/28

"?/ + :-& (D&=) + I&'&&. V-& "&. (XX_"TA TE)

+alue Enable

N&; D&= =&<

STEP 3 C&.& C-*.+? F+? ;== ; C+. DFF

D+;+ T&?'.& +? +? JAU_TO!K +?*KU" C&.& +;, C:*

C&.& D.+< *& + C-*.+? T& XX_XX_DFF

C=>& !+'&.&* Visible to NO + ATTRIBUTE1, ATTRIBUTE2,

ATTRIBUTE3, ATTRIBUTE4, ATTRIBUTE5,ATTRIBUTE6, ATTRIBUTE

7/23/2019 Create_Descriptive_Flex_Field_DFF_In_Custom_Form.docx

http://slidepdf.com/reader/full/createdescriptiveflexfielddffincustomformdocx 23/28

!+'&.&* + ATTRIBUTE_CA TEGORY1, ATTRIBUTE_CATEGORY2

"-** I+?.+ 8 TEXT_ITEM_DE"C_FLEXLOV 8 ENABLE_LI"T_LA M!V.& +? L*. 8 NO

D.*& I.&? 8 NO

Program Unit (Package Spec)

!ACAGE XX_DFF_!G I"

!ROCEDURE XX_DFF_!ROC (EVENT VARCHAR2)% END%

Package Body

!ACAGE BODY XX_DFF_!G I"

!ROCEDURE XX_DFF_!ROC (EVENT VARCHAR2)  I"

BEGINIF EVENT $HENNEFORMIN"TANCE$ THEN

FOR 1*. DFF HICH CONTAIN

GYM OR !ARLOUR (D&'&* + G&&)

OCCU!ATION COUNTRY

FND_DE"CR_FLEX#DEFINE( BLOC

$XX_XX_DFF$,FIELD $ATTRIBUTE_CA TEGORY1$, A!!L_"HORT_NAME $FND$,

DE"C_FLEX_NAME $XX_DFF_GENDER$ )%

FOR 2 DFF HICH CONTAIN

ADDRE""

CITY

"TATE (D&'&* + C+-./ +? 1*. DFF)

FND_DE"CR_FLEX#DEFINE( BLOC

$XX_XX_DFF$,FIELD $ATTRIBUTE_CATEGORY2$, A!!L_"HORT_NAME $FND$,DE"C_FLEX_NAME $XX_DFF_COUNTRY$ )% 

END IF%

END % 

END%

7/23/2019 Create_Descriptive_Flex_Field_DFF_In_Custom_Form.docx

http://slidepdf.com/reader/full/createdescriptiveflexfielddffincustomformdocx 24/28

Change in Triggers

1# When-New-Form-Instance :

XX_DFF_!G#XX_DFF_!ROC($HENNEFORMIN"TA NCE$)%

2.When-New-Item-Instance:FND_FLEX#EVENT($HENNEITEMIN"TA NCE$)%

STEP 4 1egister this Form with 0pps

#. F3 the form to 8FD43O/forms/(+ )&9ve registered m DFF with FD*$. 3elnet to 8FD43O/forms/(+ run

f;gen <<4<<4DFF.fmb apps/password=db4name6. 1egister Form (sing A. De)eloer Alication Form

7. 1egister Form with Function(sing A. De)eloer Alication Function

7/23/2019 Create_Descriptive_Flex_Field_DFF_In_Custom_Form.docx

http://slidepdf.com/reader/full/createdescriptiveflexfielddffincustomformdocx 25/28

7/23/2019 Create_Descriptive_Flex_Field_DFF_In_Custom_Form.docx

http://slidepdf.com/reader/full/createdescriptiveflexfielddffincustomformdocx 26/28

>. 0dd this Function into a %enu.

DFF is %ea!$ Now

2ogin to that 1esponsibilit which ontain this %enu

7/23/2019 Create_Descriptive_Flex_Field_DFF_In_Custom_Form.docx

http://slidepdf.com/reader/full/createdescriptiveflexfielddffincustomformdocx 27/28

,ou can ?uer this 1ecord in 3able @

7/23/2019 Create_Descriptive_Flex_Field_DFF_In_Custom_Form.docx

http://slidepdf.com/reader/full/createdescriptiveflexfielddffincustomformdocx 28/28