DBA Data[Home] [Help]

PACKAGE BODY: APPS.BIS_VG_PARSER

Source


1 PACKAGE body BIS_VG_PARSER AS
2 /* $Header: BISTPARB.pls 115.7 2002/03/27 08:18:43 pkm ship     $ */
3 
4 --  Copyright (c) 1998 Oracle Corporation, Redwood Shores, CA, USA
5 --  All rights reserved.
6 --
7 --  FILENAME
8 --
9 --      BISTPARB.pls
10 --
11 --  DESCRIPTION
12 --
13 --      body of view parser to be used in the view generator
14 --         package specifyling the view security
15 --
16 --  NOTES
17 --
18 --  HISTORY
19 --
20 --  21-JUL-98 Created
21 --  19-MAR-99 Edited by WNASRALL@US for exception handling
22 --  11-DEC-01 Edited by DBOWLES  Added dr driver comments.
23 --
24 g_max_number CONSTANT NUMBER := 100000000000000000000000;
25 G_PKG_NAME CONSTANT VARCHAR(30) := 'BIS_VG_PARSER';
26 --========================================================
27 -- replaces the selected portion WITH blanks
28 -- start and end are included
29 FUNCTION put_blanks
30 ( p_string  IN VARCHAR2
31 , start_num IN NUMBER
32 , end_num   IN NUMBER
33 , x_return_status       OUT VARCHAR2
34 , x_error_Tbl           OUT BIS_VG_UTIL.Error_Tbl_Type
35 )
36 RETURN VARCHAR2
37 IS
38 l_temp VARCHAR2(2000);
39 l_str  VARCHAR2(2000);
40 BEGIN
41    BIS_DEBUG_PUB.Add ('> put_blanks');
42   -- BIS_DEBUG_PUB.Add ('begin string is '||p_string);
43   -- BIS_DEBUG_PUB.Add ('start_num = '||start_num||' end num = '||end_num);
44 --
45   FOR j IN start_num .. end_num loop
46     l_temp := l_temp || ' ';
47   END LOOP;
48 --
49   l_str :=  Substr(p_string, 1, start_num - 1);
50   l_str := l_str || l_temp;
51 --
52   IF (end_num < Length(p_string)) THEN
53     l_temp := Substr(p_string, end_num + 1, Length(p_string));
54     l_str := l_str||l_temp;
55   END IF;
56   -- BIS_DEBUG_PUB.Add ('end string is '||l_str);
57   BIS_DEBUG_PUB.Add ('< put_blanks ');
58   RETURN l_str;
59 
60 
61 EXCEPTION
62    when FND_API.G_EXC_ERROR then
63       x_return_status := FND_API.G_RET_STS_ERROR ;
64       RAISE FND_API.G_EXC_ERROR;
65    when FND_API.G_EXC_UNEXPECTED_ERROR then
66       x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
67       RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
68    when others then
69       x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
70       BIS_VG_UTIL.Add_Error_Message
71       ( p_error_msg_id      => SQLCODE
72       , p_error_description => SQLERRM
73       , p_error_proc_name   => G_PKG_NAME||'.put_blanks'
74       , p_error_table       => x_error_tbl
75       , x_error_table       => x_error_tbl
76       );
77       RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
78 
79 END put_blanks;
80 --
81 -- find the comments and replace them with blanks
82 FUNCTION replace_comments_with_blanks
83 ( p_string     IN  VARCHAR2
84 , p_in_comment IN  BOOLEAN
85 , x_in_comment OUT BOOLEAN
86 , x_return_status       OUT VARCHAR2
87 , x_error_Tbl           OUT BIS_VG_UTIL.Error_Tbl_Type
88 )
89 RETURN VARCHAR2
90 IS
91 l_done      BOOLEAN := FALSE;
92 l_start_pos NUMBER;
93 l_end_pos   NUMBER;
94 l_string    VARCHAR2(2000);
95 l_first     BOOLEAN := TRUE;
96 l_open_pos  NUMBER;
97 l_close_pos NUMBER;
98 BEGIN
99    BIS_DEBUG_PUB.Add('> replace_comments_with_blanks');
100    x_return_status := FND_API.G_RET_STS_SUCCESS;
101    l_string := p_string;
102 
103 --   l_start_pos := Instr(l_string, '--');
104 --   IF (l_start_pos <> 0) THEN
105 --     l_string := Substr(l_string, 1, l_start_pos);
106 --   END IF;
107 --
108    x_in_comment := p_in_comment;
109    WHILE (l_done = false) LOOP
110      l_open_pos :=  Instr(l_string, '/*');
111      l_close_pos := Instr(l_string, '*/');
112      IF (l_open_pos = 0) THEN
113         -- no open comments
114         IF (l_close_pos = 0) THEN
115           -- no close comments
116           IF (x_in_comment = TRUE) THEN
117             -- we are in comment mode
118             IF (l_first = TRUE) THEN
119               -- just entered, blank out the entire line
120                l_string := '';
121             END IF;
122             -- done
123           END IF;
124           -- no start or end, done
125           l_done := TRUE;
126         ELSE
127           -- end pos is not zero, blank till end of comment
128           l_string := put_blanks(l_string
129 	  			, 1
130 				, l_close_pos + 1
131 				, x_return_status
132 				, x_error_Tbl
133 				);
134           x_in_comment := FALSE;
135         END IF;
136      ELSE
137        -- there is an open comment
138        IF (l_close_pos = 0) THEN
139           -- no close comments
140           l_string := put_blanks ( l_string
141 	  			 , l_open_pos
142 				 , Length(l_string)
143 				 , x_return_status
144 				 , x_error_Tbl
145 				 );
146           x_in_comment := TRUE;
147           l_done := TRUE;
148        ELSE
149           IF (l_open_pos < l_close_pos) THEN
150             l_string := put_blanks ( l_string
151 	    			   , l_open_pos
152 				   , l_close_pos + 1
153 				   , x_return_status
154 				   , x_error_Tbl
155 				   );
156           ELSE
157             l_string := put_blanks ( l_string
158 	    			   , 1
159 				   , l_close_pos + 1
160 				   , x_return_status
161 				   , x_error_Tbl
162 				   );
163           END IF;
164           x_in_comment := FALSE;
165        END IF;
166      END IF;
167    END LOOP;
168    BIS_DEBUG_PUB.Add('< replace_comments_with_blanks');
169    RETURN l_string;
170 
171 
172 EXCEPTION
173    when FND_API.G_EXC_ERROR then
174       x_return_status := FND_API.G_RET_STS_ERROR ;
175       RAISE FND_API.G_EXC_ERROR;
176    when FND_API.G_EXC_UNEXPECTED_ERROR then
177       x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
178       RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
179    when others then
180       x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
181       BIS_VG_UTIL.Add_Error_Message
182       ( p_error_msg_id      => SQLCODE
183       , p_error_description => SQLERRM
184       , p_error_proc_name   => G_PKG_NAME||'.replace_comments_with_blanks'
185       , p_error_table       => x_error_tbl
186       , x_error_table       => x_error_tbl
187       );
188       RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
189 
190 END replace_comments_with_blanks;
191 --
192 FUNCTION Get_Keyword_Position
193 ( p_view_table    IN bis_vg_types.View_Text_Table_Type
194 , p_string_set    IN bis_vg_types.View_Text_Table_Type
195 , p_start_pointer IN bis_vg_types.View_Character_Pointer_Type
196 , x_return_status       OUT VARCHAR2
197 , x_error_Tbl           OUT BIS_VG_UTIL.Error_Tbl_Type
198 )
199 RETURN bis_vg_types.view_character_pointer_type
200 IS
201 l_pos      NUMBER;
202 l_min_pos  NUMBER;
203 total_rows NUMBER;
204 l_string   VARCHAR2(2000);
205 l_temp     VARCHAR2(2000);
206 l_pointer  bis_vg_types.view_character_pointer_type := NULL;
207 l_in_comment BOOLEAN := FALSE;
208 BEGIN
209    BIS_DEBUG_PUB.Add ('> Get_Keyword_Position ');
210    total_rows := p_view_table.COUNT;
211 --
212    bis_vg_util.print_view_pointer(p_start_pointer, x_return_status, x_error_Tbl);
213 --
214    FOR i IN 1 .. p_string_set.COUNT LOOP
215      BIS_DEBUG_PUB.Add ('string set '||i||' is '||p_string_set(i));
216    END LOOP;
217 
218    l_min_pos := g_max_number;
219    l_pos     := 0;
220    FOR i IN p_start_pointer.row_num .. total_rows LOOP
221      l_string := p_view_table(i);
222 --
223      IF (i = p_start_pointer.row_num) THEN
224         -- we are AT the beginning,
225         -- make sure that we only take the relevant part
226         -- blank OUT the rest
227         IF (p_start_pointer.col_num > 1) THEN
228           l_string := put_blanks( l_string
229 	  			, 1
230 				, p_start_pointer.col_num - 1
231 				, x_return_status
232 				, x_error_Tbl
233 				);
234         END IF;
235      END IF;
236 --
237      BIS_DEBUG_PUB.Add ('string is '||l_string);
238      -- REPLACE ALL the comments WITH blanks
239      l_string := replace_comments_with_blanks( l_string
240                                              , l_in_comment
241                                              , l_in_comment
242 					     , x_return_status
243 					     , x_error_Tbl
244 					     );
245 --
246      -- find the earliest occuring string
247      FOR j IN 1 .. p_string_set.COUNT LOOP
248         BIS_DEBUG_PUB.Add ('comparing string is '||p_string_set(j));
249         l_pos := Instr(Upper(l_string), Upper(p_string_set(j)));
250 --
251         BIS_DEBUG_PUB.Add ('string occurrence at '||l_pos);
252         IF (l_pos <> 0) THEN
253            IF (l_pos < l_min_pos) THEN
254               BIS_DEBUG_PUB.Add ('l_pos '||l_pos||
255                                  ' less than l_min '|| l_min_pos);
256               l_min_pos := l_pos;
257            END IF;
258         END IF;
259      END LOOP;
260 
261      BIS_DEBUG_PUB.Add ('l_min is '||l_min_pos);
262 
263      -- we found the string. set up the end pointer and return
264      IF (l_min_pos <> g_max_number) THEN
265        l_pointer.row_num := i;
266        l_pointer.col_num := l_min_pos;
267        BIS_DEBUG_PUB.Add ('returning with a valid pointer');
268        bis_vg_util.print_view_pointer(l_pointer, x_return_status, x_error_Tbl);
269        BIS_DEBUG_PUB.Add ('< Get_Keyword_Position');
270        RETURN l_pointer;
271      END IF;
272 
273    END LOOP;
274    bis_vg_util.print_view_pointer(l_pointer, x_return_status, x_error_Tbl);
275    BIS_DEBUG_PUB.Add ('< Get_Keyword_Position');
276    RETURN l_pointer;
277 
278 EXCEPTION
279    when FND_API.G_EXC_ERROR then
280       x_return_status := FND_API.G_RET_STS_ERROR ;
281       RAISE FND_API.G_EXC_ERROR;
282    when FND_API.G_EXC_UNEXPECTED_ERROR then
283       x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
284       RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
285    when others then
286       x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
287       BIS_VG_UTIL.Add_Error_Message
288       ( p_error_msg_id      => SQLCODE
289       , p_error_description => SQLERRM
290       , p_error_proc_name   => G_PKG_NAME||'.Get_Keyword_Position'
291       , p_error_table       => x_error_tbl
292       , x_error_table       => x_error_tbl
293       );
294       RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
295 
296 
297 END Get_Keyword_Position;
298 
299 FUNCTION get_string_token
300 ( p_view_str         IN  bis_vg_types.View_Text_Table_Rec_Type
301 , p_start            IN  NUMBER
302 , p_delimiter_string IN  VARCHAR2
303 , x_end_pointer      OUT NUMBER
304 , x_return_status       OUT VARCHAR2
305 , x_error_Tbl           OUT BIS_VG_UTIL.Error_Tbl_Type
306 )
307 RETURN VARCHAR2
308 IS
309 l_str        VARCHAR2(2000);
310 l_char       VARCHAR2(1);
311 l_end        NUMBER;
312 l_start      NUMBER;
313 l_total      NUMBER;
314 l_pos        NUMBER := 0;
315 l_delimiters VARCHAR2(100);
316 BEGIN
317    BIS_DEBUG_PUB.Add('> get_string_token');
318    x_return_status := FND_API.G_RET_STS_SUCCESS;
319 
320    l_start := p_start;
321    l_total := Length(p_view_str);
322    x_end_pointer := l_start;
323    l_delimiters  := Upper(p_delimiter_string);
324    WHILE (   l_pos = 0
325          AND x_end_pointer IS NOT NULL
326          AND x_end_pointer <= l_total) LOOP
327 
328       l_char := Substr(p_view_str, x_end_pointer, 1);
329       l_pos := Instr(l_delimiters, Upper(l_char));
330       BIS_DEBUG_PUB.Add('l_char = '||l_char||' l_pos = '||l_pos);
331       IF (l_pos = 0) then
332         x_end_pointer := x_end_pointer + 1;
333       END IF;
334    END LOOP;
335 
336    l_str := Substr(p_view_str, l_start, x_end_pointer - l_start);
337 
338    -- skip the delimiter
339    IF (x_end_pointer >= l_total) THEN
340       x_end_pointer := NULL;
341    ELSE
342      WHILE (    l_pos <> 0
343            AND x_end_pointer IS NOT NULL
344            AND x_end_pointer <= l_total) LOOP
345 
346         l_char := Substr(p_view_str, x_end_pointer, 1);
347         l_pos := Instr(l_delimiters, Upper(l_char));
348         BIS_DEBUG_PUB.Add('l_char = '||l_char||' l_pos = '||l_pos);
349         IF (l_pos <> 0) then
350           x_end_pointer := x_end_pointer + 1;
351         END IF;
352      END LOOP;
353    END IF;
354 
355    BIS_DEBUG_PUB.Add('< get_string_token');
356    RETURN l_str;
357 
358 
359 EXCEPTION
360    when FND_API.G_EXC_ERROR then
361       x_return_status := FND_API.G_RET_STS_ERROR ;
362       RAISE FND_API.G_EXC_ERROR;
363    when FND_API.G_EXC_UNEXPECTED_ERROR then
364       x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
365       RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
366    when others then
367       x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
368       BIS_VG_UTIL.Add_Error_Message
369       ( p_error_msg_id      => SQLCODE
370       , p_error_description => SQLERRM
371       , p_error_proc_name   => G_PKG_NAME||'.get_string_token'
372       , p_error_table       => x_error_tbl
373       , x_error_table       => x_error_tbl
374       );
375       RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
376 
377 END get_string_token;
378 
379 FUNCTION get_token
380 ( p_view_table       IN  bis_vg_types.View_Text_Table_Type
381 , p_start_pointer    IN  bis_vg_types.View_Character_Pointer_Type
382 , p_delimiter_string IN  VARCHAR2
383 , x_end_pointer      OUT bis_vg_types.View_Character_Pointer_Type
384 , x_return_status       OUT VARCHAR2
385 , x_error_Tbl           OUT BIS_VG_UTIL.Error_Tbl_Type
386 )
387 RETURN VARCHAR2
388 IS
389 l_str_table  bis_vg_types.view_text_table_type;
390 l_length     NUMBER;
391 l_temp       VARCHAR2(2000);
392 l_char       VARCHAR2(1);
393 l_pos        NUMBER := 0;
394 l_delimiters VARCHAR2(100);
395 BEGIN
396    BIS_DEBUG_PUB.Add('> get_token');
397    x_return_status := FND_API.G_RET_STS_SUCCESS;
398    l_temp := NULL;
399    BIS_VG_UTIL.print_view_pointer(p_start_pointer, x_return_status, x_error_Tbl);
400    x_end_pointer := p_start_pointer;
401    l_delimiters := Upper(p_delimiter_string);
402    WHILE (l_pos = 0 AND x_end_pointer.row_num IS NOT null) loop
403       l_char := BIS_VG_UTIL.get_char( p_view_table
404       				    , x_end_pointer
405 				    , x_return_status
406 				    , x_error_Tbl
407 				    );
408       l_pos := Instr(l_delimiters, Upper(l_char));
409       BIS_DEBUG_PUB.Add('l_char = '||l_char||' l_pos = '||l_pos);
410       IF (l_pos = 0) then
411         x_end_pointer := BIS_VG_UTIL.increment_pointer( p_view_table
412                                                       , x_end_pointer
413 						      , x_return_status
414 						      , x_error_Tbl
415                                                       );
416       END IF;
417       bis_vg_util.print_view_pointer( x_end_pointer
418       				    , x_return_status
419 				    , x_error_Tbl
420 				    );
421    end loop;
422    BIS_DEBUG_PUB.Add('out of loop');
423    l_temp := bis_vg_util.get_string( p_view_table
424                                    , p_start_pointer
425                                    , x_end_pointer
426 				   , x_return_status
427 				   , x_error_Tbl
428 				   );
429    BIS_VG_UTIL.print_view_pointer(x_end_pointer, x_return_status, x_error_Tbl);
430    BIS_DEBUG_PUB.Add('< get_token');
431    RETURN l_temp;
432 
433 
434 EXCEPTION
435    when FND_API.G_EXC_ERROR then
436       x_return_status := FND_API.G_RET_STS_ERROR ;
437       RAISE FND_API.G_EXC_ERROR;
438    when FND_API.G_EXC_UNEXPECTED_ERROR then
439       x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
440       RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
441    when others then
442       x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
443       BIS_VG_UTIL.Add_Error_Message
444       ( p_error_msg_id      => SQLCODE
445       , p_error_description => SQLERRM
446       , p_error_proc_name   => G_PKG_NAME||'.get_token'
447       , p_error_table       => x_error_tbl
448       , x_error_table       => x_error_tbl
449       );
450       RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
451 
452 END get_token;
453 
454 
455 FUNCTION get_token_increment_pointer
456 ( p_view_table       IN  bis_vg_types.View_Text_Table_Type
457 , p_start_pointer    IN  bis_vg_types.View_Character_Pointer_Type
458 , p_delimiter_string IN  VARCHAR2
459 , x_end_pointer      OUT bis_vg_types.View_Character_Pointer_Type
460 , x_return_status       OUT VARCHAR2
461 , x_error_Tbl           OUT BIS_VG_UTIL.Error_Tbl_Type
462 )
463 RETURN VARCHAR2
464 IS
465 l_temp        VARCHAR2(1000);
466 l_CHAR        VARCHAR2(10);
467 l_pos         NUMBER := 1;
468 l_delimiters  VARCHAR2(100);
469 BEGIN
470 
471    BIS_DEBUG_PUB.Add('> get_token_increment_pointer');
472    x_return_status := FND_API.G_RET_STS_SUCCESS;
473    BIS_VG_UTIL.print_View_Pointer(p_start_pointer, x_return_status, x_error_Tbl);
474    l_temp := get_token( p_view_table
475                       , p_start_pointer
476                       , p_delimiter_string
477                       , x_end_pointer
478 		      , x_return_status
479 		      , x_error_Tbl
480                       );
481    BIS_VG_UTIL.print_View_Pointer(x_end_pointer, x_return_status, x_error_Tbl);
482    l_delimiters := Upper(p_delimiter_string);
483    WHILE (l_pos <> 0 AND x_end_pointer.row_num IS NOT null) loop
484       l_char := BIS_VG_UTIL.get_char ( p_View_Table
485       				     , x_end_pointer
486 				     , x_return_status
487 				     , x_error_Tbl
488 				     );
489       l_pos := Instr(l_delimiters, Upper(l_char));
490       IF (l_pos <> 0) THEN
491          x_end_pointer := BIS_VG_UTIL.increment_pointer( p_View_Table
492                                                        , x_end_pointer
493 						       , x_return_status
494 						       , x_error_Tbl
495                                                        );
496       END IF;
497    end loop;
498    BIS_DEBUG_PUB.Add('< get_token_increment_pointer');
499    RETURN l_temp;
500 
501 
502 EXCEPTION
503    when FND_API.G_EXC_ERROR then
504       x_return_status := FND_API.G_RET_STS_ERROR ;
505       RAISE FND_API.G_EXC_ERROR;
506    when FND_API.G_EXC_UNEXPECTED_ERROR then
507       x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
508       RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
509    when others then
510       x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
511       BIS_VG_UTIL.Add_Error_Message
512       ( p_error_msg_id      => SQLCODE
513       , p_error_description => SQLERRM
514       , p_error_proc_name   => G_PKG_NAME||'.get_token_increment_pointer'
515       , p_error_table       => x_error_tbl
516       , x_error_table       => x_error_tbl
517       );
518       RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
519 
520 END get_token_increment_pointer;
521 
522 -- this functions returns the string expression between the start pointer and
523 -- single quote ending the expression. Takes care of nested strings in the
524 -- expression
525 
526 FUNCTION get_expression
527 ( p_view_table       IN bis_vg_types.View_Text_Table_Type
528 , p_start_pointer    IN  bis_vg_types.View_Character_Pointer_Type
529 , x_end_pointer      OUT bis_vg_types.View_Character_Pointer_Type
530 , x_return_status       OUT VARCHAR2
531 , x_error_Tbl           OUT BIS_VG_UTIL.Error_Tbl_Type
532 )
533 RETURN VARCHAR2
534 IS
535 l_done           BOOLEAN := FALSE;
536 l_str            VARCHAR2(2000);
537 l_delimiter      VARCHAR2(1) := '''';
538 l_temp_pointer   bis_vg_types.View_Character_Pointer_Type;
539 BEGIN
540    BIS_DEBUG_PUB.Add('> get_expression');
541    x_return_status := FND_API.G_RET_STS_SUCCESS;
542    x_end_pointer := p_start_pointer;
543    WHILE (l_done = FALSE) LOOP
544      -- find the single quote incrementing the pointer
545      l_str := get_token( p_view_table
546                        , x_end_pointer
547                        , l_delimiter
548                        , x_end_pointer
549 		       , x_return_status
550 		       , x_error_Tbl
551                        );
552 
553      -- increment pointer to just beyond
554      l_temp_pointer := bis_vg_util.increment_pointer( p_view_table
555                                                     , x_end_pointer
556 						    , x_return_status
557 						    , x_error_Tbl
558                                                     );
559 
560      IF (bis_vg_util.get_char( p_view_table
561      			     , l_temp_pointer
562 			     , x_return_status
563 			     , x_error_Tbl
564 			     )
565 			     <> l_delimiter)
566       THEN
567         -- we do not have two quotes one after another
568         -- valid delimiter, done
569         l_done := TRUE;
570       ELSE
571         -- invalid delimiter. increment and continue
572         x_end_pointer := bis_vg_util.increment_pointer( p_view_table
573                                                         , l_temp_pointer
574                                                         , x_return_status
575 							, x_error_Tbl
576 							);
577 
578      END IF;
579    END LOOP;
580    BIS_DEBUG_PUB.Add('< get_expression');
581    RETURN bis_vg_util.get_string ( p_view_table
582    				 , p_start_pointer
583 				 , x_end_pointer
584 				 , x_return_status
585 				 , x_error_Tbl
586 				 );
587 
588 EXCEPTION
589    when FND_API.G_EXC_ERROR then
590       x_return_status := FND_API.G_RET_STS_ERROR ;
591       RAISE FND_API.G_EXC_ERROR;
592    when FND_API.G_EXC_UNEXPECTED_ERROR then
593       x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
594       RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
595    when others then
596       x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
597       BIS_VG_UTIL.Add_Error_Message
598       ( p_error_msg_id      => SQLCODE
599       , p_error_description => SQLERRM
600       , p_error_proc_name   => G_PKG_NAME||'.get_expression'
601       , p_error_table       => x_error_tbl
602       , x_error_table       => x_error_tbl
603       );
604       RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
605 
606 END get_expression;
607 
608 -- skips the type of tag
609 -- returns the tag
610 -- the out pointer is positioned beyond the separator
611 FUNCTION skip_tag
612 ( p_View_Table    IN  BIS_VG_TYPES.View_Text_Table_Type
613 , p_start_pointer IN  BIS_VG_TYPES.view_character_pointer_type
614 , X_end_pointer   OUT BIS_VG_TYPES.view_character_pointer_type
615 , x_return_status       OUT VARCHAR2
616 , x_error_Tbl           OUT BIS_VG_UTIL.Error_Tbl_Type
617 )
618 RETURN VARCHAR2
619 IS
620 l_str VARCHAR2(100);
621 BEGIN
622   -- get the tag
623   BIS_DEBUG_PUB.Add('> skip_tag');
624   x_return_status := FND_API.G_RET_STS_SUCCESS;
625   l_str := bis_vg_parser.get_token_increment_pointer( p_view_table
626                                                     , p_start_pointer
627                                                     , ':'
628                                                     , x_end_pointer
629 						    , x_return_status
630 						    , x_error_Tbl
631                                                     );
632   BIS_DEBUG_PUB.Add('< skip_tag');
633   RETURN l_str;
634 
635 
636 EXCEPTION
637    when FND_API.G_EXC_ERROR then
638       x_return_status := FND_API.G_RET_STS_ERROR ;
639       RAISE FND_API.G_EXC_ERROR;
640    when FND_API.G_EXC_UNEXPECTED_ERROR then
641       x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
642       RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
643    when others then
644       x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
645       BIS_VG_UTIL.Add_Error_Message
646       ( p_error_msg_id      => SQLCODE
647       , p_error_description => SQLERRM
648       , p_error_proc_name   => G_PKG_NAME||'.skip_tag'
649       , p_error_table       => x_error_tbl
650       , x_error_table       => x_error_tbl
651       );
652       RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
653 
654 END skip_tag;
655 
656 END BIS_VG_PARSER;