1 PACKAGE BODY wf_lookup_types_pub AS
2 /* $Header: wfdefb.pls 120.1 2005/07/02 03:43:48 appldev ship $ */
3
4 /*===========================================================================
5 PACKAGE NAME: wf_lookup_types_pub
6
7 DESCRIPTION:
8
9 OWNER: GKELLNER
10
11 TABLES/RECORDS:
12
13 PROCEDURES/FUNCTIONS:
14
15 ============================================================================*/
16
17 /*===========================================================================
18 PROCEDURE NAME: fetch_lookup_type
19
20 DESCRIPTION: Fetches all the lookup types for a given item type
21 into a p_wf_lookup_types_vl_tbl table based on the
22 item type internal eight character name. This function
23 can also retrieve a single lookup type definition if
24 the internal name along with the item type name is
25 provided. This is especially useful if you wish to
26 display the details for a single lookup type when it
27 is referenced from some drilldown mechanism.
28
29 ============================================================================*/
30 PROCEDURE fetch_lookup_types
31 (p_item_type IN VARCHAR2,
32 p_lookup_type IN VARCHAR2,
33 p_wf_lookup_types_tbl OUT NOCOPY wf_lookup_types_pub.wf_lookup_types_tbl_type,
34 p_wf_lookups_tbl OUT NOCOPY wf_lookup_types_pub.wf_lookups_tbl_type) IS
35
36 CURSOR fetch_lookup_types (c_item_type IN VARCHAR2) IS
37 SELECT row_id,
38 lookup_type,
39 item_type,
40 protect_level,
41 custom_level,
42 display_name,
43 description
44 FROM wf_lookup_types
45 WHERE item_type = c_item_type
46 ORDER BY display_name;
47
48 /*===========================================================================
49
50 CURSOR NAME: fetch_lookups
51
52 DESCRIPTION: Fetches all lookups for the given item_type.
53
54 You'll notice that the select orders the
55 results by lookup type display name, and then
56 by lookup meaning. The criteria is based
57 on the requirement to synchronize the
58 lookup list with the lookup type list. The
59 lookup type list is ordered by display name.
60 When we list the lookup tyoes and their
61 corresponding lookups we walk these lists
62 in parallel. When we find a lookup that matches
63 the lookup type, we copy that lookup to a temp
64 list until we find a new lookup type in the lookup
65 list. When this happens we write out the lookup
66 temp list and move to the next lookup type.
67 Thus the need for the special order criteria.
68
69 PARAMETERS:
70
71 c_item_type IN Internal name of the item type
72
73 ============================================================================*/
74 CURSOR fetch_lookups (c_item_type IN VARCHAR2) IS
75 SELECT
76 wlt.display_name lookup_type_display_name,
77 wlt.item_type,
78 wl.row_id,
79 wl.lookup_type,
80 wl.lookup_code,
81 wl.protect_level,
82 wl.custom_level,
83 wl.meaning,
84 wl.description
85 FROM wf_lookups wl, wf_lookup_types wlt
86 WHERE wlt.item_type = c_item_type
87 AND wlt.lookup_type = wl.lookup_type
88 ORDER BY wlt.display_name, wl.meaning;
89
90 /*===========================================================================
91
92 CURSOR NAME: fetch_lookups_for_type
93
94 DESCRIPTION: Fetches lookups for the given item_type
95 and lookup type.
96
97 PARAMETERS:
98
99 c_item_type IN Internal name of the item type
100
101 c_lookup_type
102 IN Internal name of the lookup type
103 ============================================================================*/
104 CURSOR fetch_lookups_for_type (c_item_type IN VARCHAR2,
105 c_lookup_type IN VARCHAR2) IS
106 SELECT
107 wlt.display_name lookup_type_display_name,
108 wlt.item_type,
109 wl.row_id,
110 wl.lookup_type,
111 wl.lookup_code,
112 wl.protect_level,
113 wl.custom_level,
114 wl.meaning,
115 wl.description
116 FROM wf_lookups wl, wf_lookup_types wlt
117 WHERE wlt.item_type = c_item_type
118 AND wlt.lookup_type = c_lookup_type
119 AND wlt.lookup_type = wl.lookup_type
120 ORDER BY wlt.display_name, wl.meaning;
121
122 l_record_num NUMBER := 0;
123
124 BEGIN
125
126 /*
127 ** Make sure all the required parameters are set
128 */
129 IF (p_item_type IS NULL) THEN
130
131 return;
132
133 END IF;
134
135 /*
136 ** Check if the caller has passed a specific attribute_name to search for.
137 ** If so then just get the row corresponding to that item_type and
138 ** attribute_name. If not then get all rows for that item_type.
139 */
140 IF (p_lookup_type IS NOT NULL) THEN
141
142 SELECT row_id,
143 lookup_type,
144 item_type,
145 protect_level,
146 custom_level,
147 display_name,
148 description
149 INTO p_wf_lookup_types_tbl(1)
150 FROM wf_lookup_types
151 WHERE item_type = p_item_type
152 AND lookup_type = p_lookup_type;
153
154 l_record_num := 0;
155
156 OPEN fetch_lookups_for_type (p_item_type, p_lookup_type);
157
158 /*
159 ** Loop through all the lookup_code rows for the given lookup_type
160 ** filling in the p_wf_lookups_tbl
161 */
162 LOOP
163
164 l_record_num := l_record_num + 1;
165
166 FETCH fetch_lookups_for_type INTO p_wf_lookups_tbl(l_record_num);
167
168 EXIT WHEN fetch_lookups_for_type%NOTFOUND;
169
170 END LOOP;
171
172 CLOSE fetch_lookups_for_type;
173
174 ELSE
175
176 OPEN fetch_lookup_types (p_item_type);
177
178 /*
179 ** Loop through all the lookup_code rows for the given lookup_type
180 ** filling in the p_wf_lookups_tbl
181 */
182 LOOP
183
184 l_record_num := l_record_num + 1;
185
186 FETCH fetch_lookup_types INTO p_wf_lookup_types_tbl(l_record_num);
187
188 EXIT WHEN fetch_lookup_types%NOTFOUND;
189
190 END LOOP;
191
192 CLOSE fetch_lookup_types;
193
194 l_record_num := 0;
195
196 OPEN fetch_lookups (p_item_type);
197
198 /*
199 ** Loop through all the lookup_code rows for the given lookup_type
200 ** filling in the p_wf_lookups_tbl
201 */
202 LOOP
203
204 l_record_num := l_record_num + 1;
205
206 FETCH fetch_lookups INTO p_wf_lookups_tbl(l_record_num);
207
208 EXIT WHEN fetch_lookups%NOTFOUND;
209
210 END LOOP;
211
212 CLOSE fetch_lookups;
213
214 END IF;
215
216 EXCEPTION
217 WHEN OTHERS THEN
218 Wf_Core.Context('wf_lookup_types_pub',
219 'fetch_lookup_types',
220 p_item_type,
221 p_lookup_type);
222
223 wf_item_definition.Error;
224
225 END fetch_lookup_types;
226
227 /*===========================================================================
228 PROCEDURE NAME: fetch_lookup_display
229
230 DESCRIPTION: fetch the lookup type display name and the lookup code
231 display name based on a lookup type internal name and
232 lookup code internal name
233
234 ============================================================================*/
235 PROCEDURE fetch_lookup_display (p_type_internal_name IN VARCHAR2,
236 p_code_internal_name IN VARCHAR2,
237 p_type_display_name OUT NOCOPY VARCHAR2,
238 p_code_display_name OUT NOCOPY VARCHAR2) IS
239
240 l_type_display_name VARCHAR2(80);
241 l_code_display_name VARCHAR2(80);
242
243 BEGIN
244
245 /*
246 ** Only try to fetch the lookup type if the internal name is passed in
247 */
248 IF (p_type_internal_name IS NOT NULL) THEN
249
250 /*
251 ** Get the display name based on the internal name.
252 ** Use a max() so you don't need a exception for no data found
253 */
254 SELECT MAX(display_name)
255 INTO l_type_display_name
256 FROM wf_lookup_types
257 WHERE lookup_type = p_type_internal_name;
258
259 /*
260 ** If no value is found then set the display name to the
261 ** internal name + ' is undefined' message so user can see
262 ** missing reference
263 */
264 IF (l_type_display_name IS NULL) THEN
265
266 l_type_display_name := p_type_internal_name||' '||
267 '<B> -- '||UPPER(wf_core.translate ('WFITD_UNDEFINED'))||'</B>';
268
269 END IF;
270
271 ELSE
272
273 /*
274 ** No internal name was passed so set the display name to null
275 */
276 l_type_display_name := NULL;
277
278 END IF;
279
280 /*
281 ** Set the outbound lookup code display name
282 */
283 p_type_display_name := l_type_display_name;
284
285 /*
286 ** Only try to fetch the lookup code if both internal names are passed in
287 */
288 IF (p_type_internal_name IS NOT NULL AND p_code_internal_name IS NOT NULL) THEN
289
290 /*
291 ** Get the display name based on the internal name.
292 ** Use a max() so you don't need a exception for no data found
293 */
294 SELECT MAX(meaning)
295 INTO l_code_display_name
296 FROM wf_lookups
297 WHERE lookup_type = p_type_internal_name
298 AND lookup_code = p_code_internal_name;
299
300 /*
301 ** If no value is found then set the display name to the
302 ** internal name + ' is undefined' message so user can see
303 ** missing reference
304 */
305 IF (l_code_display_name IS NULL) THEN
306
307 l_code_display_name := p_code_internal_name||' '||
308 '<B> -- '||UPPER(wf_core.translate ('WFITD_UNDEFINED'))||'</B>';
309
310 END IF;
311
312 ELSE
313
314 /*
315 ** No internal name was passed so set the display name to null
316 */
317 l_code_display_name := NULL;
318
319 END IF;
320
321 /*
322 ** Set the outbound lookup code display name
323 */
324 p_code_display_name := l_code_display_name;
325
326 EXCEPTION
327 WHEN OTHERS THEN
328 Wf_Core.Context('wf_lookup_types_pub',
329 'fetch_lookup_display',
330 p_type_internal_name,
331 p_code_internal_name);
332
333 END fetch_lookup_display;
334
335 /*===========================================================================
336 PROCEDURE NAME: draw_lookup_type_list
337
338 DESCRIPTION: Shows the display name of lookup type as a
339 html view as a part of a hierical summary list of
340 an item type. This function uses the htp to
341 generate its html output.
342
343 ============================================================================*/
344 PROCEDURE draw_lookup_type_list
345 (p_wf_lookup_types_tbl IN wf_lookup_types_pub.wf_lookup_types_tbl_type,
346 p_wf_lookups_tbl IN wf_lookup_types_pub.wf_lookups_tbl_type,
347 p_effective_date IN DATE,
348 p_indent_level IN NUMBER) IS
349
350 l_lookup_type_record_num NUMBER;
351 l_lookup_record_num NUMBER := 1;
352 ii NUMBER := 0;
353 l_cur_lookup_record_num NUMBER := 1;
354 l_wf_lookups_tbl wf_lookup_types_pub.wf_lookups_tbl_type;
355
356
357 BEGIN
358
359 /*
360 ** Create the the attributes title. Indent it to the level specified
361 */
362 wf_item_definition_util_pub.draw_summary_section_title(
363 wf_core.translate('WFITD_LOOKUP_TYPES'),
364 p_indent_level);
365
366 /*
367 ** Print out all lookup type display names in the pl*sql table
368 */
369 FOR l_lookup_type_record_num IN 1..p_wf_lookup_types_tbl.count LOOP
370
371 /*
372 ** The creation of the anchor from the summary frame to the detail
373 ** frame was very complex so I've extracted the function into its
374 ** own routine.
375 */
376 wf_item_definition_util_pub.create_hotlink_to_details (
377 p_wf_lookup_types_tbl(l_lookup_type_record_num).item_type,
378 p_effective_date,
379 'LOOKUP_TYPE',
380 p_wf_lookup_types_tbl(l_lookup_type_record_num).lookup_type,
381 p_wf_lookup_types_tbl(l_lookup_type_record_num).display_name,
382 NULL,
383 p_indent_level+1);
384
385 /*
386 ** Here we look for all the lookup types that are related to the
387 ** current lookup type. The p_wf_lookups_vl_tbl is ordered by display
388 ** name and then by lookup type display name. As long as we stay
389 ** in sync we should be able to correctly create the temp attribute list
390 ** for the current lookup type. We could create a cursor here for the child
391 ** attributes but that would break the rule of separating the UI layer
392 ** and the data layer
393 */
394 l_wf_lookups_tbl.delete;
395 l_cur_lookup_record_num := 1;
396
397 /*
398 ** Make sure there is at least on record in the lookup
399 ** list. If there is not then the l_lookup_record_num index of 1
400 ** will cause a 6502-PL*SQL numeric or value error exception.
401 */
402 WHILE (
403 l_lookup_record_num <= p_wf_lookups_tbl.count AND
404 p_wf_lookup_types_tbl(l_lookup_type_record_num).display_name =
405 p_wf_lookups_tbl(l_lookup_record_num).lookup_type_display_name
406 ) LOOP
407
408 /*
409 ** We have found an attribute for the current lookup type. Copy the
410 ** contents of that list to a temp attr list and then pass the
411 ** temp list to the lookupsibute display function to display
412 ** the results.
413 */
414 l_wf_lookups_tbl(l_cur_lookup_record_num) :=
415 p_wf_lookups_tbl(l_lookup_record_num);
416
417 l_lookup_record_num := l_lookup_record_num + 1;
418 l_cur_lookup_record_num := l_cur_lookup_record_num + 1;
419
420 END LOOP;
421
422 /*
423 ** If the l_cur_attr_record_num is greater than 1 then you
424 ** must have found an attribute for this lookup type. Copy that
425 ** set of attributes to a temporary pl*sql table and then
426 ** print it out.
427 */
428 IF (l_cur_lookup_record_num > 1) THEN
429
430 /*
431 ** List all the lookup type details for this lookup type that
432 ** we found above. Add two to the current indent level so it
433 ** is pushed in past the start of the lookup type list.
434 */
435 wf_lookup_types_pub.draw_lookup_list (
436 l_wf_lookups_tbl,
437 p_effective_date,
438 p_indent_level + 2);
439
440 END IF;
441
442 END LOOP;
443
444 EXCEPTION
445 WHEN OTHERS THEN
446 Wf_Core.Context('wf_lookup_types_pub', 'draw_lookup_type_list');
447 wf_item_definition.Error;
448
449 END draw_lookup_type_list;
450
451 /*===========================================================================
452 PROCEDURE NAME: draw_lookup_list
453
454 DESCRIPTION: Shows the display names of message attributes for
455 a given message as a html view as a part of
456 a hierical summary list of an item type.
457 This function uses the htp to generate its html
458 output.
459
460 ============================================================================*/
461 PROCEDURE draw_lookup_list
462 (p_wf_lookups_tbl IN wf_lookup_types_pub.wf_lookups_tbl_type,
463 p_effective_date IN DATE,
464 p_indent_level IN NUMBER) IS
465
466 l_record_num NUMBER;
467 ii NUMBER := 0;
468
469 BEGIN
470
471 /*
472 ** Create the the lookups title. Indent it to the level specified
473 */
474 wf_item_definition_util_pub.draw_summary_section_title(
475 wf_core.translate('WFITD_LOOKUP_CODES'),
476 p_indent_level);
477
478 /*
479 ** Print out all lookup display names in the pl*sql table
480 */
481 FOR l_record_num IN 1..p_wf_lookups_tbl.count LOOP
482
483 /*
484 ** The creation of the anchor from the summary frame to the detail
485 ** frame was very complex so I've extracted the function into its
486 ** own routine.
487 */
488 wf_item_definition_util_pub.create_hotlink_to_details (
489 p_wf_lookups_tbl(l_record_num).item_type,
490 p_effective_date,
491 'LOOKUP',
492 p_wf_lookups_tbl(l_record_num).lookup_type||':'||
493 p_wf_lookups_tbl(l_record_num).lookup_code,
494 p_wf_lookups_tbl(l_record_num).meaning,
495 NULL,
496 p_indent_level+1);
497
498 END LOOP;
499
500 EXCEPTION
501 WHEN OTHERS THEN
502 Wf_Core.Context('wf_lookup_types_vl_pub', 'draw_lookup_list');
503 wf_item_definition.Error;
504
505 END draw_lookup_list;
506
507 /*===========================================================================
508 PROCEDURE NAME: draw_lookup_type_details
509
510 DESCRIPTION: Shows all the details of an lookup type as a
511 html view. This function uses the htp to
512 generate its html output.
513
514 MODIFICATION LOG:
515 06-JUN-2001 JWSMITH BUG 1819232 - added summary attr for table tag for ADA
516 ============================================================================*/
517 PROCEDURE draw_lookup_type_details
518 (p_wf_lookup_types_tbl IN wf_lookup_types_pub.wf_lookup_types_tbl_type,
519 p_wf_lookups_tbl IN wf_lookup_types_pub.wf_lookups_tbl_type,
520 p_indent_level IN NUMBER) IS
521
522 l_lookup_type_record_num NUMBER;
523 ii NUMBER := 0;
524 l_lookup_record_num NUMBER := 1;
525 l_cur_lookup_record_num NUMBER := 1;
526 l_wf_lookups_tbl wf_lookup_types_pub.wf_lookups_tbl_type;
527
528 BEGIN
529
530 /*
531 ** Draw the section title for the lookup type detail section
532 */
533 wf_item_definition_util_pub.draw_detail_section_title (
534 wf_core.translate('WFITD_LOOKUP_TYPE_DETAILS'),
535 0);
536
537 /*
538 ** Print out all item attribute display names in the pl*sql table
539 */
540 FOR l_lookup_type_record_num IN 1..p_wf_lookup_types_tbl.count LOOP
541
542 /*
543 ** Open a new table for each attribute so you can control the spacing
544 ** between each attribute
545 */
546 htp.tableOpen(cattributes=>'border=0 cellpadding=2 cellspacing=0
547 summary=""');
548
549 /*
550 ** Create the target for the hotlink from the summary view. Also
551 ** create the first row in the table which is always the display
552 ** name for the object.
553 */
554 wf_item_definition_util_pub.create_details_hotlink_target (
555 'LOOKUP_TYPE',
556 p_wf_lookup_types_tbl(l_lookup_type_record_num).lookup_type,
557 p_wf_lookup_types_tbl(l_lookup_type_record_num).display_name,
558 wf_core.translate('WFITD_LOOKUP_TYPE_NAME'),
559 0);
560
561 /*
562 ** Create the internal name row in the table. Also lay down the
563 ** destination for the anchor based on the row id.
564 */
565 wf_item_definition_util_pub.draw_detail_prompt_value_pair (
566 wf_core.translate('WFITD_INTERNAL_NAME'),
567 p_wf_lookup_types_tbl(l_lookup_type_record_num).lookup_type);
568
569 /*
570 ** Create the description row in the table
571 */
572 wf_item_definition_util_pub.draw_detail_prompt_value_pair (
573 wf_core.translate('DESCRIPTION'),
574 p_wf_lookup_types_tbl(l_lookup_type_record_num).description);
575
576 /*
577 ** Call function to print the customization/protection levels
578 */
579 wf_item_definition_util_pub.draw_custom_protect_details(
580 p_wf_lookup_types_tbl(l_lookup_type_record_num).custom_level,
581 p_wf_lookup_types_tbl(l_lookup_type_record_num).protect_level);
582
583 /*
584 ** Table is created so close it out
585 */
586 htp.tableClose;
587
588 /*
589 ** Here we look for all the lookups that are related to the current
590 ** lookup type. The p_wf_lookups_tbl is ordered by display
591 ** name and then by lookup meaning. As long as we stay
592 ** in sync we should be able to correctly create the temp lookup list
593 ** for the current lookup type. We could create a cursor here for
594 ** the child lookups but that would break the rule of separating
595 ** the UI layer and the data layer
596 */
597 l_wf_lookups_tbl.delete;
598 l_cur_lookup_record_num := 1;
599
600 /*
601 ** Make sure there is at least on record in the lookups
602 ** list. If there is not then the l_lookup_record_num index of 1
603 ** will cause a 6502-PL*SQL numeric or value error exception.
604 */
605 WHILE (
606 l_lookup_record_num <= p_wf_lookups_tbl.count AND
607 p_wf_lookup_types_tbl(l_lookup_type_record_num).display_name =
608 p_wf_lookups_tbl(l_lookup_record_num).lookup_type_display_name
609 ) LOOP
610
611 /*
612 ** We have found a lookup for the lookup type. Copy the
613 ** contents of that list to a temp lookup list and then pass the
614 ** temp list to the lookup display function to display
615 ** the results.
616 */
617 l_wf_lookups_tbl(l_cur_lookup_record_num) :=
618 p_wf_lookups_tbl(l_lookup_record_num);
619
620 l_lookup_record_num := l_lookup_record_num + 1;
621 l_cur_lookup_record_num := l_cur_lookup_record_num + 1;
622
623 END LOOP;
624
625 /*
626 ** If the l_cur_lookup_record_num is greater than 1 then you
627 ** must have found a lookup for this lookup type. Copy that
628 ** set of lookups to a temporary pl*sql table and then
629 ** print it out.
630 */
631 IF (l_cur_lookup_record_num > 1) THEN
632
633 /*
634 ** Put in a couple of blank lines between the current lookup type
635 ** and its lookups
636 */
637 htp.p('<BR><BR>');
638
639 /*
640 ** List all the lookup details for this lookup typethat
641 ** we found above.
642 */
643 wf_lookup_types_pub.draw_lookup_details (
644 l_wf_lookups_tbl,
645 1);
646
647 /*
648 ** If you still have more lookup types to process then put in a
649 ** few blank lines and put in another Lookup Type Details Header
650 */
651 IF (l_lookup_type_record_num < p_wf_lookup_types_tbl.count) THEN
652
653 /*
654 ** Put in a couple of blank lines between the current message
655 ** attributes and the next message
656 */
657 htp.p('<BR><BR>');
658
659 /*
660 ** Draw the section title for the Lookup Type detail section
661 */
662 wf_item_definition_util_pub.draw_detail_section_title (
663 wf_core.translate('WFITD_LOOKUP_TYPE_DETAILS'),
664 0);
665
666 END IF;
667
668 END IF;
669
670 /*
671 ** Draw a line between each message definition
672 ** if this is not the last item in the list and if there
673 ** are no attributes in the attribute list for this message.
674 */
675 IF (l_lookup_type_record_num < p_wf_lookup_types_tbl.count AND
676 l_cur_lookup_record_num = 1) THEN
677
678 htp.p ('<HR noshade size="1">');
679
680 END IF;
681
682 END LOOP;
683
684 EXCEPTION
685 WHEN OTHERS THEN
686 Wf_Core.Context('wf_lookup_types_pub', 'draw_lookup_type_details');
687 wf_item_definition.Error;
688
689 END draw_lookup_type_details;
690
691 /*===========================================================================
692 PROCEDURE NAME: draw_lookup_details
693
694 DESCRIPTION: Shows all of the details for a list of
695 lookups that have been passed in.
696
697 MODIFICATION LOG:
698 06-JUN-2001 JWSMITH BUG 1819232 - added summary attr for table tag for ADA
699 ============================================================================*/
700 PROCEDURE draw_lookup_details
701 (p_wf_lookups_tbl IN wf_lookup_types_pub.wf_lookups_tbl_type,
702 p_indent_level IN NUMBER) IS
703
704 l_record_num NUMBER;
705 ii NUMBER := 0;
706
707 BEGIN
708
709 /*
710 ** Draw the section title for the lookup detail section
711 */
712 wf_item_definition_util_pub.draw_detail_section_title (
713 wf_core.translate('WFITD_LOOKUP_DETAILS'),
714 0);
715
716 /*
717 ** Print out all meesage attribute display names in the pl*sql table
718 */
719 FOR l_record_num IN 1..p_wf_lookups_tbl.count LOOP
720
721 /*
722 ** Open a new table for each lookup so you can control the spacing
723 ** between each attribute
724 */
725 htp.tableOpen(cattributes=>'border=0 cellpadding=2 cellspacing=0
726 summary=""');
727
728 /*
729 ** Create the target for the hotlink from the summary view. Also
730 ** create the first row in the table which is always the display
731 ** name for the object.
732 */
733 wf_item_definition_util_pub.create_details_hotlink_target (
734 'LOOKUP',
735 p_wf_lookups_tbl(l_record_num).lookup_type||':'||
736 p_wf_lookups_tbl(l_record_num).lookup_code,
737 p_wf_lookups_tbl(l_record_num).meaning,
738 wf_core.translate('WFITD_LOOKUP_CODE_NAME'),
739 0);
740
741 /*
742 ** Create the internal name row in the table.
743 */
744 wf_item_definition_util_pub.draw_detail_prompt_value_pair (
745 wf_core.translate('WFITD_INTERNAL_NAME'),
746 p_wf_lookups_tbl(l_record_num).lookup_code);
747
748 /*
749 ** Create the lookup type display name row in the table.
750 */
751 wf_item_definition_util_pub.draw_detail_prompt_value_pair (
752 wf_core.translate('WFITD_LOOKUP_TYPE_NAME'),
753 p_wf_lookups_tbl(l_record_num).lookup_type_display_name);
754
755 /*
756 ** Create the description row in the table
757 */
758 wf_item_definition_util_pub.draw_detail_prompt_value_pair (
759 wf_core.translate('DESCRIPTION'),
760 p_wf_lookups_tbl(l_record_num).description);
761
762 /*
763 ** Table is created so close it out
764 */
765 htp.tableClose;
766
767 /*
768 ** Draw a line between each lookup definition
769 ** if this is not the last item in the list
770 */
771 IF (l_record_num <> p_wf_lookups_tbl.count) THEN
772
773 htp.p ('<HR noshade size="1">');
774
775 END IF;
776
777 END LOOP;
778
779 EXCEPTION
780 WHEN OTHERS THEN
781 Wf_Core.Context('wf_lookup_types_vl_pub', 'draw_lookup_details');
782 wf_item_definition.Error;
783
784 END draw_lookup_details;
785
786 END wf_lookup_types_pub;