211: l_pos NUMBER;
212: --
213: BEGIN
214:
215: bis_debug_pub.Add('> parse_DF_Column_Line');
216: x_return_status := FND_API.G_RET_STS_SUCCESS;
217: -- get row of text from table
218: l_string := bis_vg_util.get_row ( p_View_Column_Table
219: , p_Column_Pointer
230: , l_pos
231: , x_return_status
232: , x_error_Tbl
233: );
234: bis_debug_pub.Add('l_token = ' || l_token);
235:
236: IF(l_pos IS NOT NULL) THEN --- first real token exists
237: -- get next token, if any
238: x_prefix := bis_vg_parser.get_string_token
243: , x_return_status
244: , x_error_Tbl
245: );
246:
247: bis_debug_pub.Add('x_prefix = ' || x_prefix);
248:
249: --EDW flag change
250:
251: IF(upper(substr(x_prefix, 1, 4)) = '_EDW')
274: , x_return_status
275: , x_error_Tbl
276: );
277:
278: bis_debug_pub.Add('l_token = ' || l_token);
279:
280:
281: IF( UPPER(l_token) = '_EDW' )
282: THEN
280:
281: IF( UPPER(l_token) = '_EDW' )
282: THEN
283: x_EDW_flag := TRUE;
284: bis_debug_pub.Add('x_EDW_flag = TRUE');
285: ELSIF (UPPER(l_token) = '_BS' ) THEN
286: x_decode := TRUE;
287: bis_debug_pub.Add('x_decode = TRUE');
288: ELSE --- second token is not a valid flag
283: x_EDW_flag := TRUE;
284: bis_debug_pub.Add('x_EDW_flag = TRUE');
285: ELSIF (UPPER(l_token) = '_BS' ) THEN
286: x_decode := TRUE;
287: bis_debug_pub.Add('x_decode = TRUE');
288: ELSE --- second token is not a valid flag
289: bis_vg_util.add_message
290: ( DFX_COL_TAG_EXP_BAD_FLAG_MSG
291: , FND_MSG_PUB.G_MSG_LVL_ERROR
311: x_decode := TRUE;
312: elsif (( upper(l_token) = '_EDW') AND (x_EDW_flag = FALSE))
313: then
314: x_EDW_flag := TRUE;
315: bis_debug_pub.Add('x_EDW_flag = TRUE');
316: else --- Third token is not a valid flag
317: bis_vg_util.add_message
318: ( DFX_COL_TAG_EXP_BAD_FLAG_MSG
319: , FND_MSG_PUB.G_MSG_LVL_ERROR
342: , p_Column_Pointer
343: , x_return_status
344: , x_error_Tbl
345: );
346: bis_debug_pub.Add('< parse_DF_Column_Line');
347: --
348:
349: EXCEPTION
350: when FND_API.G_EXC_ERROR then
390: select 1
391: from fnd_application_all_view
392: where application_short_name = p_app;
393: begin
394: BIS_DEBUG_PUB.Add('> check_application_validity');
395: open l_cursor ;
396: fetch l_cursor into l_dummy ;
397: l_return_value := l_cursor%found ;
398: close l_cursor ;
395: open l_cursor ;
396: fetch l_cursor into l_dummy ;
397: l_return_value := l_cursor%found ;
398: close l_cursor ;
399: BIS_DEBUG_PUB.Add('< check_application_validity');
400: return(l_return_value);
401:
402: END CHECK_APPLICATION_VALIDITY;
403:
434: l_whole_tag VARCHAR2(2000);
435: l_tmp_pointer bis_vg_types.View_Character_Pointer_Type;
436: --
437: BEGIN
438: bis_debug_pub.Add('> parse_DF_Select_Line');
439: x_return_status := FND_API.G_RET_STS_SUCCESS;
440: -- get '_DF'
441: l_whole_tag := bis_vg_parser.get_token_increment_pointer
442: ( p_View_Select_Table
535:
536: END IF;
537: --EDW flag change
538:
539: bis_debug_pub.Add('x_Application_Name = ' || x_Application_Name);
540: x_Desc_Flex_Name := bis_vg_parser.get_token_increment_pointer
541: ( p_View_Select_Table
542: , x_Select_Pointer
543: , ':'''
573: RAISE FND_API.G_EXC_ERROR;
574:
575: END IF;
576:
577: bis_debug_pub.Add('x_Desc_Flex_Name = ' || x_Desc_Flex_Name);
578: x_Table_Alias := bis_vg_parser.get_token
579: ( p_View_Select_Table
580: , x_Select_Pointer
581: , ':'''
582: , x_Select_Pointer
583: , x_return_status
584: , x_error_Tbl
585: );
586: bis_debug_pub.Add('x_Table_Alias = ' || x_Table_Alias);
587:
588:
589: IF (x_table_alias IS NULL
590: OR
619: , x_Select_Pointer
620: , x_return_status
621: , x_error_Tbl
622: );
623: bis_debug_pub.Add('< parse_DF_Select_Line');
624: ELSE
625: BIS_VG_UTIL.Add_Error_message
626: ( p_error_msg_name => bis_vg_desc_flex.DFX_SEL_TAG_EXP_INVALID_APP
627: , p_error_proc_name => G_PKG_NAME||'.parse_DF_Select_Line'
724: type CurType is ref cursor;
725: cv CurType;
726: --
727: BEGIN
728: bis_debug_pub.Add('> add_desc_flexfield_segments');
729: x_return_status := FND_API.G_RET_STS_SUCCESS;
730: IF(p_Prefix IS NOT NULL) THEN
731: l_prefix := p_Prefix || '_';
732: END IF;
730: IF(p_Prefix IS NOT NULL) THEN
731: l_prefix := p_Prefix || '_';
732: END IF;
733:
734: bis_debug_pub.Add('l_prefix = ' || l_prefix);
735:
736: x_attr_categ_flag := p_attr_categ_flag;
737: IF(p_Context_Code IS NOT NULL AND p_nContexts_flag = FALSE) THEN
738: -- l_context_code := '^' || p_Context_Code;
771: p_context_code;
772: END IF;
773: ---EDW flag change
774:
775: bis_debug_pub.Add('x_Column_Table(1) = ' || x_Column_Table(1));
776:
777: -- x_Select_Table(1) := ' ' || p_Table_Alias || '.'
778: -- || p_Flexinfo.context_column_name;
779: --EDW flag change
800: x_Column_Comment_Table(l_count).column_comments :=p_flexfield.application_id||','||
801: p_flexfield.flexfield_name||','||
802: p_context_code||','||
803: l_segments.APPLICATION_COLUMN_NAME(j);
804: bis_debug_pub.Add('x_Column_Table('|| l_count||') = '
805: || x_Column_Table(l_count));
806: IF (p_decode = TRUE) THEN
807: x_Select_Table(l_count) := ', '
808: || 'DECODE( '
848: || l_segments.APPLICATION_COLUMN_NAME(j);
849: END IF;
850: --EDW flag change
851: END IF;
852: bis_debug_pub.Add('x_Select_Table('|| l_count||') = ' || x_Select_Table(l_count));
853: --
854: l_count := l_count + 1;
855: END LOOP;
856: END IF;
853: --
854: l_count := l_count + 1;
855: END LOOP;
856: END IF;
857: bis_debug_pub.Add('< add_desc_flexfield_segments');
858: --
859: EXCEPTION
860: when FND_API.G_EXC_ERROR then
861: x_return_status := FND_API.G_RET_STS_ERROR ;
948: l_dummy2 varchar2(2000);
949: l_schema varchar2(400);
950:
951: BEGIN
952: --- bis_debug_pub.debug_on;
953: bis_debug_pub.Add('> update_Desc_Flex_Tables');
954:
955: --get schema name
956: if FND_INSTALLATION.GET_APP_INFO(p_Application_Name,l_dummy1, l_dummy2,l_schema) = false then
949: l_schema varchar2(400);
950:
951: BEGIN
952: --- bis_debug_pub.debug_on;
953: bis_debug_pub.Add('> update_Desc_Flex_Tables');
954:
955: --get schema name
956: if FND_INSTALLATION.GET_APP_INFO(p_Application_Name,l_dummy1, l_dummy2,l_schema) = false then
957: bis_debug_pub.Add('FND_INSTALLATION.GET_APP_INFO returned with error');
953: bis_debug_pub.Add('> update_Desc_Flex_Tables');
954:
955: --get schema name
956: if FND_INSTALLATION.GET_APP_INFO(p_Application_Name,l_dummy1, l_dummy2,l_schema) = false then
957: bis_debug_pub.Add('FND_INSTALLATION.GET_APP_INFO returned with error');
958: end if;
959:
960: x_return_status := FND_API.G_RET_STS_SUCCESS;
961: FND_DFLEX.GET_FLEXFIELD( appl_short_name => p_Application_Name
962: , flexfield_name => p_Desc_Flex_Name
963: , flexfield => l_flexfield
964: , flexinfo => l_flexinfo
965: );
966: bis_debug_pub.Add('l_flexfield.FLEXFIELD_NAME = '
967: || l_flexfield.FLEXFIELD_NAME);
968: bis_debug_pub.Add('l_flexinfo.TITLE = ' || l_flexinfo.TITLE);
969: IF p_column_table IS NULL
970: --- regular BVG behavior (not pruned)
964: , flexinfo => l_flexinfo
965: );
966: bis_debug_pub.Add('l_flexfield.FLEXFIELD_NAME = '
967: || l_flexfield.FLEXFIELD_NAME);
968: bis_debug_pub.Add('l_flexinfo.TITLE = ' || l_flexinfo.TITLE);
969: IF p_column_table IS NULL
970: --- regular BVG behavior (not pruned)
971: THEN
972: GET_CONTEXTS
972: GET_CONTEXTS
973: ( flexfield => l_flexfield
974: , contexts => l_contexts
975: );
976: bis_debug_pub.Add('l_contexts.NCONTEXTS = ' || l_contexts.NCONTEXTS);
977: -- set l_nContexts_flag if only one context or only one enabled context
978: IF(l_contexts.NCONTEXTS = 1) THEN
979: l_nContexts_flag := TRUE;
980: ELSE
1056: IF ( p_column_table(i).flex_field_type = 'D'
1057: AND p_column_table(i).id_flex_code = p_desc_flex_name)
1058: THEN
1059: l_count := l_count+1;
1060: bis_debug_pub.ADD ('Processing p_column_table(i).segment_name = '
1061: || p_column_table(i).segment_name);
1062: bis_debug_pub.ADD ('and p_column_table(i).structure_num = '
1063: || p_column_table(i).structure_num);
1064: bis_debug_pub.ADD ('and p_column_table(i).application_column_name = '
1058: THEN
1059: l_count := l_count+1;
1060: bis_debug_pub.ADD ('Processing p_column_table(i).segment_name = '
1061: || p_column_table(i).segment_name);
1062: bis_debug_pub.ADD ('and p_column_table(i).structure_num = '
1063: || p_column_table(i).structure_num);
1064: bis_debug_pub.ADD ('and p_column_table(i).application_column_name = '
1065: || p_column_table(i).application_column_name);
1066: x_column_table(l_count):= p_Prefix
1060: bis_debug_pub.ADD ('Processing p_column_table(i).segment_name = '
1061: || p_column_table(i).segment_name);
1062: bis_debug_pub.ADD ('and p_column_table(i).structure_num = '
1063: || p_column_table(i).structure_num);
1064: bis_debug_pub.ADD ('and p_column_table(i).application_column_name = '
1065: || p_column_table(i).application_column_name);
1066: x_column_table(l_count):= p_Prefix
1067: || '_' || p_column_table(i).segment_name;
1068:
1095:
1096: IF l_count > 1
1097: THEN
1098: x_Column_Table(1) := p_prefix || '_context';
1099: bis_debug_pub.ADD ('l_Flexinfo.context_column_name = '
1100: || l_Flexinfo.context_column_name);
1101: IF p_dummy_flag OR l_Flexinfo.context_column_name IS NULL
1102: THEN
1103: x_Select_Table(1) := 'NULL';
1115: ( x_Column_Table
1116: , x_return_status
1117: , x_error_Tbl
1118: );
1119: bis_debug_pub.Add('< update_Desc_Flex_Tables');
1120: --- bis_debug_pub.debug_off;
1121: --
1122:
1123: EXCEPTION
1116: , x_return_status
1117: , x_error_Tbl
1118: );
1119: bis_debug_pub.Add('< update_Desc_Flex_Tables');
1120: --- bis_debug_pub.debug_off;
1121: --
1122:
1123: EXCEPTION
1124: when FND_API.G_EXC_ERROR then
1205: l_decode BOOLEAN;
1206: l_EDW_Flag BOOLEAN; --EDW flag change
1207: l_DUMMY_Flag BOOLEAN; --EDW flag change
1208: BEGIN
1209: bis_debug_pub.Add('> add_Desc_Flex_Info');
1210: x_return_status := FND_API.G_RET_STS_SUCCESS;
1211:
1212: parse_DF_Column_Line( p_View_Column_Table
1213: , p_Column_Pointer
1218: , x_return_status
1219: , x_error_Tbl
1220: );
1221:
1222: bis_debug_pub.Add('l_Prefix = ' || l_Prefix);
1223:
1224: --- This clause catches flexfield tags that do not have the
1225: --- _EDW tags when the generator is called via generate_pruned_view
1226: IF (p_column_table IS NOT NULL AND l_edw_flag = FALSE )
1238: , l_DUMMY_Flag --EDW flag change
1239: , x_return_status
1240: , x_error_Tbl
1241: );
1242: bis_debug_pub.Add('l_Application_Name = ' || l_Application_Name);
1243: bis_debug_pub.Add('l_Desc_Flex_Name = ' || l_Desc_Flex_Name);
1244: bis_debug_pub.Add('l_Table_Alias = ' || l_Table_Alias);
1245: bis_debug_pub.Add('l_Prefix = ' || l_Prefix);
1246:
1239: , x_return_status
1240: , x_error_Tbl
1241: );
1242: bis_debug_pub.Add('l_Application_Name = ' || l_Application_Name);
1243: bis_debug_pub.Add('l_Desc_Flex_Name = ' || l_Desc_Flex_Name);
1244: bis_debug_pub.Add('l_Table_Alias = ' || l_Table_Alias);
1245: bis_debug_pub.Add('l_Prefix = ' || l_Prefix);
1246:
1247: IF(
1240: , x_error_Tbl
1241: );
1242: bis_debug_pub.Add('l_Application_Name = ' || l_Application_Name);
1243: bis_debug_pub.Add('l_Desc_Flex_Name = ' || l_Desc_Flex_Name);
1244: bis_debug_pub.Add('l_Table_Alias = ' || l_Table_Alias);
1245: bis_debug_pub.Add('l_Prefix = ' || l_Prefix);
1246:
1247: IF(
1248: (p_Mode <> bis_vg_types.remove_tags_mode)
1241: );
1242: bis_debug_pub.Add('l_Application_Name = ' || l_Application_Name);
1243: bis_debug_pub.Add('l_Desc_Flex_Name = ' || l_Desc_Flex_Name);
1244: bis_debug_pub.Add('l_Table_Alias = ' || l_Table_Alias);
1245: bis_debug_pub.Add('l_Prefix = ' || l_Prefix);
1246:
1247: IF(
1248: (p_Mode <> bis_vg_types.remove_tags_mode)
1249: AND
1273: );
1274: END IF;
1275: bis_vg_util.print_View_Text(x_Column_Table, x_return_status, x_error_Tbl);
1276: bis_vg_util.print_View_Text(x_Select_Table, x_return_status, x_error_Tbl);
1277: bis_debug_pub.Add('COLUMN POINTER');
1278: bis_vg_util.print_View_Pointer ( x_Column_Pointer
1279: , x_return_status
1280: , x_error_Tbl
1281: );
1278: bis_vg_util.print_View_Pointer ( x_Column_Pointer
1279: , x_return_status
1280: , x_error_Tbl
1281: );
1282: bis_debug_pub.Add('SELECT POINTER');
1283: bis_vg_util.print_View_Pointer ( x_Select_Pointer
1284: , x_return_status
1285: , x_error_Tbl
1286: );
1283: bis_vg_util.print_View_Pointer ( x_Select_Pointer
1284: , x_return_status
1285: , x_error_Tbl
1286: );
1287: bis_debug_pub.Add('< add_Desc_Flex_Info');
1288:
1289: --
1290:
1291: