1 PACKAGE BODY GMO_SETUP_PVT
2 /* $Header: GMOVSTPB.pls 120.1 2005/08/08 03:51 swasubra noship $ */
3
4 AS
5
6 --This procedure enables GMO profile option that would enable process operation modules
7 --to start functioning in the environment.
8 --This procedure is called through a concurrent program request.
9 PROCEDURE ENABLE_GMO(ERRBUF OUT NOCOPY VARCHAR2,
10 RETCODE OUT NOCOPY VARCHAR2)
11
12 IS
13
14 --This variable would hold the current value of of the GMO_ENABLED_FLAG profile option.
15 L_CURRENT_VALUE VARCHAR2(10);
16
17 --This variable would indicate if the profile option was updated successfully.
18 L_STATUS BOOLEAN;
19
20 BEGIN
21
22 --Obtain the current value of the profile option GMO_ENABLED_FLAG.
23 L_CURRENT_VALUE := FND_PROFILE.VALUE('GMO_ENABLED_FLAG');
24
25 IF L_CURRENT_VALUE <> 'Y' THEN
26
27 --The profile option ios switched off.
28 --Hence switch on the profile option.
29 L_STATUS := FND_PROFILE.SAVE(X_NAME => 'GMO_ENABLED_FLAG',
30 X_VALUE => 'Y',
31 X_LEVEL_NAME => 'SITE');
32
33 --Set the message name based on the status value.
34 IF L_STATUS THEN
35 FND_MESSAGE.SET_NAME('GMO','GMO_SETUP_ENABLED_SUCCESS');
36 ELSE
37 FND_MESSAGE.SET_NAME('GMO','GMO_SETUP_ENABLE_FAILURE');
38 END IF;
39
40 ELSE
41 --For some reason the profile option could not be updated.
42 --Set the message appropriately to indicate the same.
43 FND_MESSAGE.SET_NAME('GMO','GMO_SETUP_ALREADY_ENABLED');
44 END IF;
45
46 --Set the message on the log.
47 FND_FILE.PUT_LINE(FND_FILE.OUTPUT, FND_MESSAGE.GET);
48
49 --Commit the transaction.
50 COMMIT;
51
52 END ENABLE_GMO;
53
54 END GMO_SETUP_PVT;