Default Context Value by Transaction Type or Transaction Action in Descriptive Flexfields

Use descriptive flexfields in transaction history to provide additional details for inventory transactions like miscellaneous issues or receipts and interorganization transfers.

Descriptive flexfields are extensible sets of placeholder fields associated with business objects that you can place on application pages to capture additional information specific to your business. For transaction history, you can default the context values based on the specific transaction type or transaction action you perform. Defaulting the context values ensure that the correct context-sensitive segments display the appropriate context value without having to choose the value manually. You save time because you only have to enter descriptive flexfield values for a specific context, which reduces the time you spend selecting the right context for transactions.

To enable this feature, you must:

  • Obtain the values

  • Create context for the values

  • Add SQL commands

Obtain the Values

  1. From the Setup and Maintenance work area, go to the Manage Inventory Transaction Sources and Types task:

    • Offering: Manufacturing and Supply Chain Materials Management

    • Functional Area: Inventory Management

    • Task: Manage Inventory Transaction Sources and Types

  2. On the Manage Inventory Transaction Source and Types page, search for a transaction type in which you want to default the context by entering these values.

    Field

    Value

    Transaction Source

    Inventory

    Defined By

    System

  3. Select the transaction type from the search results and click the Edit icon.

  4. Copy the transaction type name from the Edit Transaction Type dialog.

  5. When the context is to be defaulted based on transaction action, copy the transaction action name from the Edit Transaction Type dialog box.

Create Context for the Values

  1. From the Setup and Maintenance work area, go to the Manage Inventory Descriptive Flexfields task:

    • Offering: Manufacturing and Supply Chain Materials Management
    • Functional Area: Inventory Management
    • Task: Manage Inventory Descriptive Flexfields
  2. On the Manage Inventory Descriptive Flexfields page, search for a flexfield code, choose a row from the search results, and click Actions > Edit.

  3. On the Edit Description Flexfield: Flexfield Code page, click Manage Contexts.

  4. On the Manage Contexts page, click Actions > Create.

  5. Paste the values obtained for the transaction type or transaction action from the previous task (Manage Inventory Transactions Sources and Types task) in the Display Name and Context Code fields.

  6. Click Save.

  7. In the Context Sensitive Segments section, click Actions > Create.

  8. Supply values for the required fields and click Save and Close.

  9. Click Save and Close to exit the Edit Description Flexfield: Flexfield Code page.

Add SQL Commands

  1. From the Setup and Maintenance work area, go to the Manage Inventory Descriptive Flexfields task:

    • Offering: Manufacturing and Supply Chain Materials Management
    • Functional Area: Inventory Management
    • Task: Manage Inventory Descriptive Flexfields
  2. On the Manage Inventory Descriptive Flexfields page, search for a flexfield code, choose a row from the search results, and click Actions > Edit.

  3. Scroll to the Context Sensitive Segments section.

  4. Select the context (such as Miscellaneous Receipt) from the Context drop-down list.

  5. Select the line sequence and click the Edit icon.

  6. On the Edit Segment page, select SQL from the drop-down list in the Default Type field.

  7. Enter the SQL in the Default Value field.

    • To default the context based on transaction type, enter this SQL command:

      select TRANSACTION_TYPE_NAME from inv_transaction_types_vl where 
      transaction_type_id=:{PARAMETER.TransactionTypeId} and transaction_type_name in
      (select descriptive_flex_context_code from fnd_descr_flex_contexts where 
      descriptive_flexfield_name='INV_MATERIAL_TXNS' and enabled_flag='Y')
    • To default the context based on transaction action, enter this SQL command:

      select MEANING from fnd_lookups where lookup_code =:{PARAMETER.TransactionActionId} and 
      lookup_type='INV_TRANSACTION_ACTION' and meaning in(select descriptive_flex_context_code from 
      fnd_descr_flex_contexts where descriptive_flexfield_name='INV_MATERIAL_TXNS')
  8. Click Save and Close.

  9. Click Deploy Flexfield and wait for the deployment to complete to 100%.