56: -- Standard Start of API Savepoint
57: SAVEPOINT CS_Charge_Create_Order_PUB;
58:
59: -- Standard Call to check API compatibility
60: IF NOT FND_API.Compatible_API_Call( l_api_version,
61: p_api_version,
62: l_api_name,
63: G_PKG_NAME) THEN
64: RAISE FND_API.G_EXC_UNEXPECTED_ERROR ;
60: IF NOT FND_API.Compatible_API_Call( l_api_version,
61: p_api_version,
62: l_api_name,
63: G_PKG_NAME) THEN
64: RAISE FND_API.G_EXC_UNEXPECTED_ERROR ;
65: END IF;
66:
67: -- Initialize message list if p_init_msg_list is set to TRUE.
68: IF FND_API.to_Boolean( p_init_msg_list ) THEN
64: RAISE FND_API.G_EXC_UNEXPECTED_ERROR ;
65: END IF;
66:
67: -- Initialize message list if p_init_msg_list is set to TRUE.
68: IF FND_API.to_Boolean( p_init_msg_list ) THEN
69: FND_MSG_PUB.initialize;
70: END IF;
71:
72: if (l_debug > 0) then
74: aso_debug_pub.add ('Start time: ' || TO_CHAR(SYSDATE, 'HH24:MI:SSSSS'), 1, 'Y');
75: end if;
76:
77: -- Initialize API return status to success
78: x_return_status := FND_API.G_RET_STS_SUCCESS;
79:
80: --
81: -- API body
82: --
101: x_org_id => x_org_id,
102: x_profile => x_profile
103: );
104:
105: IF (l_return_status = FND_API.G_RET_STS_ERROR) THEN
106: if (l_debug > 0) then
107: aso_debug_pub.add(l_api_name_full || ': STS error: Calling CS_MultiOrg_PVT.Get_OrgId failed', 1, 'Y');
108: end if;
109: --FND_MESSAGE.Set_Name('CS','CS_CHG_PROCEDURE_FAILED');
110: --FND_MESSAGE.Set_Token('PROCEDURE','CS_MultiOrg_PVT.Get_OrgId');
111: --FND_MSG_PUB.Add;
112: x_msg_count := l_msg_count;
113: x_msg_data := l_msg_data;
114: RAISE FND_API.G_EXC_ERROR;
115: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
116: if (l_debug > 0) then
117: aso_debug_pub.add(l_api_name_full || ': Unexpected error: Calling CS_MultiOrg_PVT.Get_OrgId failed',1, 'Y');
118: end if;
111: --FND_MSG_PUB.Add;
112: x_msg_count := l_msg_count;
113: x_msg_data := l_msg_data;
114: RAISE FND_API.G_EXC_ERROR;
115: ELSIF (l_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
116: if (l_debug > 0) then
117: aso_debug_pub.add(l_api_name_full || ': Unexpected error: Calling CS_MultiOrg_PVT.Get_OrgId failed',1, 'Y');
118: end if;
119: --FND_MESSAGE.Set_Name('CS','CS_CHG_PROCEDURE_FAILED');
120: --FND_MESSAGE.Set_Token('PROCEDURE','CS_MultiOrg_PVT.Get_OrgId');
121: --FND_MSG_PUB.Add;
122: x_msg_count := l_msg_count;
123: x_msg_data := l_msg_data;
124: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
125: END IF;
126:
127: if (l_debug > 0) then
128: aso_debug_pub.add(l_api_name_full || ': After call CS_MultiOrg_PVT.Get_OrgId', 1, 'Y');
134: -- End of API body
135: --
136:
137: -- Standard check of p_commit.
138: IF FND_API.To_Boolean( p_commit ) THEN
139: COMMIT WORK;
140: END IF;
141:
142: if (l_debug > 0) then
149: p_data => x_msg_data
150: );
151:
152: EXCEPTION
153: WHEN FND_API.G_EXC_ERROR THEN
154: ROLLBACK TO CS_Charge_Create_Order_PUB;
155: x_return_status := FND_API.G_RET_STS_ERROR;
156: FND_MSG_PUB.Count_And_Get
157: ( p_count => x_msg_count,
151:
152: EXCEPTION
153: WHEN FND_API.G_EXC_ERROR THEN
154: ROLLBACK TO CS_Charge_Create_Order_PUB;
155: x_return_status := FND_API.G_RET_STS_ERROR;
156: FND_MSG_PUB.Count_And_Get
157: ( p_count => x_msg_count,
158: p_data => x_msg_data
159: );
156: FND_MSG_PUB.Count_And_Get
157: ( p_count => x_msg_count,
158: p_data => x_msg_data
159: );
160: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
161: ROLLBACK TO CS_Charge_Create_Order_PUB;
162: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
163: FND_MSG_PUB.Count_And_Get
164: ( p_count => x_msg_count,
158: p_data => x_msg_data
159: );
160: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
161: ROLLBACK TO CS_Charge_Create_Order_PUB;
162: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
163: FND_MSG_PUB.Count_And_Get
164: ( p_count => x_msg_count,
165: p_data => x_msg_data
166: );
165: p_data => x_msg_data
166: );
167: WHEN OTHERS THEN
168: ROLLBACK TO CS_Charge_Create_Order_PUB;
169: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
170: IF FND_MSG_PUB.Check_Msg_Level
171: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
172: THEN
173: FND_MSG_PUB.Add_Exc_Msg