DECLARE
v_userid NUMBER;
v_respid NUMBER;
v_appid NUMBER;
x_out VARCHAR2 (200);
v_msg VARCHAR2 (2000);
BEGIN
SELECT fnd.user_id, fresp.responsibility_id, fresp.application_id
INTO v_userid, v_respid, v_appid
FROM fnd_user fnd, fnd_responsibility_tl fresp
WHERE fnd.user_name = 'XXUSER'
AND fresp.responsibility_name = 'Application Developer';
fnd_global.apps_initialize (user_id => v_userid,
resp_id => v_respid,
resp_appl_id => v_appid);
DBMS_OUTPUT.put_line ('The Value is :' || fnd_global.USER_NAME);
FND_FLEX_VAL_API.create_independent_vset_value ('XX_SOURCE',
'OKS_CONTRACTS',
'OKS_CONTRACTS',
'Y',
SYSDATE,
NULL,
'N',
NULL,
NULL,
x_out
);
DBMS_OUTPUT.put_line ('The Value of x_out is :' || x_out);
COMMIT;
EXCEPTION
WHEN OTHERS
THEN
v_msg := fnd_flex_val_api.MESSAGE;
DBMS_OUTPUT.PUT_LINE (v_msg);
DBMS_OUTPUT.put_line ('The Value of v_msg is :' || v_msg);
DBMS_OUTPUT.put_line ('The Error is :' || SQLERRM);
END;
v_userid NUMBER;
v_respid NUMBER;
v_appid NUMBER;
x_out VARCHAR2 (200);
v_msg VARCHAR2 (2000);
BEGIN
SELECT fnd.user_id, fresp.responsibility_id, fresp.application_id
INTO v_userid, v_respid, v_appid
FROM fnd_user fnd, fnd_responsibility_tl fresp
WHERE fnd.user_name = 'XXUSER'
AND fresp.responsibility_name = 'Application Developer';
fnd_global.apps_initialize (user_id => v_userid,
resp_id => v_respid,
resp_appl_id => v_appid);
DBMS_OUTPUT.put_line ('The Value is :' || fnd_global.USER_NAME);
FND_FLEX_VAL_API.create_independent_vset_value ('XX_SOURCE',
'OKS_CONTRACTS',
'OKS_CONTRACTS',
'Y',
SYSDATE,
NULL,
'N',
NULL,
NULL,
x_out
);
DBMS_OUTPUT.put_line ('The Value of x_out is :' || x_out);
COMMIT;
EXCEPTION
WHEN OTHERS
THEN
v_msg := fnd_flex_val_api.MESSAGE;
DBMS_OUTPUT.PUT_LINE (v_msg);
DBMS_OUTPUT.put_line ('The Value of v_msg is :' || v_msg);
DBMS_OUTPUT.put_line ('The Error is :' || SQLERRM);
END;
No comments:
Post a Comment