4 **
1 PACKAGE BODY GR_PROCESS_DOCUMENTS AS
2 /*$Header: GRPDOCUB.pls 120.1 2005/09/06 14:37:10 pbamb noship $*/
3 /*
5 **
6 **
7 */
8 PROCEDURE Build_Document_Details
9 (p_commit IN VARCHAR2,
10 p_init_msg_list IN VARCHAR2,
11 p_validation_level IN NUMBER,
12 p_api_version IN NUMBER,
13 p_item_code IN VARCHAR2,
14 p_document_code IN VARCHAR2,
15 p_session_id IN NUMBER,
16 x_return_status OUT NOCOPY VARCHAR2,
17 x_msg_count OUT NOCOPY NUMBER,
18 x_msg_data OUT NOCOPY VARCHAR2)
19 IS
20 BEGIN
21
22 NULL;
23 x_return_status := FND_API.G_RET_STS_SUCCESS;
24
25 EXCEPTION
26
27 WHEN OTHERS THEN
28 x_return_status := FND_API.G_RET_STS_SUCCESS;
29
30
31 END Build_Document_Details;
32 /*
33 **
34 **
35 **
36 */
37 PROCEDURE Resolve_Phrase_Conflicts
38 (p_commit IN VARCHAR2,
39 p_init_msg_list IN VARCHAR2,
40 p_validation_level IN NUMBER,
41 p_api_version IN NUMBER,
42 p_session_id IN NUMBER,
43 x_return_status OUT NOCOPY VARCHAR2,
44 x_msg_count OUT NOCOPY NUMBER,
45 x_msg_data OUT NOCOPY VARCHAR2)
46 IS
47 BEGIN
48
49 NULL;
50 x_return_status := FND_API.G_RET_STS_SUCCESS;
51
52 EXCEPTION
53
54 WHEN OTHERS THEN
55 x_return_status := FND_API.G_RET_STS_SUCCESS;
56
57
58 END Resolve_Phrase_Conflicts;
59 /*
60 **
61 **
62 **
63 */
64 PROCEDURE Build_Item_Document
65 (p_commit IN VARCHAR2,
66 p_init_msg_list IN VARCHAR2,
67 p_validation_level IN NUMBER,
68 p_api_version IN NUMBER,
69 p_build_item IN VARCHAR2,
70 p_document_code IN VARCHAR2,
71 p_disclosure_code IN VARCHAR2,
72 p_language_code IN VARCHAR2,
73 p_session_id IN NUMBER,
74 x_document_text_id OUT NOCOPY NUMBER,
75 x_return_status OUT NOCOPY VARCHAR2,
76 x_msg_count OUT NOCOPY NUMBER,
77 x_msg_data OUT NOCOPY VARCHAR2)
78 IS
79 BEGIN
80
81 NULL;
82 x_return_status := FND_API.G_RET_STS_SUCCESS;
83
84 EXCEPTION
85
86 WHEN OTHERS THEN
87 x_return_status := FND_API.G_RET_STS_SUCCESS;
88
89
90 END Build_Item_Document;
91 /*
92 **
93 **
94 **
95 */
96
97 /* 20-Jun-2002 Melanie Grosser BUG 2381697 - Modified code to allow printing of documents in XML */
98 /* 18-Feb-2003 Melanie Grosser BUG 2800429 - Patchset version of Sico BUG 2789546
99 Modified code to use new sequence GR_PRINT_ID_S as the value for g_session_id.
100 The use of the profile value DB_SESSION_ID was causing various problems with
101 the same session id being used for more than one document.
102 */
103 PROCEDURE Print_Document
104 (errbuf OUT NOCOPY VARCHAR2,
105 retcode OUT NOCOPY VARCHAR2,
106 p_commit IN VARCHAR2,
107 p_init_msg_list IN VARCHAR2,
108 p_validation_level IN NUMBER,
109 p_api_version IN NUMBER,
110 p_start_item IN VARCHAR2,
111 p_end_item IN VARCHAR2,
115 p_session_id IN NUMBER,
112 p_document_code IN VARCHAR2,
113 p_disclosure_code IN VARCHAR2,
114 p_language_code IN VARCHAR2,
116 p_printer IN VARCHAR2,
117 p_user_print_style IN VARCHAR2,
118 p_number_of_copies IN NUMBER,
119 p_items_to_print IN VARCHAR2,
120 p_return_status OUT NOCOPY VARCHAR2,
121 p_msg_count OUT NOCOPY NUMBER,
122 p_msg_data OUT NOCOPY VARCHAR2,
123 p_output_type IN VARCHAR2)
124 IS
125 BEGIN
126
127 NULL;
128 p_return_status := FND_API.G_RET_STS_SUCCESS;
129
130 EXCEPTION
131
132 WHEN OTHERS THEN
133 p_return_status := FND_API.G_RET_STS_SUCCESS;
134
135
136 END Print_Document;
137 /*
138 **
139 **
140 **
141 */
142
143
144 /* 20-Jun-2002 Melanie Grosser BUG 2381697 - Modified code to allow printing of documents in XML */
145 /* 18-Feb-2003 Melanie Grosser BUG 2800429 - Patchset version of Sico BUG 2789546
146 Modified code to use new sequence GR_PRINT_ID_S as the value for g_session_id.
147 The use of the profile value DB_SESSION_ID was causing various problems with
148 the same session id being used for more than one document.
149 */
150 PROCEDURE Print_Worksheet
151 (errbuf OUT NOCOPY VARCHAR2,
152 retcode OUT NOCOPY VARCHAR2,
153 p_commit IN VARCHAR2,
154 p_init_msg_list IN VARCHAR2,
155 p_validation_level IN NUMBER,
156 p_api_version IN NUMBER,
157 p_start_item IN VARCHAR2,
158 p_end_item IN VARCHAR2,
159 p_document_code IN VARCHAR2,
160 p_disclosure_code IN VARCHAR2,
161 p_language_code IN VARCHAR2,
162 p_session_id IN NUMBER,
163 p_printer IN VARCHAR2,
164 p_user_print_style IN VARCHAR2,
165 p_number_of_copies IN NUMBER,
166 p_items_to_print IN VARCHAR2,
167 p_return_status OUT NOCOPY VARCHAR2,
168 p_msg_count OUT NOCOPY NUMBER,
169 p_msg_data OUT NOCOPY VARCHAR2,
170 p_output_type IN VARCHAR2)
171 IS
172 BEGIN
173
174 NULL;
175 p_return_status := FND_API.G_RET_STS_SUCCESS;
176
177 EXCEPTION
178
179 WHEN OTHERS THEN
180 p_return_status := FND_API.G_RET_STS_SUCCESS;
181 END Print_Worksheet;
182 /*
183 **
184 **
185 **
186 */
187 PROCEDURE Process_Document_Structure
188 (p_commit IN VARCHAR2,
189 p_session_id IN NUMBER,
190 p_source_action IN VARCHAR2,
191 x_return_status OUT NOCOPY VARCHAR2,
192 x_msg_count OUT NOCOPY NUMBER,
193 x_msg_data OUT NOCOPY VARCHAR2)
194 IS
195 BEGIN
196
197 NULL;
198 x_return_status := FND_API.G_RET_STS_SUCCESS;
199
200 EXCEPTION
201
202 WHEN OTHERS THEN
203 x_return_status := FND_API.G_RET_STS_SUCCESS;
204 END Process_Document_Structure;
205
206 /*
207 **
208 **
209 **
210 */
211 PROCEDURE Get_Phrase_Type
212 (p_phrase_code IN VARCHAR2,
213 p_conc_value IN NUMBER,
214 x_phrase_type OUT NOCOPY VARCHAR2,
215 x_hierarchy OUT NOCOPY NUMBER)
216 IS
217 BEGIN
218
219 NULL;
220
221 END Get_Phrase_Type;
222
223 PROCEDURE Third_Phrase_Insert_Row
224 (p_session_id IN NUMBER,
225 p_sequence_number IN NUMBER,
226 p_source_itemcode IN VARCHAR2,
227 p_document_code IN VARCHAR2,
228 p_main_heading_code IN VARCHAR2,
229 p_main_display_order IN NUMBER,
230 p_sub_heading_code IN VARCHAR2,
231 p_sub_display_order IN NUMBER,
232 p_structure_display_order IN NUMBER,
233 p_third_phrase IN VARCHAR2,
234 x_return_status OUT NOCOPY VARCHAR2)
235 IS
236 BEGIN
237
238 NULL;
239
240 END Third_Phrase_Insert_Row;
241
242 /*
243 **
244 **
245 **
246 */
247
248 /* 07-Jun-2001 Melanie Grosser BUG 1772096 - Modified code to print column headings for Ingredient,
249 Exposure and Toxic sections. Added code to this procedure to retrieve
250 the headings that will be printed.
251 */
252 PROCEDURE Sort_Line_Data
253 (p_document_code IN VARCHAR2,
254 x_ingred_line IN OUT NOCOPY g_ingred_line,
255 x_toxic_line IN OUT NOCOPY g_toxic_line,
256 x_exposure_line IN OUT NOCOPY g_exposure_line,
257 x_msg_data OUT NOCOPY VARCHAR2,
258 x_msg_count OUT NOCOPY NUMBER,
259 x_return_status OUT NOCOPY VARCHAR2)
260 IS
261 BEGIN
262
263 NULL;
264 x_return_status := FND_API.G_RET_STS_SUCCESS;
265
266 EXCEPTION
267
268 WHEN OTHERS THEN
269 x_return_status := FND_API.G_RET_STS_SUCCESS;
270
271 END Sort_Line_Data;
272
273 PROCEDURE Print_Ingredient_Data
274 (p_item_code IN VARCHAR2,
275 p_language_code IN VARCHAR2,
276 p_label_code IN VARCHAR2,
277 p_source_procedure IN VARCHAR2,
278 p_source_action IN VARCHAR2,
279 x_return_status OUT NOCOPY VARCHAR2)
280 IS
284 x_return_status := FND_API.G_RET_STS_SUCCESS;
281 BEGIN
282
283 NULL;
285
286 EXCEPTION
287
288 WHEN OTHERS THEN
289 x_return_status := FND_API.G_RET_STS_SUCCESS;
290
291
292 END Print_Ingredient_Data;
293
294
295
296 /*
297 ** This procedure will write an informational message into the
298 ** work sheet print table to give the user more information about
299 ** how the document is built.
300 */
301 PROCEDURE Insert_Worksheet_Message
302 (p_message_name IN VARCHAR2,
303 p_token_name IN VARCHAR2,
304 p_token_value IN VARCHAR2,
305 p_item_code IN VARCHAR2,
306 x_return_status OUT NOCOPY VARCHAR2,
307 p_token_name2 IN VARCHAR2,
308 p_token_value2 IN VARCHAR2)
309 IS
310 BEGIN
311
312 NULL;
313 x_return_status := FND_API.G_RET_STS_SUCCESS;
314
315 EXCEPTION
316
317 WHEN OTHERS THEN
318 x_return_status := FND_API.G_RET_STS_SUCCESS;
319
320
321 END Insert_Worksheet_Message;
322
323 PROCEDURE Print_Toxic_Data
324 (p_item_code IN VARCHAR2,
325 p_language_code IN VARCHAR2,
326 p_label_code IN VARCHAR2,
327 p_source_action IN VARCHAR2,
328 p_consolidate IN VARCHAR2,
329 x_return_status OUT NOCOPY VARCHAR2)
330 IS
331 BEGIN
332
333 NULL;
334 x_return_status := FND_API.G_RET_STS_SUCCESS;
335
336 EXCEPTION
337
338 WHEN OTHERS THEN
339 x_return_status := FND_API.G_RET_STS_SUCCESS;
340
341
342 END Print_Toxic_Data;
343
344
345 /*
346 **
347 **
348 **
349 */
350 /* 07-Jun-2001 Melanie Grosser BUG 1772096 - Modified code to print column headings for Ingredient,
351 Exposure and Toxic sections. Added code to procedure
352 Sort_Line_data to retrieve the column headings. Greatly re-worked
353 Print_Ingredient_Data, Print_Toxic_Data and Print_Exposure_Data
354 procedures in order to correctly align the columns. Removed some
355 formatting code from Print_Array_Data.
356 */
357 /* 03-Jul-2001 Melanie Grosser BUG 1862284 - Modified code take disclosure codes into consideration when
358 determining the max length of fields. Also modified code to account
359 for uom of 'Not Available' in toxic and exposure sections.
360 Re-worked most of the procedure.
361 */
362 /* 22-Oct-2001 Melanie Grosser BUGs 1985685,1839807 - Break printed line into
363 multiple lines no longer than 80 characters if
364 text to be pinted is greater than 80
365 */
366 /* 20-Jun-2002 Melanie Grosser BUG 2381697 - Modified code to allow printing of documents in XML and HTML */
367
368 /* MGEXP*/
369 PROCEDURE Print_Exposure_Data
370 (p_item_code IN VARCHAR2,
371 p_language_code IN VARCHAR2,
372 p_label_code IN VARCHAR2,
373 p_source_action IN VARCHAR2,
374 p_consolidate IN VARCHAR2,
375 x_return_status OUT NOCOPY VARCHAR2)
376 IS
377 BEGIN
378
379 NULL;
380 x_return_status := FND_API.G_RET_STS_SUCCESS;
381
382 EXCEPTION
383
384 WHEN OTHERS THEN
385 x_return_status := FND_API.G_RET_STS_SUCCESS;
386
387
388 END Print_Exposure_Data;
389
390 /*
391 **
392 **
393 **
394 */
395 PROCEDURE Print_Phrase_Lines
396 (p_phrase_text IN VARCHAR2,
397 p_source_action IN VARCHAR2,
398 x_return_status OUT NOCOPY VARCHAR2)
399 IS
400 BEGIN
401
402 NULL;
403 x_return_status := FND_API.G_RET_STS_SUCCESS;
404
405 EXCEPTION
406
407 WHEN OTHERS THEN
408 x_return_status := FND_API.G_RET_STS_SUCCESS;
409
410 END Print_Phrase_Lines;
411
412 /*
413 **
414 **
415 **
416 */
417 /* 24-Sep-2001 Melanie Grosser BUG 1323963 - Implementation of field name masking
418 Added new procedure PRINT_MASKED_VALUE
419 */
420 /* 10-Dec-2001 Melanie Grosser BUG 1323963 - Implementation of field name masking
421 If this is a user defined field name and there is data, check for a mask
422 */
423 /* 20-Jun-2002 Melanie Grosser BUG 2381697 - Modified code to allow printing of documents in XML and HTML */
424
425 /* 12-May-2003 Geraldine Kelly Bug 2948796 - Modified code to check for the document version label 00006 and that it selects from the
426 Item_Doc_Statuses table in procedure Print_Label_Lines.*/
427
428 PROCEDURE Print_Label_Lines
429 (p_label_code IN VARCHAR2,
430 p_source_action IN VARCHAR2,
431 x_return_status OUT NOCOPY VARCHAR2)
432 IS
433 BEGIN
434
435 NULL;
436 x_return_status := FND_API.G_RET_STS_SUCCESS;
437
438 EXCEPTION
439
440 WHEN OTHERS THEN
441 x_return_status := FND_API.G_RET_STS_SUCCESS;
442
443 END Print_Label_Lines;
444
445 /*
446 **
447 **
448 */
452 x_return_status OUT NOCOPY VARCHAR2,
449 PROCEDURE Clear_Worksheet_Session
450 (p_commit IN VARCHAR2,
451 p_session_id IN NUMBER,
453 x_oracle_error OUT NOCOPY NUMBER,
454 x_msg_data OUT NOCOPY VARCHAR2)
455 IS
456 BEGIN
457
458 NULL;
459 x_return_status := FND_API.G_RET_STS_SUCCESS;
460
461 EXCEPTION
462
463 WHEN OTHERS THEN
464 x_return_status := FND_API.G_RET_STS_SUCCESS;
465
466
467 END Clear_Worksheet_Session;
468 /*
469 **
470 **
471 **
472 */
473 PROCEDURE Update_Phrase_Groups
474 (p_commit IN VARCHAR2,
475 p_api_version IN NUMBER,
476 p_init_msg_list IN VARCHAR2,
477 p_validation_level IN NUMBER,
478 p_called_by_form IN VARCHAR2,
479 p_update_option IN VARCHAR2,
480 p_rebuild_document_flag IN VARCHAR2,
481 p_phrase_group_code IN VARCHAR2,
482 p_phrase_code IN VARCHAR2,
483 x_return_status OUT NOCOPY VARCHAR2,
484 x_msg_count OUT NOCOPY NUMBER,
485 x_msg_data OUT NOCOPY VARCHAR2)
486 IS
487 BEGIN
488
489 NULL;
490 x_return_status := FND_API.G_RET_STS_SUCCESS;
491
492 EXCEPTION
493
494 WHEN OTHERS THEN
495 x_return_status := FND_API.G_RET_STS_SUCCESS;
496
497 END Update_Phrase_Groups;
498 /*
499 **
500 **
501 **
502 */
503 FUNCTION Conflict_Action
504 (p_work_phrase IN VARCHAR2,
505 p_phrase_code IN VARCHAR2)
506
507 RETURN VARCHAR2 IS
508
509 BEGIN
510 NULL;
511 RETURN NULL;
512
513 END Conflict_Action;
514
515 FUNCTION Product_Toxic_Data
516 (p_item_code IN VARCHAR2)
517
518 RETURN NUMBER IS
519
520 BEGIN
521
522
523 RETURN 0;
524
525
526 END Product_Toxic_Data;
527 /*
528 **
529 **
530 */
531 FUNCTION Product_Exposure_Data
532 (p_item_code IN VARCHAR2)
533
534 RETURN NUMBER IS
535
536 BEGIN
537
538 RETURN 0;
539
540 END Product_Exposure_Data;
541 /*
542 ** Read for the multilingual name using the label code
543 ** and language code passed in. If the MSDS name is not
544 ** found for the language, substitute with the user's
545 ** environment language. IF still not found then return
546 ** a description with an error
547 **
548 */
549 FUNCTION Read_Multilingual_Name
550 (p_label_code IN VARCHAR2,
551 p_language_code IN VARCHAR2)
552 RETURN VARCHAR2 IS
553
554 BEGIN
555
556
557 RETURN NULL;
558
559 EXCEPTION
560
561 WHEN OTHERS THEN
562
563 RETURN NULL;
564
565 END Read_Multilingual_Name;
566 /*
567 **
568 **
569 */
570 /*
571 -- HISTORY
572 -- 22-Apr-2002 Melanie Grosser BUG 2300466 - Increased mask on approximate concentration to accommodate a value
573 -- of 100.
574 */
575 FUNCTION Print_Concentration
576 (p_concentration_ind IN VARCHAR2,
577 p_concentration IN NUMBER)
578 RETURN VARCHAR2 IS
579
580 BEGIN
581
582
583 RETURN NULL;
584
585 EXCEPTION
586
587 WHEN OTHERS THEN
588
589 RETURN NULL;
590
591 END Print_Concentration;
592 /*
593 ** This function is called to obtain the character string
594 ** that holds the HMIS, NFPA or USER defined hazard codes
595 ** for the ingredient.
596 ** HMIS will return fire, health and reactivity
597 ** NFPA will return fire, health and reactivity
598 ** USER will return fire, health and reactivity
599 **
600 */
601 FUNCTION Get_Hazard_Info
602 (p_item_code IN VARCHAR2,
603 p_hazard_code IN VARCHAR2,
604 p_source_procedure IN VARCHAR2)
605 RETURN VARCHAR2 IS
606
607 BEGIN
608
609
610 RETURN NULL;
611
612 EXCEPTION
613
614 WHEN OTHERS THEN
615
616 RETURN NULL;
617
618 END Get_Hazard_Info;
619 /*
620 **
621 **
622 **
623 **
624 */
625
626 /*======================================================================
627 -- FUNCTION :
628 -- Calc_OSHA_Flam
629 --
630 -- DESCRIPTION:
631 -- This PL/SQL function is used to return a value for OSHA Flammability
632 -- Class. It will try to use Flash Point data and if none can be
633 -- retrieved it will try to use Boiling Point data. It will first try to
634 -- retrieve a value from the properties table and if no value is found,
635 -- it will try to rollup the data.
636 --
637 -- PARAMETERS:
638 -- p_source_action IN VARCHAR2 - The source action for this call
639 -- (e.g. WORKSHEET)
640 -- p_item_code IN VARCHAR2 - The phrase code to be printed.
641 --
642 -- SYNOPSIS:
643 -- l_osha_flam_class := Calc_OSHA_Flam(p_source_action,
644 -- g_current_item);
645 --
646 -- HISTORY
647 -- 14-Aug-2001 Melanie Grosser BUG 1778234 - Modified OSHA Flammability
648 -- calculation code to try to rollup values
649 -- if the property value has not been entered.
653 FUNCTION Calc_OSHA_Flam
650 -- Completely re-worked this procedure
651 --===================================================================== */
652 /* MGFLAM */
654 (p_source_action IN VARCHAR2,
655 p_item_code IN VARCHAR2)
656 RETURN VARCHAR2 IS
657
658 BEGIN
659
660
661 RETURN NULL;
662
663 EXCEPTION
664
665 WHEN OTHERS THEN
666
667 RETURN NULL;
668 END Calc_OSHA_Flam;
669
670 /*
671 ** This procedure is called from the EXCEPTION handlers
672 ** in other procedures. It is passed the message code,
673 ** token name and token value.
674 **
675 ** The procedure will then process the error message into
676 ** the message stack and then return to the calling routine.
677 ** The procedure assumes all messages used are in the
678 ** application id 'GR'.
679 **
680 */
681 PROCEDURE Handle_Error_Messages
682 (p_message_code IN VARCHAR2,
683 p_token_name IN VARCHAR2,
684 p_token_value IN VARCHAR2,
685 x_msg_count IN OUT NOCOPY NUMBER,
686 x_msg_data IN OUT NOCOPY VARCHAR2,
687 x_return_status OUT NOCOPY VARCHAR2)
688 IS
689 BEGIN
690
691 NULL;
692 x_return_status := FND_API.G_RET_STS_SUCCESS;
693
694 EXCEPTION
695
696 WHEN OTHERS THEN
697 x_return_status := FND_API.G_RET_STS_SUCCESS;
698
699 END Handle_Error_Messages;
700
701 /* - Fix for B1307058
702 ** This function is called to convert the temperature
703 ** values for boiling point and flash range from
704 ** celsius to farhenheit and vice versa.
705 **
706 ** This function returns the converted value and the
707 ** scale concatenated as a string.
708 */
709 FUNCTION Convert_Temperature_Values
710 (p_low_val IN NUMBER,
711 p_high_val IN NUMBER,
712 p_scale IN VARCHAR2)
713 RETURN VARCHAR2 IS
714
715 BEGIN
716
717
718 RETURN NULL;
719
720 EXCEPTION
721
722 WHEN OTHERS THEN
723
724 RETURN NULL;
725 END Convert_Temperature_Values;
726
727 /* - Fix for B1307058
728 ** This function is called to convert the temperature value
729 ** from P_FROM_SCALE to P_TO_SCALE.
730 */
731 FUNCTION Convert_To_Scale
732 (p_value IN NUMBER,
733 p_from_scale IN VARCHAR2,
734 p_to_scale IN VARCHAR2,
735 p_precision IN NUMBER)
736 RETURN NUMBER IS
737
738 BEGIN
739
740
741 RETURN 0;
742
743 EXCEPTION
744
745 WHEN OTHERS THEN
746
747 RETURN 0;
748 END Convert_To_Scale;
749
750 /*
751 ** This procedure is used to consolidate the concentrations percentages
752 ** for similar group of ingredients.
753 */
754 PROCEDURE consolidate_ingredient_data (p_count IN OUT NOCOPY NUMBER) IS
755
756 BEGIN
757 NULL;
758 END consolidate_ingredient_data;
759
760 /* 07-Jun-2001 Melanie Grosser BUG 1772096 - Modified code to print column headings for Ingredient,
761 Exposure and Toxic sections. Added code to procedure
762 Sort_Line_data to retrieve the column headings. Greatly re-worked
763 Print_Ingredient_Data, Print_Toxic_Data and Print_Exposure_Data
764 procedures in order to correctly align the columns. Removed some
765 formatting code from Print_Array_Data.
766 */
767 /* 22-Oct-2001 Melanie Grosser BUGs 1985685,1839807 - Break printed line into
768 multiple lines no longer than 80 characters if
769 text to be pinted is greater than 80
770 */
771 /* 20-Jun-2002 Melanie Grosser BUG 2381697 - Modified code to allow printing of documents in XML and HTML */
772
773 PROCEDURE Print_Array_Data (p_source_action IN VARCHAR2,
774 p_source_procedure IN VARCHAR2,
775 p_row IN NUMBER,
776 p_msds_count IN NUMBER,
777 p_conc_count IN NUMBER,
778 x_return_status IN OUT NOCOPY VARCHAR2)
779 IS
780 BEGIN
781
782 NULL;
783 x_return_status := FND_API.G_RET_STS_SUCCESS;
784
785 EXCEPTION
786
787 WHEN OTHERS THEN
788 x_return_status := FND_API.G_RET_STS_SUCCESS;
789
790 END Print_Array_Data;
791
792
793 FUNCTION Get_Ingredient_Rollup_Value (p_item_code IN VARCHAR2, p_label_code IN VARCHAR2,
794 p_property_id IN VARCHAR2, p_scale IN OUT NOCOPY VARCHAR2,
795 x_return_status IN OUT NOCOPY VARCHAR2) RETURN VARCHAR2 IS
796
797 BEGIN
798
799
800 RETURN NULL;
801
802 EXCEPTION
803
804 WHEN OTHERS THEN
805
806 RETURN NULL;
807 END GET_INGREDIENT_ROLLUP_VALUE;
808
809
810 /*======================================================================
811 -- PROCEDURE :
812 -- print_masked_value
813 --
814 -- DESCRIPTION:
815 -- This PL/SQL procedure is used to print the value of the
816 -- field name that is being masked and the value of the mask.
817 -- This will only be printed if a Worksheet is being printed.
821 -- p_label_code IN VARCHAR2 - The field name (label_code) to be used
818 --
819 -- PARAMETERS:
820 -- p_item_code IN VARCHAR2 - The regulatory item code to be used
822 -- p_value IN VARCHAR2 - The actual value of the field name
823 -- p_source_action IN VARCHAR2 - The source action for this call
824 -- (e.g. WORKSHEET)
825 -- p_mask OUT NOCOPY VARCHAR2 - The mask to be used
826 -- x_return_status OUT NOCOPY VARCHAR2 - Return status for procedure.
827 --
828 -- SYNOPSIS:
829 -- print_masked_value(g_current_item,g_current_label,LocalItemRecord.alpha_value,
830 -- p_source_action,l_mask,x_return_status);
831 --
832 -- HISTORY
833 -- 24-Sep-2001 Melanie Grosser BUG 1323963 - Implementation of field name masking
834 -- Added new procedure PRINT_MASKED_VALUE
835 --===================================================================== */
836 PROCEDURE print_masked_value
837 (p_item_code IN VARCHAR2,
838 p_label_code IN VARCHAR2,
839 p_value IN VARCHAR2,
840 p_source_action IN VARCHAR2,
841 p_mask OUT NOCOPY VARCHAR2,
842 x_return_status OUT NOCOPY VARCHAR2)
843 IS
844 BEGIN
845
846 NULL;
847 x_return_status := FND_API.G_RET_STS_SUCCESS;
848
849 EXCEPTION
850
851 WHEN OTHERS THEN
852 x_return_status := FND_API.G_RET_STS_SUCCESS;
853
854 END PRINT_MASKED_VALUE;
855
856
857 /*======================================================================
858 -- PROCEDURE :
859 -- check_heading_length
860 --
861 -- DESCRIPTION:
862 -- This PL/SQL procedure is used to check to see if line text line
863 -- line should be wrapped. If so, it will print the current text line
864 -- and clear the line.
865 --
866 -- PARAMETERS:
867 -- p_text_line IN OUT NOCOPY VARCHAR2 - Line of text to be printed
868 -- p_text_line2 IN OUT NOCOPY VARCHAR2 - Used to print HMIS headings
869 -- p_column_length IN NUMBER - The max length of the column
870 -- p_source IN VARCHAR2 - 'WORKSHEET' or 'DOCUMENT'
871 -- x_return_status OUT NOCOPY VARCHAR2 - Return status for procedure.
872 --
873 -- SYNOPSIS:
874 -- check_heading_length(l_text_line, l_text_line2, max_msds,x_return_status);
875 --
876 -- HISTORY
877 -- M. Grosser 22-Oct-2001 BUG 1985685,1839807 - Break printed line into
878 -- multiple lines no longer than 80 characters if
879 -- text to be pinted is greater than 80
880 -- M. Grosse 20-Jun-2002 BUG 2381697 - Allow printing of documents in XML
881 -- Only run this code if NOT printing XML or HTML
882 --===================================================================== */
883 PROCEDURE check_heading_length
884 (p_text_line IN OUT NOCOPY VARCHAR2,
885 p_text_line2 IN OUT NOCOPY VARCHAR2,
886 p_column_length IN NUMBER,
887 p_source IN VARCHAR2,
888 x_return_status OUT NOCOPY VARCHAR2)
889 IS
890 BEGIN
891
892 NULL;
893 x_return_status := FND_API.G_RET_STS_SUCCESS;
894
895 EXCEPTION
896
897 WHEN OTHERS THEN
898 x_return_status := FND_API.G_RET_STS_SUCCESS;
899
900 END check_heading_length;
901
902
903
904 /*======================================================================
905 -- PROCEDURE :
906 -- invalidate_languages
907 --
908 -- DESCRIPTION:
909 -- Set all languages to rebuild if one is rebuilt. This is done by
910 -- looping through and setting the end date to yesterday.
911 --
912 -- PARAMETERS:
913 -- p_document_code IN VARCHAR2
914 -- p_language_code IN VARCHAR2
915 -- p_disclosure_code IN VARCHAR2
916 -- p_commit IN VARCHAR2
917 -- p_called_by_form IN VARCHAR2(1)
918 -- p_return_status OUT NOCOPY VARCHAR2
919 --
920 -- HISTORY
921 -- Jeff Baird 06-Nov-2001 Create procedure.
922 --===================================================================== */
923
924 PROCEDURE invalidate_languages
925 (p_document_code IN VARCHAR2,
926 p_language_code IN VARCHAR2,
927 p_disclosure_code IN VARCHAR2,
928 p_commit IN VARCHAR2,
929 p_called_by_form IN VARCHAR2,
930 p_return_status OUT NOCOPY VARCHAR2)
931 IS
932 BEGIN
933
934 NULL;
935 p_return_status := FND_API.G_RET_STS_SUCCESS;
936
937 EXCEPTION
938
939 WHEN OTHERS THEN
940 p_return_status := FND_API.G_RET_STS_SUCCESS;
941
942 END invalidate_languages;
943
944
945 /*===========================================================================
946 -- PROCEDURE:
947 -- Submit_Print
948 --
949 -- DESCRIPTION:
950 -- This PL/SQL procedure is used to submit the concurrent request to print
951 -- a document or a worksheet in PDF, XML or HTML.
952 --
953 -- PARAMETERS:
954 -- p_document_code IN VARCHAR2 - Document code being printed
955 -- p_language_code IN VARCHAR2 - Language that document is being printed in
956 -- p_source IN VARCHAR2 - 'WORKSHEET' or 'DOCUMENT'
957 -- x_return_status OUT NOCOPY VARCHAR2 - 'S'uccess, 'E'rror, 'U'nexpected Error
958 --
959 -- SYNOPSIS:
960 -- Submit_Print(p_document_code,p_language_code,p_source,l_return_status);
961 --
962 -- HISTORY
963 -- 20-Jun-2002 Melanie Grosser BUG 2381697 - Modified code to allow printing of documents in XML and HTML
964 -- Created new procedure Submit_Print.
968 -- program (with the proper display title) when printing a worksheet.
965 -- 15-Aug-2002 Melanie Grosser BUG 2381697 - Modified wait statement and concurrent program name.
966 -- 01-Oct-2002 Melanie Grosser BUG 2381697 - Removed printing of HTML
967 -- 22-Nov-2002 Melanie Grosser BUG 2381697 - Corrected procedure Submit_Print to call the proper concurrent
969 -- 17-Jun-2003 Mercy Thomas BUG 2932007 - Added parameter to the Concurrent Report to incorporate Document Management
970 --=========================================================================== */
971 PROCEDURE Submit_Print
972 (p_document_code IN VARCHAR2,
973 p_language_code IN VARCHAR2,
974 p_source IN VARCHAR2,
975 x_return_status OUT NOCOPY VARCHAR2)
976 IS
977 BEGIN
978
979 NULL;
980 x_return_status := FND_API.G_RET_STS_SUCCESS;
981
982 EXCEPTION
983
984 WHEN OTHERS THEN
985 x_return_status := FND_API.G_RET_STS_SUCCESS;
986 END Submit_Print;
987
988
989 /*===========================================================================
990 -- FUNCTION:
991 -- Get_Print_ID
992 --
993 -- DESCRIPTION:
994 -- This PL/SQL function is used to retrieve a value from the sequence
995 -- GR_PRINT_ID_S, which will be used for the value of g_session_id
996 --
997 -- PARAMETERS:
998 -- NONE
999 --
1000 -- SYNOPSIS:
1001 -- g_session_id := Get_Print_ID;
1002 --
1003 -- HISTORY
1004 -- 18-Feb-2003 Melanie Grosser BUG 2800429 - Patchset version of Sico BUG 2789546
1005 -- Modified code to use new sequence GR_PRINT_ID_S as the value for g_session_id.
1006 -- The use of the profile value DB_SESSION_ID was causing various problems with
1007 -- the same session id being used for more than one document.
1008 -- Created new procedure Get_Print_ID to handle the retrieval/incrementation of
1009 -- retrieval/incrementation of GR_PRINT_ID_S.
1010 -- GR_PRINT_ID_S. Replaced the setting of g_session_id = g_session_id + 1 with
1011 -- a call to Get_Print_ID.
1012 --=========================================================================== */
1013 FUNCTION Get_Print_ID
1014 RETURN NUMBER IS
1015
1016 BEGIN
1017
1018
1019 RETURN 0;
1020
1021 EXCEPTION
1022
1023 WHEN OTHERS THEN
1024
1025 RETURN 0;
1026 END Get_Print_ID;
1027
1028
1029 /*======================================================================
1030 -- FUNCTION :
1031 -- Get_Field_Name_Phrase
1032 --
1033 -- DESCRIPTION:
1034 -- This PL/SQL function is used to retrieve phrases associated with
1035 -- field name properties.
1036 --
1037 -- PARAMETERS:
1038 -- p_phrase_code IN VARCHAR2 - The phrase code to be used for text retrieval
1039 -- x_return_status OUT NOCOPY VARCHAR2 - Return status for function
1040 --
1041 -- SYNOPSIS:
1042 -- Get_Field_Name_Phrase(l_phrase_code,x_return_status);
1043 --
1044 -- HISTORY
1045 -- 26-Feb-2003 Melanie Grosser BUG 2718956 - Fixed data alignment issues
1046 -- Added new function Get_Field_Name_Phrase
1047 --===================================================================== */
1048 FUNCTION Get_Field_Name_Phrase
1049 (p_phrase_code IN VARCHAR2,
1050 x_return_status OUT NOCOPY VARCHAR2) RETURN VARCHAR2
1051 IS
1052 BEGIN
1053
1054
1055 RETURN NULL;
1056
1057 EXCEPTION
1058
1059 WHEN OTHERS THEN
1060
1061 RETURN NULL;
1062
1063 END GET_FIELD_NAME_PHRASE;
1064
1065
1066 /*======================================================================
1067 -- PROCEDURE :
1068 -- print_field_name_data
1069 --
1070 -- DESCRIPTION:
1071 -- This PL/SQL procedure is used to print data associated with
1072 -- field name properties. It will format the data apropriately.
1073 --
1074 -- PARAMETERS:
1075 -- p_line_length IN NUMBER - The maximum number of characters
1076 -- that can be printed on a line
1077 -- p_text_line_2 IN OUT NOCOPY VARCHAR2 - Any text that should have more
1078 -- text appended to the end.
1079 -- p_source_action IN VARCHAR2 - The source action for this call
1080 -- (e.g. WORKSHEET)
1081 -- x_return_status OUT NOCOPY VARCHAR2 - Return status for procedure.
1082 --
1083 -- SYNOPSIS:
1084 -- print_field_name_data( l_line_length,l_text_line2,l_text_line_2,p_source_action,x_return_status);
1085 --
1086 -- HISTORY
1087 -- 26-Feb-2003 Melanie Grosser BUG 2718956 - Fixed data alignment issues
1088 -- Added new procedure Print_Field_Name_Data
1089 --===================================================================== */
1090 PROCEDURE print_field_name_data
1091 (p_line_length IN NUMBER,
1092 p_text_line_1 IN OUT NOCOPY VARCHAR2,
1093 p_text_line_2 IN OUT NOCOPY VARCHAR2,
1094 p_source_action IN VARCHAR2,
1095 x_return_status OUT NOCOPY VARCHAR2)
1096 IS
1097 BEGIN
1098
1099 NULL;
1100 x_return_status := FND_API.G_RET_STS_SUCCESS;
1101
1102 EXCEPTION
1103
1104 WHEN OTHERS THEN
1105 x_return_status := FND_API.G_RET_STS_SUCCESS;
1106 END PRINT_FIELD_NAME_DATA;
1107
1108 /*===========================================================================
1109 -- PROCEDURE:
1110 -- Upload_Doc_File
1111 --
1112 -- DESCRIPTION:
1116 -- p_document_management IN VARCHAR2 - Document Management is enbled or not.
1113 -- This PL/SQL procedure is used to Upload the document file into FND Tables
1114 --
1115 -- PARAMETERS:
1117 -- p_source_lang IN VARCHAR2 - Source Lanaguage
1118 -- p_category IN VARCHAR2 - Category code for the document
1119 -- p_request_id IN NUMBER - Request ID for the generated Document
1120 -- p_output_type IN VARCHAR2 - Output Type
1121 -- p_attribute1 IN VARCHAR2 - Attribute1
1122 -- p_attribute2 IN VARCHAR2 - Attribute2
1123 -- p_attribute3 IN VARCHAR2 - Attribute3
1124 -- p_attribute4 IN VARCHAR2 - Attribute4
1125 -- p_attribute5 IN VARCHAR2 - Attribute5
1126 -- p_attribute6 IN VARCHAR2 - Attribute6
1127 -- p_attribute7 IN VARCHAR2 - Attribute7
1128 -- p_attribute8 IN VARCHAR2 - Attribute8
1129 -- p_attribute9 IN VARCHAR2 - Attribute9
1130 -- p_attribute10 IN VARCHAR2 - Attribute10
1131 -- p_created_by IN NUMBER - WHO Column for Created By
1132 -- p_creation_date IN DATE - WHO Column for Creation Date
1133 -- p_last_updated_by IN NUMBER - WHO Column for Last Updated By
1134 -- p_last_updated_login IN NUMBER - WHO Column for Last Updated Login
1135 -- p_last_updated_date IN DATE - WHO Column for Last Updated Date
1136 -- x_return_status OUT NOCOPY VARCHAR2 - 'S'uccess, 'E'rror, 'U'nexpected Error
1137 -- x_msg_data OUT NOCOPY VARCHAR2 - Message Data for the return status
1138 --
1139 -- SYNOPSIS:
1140 -- Upload_Doc_File(p_document_management,
1141 -- p_source_lang,
1142 -- p_category,
1143 -- p_request_id,
1144 -- p_output_type,
1145 -- p_attribute1,
1146 -- p_attribute2,
1147 -- p_attribute3,
1148 -- p_attribute4,
1149 -- p_attribute5,
1150 -- p_attribute6,
1151 -- p_attribute7,
1152 -- p_attribute8,
1153 -- p_attribute9,
1154 -- p_attribute10,
1155 -- p_created_by,
1156 -- p_creation_date,
1157 -- p_last_updated_by,
1158 -- p_last_updated_login,
1159 -- p_last_updated_date,
1160 -- l_return_status,
1161 -- l_msg_data);
1162 --
1163 -- HISTORY
1164 -- 17-Jun-2003 Mercy Thomas BUG 2932007 - Created new procedure Upload_Doc_File
1165 -- to Upload the Document into FND Tables
1166 -- 01-Dec-2003 Mercy Thomas BUG 3289104 - Added new local variables l_return_Status and l_msg_data
1167 -- Modified the code which calls EDR API to call using call by reference
1168 -- Replace the x_return_status with l_return_status and x_msg_data with l_msg_data.
1169 --=========================================================================== */
1170
1171
1172 PROCEDURE Upload_Doc_File
1173 (errbuf OUT NOCOPY VARCHAR2,
1174 retcode OUT NOCOPY VARCHAR2,
1175 p_document_management IN VARCHAR2,
1176 p_source_lang IN VARCHAR2,
1177 p_category IN VARCHAR2,
1178 p_request_id IN NUMBER,
1179 p_output_type IN VARCHAR2,
1180 p_attribute1 IN VARCHAR2,
1181 p_attribute2 IN VARCHAR2,
1182 p_attribute3 IN VARCHAR2,
1183 p_attribute4 IN VARCHAR2,
1184 p_attribute5 IN VARCHAR2,
1185 p_attribute6 IN VARCHAR2,
1186 p_attribute7 IN VARCHAR2,
1187 p_attribute8 IN VARCHAR2,
1188 p_attribute9 IN VARCHAR2,
1189 p_attribute10 IN VARCHAR2,
1190 p_created_by IN NUMBER,
1191 p_creation_date IN DATE,
1192 p_last_updated_by IN NUMBER,
1193 p_last_update_login IN NUMBER,
1194 p_last_update_date IN DATE,
1195 x_return_status OUT NOCOPY VARCHAR2,
1196 x_msg_data OUT NOCOPY VARCHAR2) IS
1197 BEGIN
1198
1199 NULL;
1200 x_return_status := FND_API.G_RET_STS_SUCCESS;
1201
1202 EXCEPTION
1203
1204 WHEN OTHERS THEN
1205 x_return_status := FND_API.G_RET_STS_SUCCESS;
1206 END Upload_Doc_File;
1207
1208
1209 END GR_PROCESS_DOCUMENTS;