SELECT user_id, responsibility_id, responsibility_application_id,
security_group_id
FROM fnd_user_resp_groups FURG
-- WHERE FURG.RESPONSIBILITY_ID=51399
WHERE user_id = -1 (SELECT user_id
FROM fnd_user
WHERE user_name = '&USER_NAME')
AND responsibility_id = (SELECT responsibility_id
FROM fnd_responsibility_vl
WHERE responsibility_name = '&RESP_NAME');
DECLARE
v_request_id VARCHAR2 (100);
p_create_reciprocal_flag VARCHAR2 (1) := 'N';
l_user_id fnd_user.user_id%TYPE := 6642;
l_resp_id fnd_responsibility.responsibility_id%TYPE
:= 5669;
l_resp_appl_id fnd_application.application_id%TYPE := 405;
p_return_code NUMBER;
p_return_msg VARCHAR2 (100);
BEGIN
fnd_global.apps_initialize (6642, 5669, 405);
v_request_id :=
fnd_request.submit_request (application => 'WMS',
program => 'WMS_GENERATE_LPN', ---Concurrent program Short Name
description => 'To generate LPN',
start_time => SYSDATE,
sub_request => FALSE, -- Pass the Concurrent Program Parameters
argument1 => 1.0, -- API Version
argument2 => '111', -- Organization
argument3 => NULL, -- Container Item
argument4 => NULL, -- Revision
argument5 => NULL, -- Lot Number
argument6 => NULL, -- Serial From
argument7 => NULL, -- Serial To
argument8 => NULL,-- Subinventory
argument9 => NULL, -- Locator ID
argument10 => 2, -- Organization Parameters
argument11 => 'N', -- Org Dummy
argument12 => 7, -- Total Length
argument13 => 'P', -- 'RM', -- LPN Prefix
argument14 => '000022', -- Starting Number
argument15 => 2, -- UCC 128 Suffix Flag
argument16 => 'N', --- Fld Dummy
argument17 => NULL, -- LPN Suffix
argument18 => 1, -- Quantity
argument19 => 5, -- Source
argument20 => NULL ---- Cost Group ID
);
p_return_msg := 'Request submitted.ID=' || v_request_id;
DBMS_OUTPUT.put_line ('Request Id ' || p_return_msg);
p_return_code := 0;
DBMS_OUTPUT.put_line ('RETURN CODE' || p_return_code);
COMMIT;
EXCEPTION
WHEN OTHERS
THEN
p_return_msg :=
'REQUEST SET SUBMISSION FAILED -UNKNOWN ERROR:' || SQLERRM;
p_return_code := 2;
END;
security_group_id
FROM fnd_user_resp_groups FURG
-- WHERE FURG.RESPONSIBILITY_ID=51399
WHERE user_id = -1 (SELECT user_id
FROM fnd_user
WHERE user_name = '&USER_NAME')
AND responsibility_id = (SELECT responsibility_id
FROM fnd_responsibility_vl
WHERE responsibility_name = '&RESP_NAME');
DECLARE
v_request_id VARCHAR2 (100);
p_create_reciprocal_flag VARCHAR2 (1) := 'N';
l_user_id fnd_user.user_id%TYPE := 6642;
l_resp_id fnd_responsibility.responsibility_id%TYPE
:= 5669;
l_resp_appl_id fnd_application.application_id%TYPE := 405;
p_return_code NUMBER;
p_return_msg VARCHAR2 (100);
BEGIN
fnd_global.apps_initialize (6642, 5669, 405);
v_request_id :=
fnd_request.submit_request (application => 'WMS',
program => 'WMS_GENERATE_LPN', ---Concurrent program Short Name
description => 'To generate LPN',
start_time => SYSDATE,
sub_request => FALSE, -- Pass the Concurrent Program Parameters
argument1 => 1.0, -- API Version
argument2 => '111', -- Organization
argument3 => NULL, -- Container Item
argument4 => NULL, -- Revision
argument5 => NULL, -- Lot Number
argument6 => NULL, -- Serial From
argument7 => NULL, -- Serial To
argument8 => NULL,-- Subinventory
argument9 => NULL, -- Locator ID
argument10 => 2, -- Organization Parameters
argument11 => 'N', -- Org Dummy
argument12 => 7, -- Total Length
argument13 => 'P', -- 'RM', -- LPN Prefix
argument14 => '000022', -- Starting Number
argument15 => 2, -- UCC 128 Suffix Flag
argument16 => 'N', --- Fld Dummy
argument17 => NULL, -- LPN Suffix
argument18 => 1, -- Quantity
argument19 => 5, -- Source
argument20 => NULL ---- Cost Group ID
);
p_return_msg := 'Request submitted.ID=' || v_request_id;
DBMS_OUTPUT.put_line ('Request Id ' || p_return_msg);
p_return_code := 0;
DBMS_OUTPUT.put_line ('RETURN CODE' || p_return_code);
COMMIT;
EXCEPTION
WHEN OTHERS
THEN
p_return_msg :=
'REQUEST SET SUBMISSION FAILED -UNKNOWN ERROR:' || SQLERRM;
p_return_code := 2;
END;
No comments:
Post a Comment