DBA Data[Home] [Help]

APPS.IGS_SC_GRANTS_PVT dependencies on IGS_SC_GRANTS_PVT

Line 1: PACKAGE BODY IGS_SC_GRANTS_PVT AS

1: PACKAGE BODY IGS_SC_GRANTS_PVT AS
2: /* $Header: IGSSC01B.pls 120.11 2006/01/27 00:16:18 skpandey noship $ */
3:
4: /******************************************************************
5:

Line 27: G_PKG_NAME CONSTANT VARCHAR2(30) := 'IGS_SC_GRANTS_PVT';

23: gmaheswa 26-Jul-2005 Fnd Logging
24: ******************************************************************/
25:
26:
27: G_PKG_NAME CONSTANT VARCHAR2(30) := 'IGS_SC_GRANTS_PVT';
28: g_debug_level NUMBER(1) := 0;
29: g_user_orig_system CONSTANT VARCHAR2(25) := 'FND_USR';
30: g_alias_number NUMBER(5) :=0;
31: g_user_id NUMBER(14);

Line 46: l_prog_label CONSTANT VARCHAR2(500) :='igs.plsql.igs_sc_grants_pvt';

42: l_operator_temp VARCHAR2(10) := '';
43: onlyZTypeAttributes BOOLEAN := true;
44: --code added by mmkumar ends
45:
46: l_prog_label CONSTANT VARCHAR2(500) :='igs.plsql.igs_sc_grants_pvt';
47: l_label VARCHAR2(4000);
48: l_debug_str VARCHAR2(32000);
49:
50: TYPE g_grant_cond_rec IS RECORD (

Line 173: l_label := 'igs.plsql.igs_sc_grants_pvt.handler.end';

169: END IF;
170: END IF;
171:
172: IF fnd_log.test(fnd_log.level_procedure,l_prog_label) THEN
173: l_label := 'igs.plsql.igs_sc_grants_pvt.handler.end';
174: l_debug_str := 'Final Result :'|| l_final_result;
175: fnd_log.string_with_context( fnd_log.level_procedure,l_label,l_debug_str, NULL,NULL,NULL,NULL,NULL,NULL);
176: END IF;
177:

Line 307: l_label := 'igs.plsql.igs_sc_grants_pvt.check_grant_text.begin';

303: l_val NUMBER(20);
304: l_select_text VARCHAR(32000);
305: BEGIN
306: IF fnd_log.test(fnd_log.level_procedure,l_prog_label) THEN
307: l_label := 'igs.plsql.igs_sc_grants_pvt.check_grant_text.begin';
308: l_debug_str := 'Table Name: '||p_table_name||','||'Select Text: '||p_select_text;
309: fnd_log.string_with_context( fnd_log.level_procedure,l_label,l_debug_str, NULL,NULL,NULL,NULL,NULL,NULL);
310: END IF;
311:

Line 319: l_label := 'igs.plsql.igs_sc_grants_pvt.check_grant_text.before_execute';

315:
316: l_select_text := replace_string(ltrim(l_select_text),':TBL_ALIAS','tstal');
317:
318: IF fnd_log.test(fnd_log.level_procedure,l_prog_label) THEN
319: l_label := 'igs.plsql.igs_sc_grants_pvt.check_grant_text.before_execute';
320: l_debug_str := 'Final Select: '||'SELECT 1 FROM ('||' SELECT 1 FROM '||p_table_name||' WHERE '||l_select_text||' )';
321: fnd_log.string_with_context( fnd_log.level_procedure,l_label,l_debug_str, NULL,NULL,NULL,NULL,NULL,NULL);
322: END IF;
323:

Line 336: l_label := 'igs.plsql.igs_sc_grants_pvt.check_grant_text.execption';

332: WHEN OTHERS THEN
333:
334: -- add error to the stack and return false
335: IF fnd_log.test(fnd_log.level_procedure,l_prog_label) THEN
336: l_label := 'igs.plsql.igs_sc_grants_pvt.check_grant_text.execption';
337: l_debug_str := 'Exception: '||SQLERRM;
338: fnd_log.string_with_context( fnd_log.level_procedure,l_label,l_debug_str, NULL,NULL,NULL,NULL,NULL,NULL);
339: END IF;
340:

Line 539: l_label := 'igs.plsql.igs_sc_grants_pvt.generate_grant';

535: p_object_name => p_object_name,
536: p_function_type => p_function_type);
537:
538: IF fnd_log.test(fnd_log.level_procedure,l_prog_label) THEN
539: l_label := 'igs.plsql.igs_sc_grants_pvt.generate_grant';
540: l_debug_str := 'Table Name: '||p_object_name||','||' Function type: '||p_function_type||','
541: ||'Pridicate Where Clause: '||x_where_clause;
542: fnd_log.string_with_context( fnd_log.level_procedure,l_label,l_debug_str, NULL,NULL,NULL,NULL,NULL,NULL);
543: END IF;

Line 569: l_label := 'igs.plsql.igs_sc_grants_pvt.generate_grant.ex_error';

565: FND_MSG_PUB.Count_And_Get (p_count => x_msg_count,
566: p_data => x_msg_data );
567:
568: IF fnd_log.test(fnd_log.level_procedure,l_prog_label) THEN
569: l_label := 'igs.plsql.igs_sc_grants_pvt.generate_grant.ex_error';
570: l_debug_str := 'Handled Exception: Table Name: '||p_object_name||','||' Function type: '||p_function_type||','
571: ||'Error Message: '||x_msg_data;
572: fnd_log.string_with_context( fnd_log.level_procedure,l_label,l_debug_str, NULL,NULL,NULL,NULL,NULL,NULL);
573: END IF;

Line 582: l_label := 'igs.plsql.igs_sc_grants_pvt.generate_grant.ex_un';

578: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
579: p_data => x_msg_data );
580:
581: IF fnd_log.test(fnd_log.level_procedure,l_prog_label) THEN
582: l_label := 'igs.plsql.igs_sc_grants_pvt.generate_grant.ex_un';
583: l_debug_str := 'Unhandled Exception: Table Name: '||p_object_name||','||' Function type: '||p_function_type||','
584: ||'Error Message: '||x_msg_data;
585: fnd_log.string_with_context( fnd_log.level_procedure,l_label,l_debug_str, NULL,NULL,NULL,NULL,NULL,NULL);
586: END IF;

Line 599: l_label := 'igs.plsql.igs_sc_grants_pvt.generate_grant.ex_other';

595: FND_MSG_PUB.Count_And_Get ( p_count => x_msg_count,
596: p_data => x_msg_data );
597:
598: IF fnd_log.test(fnd_log.level_procedure,l_prog_label) THEN
599: l_label := 'igs.plsql.igs_sc_grants_pvt.generate_grant.ex_other';
600: l_debug_str := 'Other Exceptions: Table Name: '||p_object_name||','||' Function type: '||p_function_type||','
601: ||'Error Message: '||x_msg_data;
602: fnd_log.string_with_context( fnd_log.level_procedure,l_label,l_debug_str, NULL,NULL,NULL,NULL,NULL,NULL);
603: END IF;

Line 671: l_label := 'igs.plsql.igs_sc_grants_pvt.build_grant.begin';

667:
668: BEGIN
669:
670: IF fnd_log.test(fnd_log.level_procedure,l_prog_label) THEN
671: l_label := 'igs.plsql.igs_sc_grants_pvt.build_grant.begin';
672: l_debug_str := 'Grant ID: '||p_grants_rec.grant_id||','||' Grant text: '||p_grants_rec.grant_text;
673: fnd_log.string_with_context( fnd_log.level_procedure,l_label,l_debug_str, NULL,NULL,NULL,NULL,NULL,NULL);
674: END IF;
675:

Line 714: l_label := 'igs.plsql.igs_sc_grants_pvt.build_grant.grant_cond_loop';

710:
711: FOR c_grant_cond_rec IN c_grant_cond(p_grants_rec.grant_id) LOOP
712:
713: IF fnd_log.test(fnd_log.level_statement,l_prog_label) THEN
714: l_label := 'igs.plsql.igs_sc_grants_pvt.build_grant.grant_cond_loop';
715: l_debug_str := 'Condition Number: '||c_grant_cond_rec.grant_cond_num||','||'Object Attribute ID: '||c_grant_cond_rec.obj_attrib_id
716: ||','||'User Attrib ID: '||c_grant_cond_rec.user_attrib_id||','||'Condition Text Value: '||c_grant_cond_rec.text_value;
717: fnd_log.string_with_context( fnd_log.level_statement,l_label,l_debug_str, NULL,NULL,NULL,NULL,NULL,NULL);
718: END IF;

Line 760: l_label := 'igs.plsql.igs_sc_grants_pvt.build_grant.grant_attrib';

756: CLOSE c_obj_attrib;
757:
758: Put_Log_Msg ('| Attribute fetched: '||l_obj_attrib.obj_attrib_id||' '||l_obj_attrib.obj_attrib_type ,0);
759: IF fnd_log.test(fnd_log.level_statement,l_prog_label) THEN
760: l_label := 'igs.plsql.igs_sc_grants_pvt.build_grant.grant_attrib';
761: l_debug_str := 'Attribute fetched: '||l_obj_attrib.obj_attrib_id||','||l_obj_attrib.obj_attrib_type ;
762: fnd_log.string_with_context( fnd_log.level_statement,l_label,l_debug_str, NULL,NULL,NULL,NULL,NULL,NULL);
763: END IF;
764:

Line 845: l_label := 'igs.plsql.igs_sc_grants_pvt.build_grant.condition_text';

841:
842: END IF;
843:
844: IF fnd_log.test(fnd_log.level_statement,l_prog_label) THEN
845: l_label := 'igs.plsql.igs_sc_grants_pvt.build_grant.condition_text';
846: l_debug_str := 'Attribute condition: '||l_grant_cond(c_grant_cond_rec.grant_cond_num).cond_text ;
847: fnd_log.string_with_context( fnd_log.level_statement,l_label,l_debug_str, NULL,NULL,NULL,NULL,NULL,NULL);
848: END IF;
849:

Line 868: l_label := 'igs.plsql.igs_sc_grants_pvt.build_grant.user_attrib';

864:
865: Put_Log_Msg ('| User Attribute found: '|| l_grant_cond(c_grant_cond_rec.grant_cond_num).user_attrib_id ,0);
866:
867: IF fnd_log.test(fnd_log.level_statement,l_prog_label) THEN
868: l_label := 'igs.plsql.igs_sc_grants_pvt.build_grant.user_attrib';
869: l_debug_str := ' User Attribute found: '||l_grant_cond(c_grant_cond_rec.grant_cond_num).user_attrib_id ;
870: fnd_log.string_with_context( fnd_log.level_statement,l_label,l_debug_str, NULL,NULL,NULL,NULL,NULL,NULL);
871: END IF;
872:

Line 936: l_label := 'igs.plsql.igs_sc_grants_pvt.build_grant.Obj_select_1';

932: NULL;
933: END IF;
934:
935: IF fnd_log.test(fnd_log.level_statement,l_prog_label) THEN
936: l_label := 'igs.plsql.igs_sc_grants_pvt.build_grant.Obj_select_1';
937: l_debug_str := ' Object select NULL, and Z type attrib. Condition text '||l_grant_cond(c_grant_cond_rec.grant_cond_num).cond_text ;
938: fnd_log.string_with_context( fnd_log.level_statement,l_label,l_debug_str, NULL,NULL,NULL,NULL,NULL,NULL);
939: END IF;
940:

Line 982: l_label := 'igs.plsql.igs_sc_grants_pvt.build_grant.Obj_select_2';

978:
979: END IF;
980:
981: IF fnd_log.test(fnd_log.level_statement,l_prog_label) THEN
982: l_label := 'igs.plsql.igs_sc_grants_pvt.build_grant.Obj_select_2';
983: l_debug_str := ' Object select is NULL. Non Z. Grant condition text '||l_grant_cond(c_grant_cond_rec.grant_cond_num).cond_text ;
984: fnd_log.string_with_context( fnd_log.level_statement,l_label,l_debug_str, NULL,NULL,NULL,NULL,NULL,NULL);
985: END IF;
986: END IF; --mmkumar

Line 1007: l_label := 'igs.plsql.igs_sc_grants_pvt.build_grant.Obj_select_3';

1003: NULL;
1004: END IF;
1005:
1006: IF fnd_log.test(fnd_log.level_statement,l_prog_label) THEN
1007: l_label := 'igs.plsql.igs_sc_grants_pvt.build_grant.Obj_select_3';
1008: l_debug_str := ' Object select NOT NULL, and Z type attrib. Condition text '||l_grant_cond(c_grant_cond_rec.grant_cond_num).cond_text ;
1009: fnd_log.string_with_context( fnd_log.level_statement,l_label,l_debug_str, NULL,NULL,NULL,NULL,NULL,NULL);
1010: END IF;
1011:

Line 1036: l_label := 'igs.plsql.igs_sc_grants_pvt.build_grant.Obj_select_4';

1032: l_grant_cond(c_grant_cond_rec.grant_cond_num).cond_text := l_grant_cond(c_grant_cond_rec.grant_cond_num).cond_text||')';
1033: END IF;
1034:
1035: IF fnd_log.test(fnd_log.level_statement,l_prog_label) THEN
1036: l_label := 'igs.plsql.igs_sc_grants_pvt.build_grant.Obj_select_4';
1037: l_debug_str := ' Object select NOT NULL, and Non Z type attrib. Condition text '||l_grant_cond(c_grant_cond_rec.grant_cond_num).cond_text ;
1038: fnd_log.string_with_context( fnd_log.level_statement,l_label,l_debug_str, NULL,NULL,NULL,NULL,NULL,NULL);
1039: END IF;
1040: END IF; --mmkumar

Line 1075: l_label := 'igs.plsql.igs_sc_grants_pvt.build_grant.bodmas_return_1';

1071:
1072: l_bodmas_grant_text := getBodmasCondition(l_grant_text);
1073:
1074: IF fnd_log.test(fnd_log.level_statement,l_prog_label) THEN
1075: l_label := 'igs.plsql.igs_sc_grants_pvt.build_grant.bodmas_return_1';
1076: l_debug_str := ' Grant text after Bodmas call '||l_bodmas_grant_text ;
1077: fnd_log.string_with_context( fnd_log.level_statement,l_label,l_debug_str, NULL,NULL,NULL,NULL,NULL,NULL);
1078: END IF;
1079:

Line 1138: l_label := 'igs.plsql.igs_sc_grants_pvt.build_grant_end';

1134: --code added by mmkumar ends
1135:
1136: --gmaheswa fnd logging
1137: IF fnd_log.test(fnd_log.level_procedure,l_prog_label) THEN
1138: l_label := 'igs.plsql.igs_sc_grants_pvt.build_grant_end';
1139: l_debug_str := 'Final where Clause: Table Name: '||p_group_rec.table_name||','||'Pridicate Where: '||l_statment;
1140: fnd_log.string_with_context( fnd_log.level_procedure,l_label,l_debug_str, NULL,NULL,NULL,NULL,NULL,NULL);
1141: END IF;
1142:

Line 1274: l_label := 'igs.plsql.igs_sc_grants_pvt.generate_grant.local';

1270: BEGIN
1271:
1272: --gmaheswa fnd logging
1273: IF fnd_log.test(fnd_log.level_procedure,l_prog_label) THEN
1274: l_label := 'igs.plsql.igs_sc_grants_pvt.generate_grant.local';
1275: l_debug_str := 'Table Name: '||p_object_name||','||'Function Type: '||p_function_type;
1276: fnd_log.string_with_context( fnd_log.level_procedure,l_label,l_debug_str, NULL,NULL,NULL,NULL,NULL,NULL);
1277: END IF;
1278:

Line 1356: l_label := 'igs.plsql.igs_sc_grants_pvt.generate_grant.default1';

1352:
1353: -- Default policy G - grant all, R - restrict all
1354: IF l_group_rec.default_policy_type ='G' THEN
1355: IF fnd_log.test(fnd_log.level_statement,l_prog_label) THEN
1356: l_label := 'igs.plsql.igs_sc_grants_pvt.generate_grant.default1';
1357: l_debug_str := 'Table Name: '||p_object_name||','||'Function Type: '||p_function_type||','||' User ID: '
1358: ||l_user_id||','||'Default Policy: G';
1359: fnd_log.string_with_context( fnd_log.level_statement,l_label,l_debug_str, NULL,NULL,NULL,NULL,NULL,NULL);
1360: END IF;

Line 1365: l_label := 'igs.plsql.igs_sc_grants_pvt.generate_grant.default2';

1361: RETURN '';
1362:
1363: ELSE
1364: IF fnd_log.test(fnd_log.level_statement,l_prog_label) THEN
1365: l_label := 'igs.plsql.igs_sc_grants_pvt.generate_grant.default2';
1366: l_debug_str := 'Table Name: '||p_object_name||','||'Function Type: '||p_function_type||','||' User ID: '
1367: ||l_user_id||','||'Default Policy: R';
1368: fnd_log.string_with_context( fnd_log.level_statement,l_label,l_debug_str, NULL,NULL,NULL,NULL,NULL,NULL);
1369: END IF;

Line 1380: l_label := 'igs.plsql.igs_sc_grants_pvt.generate_grant.final_return';

1376: END IF;
1377:
1378: --gmaheswa fnd logging
1379: IF fnd_log.test(fnd_log.level_statement,l_prog_label) THEN
1380: l_label := 'igs.plsql.igs_sc_grants_pvt.generate_grant.final_return';
1381: l_debug_str := 'Table Name: '||p_object_name||','||'Function Type: '||p_function_type||','||' User ID: '
1382: ||l_user_id||','||'Final Select: '||l_statment;
1383: fnd_log.string_with_context( fnd_log.level_statement,l_label,l_debug_str, NULL,NULL,NULL,NULL,NULL,NULL);
1384: END IF;

Line 1627: -- replace all PARTY_ID with call to a IGS_SC_GRANTS_PVT.get_current_party function

1623:
1624: l_select := 'INSERT INTO igs_sc_usr_att_vals (USER_ID,USER_ATTRIB_ID,CREATION_DATE,CREATED_BY,LAST_UPDATED_BY,LAST_UPDATE_DATE,ATTR_VALUE )';
1625:
1626: -- find is :USER_ID or :PARTY_ID is used in the text
1627: -- replace all PARTY_ID with call to a IGS_SC_GRANTS_PVT.get_current_party function
1628:
1629: l_select_text := replace_string(ltrim(p_select_text),':PARTY_ID','IGS_SC_GRANTS_PVT.get_current_party');
1630:
1631: l_select_text := replace_string(ltrim(l_select_text),':USER_ID','IGS_SC_GRANTS_PVT.get_current_user');

Line 1629: l_select_text := replace_string(ltrim(p_select_text),':PARTY_ID','IGS_SC_GRANTS_PVT.get_current_party');

1625:
1626: -- find is :USER_ID or :PARTY_ID is used in the text
1627: -- replace all PARTY_ID with call to a IGS_SC_GRANTS_PVT.get_current_party function
1628:
1629: l_select_text := replace_string(ltrim(p_select_text),':PARTY_ID','IGS_SC_GRANTS_PVT.get_current_party');
1630:
1631: l_select_text := replace_string(ltrim(l_select_text),':USER_ID','IGS_SC_GRANTS_PVT.get_current_user');
1632:
1633: -- Replace table alias value with our alias, generated based on attribute id

Line 1631: l_select_text := replace_string(ltrim(l_select_text),':USER_ID','IGS_SC_GRANTS_PVT.get_current_user');

1627: -- replace all PARTY_ID with call to a IGS_SC_GRANTS_PVT.get_current_party function
1628:
1629: l_select_text := replace_string(ltrim(p_select_text),':PARTY_ID','IGS_SC_GRANTS_PVT.get_current_party');
1630:
1631: l_select_text := replace_string(ltrim(l_select_text),':USER_ID','IGS_SC_GRANTS_PVT.get_current_user');
1632:
1633: -- Replace table alias value with our alias, generated based on attribute id
1634:
1635: l_select_text := replace_string(ltrim(l_select_text),':TBL_ALIAS','sc'||p_user_attrib_id||'u');

Line 1653: Put_Log_Msg ('Executed text is: '||IGS_SC_GRANTS_PVT.get_current_user||' : '||IGS_SC_GRANTS_PVT.get_current_party||':'|| l_select ,0);

1649: l_select := l_select||' SELECT :V1, :V2, sysdate , -1 , -1, sysdate ,'||substr(l_select_text,7,32000);
1650:
1651: END IF;
1652:
1653: Put_Log_Msg ('Executed text is: '||IGS_SC_GRANTS_PVT.get_current_user||' : '||IGS_SC_GRANTS_PVT.get_current_party||':'|| l_select ,0);
1654:
1655: -- Execute as it is
1656: EXECUTE IMMEDIATE l_select USING p_user_id,p_user_attrib_id;
1657:

Line 2057: l_label := 'igs.plsql.igs_sc_grants_pvt.check_attrib_text';

2053: RETURN BOOLEAN IS
2054: l_select_text VARCHAR2(32000);
2055: BEGIN
2056: IF fnd_log.test(fnd_log.level_procedure,l_prog_label) THEN
2057: l_label := 'igs.plsql.igs_sc_grants_pvt.check_attrib_text';
2058: l_debug_str := 'Table Name: '||p_table_name||','||'Select Text: '||p_select_text||','||'Object Attribute Type: '||p_obj_attrib_type;
2059: fnd_log.string_with_context( fnd_log.level_procedure,l_label,l_debug_str, NULL,NULL,NULL,NULL,NULL,NULL);
2060: END IF;
2061:

Line 2080: END IGS_SC_GRANTS_PVT;

2076: RETURN check_grant_text ( p_table_name, l_select_text );
2077:
2078: END check_attrib_text;
2079:
2080: END IGS_SC_GRANTS_PVT;
2081: