73: p_Item_Orderability_Import_Rec.msg_count := 0;
74:
75: IF p_Item_Orderability_Import_Rec.org_id is NULL then
76:
77: fnd_message.set_name('ONT','OE_ATTRIBUTE_REQUIRED');
78: fnd_message.set_token('ATTRIBUTE','ORG_ID');
79: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
80: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
81: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
74:
75: IF p_Item_Orderability_Import_Rec.org_id is NULL then
76:
77: fnd_message.set_name('ONT','OE_ATTRIBUTE_REQUIRED');
78: fnd_message.set_token('ATTRIBUTE','ORG_ID');
79: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
80: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
81: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
82: END IF;
76:
77: fnd_message.set_name('ONT','OE_ATTRIBUTE_REQUIRED');
78: fnd_message.set_token('ATTRIBUTE','ORG_ID');
79: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
80: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
81: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
82: END IF;
83:
84: IF p_Item_Orderability_Import_Rec.ITEM_LEVEL is NULL then
81: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
82: END IF;
83:
84: IF p_Item_Orderability_Import_Rec.ITEM_LEVEL is NULL then
85: fnd_message.set_name('ONT','OE_ATTRIBUTE_REQUIRED');
86: fnd_message.set_token('ATTRIBUTE','ITEM_LEVEL');
87: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
88: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get ;
89: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
82: END IF;
83:
84: IF p_Item_Orderability_Import_Rec.ITEM_LEVEL is NULL then
85: fnd_message.set_name('ONT','OE_ATTRIBUTE_REQUIRED');
86: fnd_message.set_token('ATTRIBUTE','ITEM_LEVEL');
87: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
88: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get ;
89: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
90: END IF;
84: IF p_Item_Orderability_Import_Rec.ITEM_LEVEL is NULL then
85: fnd_message.set_name('ONT','OE_ATTRIBUTE_REQUIRED');
86: fnd_message.set_token('ATTRIBUTE','ITEM_LEVEL');
87: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
88: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get ;
89: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
90: END IF;
91:
92: IF p_Item_Orderability_Import_Rec.generally_available is NULL then
89: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
90: END IF;
91:
92: IF p_Item_Orderability_Import_Rec.generally_available is NULL then
93: fnd_message.set_name('ONT','OE_ATTRIBUTE_REQUIRED');
94: fnd_message.set_token('ATTRIBUTE','GENERALLY_AVAILABLE');
95: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
96: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get ;
97: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
90: END IF;
91:
92: IF p_Item_Orderability_Import_Rec.generally_available is NULL then
93: fnd_message.set_name('ONT','OE_ATTRIBUTE_REQUIRED');
94: fnd_message.set_token('ATTRIBUTE','GENERALLY_AVAILABLE');
95: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
96: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get ;
97: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
98: END IF;
92: IF p_Item_Orderability_Import_Rec.generally_available is NULL then
93: fnd_message.set_name('ONT','OE_ATTRIBUTE_REQUIRED');
94: fnd_message.set_token('ATTRIBUTE','GENERALLY_AVAILABLE');
95: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
96: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get ;
97: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
98: END IF;
99:
100: IF p_Item_Orderability_Import_Rec.rule_level is NULL then
133: p_Item_Orderability_Import_Rec.ATTRIBUTE19 IS NOT NULL OR
134: p_Item_Orderability_Import_Rec.ATTRIBUTE20 IS NOT NULL
135: THEN
136:
137: fnd_message.set_name('ONT','OE_ATTRIBUTE_REQUIRED');
138: fnd_message.set_token('ATTRIBUTE','RULE_LEVEL');
139: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
140: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
141: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
134: p_Item_Orderability_Import_Rec.ATTRIBUTE20 IS NOT NULL
135: THEN
136:
137: fnd_message.set_name('ONT','OE_ATTRIBUTE_REQUIRED');
138: fnd_message.set_token('ATTRIBUTE','RULE_LEVEL');
139: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
140: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
141: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
142: END IF;
136:
137: fnd_message.set_name('ONT','OE_ATTRIBUTE_REQUIRED');
138: fnd_message.set_token('ATTRIBUTE','RULE_LEVEL');
139: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
140: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
141: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
142: END IF;
143: END IF;
144:
143: END IF;
144:
145:
146: IF p_Item_Orderability_Import_Rec.created_by is NULL then
147: fnd_message.set_name('ONT','OE_ATTRIBUTE_REQUIRED');
148: fnd_message.set_token('ATTRIBUTE','CREATED_BY');
149: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
150: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
151: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
144:
145:
146: IF p_Item_Orderability_Import_Rec.created_by is NULL then
147: fnd_message.set_name('ONT','OE_ATTRIBUTE_REQUIRED');
148: fnd_message.set_token('ATTRIBUTE','CREATED_BY');
149: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
150: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
151: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
152: END IF;
146: IF p_Item_Orderability_Import_Rec.created_by is NULL then
147: fnd_message.set_name('ONT','OE_ATTRIBUTE_REQUIRED');
148: fnd_message.set_token('ATTRIBUTE','CREATED_BY');
149: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
150: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
151: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
152: END IF;
153:
154: IF p_Item_Orderability_Import_Rec.creation_date is NULL then
151: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
152: END IF;
153:
154: IF p_Item_Orderability_Import_Rec.creation_date is NULL then
155: fnd_message.set_name('ONT','OE_ATTRIBUTE_REQUIRED');
156: fnd_message.set_token('ATTRIBUTE','CREATION_DATE');
157: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
158: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
159: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
152: END IF;
153:
154: IF p_Item_Orderability_Import_Rec.creation_date is NULL then
155: fnd_message.set_name('ONT','OE_ATTRIBUTE_REQUIRED');
156: fnd_message.set_token('ATTRIBUTE','CREATION_DATE');
157: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
158: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
159: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
160:
154: IF p_Item_Orderability_Import_Rec.creation_date is NULL then
155: fnd_message.set_name('ONT','OE_ATTRIBUTE_REQUIRED');
156: fnd_message.set_token('ATTRIBUTE','CREATION_DATE');
157: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
158: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
159: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
160:
161: END IF;
162:
160:
161: END IF;
162:
163: IF p_Item_Orderability_Import_Rec.last_updated_by is NULL then
164: fnd_message.set_name('ONT','OE_ATTRIBUTE_REQUIRED');
165: fnd_message.set_token('ATTRIBUTE','LAST_UPDATED_BY');
166: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
167: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
168: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
161: END IF;
162:
163: IF p_Item_Orderability_Import_Rec.last_updated_by is NULL then
164: fnd_message.set_name('ONT','OE_ATTRIBUTE_REQUIRED');
165: fnd_message.set_token('ATTRIBUTE','LAST_UPDATED_BY');
166: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
167: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
168: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
169: END IF;
163: IF p_Item_Orderability_Import_Rec.last_updated_by is NULL then
164: fnd_message.set_name('ONT','OE_ATTRIBUTE_REQUIRED');
165: fnd_message.set_token('ATTRIBUTE','LAST_UPDATED_BY');
166: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
167: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
168: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
169: END IF;
170:
171: IF p_Item_Orderability_Import_Rec.last_update_date is NULL then
168: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
169: END IF;
170:
171: IF p_Item_Orderability_Import_Rec.last_update_date is NULL then
172: fnd_message.set_name('ONT','OE_ATTRIBUTE_REQUIRED');
173: fnd_message.set_token('ATTRIBUTE','LAST_UPDATE_DATE');
174: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
175: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
176: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
169: END IF;
170:
171: IF p_Item_Orderability_Import_Rec.last_update_date is NULL then
172: fnd_message.set_name('ONT','OE_ATTRIBUTE_REQUIRED');
173: fnd_message.set_token('ATTRIBUTE','LAST_UPDATE_DATE');
174: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
175: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
176: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
177: END IF;
171: IF p_Item_Orderability_Import_Rec.last_update_date is NULL then
172: fnd_message.set_name('ONT','OE_ATTRIBUTE_REQUIRED');
173: fnd_message.set_token('ATTRIBUTE','LAST_UPDATE_DATE');
174: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
175: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
176: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
177: END IF;
178:
179:
209: where organization_id = p_Item_Orderability_Import_Rec.org_id
210: and rownum = 1;
211: Exception
212: when no_data_found then
213: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
214: fnd_message.set_token('ATTRIBUTE','ORG_ID');
215: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
216: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
217: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
210: and rownum = 1;
211: Exception
212: when no_data_found then
213: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
214: fnd_message.set_token('ATTRIBUTE','ORG_ID');
215: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
216: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
217: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
218: End;
212: when no_data_found then
213: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
214: fnd_message.set_token('ATTRIBUTE','ORG_ID');
215: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
216: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
217: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
218: End;
219: END IF;
220:
220:
221: IF p_Item_Orderability_Import_Rec.ITEM_LEVEL is NOT NULL then
222:
223: IF p_Item_Orderability_Import_Rec.ITEM_LEVEL NOT IN ('I','C') then
224: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
225: fnd_message.set_token('ATTRIBUTE','ITEM_LEVEL');
226: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
227: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
228: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
221: IF p_Item_Orderability_Import_Rec.ITEM_LEVEL is NOT NULL then
222:
223: IF p_Item_Orderability_Import_Rec.ITEM_LEVEL NOT IN ('I','C') then
224: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
225: fnd_message.set_token('ATTRIBUTE','ITEM_LEVEL');
226: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
227: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
228: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
229: END IF;
223: IF p_Item_Orderability_Import_Rec.ITEM_LEVEL NOT IN ('I','C') then
224: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
225: fnd_message.set_token('ATTRIBUTE','ITEM_LEVEL');
226: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
227: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
228: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
229: END IF;
230:
231: END IF;
245: 'BILL_TO_LOC',
246: 'DELIVER_TO_LOC'
247:
248: ) then
249: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
250: fnd_message.set_token('ATTRIBUTE','RULE_LEVEL');
251: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
252: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
253: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
246: 'DELIVER_TO_LOC'
247:
248: ) then
249: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
250: fnd_message.set_token('ATTRIBUTE','RULE_LEVEL');
251: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
252: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
253: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
254:
248: ) then
249: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
250: fnd_message.set_token('ATTRIBUTE','RULE_LEVEL');
251: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
252: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
253: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
254:
255: END IF;
256:
259:
260:
261: IF p_Item_Orderability_Import_Rec.generally_available is NOT NULL then
262: IF p_Item_Orderability_Import_Rec.generally_available NOT IN ('Y' ,'N' ) then
263: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
264: fnd_message.set_token('ATTRIBUTE','GENERALLY_AVAILABLE');
265: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
266: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
267: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
260:
261: IF p_Item_Orderability_Import_Rec.generally_available is NOT NULL then
262: IF p_Item_Orderability_Import_Rec.generally_available NOT IN ('Y' ,'N' ) then
263: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
264: fnd_message.set_token('ATTRIBUTE','GENERALLY_AVAILABLE');
265: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
266: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
267: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
268:
262: IF p_Item_Orderability_Import_Rec.generally_available NOT IN ('Y' ,'N' ) then
263: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
264: fnd_message.set_token('ATTRIBUTE','GENERALLY_AVAILABLE');
265: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
266: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
267: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
268:
269: END IF;
270: END IF;
278: and end_date is NULL;
279:
280: Exception
281: when others then
282: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
283: fnd_message.set_token('ATTRIBUTE','CREATED_BY');
284: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
285: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
286: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
279:
280: Exception
281: when others then
282: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
283: fnd_message.set_token('ATTRIBUTE','CREATED_BY');
284: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
285: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
286: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
287:
281: when others then
282: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
283: fnd_message.set_token('ATTRIBUTE','CREATED_BY');
284: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
285: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
286: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
287:
288: End;
289:
296: and end_date is NULL;
297:
298: Exception
299: when others then
300: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
301: fnd_message.set_token('ATTRIBUTE','LAST_UPDATED_BY');
302: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
303: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
304: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
297:
298: Exception
299: when others then
300: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
301: fnd_message.set_token('ATTRIBUTE','LAST_UPDATED_BY');
302: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
303: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
304: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
305:
299: when others then
300: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
301: fnd_message.set_token('ATTRIBUTE','LAST_UPDATED_BY');
302: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
303: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
304: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
305:
306: End;
307: END IF;
337:
338: IF p_Item_Orderability_Import_Rec.RULE_LEVEL = 'CUSTOMER' THEN
339:
340: IF p_Item_Orderability_Import_Rec.customer_id IS NULL then
341: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
342: fnd_message.set_token('FIELD','Rule Level Value');
343: fnd_message.set_token('CRITERIA','CUSTOMER_ID');
344: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
345: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
338: IF p_Item_Orderability_Import_Rec.RULE_LEVEL = 'CUSTOMER' THEN
339:
340: IF p_Item_Orderability_Import_Rec.customer_id IS NULL then
341: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
342: fnd_message.set_token('FIELD','Rule Level Value');
343: fnd_message.set_token('CRITERIA','CUSTOMER_ID');
344: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
345: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
346: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
339:
340: IF p_Item_Orderability_Import_Rec.customer_id IS NULL then
341: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
342: fnd_message.set_token('FIELD','Rule Level Value');
343: fnd_message.set_token('CRITERIA','CUSTOMER_ID');
344: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
345: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
346: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
347:
341: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
342: fnd_message.set_token('FIELD','Rule Level Value');
343: fnd_message.set_token('CRITERIA','CUSTOMER_ID');
344: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
345: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
346: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
347:
348: ELSE
349: begin
355: AND acct.status = 'A'
356: AND acct.cust_account_id = p_Item_Orderability_Import_Rec.customer_id ;
357: Exception
358: when no_data_found then
359: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
360: fnd_message.set_token('ATTRIBUTE','CUSTOMER_ID');
361: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
362: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
363: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
356: AND acct.cust_account_id = p_Item_Orderability_Import_Rec.customer_id ;
357: Exception
358: when no_data_found then
359: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
360: fnd_message.set_token('ATTRIBUTE','CUSTOMER_ID');
361: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
362: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
363: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
364:
358: when no_data_found then
359: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
360: fnd_message.set_token('ATTRIBUTE','CUSTOMER_ID');
361: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
362: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
363: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
364:
365: End;
366: END IF;
382:
383: IF p_Item_Orderability_Import_Rec.RULE_LEVEL = 'CUSTOMER_CLASS' THEN
384:
385: IF p_Item_Orderability_Import_Rec.CUSTOMER_CLASS_ID IS NULL then
386: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
387: fnd_message.set_token('FIELD','Rule Level Value');
388: fnd_message.set_token('CRITERIA','CUSTOMER_CLASS_ID');
389: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
390: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
383: IF p_Item_Orderability_Import_Rec.RULE_LEVEL = 'CUSTOMER_CLASS' THEN
384:
385: IF p_Item_Orderability_Import_Rec.CUSTOMER_CLASS_ID IS NULL then
386: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
387: fnd_message.set_token('FIELD','Rule Level Value');
388: fnd_message.set_token('CRITERIA','CUSTOMER_CLASS_ID');
389: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
390: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
391: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
384:
385: IF p_Item_Orderability_Import_Rec.CUSTOMER_CLASS_ID IS NULL then
386: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
387: fnd_message.set_token('FIELD','Rule Level Value');
388: fnd_message.set_token('CRITERIA','CUSTOMER_CLASS_ID');
389: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
390: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
391: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
392:
386: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
387: fnd_message.set_token('FIELD','Rule Level Value');
388: fnd_message.set_token('CRITERIA','CUSTOMER_CLASS_ID');
389: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
390: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
391: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
392:
393: ELSE
394: begin
397: FROM hz_cust_profile_classes cpc
398: WHERE profile_class_id = p_Item_Orderability_Import_Rec.customer_class_id ;
399: Exception
400: when no_data_found then
401: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
402: fnd_message.set_token('ATTRIBUTE','CUSTOMER_CLASS_ID');
403: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
404: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
405: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
398: WHERE profile_class_id = p_Item_Orderability_Import_Rec.customer_class_id ;
399: Exception
400: when no_data_found then
401: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
402: fnd_message.set_token('ATTRIBUTE','CUSTOMER_CLASS_ID');
403: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
404: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
405: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
406:
400: when no_data_found then
401: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
402: fnd_message.set_token('ATTRIBUTE','CUSTOMER_CLASS_ID');
403: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
404: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
405: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
406:
407: End;
408: END IF;
426: IF p_Item_Orderability_Import_Rec.RULE_LEVEL ='CUST_CATEGORY' then
427:
428: IF p_Item_Orderability_Import_Rec.customer_category_code IS NULL THEN
429:
430: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
431: fnd_message.set_token('FIELD','Rule Level Value');
432: fnd_message.set_token('CRITERIA','CUSTOMER_CATEGORY_CODE');
433: P_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
434: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
427:
428: IF p_Item_Orderability_Import_Rec.customer_category_code IS NULL THEN
429:
430: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
431: fnd_message.set_token('FIELD','Rule Level Value');
432: fnd_message.set_token('CRITERIA','CUSTOMER_CATEGORY_CODE');
433: P_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
434: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
435: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
428: IF p_Item_Orderability_Import_Rec.customer_category_code IS NULL THEN
429:
430: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
431: fnd_message.set_token('FIELD','Rule Level Value');
432: fnd_message.set_token('CRITERIA','CUSTOMER_CATEGORY_CODE');
433: P_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
434: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
435: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
436:
430: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
431: fnd_message.set_token('FIELD','Rule Level Value');
432: fnd_message.set_token('CRITERIA','CUSTOMER_CATEGORY_CODE');
433: P_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
434: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
435: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
436:
437:
438: ELSE
443: WHERE lookup_type = 'CUSTOMER_CATEGORY'
444: AND lookup_code = p_Item_Orderability_Import_Rec.customer_category_code ;
445: Exception
446: when no_data_found then
447: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
448: fnd_message.set_token('ATTRIBUTE','CUSTOMER_CATEGORY_CODE');
449: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
450: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
451: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
444: AND lookup_code = p_Item_Orderability_Import_Rec.customer_category_code ;
445: Exception
446: when no_data_found then
447: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
448: fnd_message.set_token('ATTRIBUTE','CUSTOMER_CATEGORY_CODE');
449: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
450: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
451: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
452:
446: when no_data_found then
447: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
448: fnd_message.set_token('ATTRIBUTE','CUSTOMER_CATEGORY_CODE');
449: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
450: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
451: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
452:
453: End;
454:
467:
468: IF p_Item_Orderability_Import_Rec.RULE_LEVEL ='REGIONS' then
469:
470: IF p_Item_Orderability_Import_Rec.region_id IS NULL THEN
471: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
472: fnd_message.set_token('FIELD','Rule Level Value');
473: fnd_message.set_token('CRITERIA','REGION_ID');
474: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
475: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
468: IF p_Item_Orderability_Import_Rec.RULE_LEVEL ='REGIONS' then
469:
470: IF p_Item_Orderability_Import_Rec.region_id IS NULL THEN
471: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
472: fnd_message.set_token('FIELD','Rule Level Value');
473: fnd_message.set_token('CRITERIA','REGION_ID');
474: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
475: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
476: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
469:
470: IF p_Item_Orderability_Import_Rec.region_id IS NULL THEN
471: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
472: fnd_message.set_token('FIELD','Rule Level Value');
473: fnd_message.set_token('CRITERIA','REGION_ID');
474: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
475: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
476: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
477: ELSE
471: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
472: fnd_message.set_token('FIELD','Rule Level Value');
473: fnd_message.set_token('CRITERIA','REGION_ID');
474: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
475: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
476: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
477: ELSE
478: begin
479: SELECT 'Y'
481: FROM wsh_regions_v
482: WHERE region_id = p_Item_Orderability_Import_Rec.region_id;
483: Exception
484: when no_data_found then
485: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
486: fnd_message.set_token('ATTRIBUTE','REGION_ID');
487: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
488: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
489: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
482: WHERE region_id = p_Item_Orderability_Import_Rec.region_id;
483: Exception
484: when no_data_found then
485: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
486: fnd_message.set_token('ATTRIBUTE','REGION_ID');
487: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
488: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
489: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
490:
484: when no_data_found then
485: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
486: fnd_message.set_token('ATTRIBUTE','REGION_ID');
487: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
488: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
489: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
490:
491: End;
492: END IF;
505:
506: IF p_Item_Orderability_Import_Rec.RULE_LEVEL ='ORDER_TYPE' then
507:
508: IF p_Item_Orderability_Import_Rec.order_type_id IS NULL THEN
509: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
510: fnd_message.set_token('FIELD','Rule Level Value');
511: fnd_message.set_token('CRITERIA','ORDER_TYPE_ID');
512: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
513: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
506: IF p_Item_Orderability_Import_Rec.RULE_LEVEL ='ORDER_TYPE' then
507:
508: IF p_Item_Orderability_Import_Rec.order_type_id IS NULL THEN
509: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
510: fnd_message.set_token('FIELD','Rule Level Value');
511: fnd_message.set_token('CRITERIA','ORDER_TYPE_ID');
512: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
513: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
514: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
507:
508: IF p_Item_Orderability_Import_Rec.order_type_id IS NULL THEN
509: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
510: fnd_message.set_token('FIELD','Rule Level Value');
511: fnd_message.set_token('CRITERIA','ORDER_TYPE_ID');
512: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
513: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
514: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
515: ELSE
509: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
510: fnd_message.set_token('FIELD','Rule Level Value');
511: fnd_message.set_token('CRITERIA','ORDER_TYPE_ID');
512: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
513: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
514: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
515: ELSE
516: begin
517: SELECT 'Y'
519: FROM oe_order_types_v
520: WHERE order_type_id = p_Item_Orderability_Import_Rec.order_type_id ;
521: Exception
522: when no_data_found then
523: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
524: fnd_message.set_token('ATTRIBUTE','ORDER_TYPE_ID');
525: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
526: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
527: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
520: WHERE order_type_id = p_Item_Orderability_Import_Rec.order_type_id ;
521: Exception
522: when no_data_found then
523: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
524: fnd_message.set_token('ATTRIBUTE','ORDER_TYPE_ID');
525: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
526: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
527: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
528: End;
522: when no_data_found then
523: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
524: fnd_message.set_token('ATTRIBUTE','ORDER_TYPE_ID');
525: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
526: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
527: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
528: End;
529: END IF;
530:
544: IF p_Item_Orderability_Import_Rec.RULE_LEVEL ='SHIP_TO_LOC' then
545:
546:
547: IF p_Item_Orderability_Import_Rec.SHIP_TO_LOCATION_ID IS NULL THEN
548: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
549: fnd_message.set_token('FIELD','Rule Level Value');
550: fnd_message.set_token('CRITERIA','SHIP_TO_LOCATION_ID');
551: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
552: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
545:
546:
547: IF p_Item_Orderability_Import_Rec.SHIP_TO_LOCATION_ID IS NULL THEN
548: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
549: fnd_message.set_token('FIELD','Rule Level Value');
550: fnd_message.set_token('CRITERIA','SHIP_TO_LOCATION_ID');
551: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
552: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
553: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
546:
547: IF p_Item_Orderability_Import_Rec.SHIP_TO_LOCATION_ID IS NULL THEN
548: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
549: fnd_message.set_token('FIELD','Rule Level Value');
550: fnd_message.set_token('CRITERIA','SHIP_TO_LOCATION_ID');
551: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
552: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
553: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
554: ELSE
548: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
549: fnd_message.set_token('FIELD','Rule Level Value');
550: fnd_message.set_token('CRITERIA','SHIP_TO_LOCATION_ID');
551: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
552: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
553: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
554: ELSE
555: begin
556: SELECT 'Y'
559: WHERE site.site_use_code = 'SHIP_TO'
560: AND site.site_use_id= p_Item_Orderability_Import_Rec.SHIP_TO_LOCATION_ID;
561: Exception
562: when no_data_found then
563: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
564: fnd_message.set_token('ATTRIBUTE','SHIP_TO_LOCATION_ID');
565: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
566: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
567: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
560: AND site.site_use_id= p_Item_Orderability_Import_Rec.SHIP_TO_LOCATION_ID;
561: Exception
562: when no_data_found then
563: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
564: fnd_message.set_token('ATTRIBUTE','SHIP_TO_LOCATION_ID');
565: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
566: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
567: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
568: End;
562: when no_data_found then
563: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
564: fnd_message.set_token('ATTRIBUTE','SHIP_TO_LOCATION_ID');
565: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
566: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
567: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
568: End;
569: END IF;
570:
583:
584: IF p_Item_Orderability_Import_Rec.RULE_LEVEL ='SALES_CHANNEL' then
585:
586: IF p_Item_Orderability_Import_Rec.SALES_CHANNEL_CODE IS NULL THEN
587: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
588: fnd_message.set_token('FIELD','Rule Level Value');
589: fnd_message.set_token('CRITERIA','SALES_CHANNEL_CODE');
590: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
591: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
584: IF p_Item_Orderability_Import_Rec.RULE_LEVEL ='SALES_CHANNEL' then
585:
586: IF p_Item_Orderability_Import_Rec.SALES_CHANNEL_CODE IS NULL THEN
587: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
588: fnd_message.set_token('FIELD','Rule Level Value');
589: fnd_message.set_token('CRITERIA','SALES_CHANNEL_CODE');
590: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
591: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
592: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
585:
586: IF p_Item_Orderability_Import_Rec.SALES_CHANNEL_CODE IS NULL THEN
587: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
588: fnd_message.set_token('FIELD','Rule Level Value');
589: fnd_message.set_token('CRITERIA','SALES_CHANNEL_CODE');
590: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
591: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
592: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
593: ELSE
587: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
588: fnd_message.set_token('FIELD','Rule Level Value');
589: fnd_message.set_token('CRITERIA','SALES_CHANNEL_CODE');
590: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
591: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
592: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
593: ELSE
594: begin
595: SELECT 'Y'
598: WHERE lookup_type = 'SALES_CHANNEL'
599: AND lookup_code =p_Item_Orderability_Import_Rec.sales_channel_code;
600: Exception
601: when no_data_found then
602: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
603: fnd_message.set_token('ATTRIBUTE','SALES_CHANNEL_CODE');
604: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
605: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
606: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
599: AND lookup_code =p_Item_Orderability_Import_Rec.sales_channel_code;
600: Exception
601: when no_data_found then
602: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
603: fnd_message.set_token('ATTRIBUTE','SALES_CHANNEL_CODE');
604: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
605: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
606: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
607: End;
601: when no_data_found then
602: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
603: fnd_message.set_token('ATTRIBUTE','SALES_CHANNEL_CODE');
604: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
605: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
606: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
607: End;
608: END IF;
609:
623: --check
624: IF p_Item_Orderability_Import_Rec.RULE_LEVEL ='SALES_REP' then
625:
626: IF p_Item_Orderability_Import_Rec.SALES_PERSON_ID IS NULL THEN
627: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
628: fnd_message.set_token('FIELD','Rule Level Value');
629: fnd_message.set_token('CRITERIA','SALES_PERSON_ID');
630: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
631: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
624: IF p_Item_Orderability_Import_Rec.RULE_LEVEL ='SALES_REP' then
625:
626: IF p_Item_Orderability_Import_Rec.SALES_PERSON_ID IS NULL THEN
627: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
628: fnd_message.set_token('FIELD','Rule Level Value');
629: fnd_message.set_token('CRITERIA','SALES_PERSON_ID');
630: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
631: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
632: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
625:
626: IF p_Item_Orderability_Import_Rec.SALES_PERSON_ID IS NULL THEN
627: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
628: fnd_message.set_token('FIELD','Rule Level Value');
629: fnd_message.set_token('CRITERIA','SALES_PERSON_ID');
630: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
631: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
632: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
633: ELSE
627: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
628: fnd_message.set_token('FIELD','Rule Level Value');
629: fnd_message.set_token('CRITERIA','SALES_PERSON_ID');
630: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
631: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
632: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
633: ELSE
634:
635: begin
639: WHERE salesrep_id = p_Item_Orderability_Import_Rec.SALES_PERSON_ID;
640:
641: Exception
642: when no_data_found then
643: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
644: fnd_message.set_token('ATTRIBUTE','SALES_PERSON_ID');
645: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
646: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
647: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
640:
641: Exception
642: when no_data_found then
643: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
644: fnd_message.set_token('ATTRIBUTE','SALES_PERSON_ID');
645: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
646: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
647: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
648: End;
642: when no_data_found then
643: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
644: fnd_message.set_token('ATTRIBUTE','SALES_PERSON_ID');
645: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
646: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
647: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
648: End;
649:
650: END IF;
663:
664: IF p_Item_Orderability_Import_Rec.RULE_LEVEL = 'END_CUST' then
665:
666: IF p_Item_Orderability_Import_Rec.end_customer_id IS NULL THEN
667: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
668: fnd_message.set_token('FIELD','Rule Level Value');
669: fnd_message.set_token('CRITERIA','END_CUSTOMER_ID');
670: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
671: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
664: IF p_Item_Orderability_Import_Rec.RULE_LEVEL = 'END_CUST' then
665:
666: IF p_Item_Orderability_Import_Rec.end_customer_id IS NULL THEN
667: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
668: fnd_message.set_token('FIELD','Rule Level Value');
669: fnd_message.set_token('CRITERIA','END_CUSTOMER_ID');
670: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
671: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
672: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
665:
666: IF p_Item_Orderability_Import_Rec.end_customer_id IS NULL THEN
667: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
668: fnd_message.set_token('FIELD','Rule Level Value');
669: fnd_message.set_token('CRITERIA','END_CUSTOMER_ID');
670: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
671: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
672: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
673: ELSE
667: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
668: fnd_message.set_token('FIELD','Rule Level Value');
669: fnd_message.set_token('CRITERIA','END_CUSTOMER_ID');
670: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
671: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
672: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
673: ELSE
674:
675: begin
680: WHERE acct.party_id = party.party_id
681: AND acct.cust_account_id = p_Item_Orderability_Import_Rec.end_customer_id ;
682: Exception
683: when no_data_found then
684: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
685: fnd_message.set_token('ATTRIBUTE','END_CUSTOMER_ID');
686: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
687: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
688: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
681: AND acct.cust_account_id = p_Item_Orderability_Import_Rec.end_customer_id ;
682: Exception
683: when no_data_found then
684: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
685: fnd_message.set_token('ATTRIBUTE','END_CUSTOMER_ID');
686: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
687: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
688: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
689: End;
683: when no_data_found then
684: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
685: fnd_message.set_token('ATTRIBUTE','END_CUSTOMER_ID');
686: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
687: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
688: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
689: End;
690:
691: END IF;
705:
706: IF p_Item_Orderability_Import_Rec.RULE_LEVEL = 'BILL_TO_LOC' then
707:
708: IF p_Item_Orderability_Import_Rec.BILL_TO_LOCATION_ID IS NULL THEN
709: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
710: fnd_message.set_token('FIELD','Rule Level Value');
711: fnd_message.set_token('CRITERIA','BILL_TO_LOCATION_ID');
712: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
713: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
706: IF p_Item_Orderability_Import_Rec.RULE_LEVEL = 'BILL_TO_LOC' then
707:
708: IF p_Item_Orderability_Import_Rec.BILL_TO_LOCATION_ID IS NULL THEN
709: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
710: fnd_message.set_token('FIELD','Rule Level Value');
711: fnd_message.set_token('CRITERIA','BILL_TO_LOCATION_ID');
712: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
713: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
714: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
707:
708: IF p_Item_Orderability_Import_Rec.BILL_TO_LOCATION_ID IS NULL THEN
709: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
710: fnd_message.set_token('FIELD','Rule Level Value');
711: fnd_message.set_token('CRITERIA','BILL_TO_LOCATION_ID');
712: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
713: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
714: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
715: ELSE
709: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
710: fnd_message.set_token('FIELD','Rule Level Value');
711: fnd_message.set_token('CRITERIA','BILL_TO_LOCATION_ID');
712: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
713: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
714: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
715: ELSE
716: begin
717: SELECT 'Y'
720: WHERE site.site_use_code = 'BILL_TO'
721: AND site.site_use_id= p_Item_Orderability_Import_Rec.BILL_TO_LOCATION_ID ;
722: Exception
723: when no_data_found then
724: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
725: fnd_message.set_token('ATTRIBUTE','BILL_TO_LOCATION_ID');
726: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
727: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
728: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
721: AND site.site_use_id= p_Item_Orderability_Import_Rec.BILL_TO_LOCATION_ID ;
722: Exception
723: when no_data_found then
724: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
725: fnd_message.set_token('ATTRIBUTE','BILL_TO_LOCATION_ID');
726: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
727: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
728: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
729:
723: when no_data_found then
724: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
725: fnd_message.set_token('ATTRIBUTE','BILL_TO_LOCATION_ID');
726: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
727: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
728: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
729:
730: End;
731:
746:
747: IF p_Item_Orderability_Import_Rec.RULE_LEVEL = 'DELIVER_TO_LOC' then
748:
749: IF p_Item_Orderability_Import_Rec.DELIVER_TO_LOCATION_ID IS NULL THEN
750: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
751: fnd_message.set_token('FIELD','Rule Level Value');
752: fnd_message.set_token('CRITERIA','DELIVER_TO_LOCATION_ID');
753: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
754: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
747: IF p_Item_Orderability_Import_Rec.RULE_LEVEL = 'DELIVER_TO_LOC' then
748:
749: IF p_Item_Orderability_Import_Rec.DELIVER_TO_LOCATION_ID IS NULL THEN
750: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
751: fnd_message.set_token('FIELD','Rule Level Value');
752: fnd_message.set_token('CRITERIA','DELIVER_TO_LOCATION_ID');
753: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
754: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
755: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
748:
749: IF p_Item_Orderability_Import_Rec.DELIVER_TO_LOCATION_ID IS NULL THEN
750: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
751: fnd_message.set_token('FIELD','Rule Level Value');
752: fnd_message.set_token('CRITERIA','DELIVER_TO_LOCATION_ID');
753: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
754: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
755: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
756: ELSE
750: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
751: fnd_message.set_token('FIELD','Rule Level Value');
752: fnd_message.set_token('CRITERIA','DELIVER_TO_LOCATION_ID');
753: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
754: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
755: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
756: ELSE
757:
758: begin
762: WHERE site.site_use_code = 'DELIVER_TO'
763: AND site.site_use_id= p_Item_Orderability_Import_Rec.DELIVER_TO_LOCATION_ID;
764: Exception
765: when no_data_found then
766: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
767: fnd_message.set_token('ATTRIBUTE','DELIVER_TO_LOCATION_ID');
768: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
769: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
770: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
763: AND site.site_use_id= p_Item_Orderability_Import_Rec.DELIVER_TO_LOCATION_ID;
764: Exception
765: when no_data_found then
766: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
767: fnd_message.set_token('ATTRIBUTE','DELIVER_TO_LOCATION_ID');
768: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
769: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
770: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
771:
765: when no_data_found then
766: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
767: fnd_message.set_token('ATTRIBUTE','DELIVER_TO_LOCATION_ID');
768: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
769: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
770: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
771:
772: End;
773: END IF;
789: IF p_Item_Orderability_Import_Rec.Item_level = 'I' then
790:
791: IF p_Item_Orderability_Import_Rec.inventory_item_id IS NULL then
792:
793: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
794: fnd_message.set_token('FIELD','Inventory Item');
795: fnd_message.set_token('CRITERIA','Item');
796: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
797: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
790:
791: IF p_Item_Orderability_Import_Rec.inventory_item_id IS NULL then
792:
793: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
794: fnd_message.set_token('FIELD','Inventory Item');
795: fnd_message.set_token('CRITERIA','Item');
796: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
797: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
798: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
791: IF p_Item_Orderability_Import_Rec.inventory_item_id IS NULL then
792:
793: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
794: fnd_message.set_token('FIELD','Inventory Item');
795: fnd_message.set_token('CRITERIA','Item');
796: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
797: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
798: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
799:
793: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
794: fnd_message.set_token('FIELD','Inventory Item');
795: fnd_message.set_token('CRITERIA','Item');
796: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
797: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
798: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
799:
800: ELSE
801: begin
804: where inventory_item_id = p_Item_Orderability_Import_Rec.inventory_item_id
805: and organization_id = oe_sys_parameters.value('MASTER_ORGANIZATION_ID',p_Item_Orderability_Import_Rec.org_id );
806: Exception
807: when no_data_found then
808: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
809: fnd_message.set_token('ATTRIBUTE','INVENTORY_ITEM_ID');
810: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
811: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
812: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
805: and organization_id = oe_sys_parameters.value('MASTER_ORGANIZATION_ID',p_Item_Orderability_Import_Rec.org_id );
806: Exception
807: when no_data_found then
808: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
809: fnd_message.set_token('ATTRIBUTE','INVENTORY_ITEM_ID');
810: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
811: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
812: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
813:
807: when no_data_found then
808: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
809: fnd_message.set_token('ATTRIBUTE','INVENTORY_ITEM_ID');
810: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
811: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
812: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
813:
814: End;
815:
819:
820: ELSIF p_Item_Orderability_Import_Rec.Item_level = 'C' then
821:
822: If p_Item_Orderability_Import_Rec.item_category_id IS NULL then
823: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
824: fnd_message.set_token('FIELD','Item Category');
825: fnd_message.set_token('CRITERIA','Category');
826: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
827: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
820: ELSIF p_Item_Orderability_Import_Rec.Item_level = 'C' then
821:
822: If p_Item_Orderability_Import_Rec.item_category_id IS NULL then
823: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
824: fnd_message.set_token('FIELD','Item Category');
825: fnd_message.set_token('CRITERIA','Category');
826: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
827: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
828: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
821:
822: If p_Item_Orderability_Import_Rec.item_category_id IS NULL then
823: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
824: fnd_message.set_token('FIELD','Item Category');
825: fnd_message.set_token('CRITERIA','Category');
826: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
827: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
828: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
829:
823: fnd_message.set_name('ONT','OE_ITORD_FIELD_REQUIRED');
824: fnd_message.set_token('FIELD','Item Category');
825: fnd_message.set_token('CRITERIA','Category');
826: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
827: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
828: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
829:
830: Else
831: begin
833: from mtl_categories
834: where category_id = p_Item_Orderability_Import_Rec.item_category_id ;
835: Exception
836: when others then
837: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
838: fnd_message.set_token('ATTRIBUTE','ITEM_CATEGORY_ID');
839: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
840: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
841: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
834: where category_id = p_Item_Orderability_Import_Rec.item_category_id ;
835: Exception
836: when others then
837: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
838: fnd_message.set_token('ATTRIBUTE','ITEM_CATEGORY_ID');
839: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
840: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
841: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
842:
836: when others then
837: fnd_message.set_name('ONT','OE_INVALID_ATTRIBUTE');
838: fnd_message.set_token('ATTRIBUTE','ITEM_CATEGORY_ID');
839: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
840: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
841: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
842:
843: End ;
844:
899: AND ic.category_id = oei.item_category_id
900: and org_id = p_Item_Orderability_Import_Rec.org_id
901: AND rownum = 1;
902:
903: fnd_message.set_name('ONT','OE_ITORD_RULE_EXISTS');
904: fnd_message.SET_TOKEN('CRITERIA','Item Category');
905: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
906: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
907: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
900: and org_id = p_Item_Orderability_Import_Rec.org_id
901: AND rownum = 1;
902:
903: fnd_message.set_name('ONT','OE_ITORD_RULE_EXISTS');
904: fnd_message.SET_TOKEN('CRITERIA','Item Category');
905: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
906: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
907: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
908: Exception
902:
903: fnd_message.set_name('ONT','OE_ITORD_RULE_EXISTS');
904: fnd_message.SET_TOKEN('CRITERIA','Item Category');
905: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
906: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
907: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
908: Exception
909: when no_data_found then
910: NULL;
934:
935:
936: IF NOT OE_ITORD_UTIL.Check_Duplicate_Rules(sql_stmt)
937: THEN
938: fnd_message.set_name('ONT','OE_ITORD_DUP_RULE_EXISTS');
939: fnd_message.set_token('RULE_LEVEL',l_rule_level_coulmn);
940: fnd_message.set_token('RULE_LEVEL_VALUE',l_rule_level_value);
941: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
942: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
935:
936: IF NOT OE_ITORD_UTIL.Check_Duplicate_Rules(sql_stmt)
937: THEN
938: fnd_message.set_name('ONT','OE_ITORD_DUP_RULE_EXISTS');
939: fnd_message.set_token('RULE_LEVEL',l_rule_level_coulmn);
940: fnd_message.set_token('RULE_LEVEL_VALUE',l_rule_level_value);
941: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
942: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
943: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
936: IF NOT OE_ITORD_UTIL.Check_Duplicate_Rules(sql_stmt)
937: THEN
938: fnd_message.set_name('ONT','OE_ITORD_DUP_RULE_EXISTS');
939: fnd_message.set_token('RULE_LEVEL',l_rule_level_coulmn);
940: fnd_message.set_token('RULE_LEVEL_VALUE',l_rule_level_value);
941: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
942: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
943: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
944: END IF;
938: fnd_message.set_name('ONT','OE_ITORD_DUP_RULE_EXISTS');
939: fnd_message.set_token('RULE_LEVEL',l_rule_level_coulmn);
940: fnd_message.set_token('RULE_LEVEL_VALUE',l_rule_level_value);
941: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
942: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
943: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
944: END IF;
945: END IF; -- Added for bug 10055559
946:
964: AND ic.category_id = p_Item_Orderability_Import_Rec.ITEM_CATEGORY_ID
965: and org_id = p_Item_Orderability_Import_Rec.org_id
966: AND rownum = 1;
967:
968: fnd_message.set_name('ONT','OE_ITORD_RULE_EXISTS');
969: fnd_message.SET_TOKEN('CRITERIA','Item');
970: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
971: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
972: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
965: and org_id = p_Item_Orderability_Import_Rec.org_id
966: AND rownum = 1;
967:
968: fnd_message.set_name('ONT','OE_ITORD_RULE_EXISTS');
969: fnd_message.SET_TOKEN('CRITERIA','Item');
970: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
971: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
972: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
973: Exception
967:
968: fnd_message.set_name('ONT','OE_ITORD_RULE_EXISTS');
969: fnd_message.SET_TOKEN('CRITERIA','Item');
970: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
971: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
972: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
973: Exception
974: when no_data_found then
975: NULL;
999:
1000:
1001: IF NOT OE_ITORD_UTIL.Check_Duplicate_Rules(sql_stmt)
1002: THEN
1003: fnd_message.set_name('ONT','OE_ITORD_DUP_RULE_EXISTS');
1004: fnd_message.set_token('RULE_LEVEL',l_rule_level_coulmn);
1005: fnd_message.set_token('RULE_LEVEL_VALUE',l_rule_level_value);
1006: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
1007: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
1000:
1001: IF NOT OE_ITORD_UTIL.Check_Duplicate_Rules(sql_stmt)
1002: THEN
1003: fnd_message.set_name('ONT','OE_ITORD_DUP_RULE_EXISTS');
1004: fnd_message.set_token('RULE_LEVEL',l_rule_level_coulmn);
1005: fnd_message.set_token('RULE_LEVEL_VALUE',l_rule_level_value);
1006: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
1007: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
1008: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
1001: IF NOT OE_ITORD_UTIL.Check_Duplicate_Rules(sql_stmt)
1002: THEN
1003: fnd_message.set_name('ONT','OE_ITORD_DUP_RULE_EXISTS');
1004: fnd_message.set_token('RULE_LEVEL',l_rule_level_coulmn);
1005: fnd_message.set_token('RULE_LEVEL_VALUE',l_rule_level_value);
1006: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
1007: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
1008: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
1009: END IF;
1003: fnd_message.set_name('ONT','OE_ITORD_DUP_RULE_EXISTS');
1004: fnd_message.set_token('RULE_LEVEL',l_rule_level_coulmn);
1005: fnd_message.set_token('RULE_LEVEL_VALUE',l_rule_level_value);
1006: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
1007: p_Item_Orderability_Import_Rec.msg_data := p_Item_Orderability_Import_Rec.msg_data ||fnd_global.local_chr(59)||fnd_message.get;
1008: p_Item_Orderability_Import_Rec.msg_count := p_Item_Orderability_Import_Rec.msg_count + 1;
1009: END IF;
1010:
1011: END IF; -- Added for bug 10055559
1302: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_SUCCESS;
1303: p_Item_Orderability_Import_Rec.msg_data := 'VALID';
1304: p_Item_Orderability_Import_Rec.msg_count := 1;
1305: ELSE
1306: FND_MESSAGE.Set_Encoded(FND_FLEX_DESCVAL.Encoded_Error_Message);
1307: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
1308: p_Item_Orderability_Import_Rec.msg_data := fnd_message.get;
1309: p_Item_Orderability_Import_Rec.msg_count := 1;
1310: END IF;
1304: p_Item_Orderability_Import_Rec.msg_count := 1;
1305: ELSE
1306: FND_MESSAGE.Set_Encoded(FND_FLEX_DESCVAL.Encoded_Error_Message);
1307: p_Item_Orderability_Import_Rec.status := FND_API.G_RET_STS_ERROR;
1308: p_Item_Orderability_Import_Rec.msg_data := fnd_message.get;
1309: p_Item_Orderability_Import_Rec.msg_count := 1;
1310: END IF;
1311:
1312: