Very urgent - validation failed in field
hello friedns,
i have an issue field called weight in ADF page. i am very new to ADF Technolgy.
1) if user eneters invalid value enters in weight filed it will show alert that Weight - Value should be 0 to 9999.999 only ,i cliked the ok of that alert window, but immedeately it can let me go to the next filed in create page, it should not let me go to next field until i eneter valid value.
2) same validation update page working fine - when i eneter the invalid value , then it should not go next filed to eneter value, until i enter valid value in weght field.
i did the same below validation create and update page.
function chkForDecimalValue(inpValue)
var regExpDecimal=/^(0|[1-9]\d{0,3})(\.\d{1,3})?$/
if (inpValue.search(regExpDecimal)==-1)
alert("Weight - Value should be 0 to 9999.999 only");
obj = document.forms["warrantDetailsForm"].elements;
obj["weight"].select();
obj["weight"].focus();
return false;
else
return true;
i added this function in weight field properties - java script option under in Onblur. very urget how to fix this problem and help me out.
Thanks in advance.
vamshi.
CAn you please provide the page code for update and create? Are you using same page?
Similar Messages
-
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 -
Very Urgent : Reterival of AWKEY field from BKPF table
Hi,
I am making a report in which i have to make relation of 2 fields BKPF-AWKEY and MKPF-MBLNR . but the problem is i am not to reterive data from it as i have to make inner join among these fields so data can be reterived fmo these tables.
plz provide me some guidelines as it is really urgent to me and help will be deinfately rewarded.First and foremost, i would advice you not to use words like VERY URGENT in your subject. You might want to go through the following link to understand the basic rules of the forum:
[Rules of Engagement|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement]
For your requirement, below code might help you understand the logic in determining the link between BKPF and MKPF.
TYPES: BEGIN OF t_bkpf,
bukrs type bukrs,
belnr type belnr_d,
gjahr TYPE gjahr,
awtyp type awtyp,
awkey type awkey,
end of t_bkpf.
types: begin of t_mkpf,
mblnr type mblnr,
mjahr type mjahr,
end of t_mkpf.
data: i_bkpf type STANDARD TABLE OF t_bkpf,
i_mkpf type STANDARD TABLE OF t_mkpf.
data: wa_bkpf type t_bkpf,
wa_mkpf type t_mkpf.
PARAMETERS: p_bukrs type bukrs OBLIGATORY,
p_gjahr TYPE gjahr OBLIGATORY.
START-OF-SELECTION.
SELECT bukrs belnr gjahr awtyp awkey
into table i_bkpf
from bkpf
UP TO 20 ROWS
where bukrs = p_bukrs
and gjahr = p_gjahr
and awtyp = 'MKPF'.
IF NOT i_bkpf[] is INITIAL.
select mblnr mjahr from mkpf into table i_mkpf
for ALL ENTRIES IN i_bkpf
where mblnr = i_bkpf-awkey(10).
* and mjahr = i_bkpf-awkey+10(4).
ENDIF.
LOOP AT i_bkpf into wa_bkpf.
READ TABLE i_mkpf into wa_mkpf
with key mblnr = wa_bkpf-awkey(10)
mjahr = wa_bkpf-awkey+10(4).
IF sy-subrc eq 0.
write:/ 'Accounting Document:', 23 wa_bkpf-belnr,
35 'Material Document:', 55 wa_mkpf-mblnr.
ENDIF.
ENDLOOP. -
Very Urgent: how to define field symbols in class using se24 Points assured
hi all
I am new to abap oo programming. I am using se24 to build a class
where some methods have code which involves working with field sybmols but i am not able to figure out way for how to define field symbols in the attributes section.
I tried defining like : fld_sym type ref to dbtab-fld
but in the method implementation if i try to use it like assign fld to <fld_sym> there it says fld_sym is not defined as a field symbol.
So can anyone please guide me how to define field symbols in se24.
Also what should be the general steps while creating a class using se24.
Points assured
thanksHi
Global classes are like Global fun modules in which the Methods and code is already written and is mainly used for Reusability purpose.
Goto SE24 tcode and see the std global classes like
CL_ABAP_CHAR_UTILITIES
see the links
chk out the links below:
General Tutorial for OOPS
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907
Have a look at these links for OO ABAP.
http://www.sapgenie.com/abap/OO/
http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
http://www.allsaplinks.com/
http://www.sapgenie.com/abap/controls/index.htm
http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
SDN Series:
https://www.sdn.sap.com/irj/sdn/developerareas/abap?rid=/webcontent/uuid/35eaef9c-0b01-0010-dd8b-e3b0f9ed7ccb [original link is broken]
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf
Basic concepts of OOPS
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b6cae890-0201-0010-ef8b-f970a9c41d47
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1591ec90-0201-0010-3ba8-cdcd500b17cf
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20display%20data%20in%20alv%20grid%20using%20object%20oriented%20programming.doc
http://www.henrikfrank.dk/abapuk.html
http://www.erpgenie.com/abap/OO/
Reward oints if useful,
Aleem. -
Very urgent : Problem in currency field while downloading file from excel.
I downloaded a excel file to my ABAP program.It contains a currency field which has comma in it. When i do operations on the currency field it says unable to interpret the number.Can anybody help me on this.
Message was edited by:
Bharath Srinivas
Message was edited by:
Bharath SrinivasHi,
Try this. In ur excel right click on that column wher u have the currency, go to format cells and there uncheck the box which shows 'Show tousands (,) seperator).That shud solve the problem.
Thanks
Vasudha -
Validation for Amount fields..very urgent
hI ALL.
I want Validation like Right justify amount decimal point and 2 decimal places.
this is Work area
TYPES: BEGIN OF T_DATATAB,
COL01(60) TYPE C,
COL02(60) TYPE C,
COL03(60) TYPE C,
end of T_datatab.
data: g_t_dbt like table of dbt initial size 10,
wa_dbt type dbt.
DATA : VAL TYPE STRING.
Now i want move value from VAL to wa_DBT-CURRENCY as follows,
move wa_datatab-col07 to wa_DBT-CURRENCY.
MOVE VAL TO wa_DBT-CURRENCY.
so if i give input 100, i need display like 100.00
Help me
helpful answers will be get rewarded.it is very urgent
Regards.
Bhanu
Message was edited by:
bhanuHi bhanu,
1. simple
2. just use
WRITE numberfield to charfield.
(it will put the field
in the SAME FORMAT as DISPLAY FORMAT)
eg. YYYYMMDD will put as dd.mm.yyyyy
256 will put as 256.00
regards,
amit m. -
Automatically displaying the error text for a form field when the validator fails?
Hi,
Flex 2 has a very nice feature to display custom text next to
a form field whose validation failed. But the user has to move the
mouse over the form field to display the text. Is there a way to
invoke this feature programmatically?
What I would like to do is validate form fields on submit and
- if validation fails for a form field - set focus on that form
field and automatically display the custom error text in the red
blurb. Focusing works fine but I cant' get the text to render...
MarkusThanks Bregent.
Weirdest thing...I just tried a Google search for a solution to this problem and came across another thread on this forum. By the time I got to the bottom of it I realised one of those taking part was myself from years ago! Jeesh, been here before or what!
Changed my recordset to...
<%
Dim rsPROP__MMColParam
rsPROP__MMColParam = "0"
If (Request.Form("categoryID") <> "") Then
rsPROP__MMColParam = Request.Form("categoryID")
End If
%>
<%
Dim rsPROP__MMColParam1
rsPROP__MMColParam1 = "1"
If (Request.Form("categoryID") <> "") Then
rsPROP__MMColParam1 = Request.Form("categoryID")
End If
%>
<%
Dim rsPROP
Dim rsPROP_cmd
Dim rsPROP_numRows
Set rsPROP_cmd = Server.CreateObject ("ADODB.Command")
rsPROP_cmd.ActiveConnection = MM_cs_STRING
rsPROP_cmd.CommandText = "SELECT prodid, product, categoryID FROM dbo.products WHERE ISNULL(?,0) = 0 OR categoryID = ?"
rsPROP_cmd.Prepared = true
rsPROP_cmd.Parameters.Append rsPROP_cmd.CreateParameter("param1", 5, 1, -1, rsPROP__MMColParam) ' adDouble
rsPROP_cmd.Parameters.Append rsPROP_cmd.CreateParameter("param2", 5, 1, -1, rsPROP__MMColParam) ' adDouble
Set rsPROP = rsPROP_cmd.Execute
rsPROP_numRows = 0
%>
...and it works fine.
Appreciate the help. I would have taken your advice and done an If Else on the WHERE clause to acheive the same.
Thank you.
NJ -
Searching for the fields of a table(very very urgent)
Hi all,
i am in graet trouble now.i am searching for the fields like
1)country of origin where the finished good is created.
2) customer sales order number
3)customer sales order line number
i am writing a report for delivery order.in this report i have to refer customer PO & customer SO .
i mean, my company has a customer ( seagate) & seagate has a customer (let maxtor).initially maxtor will give a PO to seagate then seagate will raise a SO againest maxtor.
Then seagate will send PO number(of maxtor), PO line number,SO number(seagate), SO line number(seagate) to our company.
Then i have to write a report for sales order & delivery order.in these reports i have to refer seagate PO number & seagate SO number for reference.
i got PO number as vbkd-bstkd but not getting any field for reference Sales order.plz advice me on this. it is very very urgent.
ur idea is highly appreaciated.
Thank u very much.
Regards
pabitracheck out tables VBAK(sales order header), VBAP(sales items)
-
Not able to download the field names in GUI_DOWNLOAD(very urgent)
Hi All,
I am downloading the file contents to the presentation server.i am able to get the file contents proeprly but not able to download the field names into text file.
Can anybody please help me in this issue..? its very urgent. Valuable answers will be rewarded.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = w_filename
filetype = 'DAT'
write_field_seperator = c_x
col_select = c_x
COL_SELECT_MASK = t_mask
TABLES
data_tab = t_tab
fieldnames = t_colnames
EXCEPTIONS
Thanks & Regards,
Satish.Hi,
I have tried in both ways its not working.
while a ran the program it is going to the dump.
I am working in mySAP ECC6.0
Can pl you suggest other way..
Thanks & Regards,
Satish. -
Installation of oracle fail safe on windows cluster - plz very urgent
hi everybody,
this is the first time i am going to install oracle failsafe on windows clusters.
i am going to install oracle 9i release 2 software.
so i have to install the patches.
plz tell me with oracle cmds how to do the following.
1. after installing oracle 9i rel 2 how to install the patches to it in windows environment?
2. how to create oracle database on one node using shared disk for storage.
3. how to install oracle fail safe on each cluster?
4. how to configure cluster using fail safemanager?
plz provide me soln asap very urgent.
and don't forget to give me the soln with commands aqnd step by step.
plz plz plz
thanks in advance
sureshFor 9i , this is better:
http://download-uk.oracle.com/docs/cd/B10501_01/rac.920/a96600/toc.htm -
Order Import - Validation failed for the field - End Customer Location
I am trying to import an order using standard import program and it is failing with below error:
- Validation failed for the field - End Customer Location
I have checked metalink to debug this and found nothing, the values i have used to populate the interface table or valid.
Can someone please post your views on this, on where the problem might be.
Thanks!Hello,
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 -
Adding Custom fields to VL02N...very urgent
Hi Friends,
I have come up with a requirement, where i need to add 2 custom fields namely "EOD INDICATOR and FREIGHT AMOUNT" in a customized additional tab at the header level in VL02N transaction.I need to update the freight amount in the deliveries that are picked up by a report program where, the shipment number and the freight cost are the inputs. The problem is that, how to update the data in the delivery through VL02N and database.
I found a BAPI, named "BAPI_OUTB_DELIVERY_CHANGE", where in at the header data we dont have fields for the custom fields i stated above. I want to know, how to enhance a BAPI, so that we can update the data for the outbound delivery and the database.
In the BAPI, in tables I found EXTENSION1 and EXTENSION2 tables. Can I use these tables to update my fields?
Let me know the way, like how to go ahead to update the customized fields in tcode using BAPI or some other way as soon as possible..it's very urgent..
Thanks in advance..
--sudha
Edited by: sudha koduri on Jul 3, 2008 2:58 PMCheck this thread:
https://forums.sdn.sap.com/click.jspa?searchID=6422849&messageID=392261 -
Keep the old value in the UI field if entity validation fails
Hi,
I have a requirement to retain the original value (old value), if the entity attribute validation fails when the filed value is changed. I have created one validation rule on the entity object and the validation rule is working as expected. But I would like to reset the value to the original value if the validation fails on the modified value.
Thanks and Regards,
S R PrasadHello,
Please tell us your first name, and change your forum handle to something more friendly than User123. It’s nicer and easier for us this way.
It seems that the forum software messed up the example code you wanted to present. To avoid that you can use the forum tags [code] and [/code] at the beginning and end of your code.
If I understand correctly, you are trying to retrieve the original field value from a fxx array, however these arrays are populated after page submit, so they don’t hold the initial values of the column.
I think the simplest solution will be to use an ‘onfocus’ event that will save the initial value – this.value – in a global JavaScript variable. In your ‘onchange’ code, instead of clearing the field if validation failed just assigns the original value for the JavaScript variable.
Regards,
Arie.
♦ Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
♦ Forthcoming book about APEX: Oracle Application Express 3.2 – The Essentials and More -
Order Import Failed in OM : Log Validation failed for the field - Ship To
Problem in Order Management
When i tried to do Order import in Source Org logfiles shows the Message :Validation failed for the field - Ship To, Please if anyone have a solution of this.
Thanks in advance.
Regards,
Rajesh Verma
Senior Consultant- Oracle Apps.
COLTperhaps you might want to try populating customer_id instead of name to make sure that there is no error on typing customer name.
primary ship-to and bill-to must exist under this customer. During order import, if ship-to is not specified then import will fetch primary ST of customer.
This is what we use to populate interface table -with mininum of data.
INSERT INTO oe_headers_iface_all
(orig_sys_document_ref,order_source_id,org_id
,order_type_id,payment_term_id, shipping_method_code, freight_terms_code
,customer_po_number,salesrep_id
,sold_to_org_id, ship_to_org_id,invoice_to_org_id,sold_to_contact_id
,booked_flag
,created_by, creation_date, last_updated_by, last_update_date,last_update_login
,operation_code, order_category
,attribute5,tp_attribute4,xml_message_id,xml_transaction_type_code
,request_id, error_flag)
INSERT INTO oe_lines_iface_all
(order_source_id, orig_sys_document_ref, orig_sys_line_ref,orig_sys_shipment_ref
,inventory_item,item_type_code,line_type_id
,top_model_line_ref,link_to_line_ref,component_sequence_id,component_code,option_flag
,ordered_quantity
,order_quantity_uom,salesrep_id
,created_by, creation_date, last_updated_by, last_update_date,last_update_login
,operation_code,cust_model_serial_number,line_category_code
,context,attribute6
,reference_type, reference_line_id, reference_header_id
,return_context, return_attribute1, return_attribute2
,return_reason_code
,tp_attribute1,tp_attribute2,tp_attribute3,tp_attribute4,tp_attribute5
,request_id,error_flag) -
Validation failed for the field - Bill To Contact, Ship To Contact
Hi,
When I am trying to Import / enter order for a specific customer, i am getting the error.
VALIDATION FAILED FOR THE FIELD - BILL TO CONTACT
VALIDATION FAILED FOR THE FIELD - SHIP TO CONTACT
Has anyone got this error earlier? If you know the resolution, please update me on this.Hi,
I am getting following error when I an adding one customer address to another customer through Order Import Program. By populating 3 table values
1. OE_CUSTOMER_INFO_IFACE_ALL
2. OE_HEADERS_IFACE_ALL
3. OE_LINES_IFACE_ALL
Error Message:
Duplicate SHIP_TO ADDRESS found for IC_804810. Please correct the data.
Duplicate BILL_TO ADDRESS found for IC_804810. Please correct the data.
But its working fine when I am giving New address for existing customer.
Please help me on this....
Thanks,
Oracle Support.
Maybe you are looking for
-
How do I Set up a LAN with no access to the Internet?
I have a Solaris 10 (08/07) [No longer can acess the internet] full install on one system, and Solaris 10 Developer Edition (09/07) on another system. Each has been auto-configured upon installation, and have reached the Internet, and registered at S
-
Only one Apple ID possible?
Hi I had initially set up my Apple ID with a wrong email, and when it did not verify yet, I realized my error and corrected it. If there's a chance that the email I punched in exists, can they now access my iPhone? I currently have an Apple ID (with
-
How do I replace my old internal hard drive with a new one?
I just ordered a new 1TB hard drive to replace my very small hard drive in my 17" MacBook Pro. I've looked around at some of the discussions and apparently I need to format the new hard drive first. I am not so great with this techy stuff. Can some
-
Attachments appearing as password-protected when they're not
Several times recently, I've had clients (on windows) tell me that attachments I've sent them in Mail -- whether they're zipped archives or single files -- indicate that a password is required before the file can be accessed. I've set no password pro
-
Bad pixel patch correction in 2D image
In one CCD image (600X800), I have few patches of bad pixels (few are in irregular shapes, few are in regular one like rectangle of 8X8 pixels). For correcting these bad pixel patches, I am looking for some surface fitting function, which should have