DBA Data[Home] [Help]

PACKAGE: APPS.JTF_PLSQL_API

Source


1 PACKAGE JTF_PLSQL_API AUTHID CURRENT_USER as
2 /* $Header: JTFPAPIS.pls 115.2 2000/02/02 10:57:08 pkm ship     $ */
3 
4 -- Start of Comments
5 --
6 -- NAME
7 --   JTF_PLSQL_API
8 --
9 -- PURPOSE
10 --   This package is a public utility API developed from Sales Core group
11 --
12 --   Constants:
13 --    G_VALID_LEVEL_ITEM
14 --    G_VALID_LEVEL_RECORD
15 --    G_VALID_LEVEL_INTER_RECORD
16 --    G_VALID_LEVEL_INTER_ENTITY
17 --    G_PVT
18 --    G_PUB
19 --    G_EXC_OTHERS
20 --    G_CREATE
21 --    G_UPDATE
22 --
23 --
24 --   Procedures:
25 --    Start_API
26 --    End_API
27 --    Handle_Exceptions
28 --    Translate_OrderBy
29 --    Get_Messages
30 --    Debug_Message
31 --    Set_Message
32 --    Gen_Flexfield_Where
33 --    Bind_Flexfield_Where
34 --
35 -- NOTES
36 --
37 --
38 -- HISTORY
39 --   08/11/99   AWU                  CREATED(as AS_UTILITY)
40 --   09/09/99   SOLIN                UPDATED(change to JTF_PLSQL_API)
41 --
42 --
43 -- End of Comments
44 
45 --------------------------------------------------------------------
46 --
47 --                    PUBLIC CONSTANTS
48 --
49 --------------------------------------------------------------------
50 
51 -- ************************************************************
52 -- The following constants are for validation levels.
53 -- ************************************************************
54 --
55 -- There are four types of validation APIs need to be provided:
56 -- Item level validation, Record level validation, Inter-record
57 -- level validation and Inter-entity level validation.
58 --
59 -- 1. Item level validation:
60 -- Validation of an individual item needs to be checked.
61 -- 2. Record level validation:
62 -- Missing-field and cross-field dependencies should be checked
63 -- 3. Inter-record(table) level validation:
64 -- Cross-record dependencies should be checked
65 -- 4. Inter- entity(among different records) level validation:
66 -- For multi-instance child entities, cross entity validation
67 -- should be performed. The order of execution depends on business
68 -- logic.
69 --
70 -- Public APIs by definition have to perform FULL validation on all
71 -- data passed to them; Accordingly, there should be no validation
72 -- levels defined for public APIs. Private APIs should include
73 -- p_validation_level parameter. Therefore, private APIs have more
74 -- flexibility when it comes to validation.
75 --
76 -- When form interface calls APIs, it can call private APIs. it should
77 -- pass JTF_PL_SQL_API.G_VALID_LEVEL_XXX for parameter p_validation_level.
78 -- In our API coding, we need to handle those validation levels . Please
79 -- do the following check in your API:
80 --
81 -- IF (p_validation_level >= JTF_PLSQL_API.G_VALID_LEVEL_ITEM
82 -- THEN
83 -- 	Perform  item level validation;
84 -- END IF;
85 --
86 -- IF (p_validation_level >= JTF_PLSQL_API.G_VALID_LEVEL_INTER_FIELD)
87 -- THEN
88 --	Perform record level validation;
89 -- END IF;
90 --
91 -- IF (p_validation_level >= JTF_PLSQL_API.G_VALID_LEVEL_INTER_RECORD)
92 -- THEN
93 --	Perform inter-record level validation;
94 -- END IF;
95 --
96 -- IF (p_validation_level >= JTF_PLSQL_API.G_VALID_LEVEL_INTER_ENTITY)
97 -- THEN
98 --	Perform inter-entity level validation;
99 -- END IF;
100 --
101 -- If you pass in JTF_PL_SQL_API.G_VALID_LEVEL_INTER_FIELD for
102 -- p_validation_level, item level validation will be bypassed. Record
103 -- level validation, inter-record level validation and inter-entity
104 -- level validation will be executed. For item level validation, form
105 -- interface can either use LOV or validation procedures to validate
106 -- data. If pass in validation level is FULL, all of the validations
107 -- above will be executed automatically.  As for get_currentUser and
108 -- access check, we should do the following:
109 --
110 -- if (p_validation_level = FND_API.G_VALID_LEVEL_FULL)
111 -- then
112 --	Call get_currentUser;
113 --	Call has_xxxAccess;
114 -- end if;
115 -- Access API can be bypassed by Form since form will use business view
116 -- to handle access privilege check.
117 --
118 
119 -- Perform item level validation only
120 G_VALID_LEVEL_ITEM CONSTANT NUMBER:= 90;
121 
122 -- Perform record level(inter-field) validation only
123 G_VALID_LEVEL_RECORD CONSTANT NUMBER:= 80;
124 
125 -- Perform inter-record level validation only
126 G_VALID_LEVEL_INTER_RECORD CONSTANT NUMBER:= 70;
127 
128 -- Perform inter-entity level validation only
129 G_VALID_LEVEL_INTER_ENTITY CONSTANT NUMBER:= 60;
130 
131 
132 -- ************************************************************
133 -- The following constants are for exception handling routine
134 -- ************************************************************
135 --
136 -- Exceptions Handling Routine will do the following:
137 -- 1. Rollback to savepoint
138 -- 2. Handle expected, unexpected and other exceptions
139 -- 3. Add an error message to the API message list
140 -- 4. Return error status
141 --
142 -- The following is example of calling exception handling routines:
143 --
144 -- EXCEPTION
145 -- WHEN FND_API.G_EXC_ERROR THEN
146 --     JTF_PLSQL_API.HANDLE_EXCEPTIONS(
147 --                         P_API_NAME => L_API_NAME
148 --                       , P_PGK_NAME => G_PKG_NAME
149 --                       , P_EXCEPTION_LEVEL  => FND_MSG_PUB.G_MSG_LVL_ERROR
150 --                       , P_PACKAGE_TYPE => JTF_PLSQL_API.G_PVT
151 --                       , X_MSG_COUNT   => X_MSG_COUNT
152 --                       , X_MSG_DATA    => X_MSG_DATA
153 --                       , X_RETURN_STATUS => x_return_status
154 -- );
155 
156 -- WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
157 --     JTF_PLSQL_API.HANDLE_EXCEPTIONS(
158 --                         P_API_NAME => L_API_NAME
159 --                       , P_PGK_NAME => G_PKG_NAME
160 --                       , P_EXCEPTION_LEVEL  => FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR
161 --                       , P_PACKAGE_TYPE => JTF_PLSQL_API.G_PVT
162 --                       , X_MSG_COUNT   => X_MSG_COUNT
163 --                       , X_MSG_DATA    => X_MSG_DATA
164 --                       , X_RETURN_STATUS => x_return_status
165 -- );
166 
167 -- WHEN OTHERS THEN
168 --     JTF_PLSQL_API.HANDLE_EXCEPTIONS(
169 --                         P_API_NAME => L_API_NAME
170 --                       , P_PGK_NAME => G_PKG_NAME
171 --                       , P_EXCEPTION_LEVEL => JTF_PLSQL_API.G_EXC_OTHERS
172 --                       , P_PACKAGE_TYPE => JTF_PLSQL_API.G_PVT
173 --                       , X_MSG_COUNT   => X_MSG_COUNT
174 --                       , X_MSG_DATA    => X_MSG_DATA
175 --                       , X_RETURN_STATUS => x_return_status
176 -- );
177 
178 -- Global variables for package type, used in Handle_Exceptions
179 G_PVT  VARCHAR2(30) := '_PVT';
180 G_PUB  VARCHAR2(30) := '_PUB';
181 
182 -- Global variable for others exception
183 G_EXC_OTHERS  NUMBER := 50;
184 
185 -- ************************************************************
186 -- The following global variables is used in validation procedures
187 -- -> validation_mode
188 -- ************************************************************
189 G_CREATE  VARCHAR2(30) := 'CREATE';
190 G_UPDATE  VARCHAR2(30) := 'UPDATE';
191 
192 
193 --------------------------------------------------------------------
194 --
195 --                    PUBLIC DATATYPES
196 --
197 --------------------------------------------------------------------
198 
199 --
200 -- Start of Comments
201 --
202 --     Order by record: util_order_by_rec_type
203 --
204 --    Notes:
205 --    1. col_choice is a two or three digit number.
206 --       First digit represents the priority for the order by column.
207 --       (If priority > 10, use 2 digits to represent it)
208 --       Second(or third) digit represents the descending or ascending
209 --       order for the query result. 1 for ascending and 0 for descending.
210 --    2. col_name is the order by column name.
211 --
212 -- End of Comments
213 
214 TYPE util_order_by_rec_type IS RECORD
215 (
216     col_choice NUMBER        := FND_API.G_MISS_NUM,
217     col_name   VARCHAR2(30)  := FND_API.G_MISS_CHAR
218 );
219 
220 G_MISS_UTIL_ORDER_BY_REC    util_order_by_rec_type;
221 
222 TYPE util_order_by_tbl_type IS TABLE OF     util_order_by_rec_type
223                             INDEX BY BINARY_INTEGER;
224 
225 -- Start of Comments
226 --
227 --     Item property record: item_property_rec_type
228 --
229 --    Notes:
230 --     This record type is for record type for item level validation
231 --
232 -- End of Comments
233 
234 TYPE item_property_rec_type IS RECORD
235 (
236     column_name         VARCHAR2(30)   := FND_API.G_MISS_CHAR,
237     required_flag       VARCHAR2(1)    := 'N', -- may be changed to FND_API.G_MISS_CHAR
238     update_allowed_flag VARCHAR2(1)    := 'Y', -- may be changed to FND_API.G_MISS_CHAR
239     default_char_val    VARCHAR2(320)  := FND_API.G_MISS_CHAR,
240     default_num_val     NUMBER         := FND_API.G_MISS_NUM,
241     default_date_val    DATE           := FND_API.G_MISS_DATE
242 );
243 
244 G_MISS_ITEM_PROPERTY_REC    item_property_rec_type;
245 
246 TYPE item_property_tbl_type IS TABLE OF item_property_rec_type
247                             INDEX BY BINARY_INTEGER;
248 
249 
250 -- Start of Comments
251 --
252 --     Flexfield where record: flex_where_rec_type
253 --
254 --    Notes: 1. name is the column name in where clause. Its format is
255 --		table_alias.column_name.
256 --	     2. value is the search criteria for the column
257 --
258 -- End of Comments
259 
260 TYPE flex_where_rec_type      IS RECORD
261 (
262     name      VARCHAR2(30)   := FND_API.G_MISS_CHAR,
263     value     VARCHAR2(150)  := FND_API.G_MISS_CHAR
264 );
265 
266 TYPE flex_where_tbl_type IS TABLE OF flex_where_rec_type
267                          INDEX BY BINARY_INTEGER;
268 
269 
270 --------------------------------------------------------------------
271 --
272 --                    PUBLIC APIS
273 --
274 --------------------------------------------------------------------
275 
276 -- Start of Comments
277 --
278 --      API name        : Start_API
279 --      Type            : Public
280 --      Function        : Prolog before API starts
281 --                        1. Set saveporint
282 --                        2. Check version number
283 --                        3. Initialize message list
284 --                        4. Invoke callout procedure
285 --
286 --
287 --      Parameters      :
288 --      IN              :
289 --            p_api_name              IN      VARCHAR2,
290 --            p_pkg_name              IN      VARCHAR2,
291 --            p_init_msg_list         IN      VARCHAR2,
292 --            p_l_api_version         IN      NUMBER,
293 --            p_api_version           IN      NUMBER,
294 --            p_api_type              IN      VARCHAR2,
295 --      OUT             :
296 --            x_return_status         OUT     VARCHAR2(1)
297 --
298 --      Version :       Current version 1.0
299 --                      Initial version 1.0
300 --
301 --
302 -- End of Comments
303 
304 PROCEDURE Start_API(
305     p_api_name              IN      VARCHAR2,
306     p_pkg_name              IN      VARCHAR2,
307     p_init_msg_list         IN      VARCHAR2,
308     p_l_api_version         IN      NUMBER,
309     p_api_version           IN      NUMBER,
310     p_api_type              IN      VARCHAR2,
311     x_return_status         OUT     VARCHAR2
312 );
313 
314 
315 -- Start of Comments
316 --
317 --      API name        : End_API
318 --      Type            : Public
319 --      Function        : Epilog of API
320 --                        1. Check whether it needs commit or not
321 --                        2. Get message count
322 --                        3. Invoke callout procedure
323 --
324 --
325 --      Parameters      :
326 --      IN              : none.
327 --      OUT             :
328 --            x_msg_count            OUT     NUMBER,
329 --            x_msg_data             OUT     VARCHAR2
330 --
331 --
332 --      Version :       Current version 1.0
333 --                      Initial version 1.0
334 --
335 --
336 -- End of Comments
337 
338 PROCEDURE End_API(
339     x_msg_count             OUT     NUMBER,
340     x_msg_data              OUT     VARCHAR2
341 );
342 
343 
344 
345 -- Start of Comments
346 --
347 --      API name        : Handle_Exceptions
348 --      Type            : Public
349 --      Function        : Exception handling routine
350 --                        1. Called by Call_Exception_Handlers
351 --                        2. Handle exception according to different
352 --                           p_exception_level
353 --
354 --
355 --      Parameters      :
356 --      IN              :
360 --            p_package_type          IN      VARCHAR2
357 --            p_api_name              IN      VARCHAR2
358 --            p_pkg_name              IN      VARCHAR2
359 --            p_exception_level       IN      NUMBER
361 --            x_msg_count             IN      NUMBER
362 --            x_msg_data              IN      VARCHAR2
363 --      OUT             :
364 --
365 --
366 --      Version :       Current version 1.0
367 --                      Initial version 1.0
368 --
369 -- End of Comments
370 PROCEDURE Handle_Exceptions(
371                 P_API_NAME        IN  VARCHAR2,
372                 P_PKG_NAME        IN  VARCHAR2,
373                 P_EXCEPTION_LEVEL IN  NUMBER   := FND_API.G_MISS_NUM,
374                 P_SQLCODE         IN  NUMBER   DEFAULT NULL,
375                 P_SQLERRM         IN  VARCHAR2 DEFAULT NULL,
376                 P_PACKAGE_TYPE    IN  VARCHAR2,
377                 P_ROLLBACK_FLAG   IN  VARCHAR2 := 'Y',
378                 X_MSG_COUNT       OUT NUMBER,
379                 X_MSG_DATA        OUT VARCHAR2,
380                 X_RETURN_STATUS   OUT VARCHAR2
381 );
382 
383 
384 
385 -- Start of Comments
386 --
387 --      API name        : translate_orderBy
388 --      Type            : Public
389 --      Function        : translate order by choice numbers and columns into
390 --                        a order by string with the order of column names and
391 --                        descending or ascending request.
392 --
393 --
394 --      Parameters      :
395 --      IN              :
396 --            p_api_version_number    IN      NUMBER,
397 --            p_init_msg_list         IN      VARCHAR2
398 --            p_validation_level      IN      NUMBER
399 --      OUT             :
400 --            x_return_status         OUT     VARCHAR2(1)
401 --            x_msg_count             OUT     NUMBER
402 --            x_msg_data              OUT     VARCHAR2(2000)
403 --
404 --      Version :       Current version 1.0
405 --                      Initial version 1.0
406 --
407 --
408 -- End of Comments
409 
410 PROCEDURE Translate_OrderBy(
411     p_api_version_number     IN      NUMBER,
412     p_init_msg_list          IN      VARCHAR2
413                   := FND_API.G_FALSE,
414     p_validation_level       IN      NUMBER
415                   := FND_API.G_VALID_LEVEL_FULL,
416     p_order_by_tbl           IN     UTIL_ORDER_BY_TBL_TYPE,
417     x_order_by_clause        OUT     VARCHAR2,
418     x_return_status          OUT     VARCHAR2,
419     x_msg_count              OUT     NUMBER,
420     x_msg_data               OUT     VARCHAR2
421 );
422 
423 
424 -- Start of Comments
425 --
426 --      API name        : Get_Messages
427 --      Type            : Public
428 --      Function        : Get messages from message dictionary
429 --
430 --
431 --      Parameters      :
432 --      IN              :
433 --            p_message_count         IN      NUMBER,
434 --      OUT             :
435 --            x_msgs                  OUT     VARCHAR2
436 --
437 --      Version :       Current version 1.0
438 --                      Initial version 1.0
439 --
440 --
441 -- End of Comments
442 PROCEDURE Get_Messages(
443     p_message_count     IN     NUMBER,
444     x_msgs              OUT    VARCHAR2
445 );
446 
447 
448 -- Start of Comments
449 --
450 -- Message levels:
451 --
452 -- The pre-defined debug message levels are defined in FND_MSG_PUB
453 -- package as follows:
454 --     G_MSG_LVL_DEBUG_HIGH    CONSTANT NUMBER := 30;
455 --     G_MSG_LVL_DEBUG_MEDIUM  CONSTANT NUMBER := 20;
456 --     G_MSG_LVL_DEBUG_LOW     CONSTANT NUMBER := 10;
457 -- The usage for the above mentioned debug levels:
458 -- High:
459 --     Procedure and function call signatures, and major events like
460 --     choosing one of two or more processing methods.
461 -- Medium:
462 --     Dynamic SQL statements, SQL bind variables and intermediate
463 --     level events like results of calculations or important flags.
464 -- Low:
465 --     Variables inside loops, all decisions, and all intermediate
466 --     results.
467 --
468 -- The pre-defined exception message levels in FND_MSG_PUB package
469 -- are as follows:
470 --     G_MSG_LVL_UNEXP_ERROR   CONSTANT NUMBER := 60;
471 --     G_MSG_LVL_ERROR         CONSTANT NUMBER := 50;
472 --     G_MSG_LVL_SUCCESS       CONSTANT NUMBER := 40;
473 -- Their usage are as their names implied.
474 --
475 -- If you'd like to get message from message table, the sample code is below.
476 -- l_count    NUMBER;
477 -- l_msg_data VARCHAR2(2000);
478 --
479 -- l_count := FND_MSG_PUB.Count_Msg;
480 -- FOR l_index IN 1..l_count LOOP
481 --     l_msg_data := FND_MSG_PUB.Get(
482 --         p_msg_index   =>  l_index,
483 --         p_encoded     =>  FND_API.G_TRUE);
484 --     dbms_output.put_line(l_msg_data);
485 -- END LOOP;
486 --
487 -- End of Comments
488 
489 
490 -- Start of Comments
491 --
492 --      API name        : Debug_Message
493 --      Type            : Public
494 --      Function        : Put a debug message into FND_MSG_PUB
495 --                        message table
496 --
497 --      Parameters      :
498 --      IN              :
499 --            p_msg_level    IN      NUMBER,
500 --            p_app_name     IN      VARCHAR2,
501 --            p_msg          IN      VARCHAR2
502 --      OUT             : none.
503 --
504 --
505 --
506 --      Version :       Current version 1.0
507 --                      Initial version 1.0
508 --
509 --      Notes:
513 --            FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW
510 --      1. If you want to print a debug message, you should not use
511 --         dbms_output.put_line(), instead, you should call this Debug_Message
512 --         procedure. The parameter p_msg_level can be one of the following:
514 --            FND_MSG_PUB.G_MSG_LVL_DEBUG_MEDIUM
515 --            FND_MSG_PUB.G_MSG_LVL_DEBUG_HIGH
516 --            FND_MSG_PUB.G_MSG_LVL_DEBUG_SUCCESS
517 --            FND_MSG_PUB.G_MSG_LVL_DEBUG_ERROR
518 --            FND_MSG_PUB.G_MSG_LVL_DEBUG_UNEXP_ERROR
519 --      2. The calling example is like this:
520 --         JTF_PLSQL_API.Debug_Message(FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW,
521 --         'Forecast Id: '||to_char(l_forecast_rec.forecast_id));
522 --      3. This API is for printing debug message use. If you'd like to
523 --         put tokens into FND_MSG_PUB message table, please use
524 --         Set_Message API described below.
525 --
526 -- End of Comments
527 PROCEDURE Debug_Message(
528     p_msg_level IN NUMBER,
529     p_app_name  IN VARCHAR2,
530     p_msg       IN VARCHAR2
531 );
532 
533 
534 
535 -- Start of Comments
536 --
537 --   The following four overloading Set_Message APIs will put message
538 --   name and token(s) into FND_MSG_PUB message table. These overloading
539 --   APIs are transparent to developers. We provide these APIs with
540 --   different number of arguments because of performance consideration.
541 --   System loader has to allocate stack for arguments at run time. If
542 --   there is only one token, it will invoke the API which needs one
543 --   token only, and hence take less resource than API with two tokens.
544 --
545 -- End of Comments
546 
547 
548 -- Start of Comments
549 --
550 --      API name        : Set_Message
551 --      Type            : Public
552 --      Function        : Put 1 message into FND_MSG_PUB message table
553 --
554 --      Parameters      :
555 --      IN              :
556 --            p_msg_level     IN      NUMBER,
557 --            p_app_name      IN      VARCHAR2,
558 --            p_msg_name      IN      VARCHAR2,
559 --            p_token1        IN      VARCHAR2,
560 --            p_token1_value  IN      VARCHAR2
561 --      OUT             : none.
562 --
563 --
564 --
565 --      Version :       Current version 1.0
566 --                      Initial version 1.0
567 --
568 --      Notes:
569 --      1. The parameter p_msg_level can be one of the following:
570 --            FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW
571 --            FND_MSG_PUB.G_MSG_LVL_DEBUG_MEDIUM
572 --            FND_MSG_PUB.G_MSG_LVL_DEBUG_HIGH
573 --            FND_MSG_PUB.G_MSG_LVL_DEBUG_SUCCESS
574 --            FND_MSG_PUB.G_MSG_LVL_DEBUG_ERROR
575 --            FND_MSG_PUB.G_MSG_LVL_DEBUG_UNEXP_ERROR
576 --      2. p_app_name is your short name of the application this message
577 --         is associated with.
578 --      3. p_msg_name is the message name that identifies your message.
579 --      4. p_token? specify the name of the token you want to substitute.
580 --      5. p_token?_value indicate your substitute text. You can include
581 --         as much substitute text as necessary for the message you call.
582 --      6. The number of token is restricted to be less than or equal to
583 --         the number of API name specifies.
584 --      7. The calling example is like this:
585 --         JTF_PLSQL_API.Set_Message(FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW, 'AS',
586 --         'MY_AP_MESSAGE', 'FILENAME', 'myfile.doc');
587 --         JTF_PLSQL_API.Set_Message(FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW, 'AS',
588 --         'MY_AP_MESSAGE', 'FILENAME', 'myfile.doc', 'USERNAME', username);
589 --
590 -- End of Comments
591 PROCEDURE Set_Message(
592     p_msg_level     IN      NUMBER,
593     p_app_name      IN      VARCHAR2,
594     p_msg_name      IN      VARCHAR2,
595     p_token1        IN      VARCHAR2,
596     p_token1_value  IN      VARCHAR2
597 );
598 
599 
600 
601 -- Start of Comments
602 --
603 --      API name        : Set_Message
604 --      Type            : Public
605 --      Function        : Put 2 messages into FND_MSG_PUB message table
606 --
607 --      Parameters      :
608 --      IN              :
609 --            p_msg_level     IN      NUMBER,
610 --            p_app_name      IN      VARCHAR2,
611 --            p_msg_name      IN      VARCHAR2,
612 --            p_token1        IN      VARCHAR2,
613 --            p_token1_value  IN      VARCHAR2
614 --            p_token2        IN      VARCHAR2,
615 --            p_token2_value  IN      VARCHAR2
616 --      OUT             : none.
617 --
618 --
619 --
620 --      Version :       Current version 1.0
621 --                      Initial version 1.0
622 --
623 --      Notes:
624 --      See Set_Message()
625 --
626 -- End of Comments
627 PROCEDURE Set_Message(
628     p_msg_level     IN      NUMBER,
629     p_app_name      IN      VARCHAR2,
630     p_msg_name      IN      VARCHAR2,
631     p_token1        IN      VARCHAR2,
632     p_token1_value  IN      VARCHAR2,
633     p_token2        IN      VARCHAR2,
634     p_token2_value  IN      VARCHAR2
635 );
636 
637 
638 
639 -- Start of Comments
640 --
641 --      API name        : Set_Message
642 --      Type            : Public
643 --      Function        : Put 3 messags into FND_MSG_PUB message table
644 --
645 --      Parameters      :
646 --      IN              :
647 --            p_msg_level     IN      NUMBER,
648 --            p_app_name      IN      VARCHAR2,
649 --            p_msg_name      IN      VARCHAR2,
650 --            p_token1        IN      VARCHAR2,
651 --            p_token1_value  IN      VARCHAR2,
655 --            p_token3_value  IN      VARCHAR2
652 --            p_token2        IN      VARCHAR2,
653 --            p_token2_value  IN      VARCHAR2,
654 --            p_token3        IN      VARCHAR2,
656 --      OUT             : none.
657 --
658 --
659 --
660 --      Version :       Current version 1.0
661 --                      Initial version 1.0
662 --
663 --      Notes:
664 --      See Set_Message()
665 --
666 -- End of Comments
667 PROCEDURE Set_Message(
668     p_msg_level     IN      NUMBER,
669     p_app_name      IN      VARCHAR2,
670     p_msg_name      IN      VARCHAR2,
671     p_token1        IN      VARCHAR2,
672     p_token1_value  IN      VARCHAR2,
673     p_token2        IN      VARCHAR2,
674     p_token2_value  IN      VARCHAR2,
675     p_token3        IN      VARCHAR2,
676     p_token3_value  IN      VARCHAR2
677 );
678 
679 -- Start of Comments
680 --
681 --      API name        : Set_Message
682 --      Type            : Public
683 --      Function        : Put 7 messages into FND_MSG_PUB message table
684 --
685 --      Parameters      :
686 --      IN              :
687 --            p_msg_level     IN      NUMBER,
688 --            p_app_name      IN      VARCHAR2,
689 --            p_msg_name      IN      VARCHAR2,
690 --            p_token1        IN      VARCHAR2,
691 --            p_token1_value  IN      VARCHAR2,
692 --            p_token2        IN      VARCHAR2,
693 --            p_token2_value  IN      VARCHAR2,
694 --            p_token3        IN      VARCHAR2,
695 --            p_token3_value  IN      VARCHAR2,
696 --            p_token4        IN      VARCHAR2,
697 --            p_token4_value  IN      VARCHAR2,
698 --            p_token5        IN      VARCHAR2,
699 --            p_token5_value  IN      VARCHAR2,
700 --            p_token6        IN      VARCHAR2,
701 --            p_token6_value  IN      VARCHAR2,
702 --            p_token7        IN      VARCHAR2,
703 --            p_token7_value  IN      VARCHAR2
704 --      OUT             : none.
705 --
706 --
707 --
708 --      Version :       Current version 1.0
709 --                      Initial version 1.0
710 --
711 --      Notes:
712 --      See Set_Message()
713 --
714 -- End of Comments
715 PROCEDURE Set_Message(
716     p_msg_level     IN      NUMBER,
717     p_app_name      IN      VARCHAR2,
718     p_msg_name      IN      VARCHAR2,
719     p_token1        IN      VARCHAR2,
720     p_token1_value  IN      VARCHAR2,
721     p_token2        IN      VARCHAR2,
722     p_token2_value  IN      VARCHAR2,
723     p_token3        IN      VARCHAR2,
724     p_token3_value  IN      VARCHAR2,
725     p_token4        IN      VARCHAR2 := FND_API.G_MISS_CHAR,
726     p_token4_value  IN      VARCHAR2 := FND_API.G_MISS_CHAR,
727     p_token5        IN      VARCHAR2 := FND_API.G_MISS_CHAR,
728     p_token5_value  IN      VARCHAR2 := FND_API.G_MISS_CHAR,
729     p_token6        IN      VARCHAR2 := FND_API.G_MISS_CHAR,
730     p_token6_value  IN      VARCHAR2 := FND_API.G_MISS_CHAR,
731     p_token7        IN      VARCHAR2 := FND_API.G_MISS_CHAR,
732     p_token7_value  IN      VARCHAR2 := FND_API.G_MISS_CHAR
733 );
734 
735 
736 
737 
738 
739 -- Start of Comments
740 --
741 --      API Name        : Gen_Flexfield_Where
742 --      Type            : Public
743 --      Function        : common procedure for flexfield search with binding
744 --      Parameters      :
745 --      IN              :
746 --            p_flex_where_tbl_type    : column names and the search criteria
747 --                                       for those columns in where clause
748 --
749 --      OUT             :
750 --            x_flex_where_clause      : where clause based on flexfield, the
751 --                                       format of which like ' AND
752 --                                       table.column1 = :p_ofso_flex_var1 AND
753 --                                       table.column2 = :p_ofso_flex_var2 ....'
754 --
755 --
756 --      Version :       Current version 1.0
757 --                      Initial version 1.0
758 --
759 --      Notes:
760 --
761 -- End of Comments
762 
763 PROCEDURE Gen_Flexfield_Where(
764     p_flex_where_tbl_type   IN   JTF_PLSQL_API.flex_where_tbl_type,
765     x_flex_where_clause     OUT  VARCHAR2
766 );
767 
768 -- Start of Comments
769 --
770 --      API Name        : Bind_Flexfield_Where
771 --      Type            : Public
772 --      Function        : common procedure for flexfield search with binding.
773 --                        Bind placeholders in the where clause generated by
774 --                        Gen_Flexfield_Where.
775 --      Parameters      :
776 --      IN              :
777 --            p_cursor_id              : identifier of the cursor for binding.
778 --            p_flex_where_tbl_type    : column names and the search criteria
779 --                                       for those columns in where clause
780 --
781 --      OUT             : none.
782 --
783 --      Version :       Current version 1.0
784 --                      Initial version 1.0
785 --
786 --      Notes:
787 --
788 -- End of Comments
789 
790 PROCEDURE Bind_Flexfield_Where(
791     p_cursor_id              IN  NUMBER,
792     p_flex_where_tbl_type    IN  JTF_PLSQL_API.flex_where_tbl_type
793 );
794 
795 
796 END JTF_PLSQL_API;