Monday, September 30, 2013

user defined exceptions in package oe_schedule_util procedure insert_into_mtl_sales_orders FND_FLEX_SERVER2.get_qualsegs() could not find any segment for the flexfield specified by application ID=401, code=MKTS and structure number=101

Issue:

user defined exceptions in package oe_schedule_util procedure insert_into_mtl_sales_orders

FND_FLEX_SERVER2.get_qualsegs() could not find any segment for the flexfield specified by application ID=401, code=MKTS and structure number=101

Solution:

Fnd_flex_server2.Get_qualsegs() Could Not Find Any Segments (Doc ID 797564.1)

Applies to:

Oracle Order Management - Version 12.0.4 and later
Information in this document applies to any platform.

Symptoms

-- Problem Statement:
On 12.0.4 in Production:
When attempting to enter the Sales Orders form, the following error occurs:

ERROR
"Program error. The data that defines the flex field on this field may be inconsistent.
Inform you system administrator that the routine FND_FLEX_SERVER2.get_qualsegs() could not find any
segments for the flex field specified by Application ID = 401, Code = MKTS and structure number = 101"

-- Steps To Reproduce:
The issue can be reproduced at will with the following steps:
Configuring OM module in R12. Configure all parameters, then:
1. Start the Sales Orders Form
2. Fill all fields
3. Press "Line Item" tab.
4. The message error is displayed.

Cause

The Flex Field for "MKTS" and title "Sales Order" was not setup.

Document 93466.1 has the information that is needed to set up the Inventory - Sales Order flex field.
Document 236108.1 Oracle Applications Flex fields Guide Release 11i.

Solution

From Document 93466.1:

Check the setup for the Sales Order flex field and make corrections wherever required.

1. Check if you have the segments of the Sales Order flex field set to the following:

segment 1 - sales order
segment 2 - order type
segment 3 - order source
If the above values do not tally, change the values, freeze and recompile
the flex field.
System Administrator Responsibility: Application --> Flexfield--> Key

2. Use the following script to check the above values at the database level:

Select Sales_Order_ID, segment1, segment2, segment3
From MTL_SALES_ORDERS
Where segment1 = 'order number'

The correct entry should return the following result:

Sales_Order_ID segment1 segment2 segment3
Sales_Order_ID number Order Number Standard ORDER ENTRY

Select the Sales_Order_ID that does not have the above result. Update the
MTL_TRANSACTIONS_INTERFACE table with the Transaction_Source_ID that has the
correct result using the following script:

Update MTL_TRANSACTIONS_INTERFACE
Set Transaction_Source_ID = correct sales order id number;

3. Check if dynamic insert has been enabled for Sales Order flex field. If you have not enabled
it, unfreeze the flex field, enable dynamic inserts, freeze and compile the flex field.

4. Check the segment separator for the flex field. It should be set to '.' (dot)

5. Check for the Value Set attached to the segments of the sales order flex field. Check if the
actual value passed is within the maximum value allowed for the Value Set.

6. Check that you have set the profile option "Validate on Server" for the Sales Order flex field
to "No."




1 comment: