I dont know HOW EBS Oracle is validating this information, i dont know what function or procedure is throwing this error message:
'ONTOE_PC_CREATE_VIOLATIONHeader orderReason Please, contact the Credit Deparment'
The problem here is that the customer account was shut down after they set an order for him (entered order).
The package involved is this one: OE_PC_CONSTRAINTS_ADMIN_PUB that contains this procedure:
PROCEDURE Set_Message
( p_operation IN VARCHAR2
, p_group_number IN VARCHAR2
, p_attribute_name IN VARCHAR2
, p_object_name IN VARCHAR2
)
IS
l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
BEGIN
IF p_operation = OE_PC_GLOBALS.UPDATE_OP THEN
IF p_attribute_name IS NOT NULL THEN
IF nvl(p_group_number,-1) = -1 THEN
FND_MESSAGE.SET_NAME('ONT','OE_PC_UPDATE_FIELD_NO_CONDN');
ELSE
FND_MESSAGE.SET_NAME('ONT','OE_PC_UPDATE_FIELD_VIOLATION');
END IF;
FND_MESSAGE.SET_TOKEN('ATTRIBUTE',p_attribute_name);
ELSE
IF nvl(p_group_number,-1) = -1 THEN
FND_MESSAGE.SET_NAME('ONT','OE_PC_UPDATE_NO_CONDN');
ELSE
FND_MESSAGE.SET_NAME('ONT','OE_PC_UPDATE_VIOLATION');
END IF;
FND_MESSAGE.SET_TOKEN('OBJECT',p_object_name);
END IF;
ELSIF p_operation = OE_PC_GLOBALS.CREATE_OP THEN
IF nvl(p_group_number,-1) = -1 THEN
FND_MESSAGE.SET_NAME('ONT','OE_PC_CREATE_NO_CONDN');
ELSE
FND_MESSAGE.SET_NAME('ONT','OE_PC_CREATE_VIOLATION');
END IF;
FND_MESSAGE.SET_TOKEN('OBJECT',p_object_name);
ELSIF p_operation = OE_PC_GLOBALS.DELETE_OP THEN
IF nvl(p_group_number,-1) = -1 THEN
FND_MESSAGE.SET_NAME('ONT','OE_PC_DELETE_NO_CONDN');
ELSE
FND_MESSAGE.SET_NAME('ONT','OE_PC_DELETE_VIOLATION');
END IF;
FND_MESSAGE.SET_TOKEN('OBJECT',p_object_name);
ELSIF p_operation = OE_PC_GLOBALS.CANCEL_OP THEN
IF nvl(p_group_number,-1) = -1 THEN
FND_MESSAGE.SET_NAME('ONT','OE_PC_CANCEL_NO_CONDN');
ELSE
FND_MESSAGE.SET_NAME('ONT','OE_PC_CANCEL_VIOLATION');
END IF;
FND_MESSAGE.SET_TOKEN('OBJECT',p_object_name);
ELSIF p_operation = OE_PC_GLOBALS.SPLIT_OP THEN
IF nvl(p_group_number,-1) = -1 THEN
FND_MESSAGE.SET_NAME('ONT','OE_PC_SPLIT_NO_CONDN');
ELSE
FND_MESSAGE.SET_NAME('ONT','OE_PC_SPLIT_VIOLATION');
END IF;
FND_MESSAGE.SET_TOKEN('OBJECT',p_object_name);
END IF;
END Set_Message;
Take a look at this image (i cannot upload images yet):
Could you please explain me HOW this function is called? at what stage? I mean, remember that the order was set and then they suspended the account number.
Also, i was not able to find the other part of the message: "Header orderReason Please, contact the Credit Deparment'". Why? Where is it stored? I think it is a concatenated message
This isn't a programming question, since it has to do with the functionality of the Oracle E-Business Suite. I hope I am not breaking some SO rule by answering.
Your error is coming from a "processing constraint". You can find these defined under the Order Management Super User responsibility, menu Setup->Rules->Security->Processing Constraints. You will find that message you are seeing there as well, as part of the constraint definition.
The constraints defined in that screen are compiled by Oracle EBS into PL/SQL packages named like 'OE_%PC%'. They are called from the Order Management Process Order API -- basically whenever a sales order or RMA is created, updated, deleted, or cancelled in the applications.