Issue with the Scheduling API - OE_GROUP_SCH_UTIL.Schedule_Multi_lines [message #509498] |
Sat, 28 May 2011 11:11 |
|
Ora_Mady
Messages: 1 Registered: May 2011
|
Junior Member |
|
|
Hi All,
I am using the API - OE_GROUP_SCH_UTIL.Schedule_Multi_lines for scheduling the sales order lines.
I have a Sales order Line, which I am able to schedule through the Application. (Navigation : SO Line -> Schedule )
However, I am unable to schedule the same line using the API inspite of returning the status as Success 'S'.
This SO Line is assigned to a Ship set - 1.
The standalone procedure which I am using is -
declare
l_selected_line_tbl OE_GLOBALS.Selected_Record_Tbl;
l_atp_tbl OE_ATP.Atp_Tbl_Type;
x_return_status VARCHAR2(1);
x_msg_data VARCHAR2(2000);
x_msg_count NUMBER;
x_debug_file VARCHAR2 (100);
l_msg_index_out NUMBER;
i NUMBER;
BEGIN
dbms_output.enable(1000000);
MO_GLOBAL.INIT ('ONT');
mo_global.set_policy_context('S',178);
fnd_global.apps_initialize(97929,21623,660);
oe_msg_pub.initialize;
oe_debug_pub.initialize;
oe_debug_pub.debug_on;
x_debug_file := oe_debug_pub.set_debug_mode ('FILE');
oe_debug_pub.setdebuglevel (5);
l_selected_line_tbl(1).id1 :=32219722; --l_line_id;
l_selected_line_tbl(1).org_id := 178;
OE_GROUP_SCH_UTIL.Schedule_Multi_lines
(p_selected_line_tbl => l_selected_line_tbl,
p_line_count => 1,
p_sch_action => 'SCHEDULE',
x_atp_tbl => l_atp_tbl,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data);
DBMS_OUTPUT.put_line ( 'OM Debug file: '
|| oe_debug_pub.g_dir
|| '/'
|| oe_debug_pub.g_file
);
FOR i IN 1 .. x_msg_count
LOOP
oe_msg_pub.get (p_msg_index => i,
p_encoded => fnd_api.g_false,
p_data => x_msg_data,
p_msg_index_out => l_msg_index_out
);
DBMS_OUTPUT.put_line ('message is: ' || x_msg_data);
DBMS_OUTPUT.put_line ('message index is: ' || l_msg_index_out);
END LOOP;
-- Check the return status
IF x_return_status = fnd_api.g_ret_sts_success
THEN
DBMS_OUTPUT.put_line ('Sucessful');
ELSE
DBMS_OUTPUT.put_line ('Failed');
END IF;
COMMIT;
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('When Others Then'||sqlerrm);
END;
The debug file generated gives me this message -
Session Id:199997317
ENTERING SCHEDULE_MULTI_LINES
LINE COUNT IS: 1
ACTION IS: SCHEDULE
ENTERING INTO QUERY SCHEDULE LINES
PROCESSING LINE_ID32219722
log schedule set delayed request
Entering OE_LINE_UTIL.QUERY_ROW, line_id:32219722
Exiting OE_LINE_UTIL.QUERY_ROW
ENTERING LOG SET REQUEST7881765
SET SCHEDULE DATE
1 SETTING GROUP SCHEDULE
SET L PARAM 12
BEFORE LOGGING G_GROUP_SCHEDULE
Entering Procedure Log_Request in Package OE_Delayed_Requests_Pvt, entity id: 32219722, request type:GROUP_SCHEDULE
Entering Procedure Check_for_Request in Package OE_Delayed_Requests_Pvt
New request inserted
!!!!!!! index 197220001
RES QTY DIFF 0
EXITING LOG SET REQUEST
EXITING QUERY_SCHEDULE_LINES0
LEAVING OE_MSG_PUB.COUNT_AND_GET 0
MESSAGE COUNT: 0
EXITING SCHEDULE_MULTI_LINES WITH: S
I am not able to figure what is wrong.
Please advice
Pls Note - The same API without any modifications worked fine and was able to schedule arnd 5-6 orders previosuly.
|
|
|