Validating a Number field in BC4J
I want to make sure users get a custom error message such as "Not a number" when they try to enter a value other than a number into a Number field/attribute.
By default, "JBO-25009:Can't create an object of type:oracle.jbo.domain.Number with value:xxx" exception is thrown.
Trying to trap this exception in the setAttribute(Number x) method in EO doesn't work because the exception thrown before that method is called.
I tried creating a custom validator, but it is not a solution for the same reason above.
I finally created a 'NumberDomain' in which I check if the entry is a number and throw a JboException if it is not. The Domain's AttributeValue type is set to String although the EO attribute is set to a Number. I guess conversion is done internally. This seems to work.
Is this an efficient solution? Is there a better built-in solution that I can implement right away without creating Domains?
Has anyone tried creating a Domain by extending oracle.jbo.domain.Number to accomplish this?
Thanks a lot,
Matt
Hi Arik,
Thanks for your suggestions.
you did mean the script running in the client, Yes.
Use JavaScript validation to make sure the data really is a number.I was looking for a way to make EditCurrentRecord DataWebBean to include Javascript methods such as onChange(), onClick() inside the INPUT tags it automatically creates for the attributes. It seems that the solution is to create a custom Field Renderer by extending HTMLFieldRendererImpl and overwriting its populateForm method with a call to aForm.addInputField(..).
Similar Messages
-
How to create a validation on number field.
Hello Experts,
My database table has a numeric column EMP_ID. I want to create a validation so that a user can only enter numeric value in this field on the Apex page.
I have tried to create validation Item/Column specified is numeric for item P2_EMP_ID.
But when I submit the page, I still get the error ORA-01722: invalid number.
How can I create a validation so that the ORA error is hidden from the end user and instead a custom message is displayed.
Thanks,
RahulRah,
Are you on 4.0? This functionality already exists inside of apex. In fact, thats the only difference between the number field and the textfield. Once you create a "Number Field" it automatically creates a numerical validation (but you have no access to it). Likewise for setting the "Require Value" setting on a textfield; the creation of a NOT NULL validation that you can not directly manipulate.
If you are not on 3.2 maybe you can use javascript to restrict the user from entering anything but numerical inputs.
Alternatively, (not sure of 3.2 support) you can install the MASKED INPUT PLUGIN, and make the mask "?9999999999999" (everything after ? is optional and 9 means only numerical) -
hallo,
i want to know whether is there any method to validate a
field that is declared as datatype number(6) if a character is inserted into that field.
i want to know other than javascripting.
also,how can i implement this validation in a table
that contains many fields of number type.When I said, if you attempt to insert a character into a number column you'll get ORa-1722 I meant using SQL i.e. running an INSERT INTO ... statement in SQL*Plus.
6512 and 6502 error numbers.Those errors represent unhandled exceptions in PL/SQL. ORA-6512 is unhandled exception, ORA-6502 is the numeric data error.
in table,if in second row a character is entered,the readings of first row is inserted and then a error message is promptedwell that sounds screwy, but definitely a front-end problem.
we are using portal as front endThen I suggest you hie yerself over to the Portal forums. There are a number of them on the Forums Home » Oracle Technology Network (OTN) » Products » Application Server page. You'll probably what the PDK forum.
Cheers, APC -
Number field validation for all application pages
Hi
I am using apex version 4.0.
I need to create number field validation for all application pages. if user press any character then display alert message. How it possible?
Thanks>
Hi Shiv,
I am using apex version 4.0.
I need to create number field validation for all application pages. if
user press any character then display alert message. How it possible?This is an Apex question - point your browser here
Oracle Application Express (APEX)
HTH,
Paul... -
Process_order api - Validation Failed for Field Bill To
I am relatively new to the EBS world and I'm having some issues with calling the OE_Order_Pub.Process_order API. When I call this API I am getting a return error of "Validation failed for field - Bill To".
For a background...I have an APEX application where users can choose parts from a small part master list to add to an existing order. The existing order will not have a status of Closed or Cancelled and there will be atleast 1 line in the order before the new parts are added. The parts will be added as new lines to the order with some of the new line data defaulting to the same information as the first line. I am using EBS version 12.1.3 with a multi-org setup. It seems that the orders under one org (id=3) are working fine, but another org(id=569) they never work and keep getting the error. I am setting the context to the org of the order and initializing the apps user information with the responsibility "Order Management Super User".
Do you have any idea what could be wrong or how I can debug the error to get a little more detail?
Here is the procedure I have.
PROCEDURE TEK_ORD_PROCESS_ORDER(p_order_id IN NUMBER, p_return_code OUT NOCOPY VARCHAR2, p_status OUT NOCOPY VARCHAR2) IS
CURSOR c_order_parts IS
SELECT *
FROM TEK_APEX.TEK_ORD_ORDER_PARTS
WHERE ORDER_ID = p_order_id;
TYPE t_parts IS TABLE OF TEK_APEX.TEK_ORD_ORDER_PARTS%ROWTYPE;
v_order_parts t_parts;
--Setup variables
H_Op_Code VARCHAR2(25) DEFAULT OE_GLOBALS.G_OPR_UPDATE;
L_Op_Code VARCHAR2(25) DEFAULT OE_GLOBALS.G_OPR_CREATE;
v_install_type VARCHAR2(25) := 'PTO';
v_source_id NUMBER;
v_user_id NUMBER;
v_resp_id NUMBER;
v_app_id NUMBER;
v_debug VARCHAR2(32767);
v_oracle_order OE_ORDER_HEADERS_ALL%ROWTYPE;
v_apex_order TEK_APEX.TEK_ORD_SALES_ORDERS%ROWTYPE;
p_header_rec OE_Order_Pub.Header_Rec_Type;
p_header_val_rec OE_Order_Pub.Header_Val_Rec_Type;
p_Header_Adj_tab OE_Order_Pub.Header_Adj_Tbl_Type;
p_Header_Adj_val_tab OE_Order_Pub.Header_Adj_Val_Tbl_Type;
p_Header_price_Att_tab OE_Order_Pub.Header_Price_Att_Tbl_Type;
p_Header_Adj_Att_tab OE_Order_Pub.Header_Adj_Att_Tbl_Type;
p_Header_Adj_Assoc_tab OE_Order_Pub.Header_Adj_Assoc_Tbl_Type;
p_Header_Scredit_tab OE_Order_Pub.Header_Scredit_Tbl_Type;
p_Header_Scredit_val_tab OE_Order_Pub.Header_Scredit_Val_Tbl_Type;
p_line_tab OE_Order_Pub.Line_Tbl_Type;
p_line_val_tab OE_Order_Pub.Line_Val_Tbl_Type;
p_Line_Adj_tab OE_Order_Pub.Line_Adj_Tbl_Type;
p_Line_Adj_val_tab OE_Order_Pub.Line_Adj_Val_Tbl_Type;
p_Line_price_Att_tab OE_Order_Pub.Line_Price_Att_Tbl_Type;
p_Line_Adj_Att_tab OE_Order_Pub.Line_Adj_Att_Tbl_Type;
p_Line_Adj_Assoc_tab OE_Order_Pub.Line_Adj_Assoc_Tbl_Type;
p_Line_Scredit_tab OE_Order_Pub.Line_Scredit_Tbl_Type;
p_Line_Scredit_val_tab OE_Order_Pub.Line_Scredit_Val_Tbl_Type;
p_Lot_Serial_tab OE_Order_Pub.Lot_Serial_Tbl_Type;
p_Lot_Serial_val_tab OE_Order_Pub.Lot_Serial_Val_Tbl_Type;
p_action_request_tab OE_Order_pub.Request_Tbl_Type;
l_header_rec OE_Order_Pub.Header_Rec_Type;
l_header_val_rec OE_Order_Pub.Header_Val_Rec_Type;
l_Header_Adj_tab OE_Order_Pub.Header_Adj_Tbl_Type;
l_Header_Adj_val_tab OE_Order_Pub.Header_Adj_Val_Tbl_Type;
l_Header_price_Att_tab OE_Order_Pub.Header_Price_Att_Tbl_Type;
l_Header_Adj_Att_tab OE_Order_Pub.Header_Adj_Att_Tbl_Type;
l_Header_Adj_Assoc_tab OE_Order_Pub.Header_Adj_Assoc_Tbl_Type;
l_Header_Scredit_tab OE_Order_Pub.Header_Scredit_Tbl_Type;
l_Header_Scredit_val_tab OE_Order_Pub.Header_Scredit_Val_Tbl_Type;
l_line_tab OE_Order_Pub.Line_Tbl_Type;
l_line_val_tab OE_Order_Pub.Line_Val_Tbl_Type;
l_Line_Adj_tab OE_Order_Pub.Line_Adj_Tbl_Type;
l_Line_Adj_val_tab OE_Order_Pub.Line_Adj_Val_Tbl_Type;
l_Line_price_Att_tab OE_Order_Pub.Line_Price_Att_Tbl_Type;
l_Line_Adj_Att_tab OE_Order_Pub.Line_Adj_Att_Tbl_Type;
l_Line_Adj_Assoc_tab OE_Order_Pub.Line_Adj_Assoc_Tbl_Type;
l_Line_Scredit_tab OE_Order_Pub.Line_Scredit_Tbl_Type;
l_Line_Scredit_val_tab OE_Order_Pub.Line_Scredit_Val_Tbl_Type;
l_Lot_Serial_tab OE_Order_Pub.Lot_Serial_Tbl_Type;
l_Lot_Serial_val_tab OE_Order_Pub.Lot_Serial_Val_Tbl_Type;
l_ret_status VARCHAR2(200);
l_msg_count NUMBER;
l_msg_data VARCHAR2(200);
--Email information
v_email_address varchar2(100);
v_msg_text varchar(1000);
v_subject_text varchar(1000);
--Default line information
v_item_id NUMBER;
v_contact_id NUMBER;
v_invoice_to_org_id oe_order_lines_all.INVOICE_TO_ORG_ID%TYPE;
v_ship_to_org_id oe_order_lines_all.SHIP_TO_ORG_ID%TYPE;
v_sold_to_org_id oe_order_lines_all.SOLD_TO_ORG_ID%TYPE;
v_flow_status_code oe_order_lines_all.FLOW_STATUS_CODE%TYPE;
FUNCTION GET_ORACLE_ORDER(p_order_number IN OE_ORDER_HEADERS_ALL.ORDER_NUMBER%TYPE)
RETURN OE_ORDER_HEADERS_ALL%ROWTYPE IS
v_order OE_ORDER_HEADERS_ALL%ROWTYPE;
BEGIN
SELECT *
INTO v_order
FROM APPS.OE_ORDER_HEADERS_ALL
WHERE ORDER_NUMBER = p_order_number;
RETURN v_order;
EXCEPTION
WHEN OTHERS THEN
RETURN NULL;
END GET_ORACLE_ORDER;
FUNCTION GET_APEX_ORDER(p_order_id IN TEK_APEX.TEK_ORD_SALES_ORDERS.ORDER_ID%TYPE)
RETURN TEK_APEX.TEK_ORD_SALES_ORDERS%ROWTYPE IS
v_order TEK_APEX.TEK_ORD_SALES_ORDERS%ROWTYPE;
BEGIN
SELECT *
INTO v_order
FROM TEK_APEX.TEK_ORD_SALES_ORDERS
WHERE ORDER_ID = p_order_id;
RETURN v_order;
EXCEPTION
WHEN OTHERS THEN
RETURN NULL;
END GET_APEX_ORDER;
FUNCTION GET_SOURCE_ID(p_source_name IN VARCHAR2)
RETURN OE_ORDER_SOURCES.ORDER_SOURCE_ID%TYPE IS
v_source_id OE_ORDER_SOURCES.ORDER_SOURCE_ID%TYPE;
BEGIN
SELECT ORDER_SOURCE_ID
INTO v_source_id
FROM APPS.OE_ORDER_SOURCES
WHERE NAME = p_source_name;
RETURN v_source_id;
EXCEPTION
WHEN OTHERS THEN
RETURN NULL;
END GET_SOURCE_ID;
FUNCTION GET_ITEM_ID(p_part_number IN VARCHAR2, p_org_id IN NUMBER)
RETURN MTL_SYSTEM_ITEMS.INVENTORY_ITEM_ID%TYPE IS
v_item_id MTL_SYSTEM_ITEMS.INVENTORY_ITEM_ID%TYPE;
BEGIN
SELECT INVENTORY_ITEM_ID
INTO v_item_id
FROM APPS.MTL_SYSTEM_ITEMS
WHERE SEGMENT1 = p_part_number
AND ORGANIZATION_ID = p_org_id;
RETURN v_item_id;
EXCEPTION
WHEN OTHERS THEN
RETURN NULL;
END GET_ITEM_ID;
BEGIN
apps.mo_global.set_policy_context('S',3);
apps.mo_global.init('XXTEK');
BEGIN
SELECT USER_ID
INTO v_user_id
FROM APPS.FND_USER
WHERE USER_NAME = 'SYSADMIN';
EXCEPTION
WHEN OTHERS THEN
RAISE_APPLICATION_ERROR(-20001, 'Error selecting user');
END;
BEGIN
SELECT RESPONSIBILITY_ID, APPLICATION_ID
INTO v_resp_id, v_app_id
FROM TEK_APEX.TEK_RR_ACTIVE_RESP_VW
WHERE UPPER(RESPONSIBILITY_NAME) = 'ORDER MANAGEMENT SUPER USER';
--Set current user information
fnd_global.apps_initialize (user_id => v_user_id
,resp_id => v_resp_id
,resp_appl_id => v_app_id);
EXCEPTION
WHEN OTHERS THEN
RAISE_APPLICATION_ERROR(-20001, 'Error selecting responsibility');
END;
--Get the order information from Oracle and APEX
v_apex_order := GET_APEX_ORDER(p_order_id);
IF v_apex_order.ORDER_ID IS NULL THEN
RAISE_APPLICATION_ERROR(-20001, 'APEX Order ID is invalid: ' || p_order_id);
END IF;
v_oracle_order := GET_ORACLE_ORDER(TO_NUMBER(v_apex_order.ORDER_NUMBER));
IF v_oracle_order.ORDER_NUMBER IS NULL THEN
RAISE_APPLICATION_ERROR(-20001, 'Order Number not found in Oracle: ' || v_apex_order.ORDER_NUMBER);
END IF;
apps.mo_global.set_policy_context('S', v_oracle_order.ORG_ID);
v_source_id := GET_SOURCE_ID('IMPORT');
IF v_source_id IS NULL THEN
RAISE_APPLICATION_ERROR(-20001, 'Source ID not found for IMPORT');
END IF;
/* ********** Gather Order Header********** */
/* ********** Info. ********** */
OE_Order_Pub.Get_Order(p_api_version_number => 1.0,
p_init_msg_list => FND_API.G_TRUE,
p_return_values => FND_API.G_TRUE,
x_return_status => l_ret_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data,
p_header_id => v_oracle_order.HEADER_ID,
p_header => NULL,
x_header_rec => l_header_rec,
x_header_val_rec => l_header_val_rec,
x_Header_Adj_tbl => l_Header_Adj_tab,
x_Header_Adj_val_tbl => l_Header_Adj_val_tab,
x_Header_price_Att_tbl => l_Header_price_Att_tab,
x_Header_Adj_Att_tbl => l_Header_Adj_Att_tab,
x_Header_Adj_Assoc_tbl => l_Header_Adj_Assoc_tab,
x_Header_Scredit_tbl => l_Header_Scredit_tab,
x_Header_Scredit_val_tbl=> l_Header_Scredit_val_tab,
x_line_tbl => l_line_tab,
x_line_val_tbl => l_line_val_tab,
x_Line_Adj_tbl => l_Line_Adj_tab,
x_Line_Adj_val_tbl => l_Line_Adj_val_tab,
x_Line_price_Att_tbl => l_Line_price_Att_tab,
x_Line_Adj_Att_tbl => l_Line_Adj_Att_tab,
x_Line_Adj_Assoc_tbl => l_Line_Adj_Assoc_tab,
x_Line_Scredit_tbl => l_Line_Scredit_tab,
x_Line_Scredit_val_tbl => l_Line_Scredit_val_tab,
x_Lot_Serial_tbl => l_Lot_Serial_tab,
x_Lot_Serial_val_tbl => l_Lot_Serial_val_tab);
--Save defaults from first line
IF l_line_tab.EXISTS(1) THEN
v_contact_id := l_line_tab(1).SHIP_TO_CONTACT_ID;
v_invoice_to_org_id := l_line_tab(1).INVOICE_TO_ORG_ID;
v_ship_to_org_id := l_line_tab(1).SHIP_TO_ORG_ID;
v_sold_to_org_id := l_line_tab(1).SOLD_TO_ORG_ID;
v_flow_status_code := l_line_tab(1).FLOW_STATUS_CODE;
END IF;
--Clear out the line array before adding any new parts
FOR i IN l_line_tab.FIRST..l_line_tab.LAST LOOP
l_line_tab.DELETE(i);
l_line_val_tab.DELETE(i);
l_line_adj_tab.DELETE(i);
l_line_adj_val_tab.DELETE(i);
l_line_price_att_tab.DELETE(i);
l_line_adj_att_tab.DELETE(i);
l_line_adj_assoc_tab.DELETE(i);
l_line_scredit_tab.DELETE(i);
l_line_scredit_val_tab.DELETE(i);
l_lot_serial_tab.DELETE(i);
l_lot_serial_val_tab.DELETE(i);
END LOOP;
/* ********** Gather Order Lines ********** */
OPEN c_order_parts;
FETCH c_order_parts BULK COLLECT INTO v_order_parts;
CLOSE c_order_parts;
FOR i IN v_order_parts.FIRST..v_order_parts.LAST LOOP
v_item_id := GET_ITEM_ID(v_order_parts(i).PART_NUMBER, v_oracle_order.SHIP_FROM_ORG_ID);
IF v_item_id IS NULL THEN
RAISE_APPLICATION_ERROR(-20001, 'Error selecting part number ' || v_order_parts(i).PART_NUMBER);
END IF;
--Clear line first
l_line_tab(i) := OE_Order_Pub.G_Miss_Line_Rec;
l_line_val_tab(i) := OE_ORDER_PUB.G_MISS_LINE_VAL_REC;
l_line_adj_tab(i) := OE_ORDER_PUB.G_MISS_LINE_ADJ_REC;
l_line_adj_val_tab(i) := OE_ORDER_PUB.G_MISS_LINE_ADJ_VAL_REC;
l_line_price_att_tab(i) := OE_ORDER_PUB.G_MISS_LINE_PRICE_ATT_REC ;
l_line_adj_att_tab(i) := OE_ORDER_PUB.G_MISS_LINE_ADJ_ATT_REC;
l_line_adj_assoc_tab(i) := OE_ORDER_PUB.G_MISS_LINE_ADJ_ASSOC_REC;
l_line_scredit_tab(i) := OE_ORDER_PUB.G_MISS_LINE_SCREDIT_REC;
l_line_scredit_val_tab(i) := OE_ORDER_PUB.G_MISS_LINE_SCREDIT_VAL_REC;
l_lot_serial_tab(i) := OE_ORDER_PUB.G_MISS_LOT_SERIAL_REC;
l_lot_serial_val_tab(i) := OE_ORDER_PUB.G_MISS_LOT_SERIAL_VAL_REC;
--Set line information
l_line_tab(i).PRICE_LIST_ID := v_oracle_order.PRICE_LIST_ID;
l_line_tab(i).header_id := v_oracle_order.header_id;
l_line_tab(i).inventory_item_id := v_item_id;
l_line_tab(i).ordered_quantity := v_order_parts(i).QUANTITY;
l_line_tab(i).operation := l_op_code;
l_line_tab(i).unit_list_price := 0;
l_line_tab(i).ship_from_org_id := v_oracle_order.ship_from_org_id;
l_line_tab(i).program_id := fnd_global.conc_program_id ;
l_line_tab(i).program_application_id := fnd_global.PROG_APPL_ID;
l_line_tab(i).order_source_id := v_source_id;
l_line_tab(i).calculate_price_flag := 'N' ;
l_line_tab(i).unit_selling_price := 0.00 ;
l_line_tab(i).request_date := v_apex_order.onsite_date;
l_line_tab(i).Schedule_ship_date := v_apex_order.onsite_date;
l_line_tab(i).promise_date := null;
l_line_tab(i).invoice_to_org_id := v_invoice_to_org_id;
l_line_tab(i).ship_to_org_id := v_ship_to_org_id;
l_line_tab(i).sold_to_org_id := v_sold_to_org_id;
l_line_tab(i).ship_to_contact_id := v_contact_id;
END LOOP;
--OE_DEBUG_PUB.DEBUG_ON;
--OE_DEBUG_PUB.Initialize;
--OE_DEBUG_PUB.SetDebugLevel(5);
--Add lines to order
OE_Order_Pub.Process_order(p_api_version_number => 1.0,
p_init_msg_list => FND_API.G_TRUE,
p_return_values => FND_API.G_TRUE,
p_action_commit => FND_API.G_FALSE,
x_return_status => l_ret_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data,
p_header_rec => l_header_rec,
p_old_header_rec => l_header_rec,
p_header_val_rec => l_header_val_rec,
p_old_header_val_rec => l_header_val_rec,
p_Header_Adj_tbl => l_Header_Adj_tab,
p_old_Header_Adj_tbl => l_Header_Adj_tab,
p_Header_Adj_val_tbl => l_Header_Adj_val_tab,
p_old_Header_Adj_val_tbl => l_Header_Adj_val_tab,
p_Header_price_Att_tbl => l_Header_price_Att_tab,
p_old_Header_Price_Att_tbl => l_Header_price_Att_tab,
p_Header_Adj_Att_tbl => l_Header_Adj_Att_tab,
p_old_Header_Adj_Att_tbl => l_Header_Adj_Att_tab,
p_Header_Adj_Assoc_tbl => l_Header_Adj_Assoc_tab,
p_old_Header_Adj_Assoc_tbl => l_Header_Adj_Assoc_tab,
p_Header_Scredit_tbl => l_Header_Scredit_tab,
p_old_Header_Scredit_tbl => l_Header_Scredit_tab,
p_Header_Scredit_val_tbl => l_Header_Scredit_val_tab,
p_old_Header_Scredit_val_tbl => l_Header_Scredit_val_tab,
p_line_tbl => l_line_tab,
p_line_val_tbl => l_line_val_tab,
p_Line_Adj_tbl => l_line_adj_tab,
p_Line_Adj_val_tbl => l_line_adj_val_tab,
p_Line_price_Att_tbl => l_line_price_att_tab,
p_Line_Adj_Att_tbl => l_line_adj_att_tab,
p_Line_Adj_Assoc_tbl => l_line_adj_assoc_tab,
p_Line_Scredit_tbl => l_line_scredit_tab,
p_Line_Scredit_val_tbl => l_line_scredit_val_tab,
p_Lot_Serial_tbl => l_lot_serial_tab,
p_Lot_Serial_val_tbl => l_lot_serial_val_tab,
p_action_request_tbl => OE_ORDER_PUB.G_MISS_REQUEST_TBL,
x_header_rec => p_header_rec,
x_header_val_rec => p_header_val_rec,
x_Header_Adj_tbl => p_Header_Adj_tab,
x_Header_Adj_val_tbl => p_Header_Adj_val_tab,
x_Header_price_Att_tbl => p_Header_price_Att_tab,
x_Header_Adj_Att_tbl => p_Header_Adj_Att_tab,
x_Header_Adj_Assoc_tbl => p_Header_Adj_Assoc_tab,
x_Header_Scredit_tbl => p_Header_Scredit_tab,
x_Header_Scredit_val_tbl => p_Header_Scredit_val_tab,
x_line_tbl => p_line_tab,
x_line_val_tbl => p_line_val_tab,
x_line_adj_tbl => p_line_adj_tab,
x_line_adj_val_tbl => p_line_adj_val_tab,
x_line_price_att_tbl => p_line_price_att_tab,
x_line_adj_att_tbl => p_line_adj_att_tab,
x_line_adj_assoc_tbl => p_line_adj_assoc_tab,
x_line_scredit_tbl => p_line_scredit_tab,
x_line_scredit_val_tbl => p_line_scredit_val_tab,
x_lot_serial_tbl => p_lot_serial_tab,
x_lot_serial_val_tbl => p_lot_serial_val_tab,
x_action_request_tbl => p_action_request_tab);
-- OE_DEBUG_PUB.DEBUG_OFF;
p_return_code := l_ret_status;
IF l_ret_status != 'S' THEN
DBMS_OUTPUT.PUT_LINE(l_msg_data);
IF l_msg_count = 1 THEN
p_status := OE_Msg_Pub.Get(1,'F');
ELSE
FOR i IN 1..l_msg_count LOOP
p_status := OE_Msg_Pub.Get(i,'F') || '<br />';
END LOOP;
END IF;
p_status := 'Error loading lines<br>' || p_status;
ELSE
p_status := 'Order Processed Successfully<br>' || v_order_parts.COUNT || ' Line(s) Loaded';
END IF;
-- WHILE OE_DEBUG_PUB.G_DEBUG_INDEX < OE_DEBUG_PUB.CountDebug LOOP
-- OE_DEBUG_PUB.GetNext(v_debug);
-- DBMS_OUTPUT.PUT_LINE(v_debug);
-- END LOOP;
EXCEPTION
WHEN OTHERS THEN
ROLLBACK;
RAISE;
END TEK_ORD_PROCESS_ORDER;Thanks!
Jonathan HartHello,
Try the following
1) Check if any processing constraints are applied to customer/location
2) Try to create a new customer and associate internal location.
Create a new order to reproduce the issue
Thanks
-Arif -
Requirement:
How can I prevent guest users from entering '+' sign or '0' in front of country-code in the visitor phone number field during self registration?
Few SMS service providers are not looking for '+' sign or '0' or '00' in front of the international phone numbers to trigger the sms. Providing these values in front of country code during self-registration may fail to deliver the sms to recipient.
Solution:
Using a simple regular expression, you can validate the entered phone number during the guest registration.
The below regular expression will help you to validate the phone number and allows to register only when the phone number is not staring with '+' or '0'.
^[1-9][0-9](\d{7}|\d{8}|\d{9}|\d{10}|\d{11}|\d{12})$
It also performs the below validations.
only numbers are allowed.
first digit of the entered phone number should be 1 to 9, so '+' or '0' is not allowed.
numbers from 0 to 9 are allowed from the second digit.
also validates phone number length, the length of the phone number should be 9 to 14.
Configuration:
To add the above regex in the visitor_phone number filed, please navigate to ClearPass Guest >> Configuration >> (Pages)Guest Self-Registration >> select the self-registration page and go to Edit >> Register Page >> Form >> select the filed visitor_phone and set the Validator to " ISRegexMatch" and enter the above regex in the Validator Argument filed as shown below.
Note: Edit the Validation Error as per your requirement.
Verification
Adding the given regex will validate the phone number and prevent the guest user from registering the phone number starts with '+' or '0'.
Please find below the sample outputs for your reference.
Result when phone number starts with '+' or '0'.
Successful registration.Is this a Mac Preview issue?
-
Can I set a number field in Acrobat that will allow me to start with Zero?
For example 012594 when I type this in as a number the zero disappears, is there anyway I can script it to allow the use of a Zero? I know I can do this by making it a text field but to limit people making mistakes of accidentally typing a letter in I was trying to make it number only for example a Mobile number or Account number where there are to be no letters.
The following will allow you to only input numbers and spaces. Set up a Custom Keystroke script which calls this function. And make your field a text field, not a number field.
function validateNumericEntry() {
var re = /[\d\s]/;
if (event.change.length >0) {
if (event.willCommit == false) {
if (re.test(event.change)) {
} else {
event.rc = false
If you want a warning if the field is incomplete, you will need to specify a pattern with regular expressions in a custom validation script. -
Vendors PAN Number field Mandatory in Vendor Master Data
HI,
I am working in 4.7 EE version. I want to make Vendors Pan Number field mandatory while creating Vendor Master Data. As per my knowledge we cannot use Validation for this purpose.
Regards
SudhakarHi Parag,
In ECC 6.0 you get a tab CIN details in vendor master itself wherein you can maintain PAN no. sales tax no. etc of the Vendor.
you dont need to use any field for PAN no... If this is followed then wht you are saying is correct. But the problem is that we want to make PAN no. in CIN details tab mandatory and that is not possible.
Regards,
SAPFICO -
Dear Expet's,
i have created validation for Reference field(f-43) for one company and activated it, but its not checking it.
Prerequisite:
BKPF-BUKRS = '6560' AND BKPF-BLART = 'KR'
Check:
BKPF-XBLNR = ''
Message:
Please check reference field!
can someone help in this!You can use the standard validation instead of the code you are programming. You activate it where you define the class type. The path under the IMG is: Financial Accounting (New) >> Financial Accounting Global Settings (New) >> Document Document Types >> Define Document Types for Entry View. Then, find the document type, double click on it and check the box Reference number. Save.
Assign points if the information was useful. -
I'm working on integrating MTM Test Runs (Via TFS/MTM API) with our automated build & test system, and I've noticed that if I supply a valid build number when creating a test run, and I later delete the build, the test run data disappears with it.
I know that I can deselect 'Test Results' in the Delete Build dialog, and in the Retention Policy for the Build Definition, but in the interest of avoiding any confusion or mistakes (we have a lot of build definitions to maintain), I wonder if it would be
possible to instruct the test run to prevent a deliberate link.
While we're on the subject, if anyone could explain the benefits or potential uses this link might provide (even under conditions that may not meet our usage) I would be very grateful.We don't use MTM to run tests, we have another system that works better with our test environments. We will be using MTM to track pass/fail data for the tests that have run, by creating test case workitems for them and using test run and test result objects
to store the data.
Going back to my question, I'm looking for a way to prevent a test run object from linking to a TFS Build so I can prevent TFS from removing the test run when I delete it. We have a lot of builds and we frequently remove old ones, I need a way to retain
historical data for test runs.
I understand that under normal circumstances, the build number would first be used to retrieve the bits from the build to test with, but since we're not using that system, I'd like to know more about how it might be used in other ways - for example, for
querying or associating work items. We're considering not using this field, or modifying it in such a way that it doesn't create the relationship with a build that I mentioned, and I would like to know what functionality we would lose by doing this. -
Creating a Simple Number Field
I want to basically create a JTextField only instead of text, numbers including decimals. I tried putting number into a text field but java won't see them as double. I tried the tutorial example with a formatted text field, however, they explain abstract and listeners for validating which I could care less about. I also tried the following code from the tutorial which doesn't work.
JFormattedTextField ftf = new JFormattedTextField();
ftf.setValue(new Number(100));
The compiler says Number cannot be instantiated as it is abstract. How can the tutorial do it? I have had the same problem with other examples in the tutorial such as the Border examples for creating compound borders. The examples don't work because the compiler says Border is not instantiable. It is frustrating. Any help with a simple number field for setting and getting the int or double values as numbers. Thanks.Read this section from the Swing tutorial. It does exactly what you want and provides code as well:
http://java.sun.com/docs/books/tutorial/uiswing/components/textfield.html -
The leading zeros are removing from Number field
Hi,
How can i keep the leading Zeros in the number field. For eg, when validating the field, 00123 becomes 123, how to prevent it,
Thanks in advanceHi
I tried with LPAD(:numberfield,5,'0') in the validate field, but it is not working, I am getting the error , it is not a procedure....., I working with Forms 10g
Thanks in advance -
ESS Family Screen - Issue validating Phone Number
I am having a problem with the Family contact screen and the validation on the phone number field. I am not the original developer that worked on this screen and do not have access to that person, but I think this issue is caused by SAP delivered code, and not anything we did here.
If I enter a phone number that has more than 7 digits (ex. 12345678), but I do not include a dash in the number, I correctly get an error that says , "Telephone number must consist of seven digits"
If I include a dash in the number (ex. 123-45678), that validation does not detect the error and I am allowed to proceed to the review screen, where the phone number is displayed exactly as I typed it in, but when it gets saved, the extra digits are truncated.
I'm willing to code my own validations on this field, but I don't know where to put the code. Can anyone please help?Could you please mention ESS BP version that is been used? If it is, you can search for Note in SMP, if not found, raise one. This could be an issue with standard SAP code. However, as you mentioned the application been changed, review the changes been made as well.
-
Badi for check tax number field
Hi guys!
Can anyone tell if exists a badi that ckecks the field 'TAXNUM' in transaction 'BP' after we put a value there.
I've already check in the transaction 'Bus7' and i only find the function for the event 'check before saving' -'BUP_BUPA_EVENT_DCHCK'.
Thanks in advance.
Hugo.Hi everybody!
I need understand how implement check of taxnum using transaction BUS3 - view BUTX01.
I need check tax number in transaction FPP2.
I see a post very interesting:
Badi for check tax number field
I create a module function but inside of module function i don't have data for my validation. I think i make a mistake. Help please!
If somebody have a tutorial would be great!!
Thanks! -
I am trying to create a phone number field that will automatically create the dashes as they are typing in the numbers. For example: i type 222 and a dash follows after the last 2 automatically. I know about the regular expression validation you can set, but it is a little complicated for the end user.
Add the JavaScript to the HTML Header field of the Page definition.
Then add the following to the HTML Form Element Attributes of your field:
onclick="javascript:getIt(this)"However, be aware that the Javascript function in the example expects a particular document structure - it is not written generically so you will have to spend some time updating the example OR find another one.
Maybe you are looking for
-
I basically just want to create a new loop using a live instrument. Then record over it while listening so I can lay several complimentary tracks over my own playing, I own a Steinberg CL1 USB audio interface and a decent condenser microphone. I am a
-
"This update is not available for this Apple ID either because it was bought by a different user or the item was refunded or cancelled" iPhoto is gone after installing to OS X Yosemite. Where did it go and how do i get all my pictures back ?? HELP
-
HT2513 Can I set reminders on events from calendars I subscribe to?
Is it possible to set a reminder on events in calendars that are subscribed to?
-
Preserving hyperlink properties from Word documents
I am using Live Cycle to convert MS Word 2007 created docs that have been pdf'ed into Acrobat forms. Within these Word files are hyperlinks that have the properties of opening a new browser window when clicked. I have set this to be the default for a
-
Monitoring SSL sessions/sec on CSS
Hello, I have been trying to find the right parameter via CLI or SNMP to monitor the number of SSL sessions/sec. We are using CSS 11503 with a SSL module supporting in theory 800 to 1000 SSL sessions/sec and I'd like to know what the current load is.