Declare
l_request_id number(10);
G_USER_NAME VARCHAR2(100) := 'OPERATIONS';
G_RESP_KEY VARCHAR2(100):= 'GENERAL_LEDGER_OPERATIONS';
l_user_id NUMBER;
l_resp_id NUMBER;
l_resp_appl_id NUMBER;
l_login_id number;
V_BOL BOOLEAN:=NULL;
BEGIN
BEGIN
SELECT user_id
INTO l_user_id
FROM fnd_user
WHERE user_name=G_USER_NAME;
EXCEPTION WHEN OTHERS THEN
null;
END;
BEGIN
SELECT responsibility_id
,application_id
INTO l_resp_id
,l_resp_appl_id
FROM fnd_responsibility_vl
WHERE responsibility_key=G_RESP_KEY;
EXCEPTION WHEN OTHERS THEN
null;
END;
FND_GLOBAL.APPS_INITIALIZE(user_id=>l_user_id,
resp_id=>l_resp_id,
resp_appl_id=>l_resp_appl_id);
V_BOL:= fnd_flex_keyval.validate_segs(operation=>'CREATE_COMBINATION',
appl_short_name=> 'SQLGL',
key_flex_code =>'GL#',
structure_number =>101,
concat_segments => '01-730-1216-0000-000',
values_or_ids => 'V',
validation_date =>sysdate,
displayable => 'ALL',
data_set => NULL,
vrule =>NULL,
where_clause => NULL,
get_columns =>NULL,
allow_nulls =>FALSE,
allow_orphans =>FALSE);
--validation_date => sysdate);
IF V_BOL=TRUE THEN
DBMS_OUTPUT.PUT_LINE('CREATED');
ELSE
DBMS_OUTPUT.PUT_LINE('NOT CREATED');
END IF;
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('ERROR='||sqlerrm);
END;
l_request_id number(10);
G_USER_NAME VARCHAR2(100) := 'OPERATIONS';
G_RESP_KEY VARCHAR2(100):= 'GENERAL_LEDGER_OPERATIONS';
l_user_id NUMBER;
l_resp_id NUMBER;
l_resp_appl_id NUMBER;
l_login_id number;
V_BOL BOOLEAN:=NULL;
BEGIN
BEGIN
SELECT user_id
INTO l_user_id
FROM fnd_user
WHERE user_name=G_USER_NAME;
EXCEPTION WHEN OTHERS THEN
null;
END;
BEGIN
SELECT responsibility_id
,application_id
INTO l_resp_id
,l_resp_appl_id
FROM fnd_responsibility_vl
WHERE responsibility_key=G_RESP_KEY;
EXCEPTION WHEN OTHERS THEN
null;
END;
FND_GLOBAL.APPS_INITIALIZE(user_id=>l_user_id,
resp_id=>l_resp_id,
resp_appl_id=>l_resp_appl_id);
V_BOL:= fnd_flex_keyval.validate_segs(operation=>'CREATE_COMBINATION',
appl_short_name=> 'SQLGL',
key_flex_code =>'GL#',
structure_number =>101,
concat_segments => '01-730-1216-0000-000',
values_or_ids => 'V',
validation_date =>sysdate,
displayable => 'ALL',
data_set => NULL,
vrule =>NULL,
where_clause => NULL,
get_columns =>NULL,
allow_nulls =>FALSE,
allow_orphans =>FALSE);
--validation_date => sysdate);
IF V_BOL=TRUE THEN
DBMS_OUTPUT.PUT_LINE('CREATED');
ELSE
DBMS_OUTPUT.PUT_LINE('NOT CREATED');
END IF;
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('ERROR='||sqlerrm);
END;
No comments:
Post a Comment