23: ** Input parameters
24: ** p_api_version IN NUMBER (required)
25: ** API Version of this procedure
26: ** p_init_msg_level IN VARCHAR2 (optional)
27: ** DEFAULT = FND_API.G_FALSE,
28: ** p_commit IN VARCHAR2 (optional)
29: ** DEFAULT = FND_API.G_FALSE,
30: ** p_kanban_card_id In VARCHAR2 (required)
31: ** kanban card id to be updated
25: ** API Version of this procedure
26: ** p_init_msg_level IN VARCHAR2 (optional)
27: ** DEFAULT = FND_API.G_FALSE,
28: ** p_commit IN VARCHAR2 (optional)
29: ** DEFAULT = FND_API.G_FALSE,
30: ** p_kanban_card_id In VARCHAR2 (required)
31: ** kanban card id to be updated
32: ** p_supply_status IN varchar2 (required)
33: ** INV_KANBAN_PVT.G_Supply_Status_New
56: ** SOURCE_WIP_ENTITY diplayed on card activity.
57: ** Output Parameters
58: ** x_msg_count - number of error messages in the buffer
59: ** x_msg_data - error messages
60: ** x_return_status - fnd_api.g_ret_sts_error, fnd_api.g_ret_sts_success,
61: ** fnd_api.g_ret_unexp_error
62: ******************************************************************/
63:
64: PROCEDURE UPDATE_CARD_SUPPLY_STATUS
57: ** Output Parameters
58: ** x_msg_count - number of error messages in the buffer
59: ** x_msg_data - error messages
60: ** x_return_status - fnd_api.g_ret_sts_error, fnd_api.g_ret_sts_success,
61: ** fnd_api.g_ret_unexp_error
62: ******************************************************************/
63:
64: PROCEDURE UPDATE_CARD_SUPPLY_STATUS
65: (x_msg_count OUT NOCOPY NUMBER,
65: (x_msg_count OUT NOCOPY NUMBER,
66: x_msg_data OUT NOCOPY VARCHAR2,
67: x_return_status OUT NOCOPY VARCHAR2,
68: p_api_version_number IN NUMBER,
69: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
70: p_commit IN VARCHAR2 := FND_API.G_FALSE,
71: p_kanban_card_id IN NUMBER,
72: p_supply_status IN NUMBER,
73: p_document_type IN NUMBER DEFAULT NULL,
66: x_msg_data OUT NOCOPY VARCHAR2,
67: x_return_status OUT NOCOPY VARCHAR2,
68: p_api_version_number IN NUMBER,
69: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
70: p_commit IN VARCHAR2 := FND_API.G_FALSE,
71: p_kanban_card_id IN NUMBER,
72: p_supply_status IN NUMBER,
73: p_document_type IN NUMBER DEFAULT NULL,
74: p_document_header_id IN NUMBER DEFAULT NULL,
91: mydebug('need by date '||p_need_by_date||
92: 'source wip id '||p_source_wip_entity_id);
93: -- Standard call to check for call compatibility
94:
95: IF NOT FND_API.COMPATIBLE_API_CALL
96: ( l_api_version_number
97: , p_api_version_number
98: , l_api_name
99: , G_PKG_NAME
98: , l_api_name
99: , G_PKG_NAME
100: )
101: THEN
102: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
103: END IF;
104:
105: mydebug('Calling INV_Kanban_PVT.Update_Card_Supply_Status');
106:
106:
107: INV_KANBAN_PVT.UPDATE_CARD_SUPPLY_STATUS
108: ( p_api_version_number => 1.0
109: , p_init_msg_list => p_init_msg_list
110: , p_validation_level => FND_API.G_VALID_LEVEL_FULL
111: , p_commit => p_commit
112: , x_return_status => x_return_status
113: , x_msg_count => x_msg_count
114: , x_msg_data => x_msg_data
124: mydebug('ret_sts '||x_return_status||
125: 'msg '||x_msg_data||
126: 'msg cnt'||x_msg_count);
127: EXCEPTION
128: WHEN FND_API.G_EXC_ERROR THEN
129: x_return_status := FND_API.G_RET_STS_ERROR;
130: -- Get message count and data
131: FND_MSG_PUB.Count_And_Get
132: ( p_count => x_msg_count
125: 'msg '||x_msg_data||
126: 'msg cnt'||x_msg_count);
127: EXCEPTION
128: WHEN FND_API.G_EXC_ERROR THEN
129: x_return_status := FND_API.G_RET_STS_ERROR;
130: -- Get message count and data
131: FND_MSG_PUB.Count_And_Get
132: ( p_count => x_msg_count
133: ,p_data => x_msg_data
132: ( p_count => x_msg_count
133: ,p_data => x_msg_data
134: );
135:
136: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
137: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
138: -- Get message count and data
139:
140: FND_MSG_PUB.Count_And_Get
133: ,p_data => x_msg_data
134: );
135:
136: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
137: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
138: -- Get message count and data
139:
140: FND_MSG_PUB.Count_And_Get
141: ( p_count => x_msg_count
142: ,p_data => x_msg_data
143: );
144:
145: WHEN OTHERS THEN
146: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
147: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
148: THEN
149: FND_MSG_PUB.Add_Exc_Msg
150: ( G_PKG_NAME
183: pull_sequence_id = p_pull_sequence_id;
184:
185: l_kanban_card_ids INV_Kanban_PVT.kanban_card_id_tbl_type;
186: l_pull_seq_rec INV_Kanban_PVT.pull_sequence_rec_type;
187: l_return_status varchar2(1) := FND_API.G_RET_STS_SUCCESS;
188: l_pullseq_found BOOLEAN := FALSE;
189: BEGIN
190:
191: mydebug('p_pull_sequence_id '||p_pull_sequence_id);
223: p_supply_status => inv_kanban_pvt.g_supply_status_new);
224:
225: mydebug('INV_kanban_PVT.create_kanban_cards ret_sts '||l_return_status);
226:
227: if l_return_status = FND_API.G_RET_STS_ERROR then
228: Raise FND_API.G_EXC_ERROR;
229: elsif l_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
230: Raise FND_API.G_EXC_UNEXPECTED_ERROR;
231: ELSIF l_return_status <> FND_API.g_ret_sts_success THEN
224:
225: mydebug('INV_kanban_PVT.create_kanban_cards ret_sts '||l_return_status);
226:
227: if l_return_status = FND_API.G_RET_STS_ERROR then
228: Raise FND_API.G_EXC_ERROR;
229: elsif l_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
230: Raise FND_API.G_EXC_UNEXPECTED_ERROR;
231: ELSIF l_return_status <> FND_API.g_ret_sts_success THEN
232: Raise FND_API.G_EXC_UNEXPECTED_ERROR;
225: mydebug('INV_kanban_PVT.create_kanban_cards ret_sts '||l_return_status);
226:
227: if l_return_status = FND_API.G_RET_STS_ERROR then
228: Raise FND_API.G_EXC_ERROR;
229: elsif l_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
230: Raise FND_API.G_EXC_UNEXPECTED_ERROR;
231: ELSIF l_return_status <> FND_API.g_ret_sts_success THEN
232: Raise FND_API.G_EXC_UNEXPECTED_ERROR;
233: end if;
226:
227: if l_return_status = FND_API.G_RET_STS_ERROR then
228: Raise FND_API.G_EXC_ERROR;
229: elsif l_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
230: Raise FND_API.G_EXC_UNEXPECTED_ERROR;
231: ELSIF l_return_status <> FND_API.g_ret_sts_success THEN
232: Raise FND_API.G_EXC_UNEXPECTED_ERROR;
233: end if;
234:
227: if l_return_status = FND_API.G_RET_STS_ERROR then
228: Raise FND_API.G_EXC_ERROR;
229: elsif l_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
230: Raise FND_API.G_EXC_UNEXPECTED_ERROR;
231: ELSIF l_return_status <> FND_API.g_ret_sts_success THEN
232: Raise FND_API.G_EXC_UNEXPECTED_ERROR;
233: end if;
234:
235: IF l_kanban_card_ids.count >= 1 THEN
228: Raise FND_API.G_EXC_ERROR;
229: elsif l_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
230: Raise FND_API.G_EXC_UNEXPECTED_ERROR;
231: ELSIF l_return_status <> FND_API.g_ret_sts_success THEN
232: Raise FND_API.G_EXC_UNEXPECTED_ERROR;
233: end if;
234:
235: IF l_kanban_card_ids.count >= 1 THEN
236: mydebug(' Created Kanban_card '||l_kanban_card_ids(1));
241: END IF;
242:
243: --ELSE --if INV_kanban_PVT.Ok_To_Create_Kanban_Cards(p_pull_sequence_id => p_Pull_sequence_id )
244: -- mydebug('Not OK to create kanban cards');
245: -- Raise FND_API.G_EXC_ERROR;
246: --END if;--if INV_kanban_PVT.Ok_To_Create_Kanban_Cards(p_pull_sequence_id => p_Pull_sequence_id )
247:
248: END LOOP;--FOR pullseq_rec IN pullseq LOOP
249:
250: IF l_pullseq_found = FALSE THEN
251: mydebug('No pull sequence found');
252: FND_MESSAGE.SET_NAME('INV','INV_INVALID_PULL_SEQ');
253: FND_MSG_PUB.Add;
254: Raise FND_API.G_EXC_ERROR;
255: END IF;
256:
257: x_return_status := fnd_api.g_ret_sts_success;
258:
253: FND_MSG_PUB.Add;
254: Raise FND_API.G_EXC_ERROR;
255: END IF;
256:
257: x_return_status := fnd_api.g_ret_sts_success;
258:
259: EXCEPTION
260:
261: WHEN FND_API.G_EXC_ERROR THEN
257: x_return_status := fnd_api.g_ret_sts_success;
258:
259: EXCEPTION
260:
261: WHEN FND_API.G_EXC_ERROR THEN
262:
263: x_return_status := FND_API.G_RET_STS_ERROR;
264:
265: -- Get message count and data
259: EXCEPTION
260:
261: WHEN FND_API.G_EXC_ERROR THEN
262:
263: x_return_status := FND_API.G_RET_STS_ERROR;
264:
265: -- Get message count and data
266:
267: FND_MSG_PUB.Count_And_Get
268: ( p_count => x_msg_count
269: , p_data => x_msg_data
270: );
271:
272: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
273:
274: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
275:
276: -- Get message count and data
270: );
271:
272: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
273:
274: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
275:
276: -- Get message count and data
277:
278: FND_MSG_PUB.Count_And_Get
281: );
282:
283: WHEN OTHERS THEN
284:
285: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
286:
287: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
288: THEN
289: FND_MSG_PUB.Add_Exc_Msg