A flexfield is a field made up of sub–fields, or segments. There are two types of flexfields: key flexfields and descriptive flexfields. A key flexfield appears on your form as a normal text field with an appropriate prompt. A descriptive flexfield appears on your form as a two–character–wide text field with square brackets [ ] as its prompt. When opened, both types of flexfield appear as a pop–up window that contains a separate field and prompt for each segment. Each segment has a name and a set of valid values. The values may also have value descriptions.
KFF, DFF, Structure, Segemnt, Value, Value Set, Value Description, Aliases, Rules, Groups, Security.

Key Flexfields
Most organizations use ”codes” made up of meaningful segments (intelligent keys) to identify general ledger accounts, part numbers, and other business entities. Each segment of the code can represent a characteristic of the entity. For example, your organization might use the part number PAD–NR–YEL–8 1/2×14” to represent a notepad that is narrow–ruled, yellow, and 8 1/2” by 14”. Another organization may identify the same notepad with the part number ”PD–8×14–Y–NR”.
Both of these part numbers are codes whose segments describe a characteristic of the part. Although these codes represent the same part, they each have a different segment structure that is meaningful only to the organization using those codes.
The Oracle Applications store these ”codes” in key flexfields. Key flexfields are flexible enough to let any organization use the code scheme they want, without programming. When your organization initially installs Oracle Applications, you and
your organization’s implementation team customize the key flexfields to incorporate code segments that are meaningful to your business. You decide what each segment means, what values each segment can have, and what the segment values mean. Your organization can define rules to specify which segment values can be combined to make a valid complete code (also called a combination). You can also define relationships among the segments. The result is that you and your
organization can use the codes you want rather than changing your codes to meet Oracle Applications’ requirements.
For example, consider the codes your organization uses to identify general ledger accounts. Oracle Applications represent these codes using a particular key flexfield called the Accounting Flexfield. One organization might choose to customize the Accounting Flexfield to include five segments: company, division, department, account, and project. Another organization, however, might structure their general ledger account segments differently, perhaps using twelve segments instead of five. The Accounting Flexfield lets your Oracle General Ledger application accommodate the needs of different organizations
by allowing them to customize that key flexfield to their particular business usage.
Descriptive Flexfields
Descriptive flexfields provide customizable ”expansion space” on your forms. You can use descriptive flexfields to track additional information, important and unique to your business, that would not otherwise be captured by the form. Descriptive flexfields can be context sensitive, where the information your application stores depends on other values your users enter in other parts of the form. A descriptive flexfield appears on a form as a single–character, unnamed field enclosed in brackets. Just like in a key flexfield, a pop–up window appears when you move your cursor into a
customized descriptive flexfield. And like a key flexfield, the pop–up window has as many fields as your organization needs.
Each field or segment in a descriptive flexfield has a prompt, just like ordinary fields, and can have a set of valid values. Your organization can define dependencies among the segments or customize a descriptive flexfield to display context–sensitive segments, so that different segments or additional pop–up windows appear depending on the values you enter in other fields or segments.

  1. KFF & DFF
  2. Structure, Segment & Qualifier
  3. Value (Parent, Group, Hirearchy & Qualifier) , Value Description & Value Set
  4. Security Rule, Cross-Validation & Alias
  5. Accounting Flexfield (Chart of Account & Account Generator processes)
Select pha.segment1 “PO_NUMBER”,pla.line_num,plla.shipment_num,
pv.segment1 “Oracle_Supplier_number”, msib.segment1 “item_number”,pla.item_revision, pla.item_description,
NULL as “Delivery_date”, NULL as “Blank Column”, pla.unit_price, pha.rate,plla.Quantity_received,plla.Quantity_rejected,
(pla.unit_price*pla.Quantity) as “Line_Amount”, NULL as “ITEM_COST”, NULL as “Amount”, pla.VENDOR_PRODUCT_NUM
from apps. PO_HEADERS_ALL pha,
apps. PO_VENDORS pv,
apps. PO_VENDOR_SITES_ALL pvsa,
apps. PO_LINES_ALL pla,
apps. MTL_SYSTEM_ITEMS_B msib,
apps. PO_LINE_LOCATIONS_ALL plla
where pha.org_id=’xxxx’
AND pha.org_id=pvsa.org_id
AND pv.vendor_id=pha.vendor_id
AND pvsa.vendor_id=pv.vendor_id
AND pha.po_header_id=pla.po_header_id(+)
–AND pha.po_header_id=plla.po_header_id
AND plla.po_line_id(+)=pla.po_line_id
–AND msib.organization_id=’xxxx’
AND pla.item_id=msib.inventory_item_id(+)
Order by pha.segment1
Select a.organization_id, a.organization_code, a.organization_name,
a.operating_unit, b.name OU, a.set_of_books_id,d.name LEDGER,
a.legal_entity,c.name LE_NAME
From  apps. ORG_ORGANIZATION_DEFINITIONS a,
apps. HR_OPERATING_UNITS b,
apps. xle_entity_profiles c,
apps. gl_ledgers d
Where a.operating_unit=b.organization_id
AND c.legal_entity_id=a.legal_entity
AND d.ledger_id=a.set_of_books_id
Select DISTINCT(aps.invoice_id), ai.SOURCE, ai.invoice_num, aps.due_date, aps.gross_amount, aps.hold_flag, aps.payment_method_lookup_code, aps.payment_status_flag, aps.org_id, aps.inv_curr_gross_amount,
ai.invoice_type_lookup_code invoice_type, ai.invoice_date, po.vendor_name, pos.vendor_site_code_alt legacy_system_site_number, ai.invoice_amount,
ai.invoice_currency_code, ai.exchange_rate, ai.payment_method_lookup_code, ai.pay_group_lookup_code, ai.terms_id, ai.doc_sequence_value, ai.doc_category_code,
ai.validated_tax_amount,ai.payment_currency_code,ai.pay_curr_invoice_amount,ai.invoice_currency_code,ai.invoice_amount, apt.NAME payment_terms_name
from apps. AP_PAYMENT_SCHEDULES_ALL aps,
apps.ap_invoices_all ai,
apps.po_vendors po,
apps.po_vendor_sites_all pos,
apps. AP_TERMS_TL apt
where aps.invoice_id = ai.invoice_id
AND apt.term_id = ai.terms_id
AND po.vendor_id = ai.vendor_id
AND pos.vendor_site_id = ai.vendor_site_id
AND ai.org_id = ‘xxx’ — org id
AND apt.enabled_flag=’Y’
AND apt.language=’US’