DBA Data[Home] [Help]

APPS.AP_CARD_VALIDATE_PKG dependencies on AP_EXPENSE_FEED_LINES

Line 27: -- o CDF denotes AP_EXPENSE_FEED_LINES.CREATE_DISTRIBUTION_FLAG

23: --
24: -- Where
25: -- o EVM denotes AP_CARD_PROFILES.EMP_NOTIFICATION_LOOKUP_CODE
26: -- o MAM denotes AP_CARD_PROFILES.MGR_APPROVAL_LOOKUP_CODE
27: -- o CDF denotes AP_EXPENSE_FEED_LINES.CREATE_DISTRIBUTION_FLAG
28: -- o BAFCF denotes AP_CARD_PROFILES.BUILD_ACCT_FROM_CODE_FLAG
29: -- (AP_CARD_PROFILES is parent of AP_CARDS).
30: --
31: --

Line 33: -- AP_EXPENSE_FEED_LINES.REJECT_CODE

29: -- (AP_CARD_PROFILES is parent of AP_CARDS).
30: --
31: --
32: -- Assigned Exceptions. Exception code stored in
33: -- AP_EXPENSE_FEED_LINES.REJECT_CODE
34: --
35: -- AP_LOOKUP_CODES.LOOKUP_TYPE='CARD EXCEPTION'
36: --
37: -- Lookup Code Displayed Field Description

Line 95: update ap_expense_feed_lines efl

91: --
92: -- No need to validate lines for which distributions have already
93: -- been created
94: --
95: update ap_expense_feed_lines efl
96: set reject_code = 'UNTESTED'
97: where card_program_id = P_CARD_PROGRAM_ID
98: and posted_date between nvl(P_START_DATE, posted_date - 1) and
99: nvl(P_END_DATE, posted_date + 1)

Line 108: /* update ap_expense_feed_lines efl

104:
105: --------------------------------------------------------------------
106: l_debug_info := 'Find the matching card number in AP_CARDS';
107: --------------------------------------------------------------------
108: /* update ap_expense_feed_lines efl
109: set card_id =
110: (select c.card_id
111: from ap_cards c
112: where c.card_number = efl.card_number)

Line 119: store it in ap_expense_feed_lines.Now while validation we would check if the card number

115:
116: /*-------------------------------------------------------------------------------------------------------*/
117: --Changes done for PCARD project to reflect the new IBY Cards Model
118: /*We would allow the user to enter the card number from the control file(sql loader) and then
119: store it in ap_expense_feed_lines.Now while validation we would check if the card number
120: exists which would return instrument id if it exists and this with card-program-id would
121: be used to get the card_id which would be populated eventually*/
122: /*-------------------------------------------------------------------------------------------------------*/
123: for i in (select card_number,card_id,feed_line_id

Line 124: from ap_expense_feed_lines where reject_code='UNTESTED'

120: exists which would return instrument id if it exists and this with card-program-id would
121: be used to get the card_id which would be populated eventually*/
122: /*-------------------------------------------------------------------------------------------------------*/
123: for i in (select card_number,card_id,feed_line_id
124: from ap_expense_feed_lines where reject_code='UNTESTED'
125: )
126: loop
127: --8726861
128: BEGIN

Line 139: update ap_expense_feed_lines efl

135:
136:
137: EXCEPTION
138: WHEN NO_DATA_FOUND THEN
139: update ap_expense_feed_lines efl
140: set reject_code = 'INVALID CARD ID'
141: where feed_line_id = i.feed_line_id ;
142: END ;
143:

Line 156: update ap_expense_feed_lines efl

152: if (x_instr_id is null) then
153: --------------------------------------------------------------------
154: l_debug_info := 'Reject Line if invalid card';
155: --------------------------------------------------------------------
156: update ap_expense_feed_lines efl
157: set reject_code = 'INVALID CARD NUM'
158: where feed_line_id=i.feed_line_id;
159: else
160: begin

Line 163: update ap_expense_feed_lines

159: else
160: begin
161: select card_id into l_card from
162: ap_cards where card_reference_id=x_instr_id and rownum=1;
163: update ap_expense_feed_lines
164: set
165: card_id=l_card
166: where
167: feed_line_id=i.feed_line_id;

Line 173: update ap_expense_feed_lines efl

169: when NO_DATA_FOUND then
170: --------------------------------------------------------------------
171: l_debug_info := 'Reject Line if invalid card';
172: --------------------------------------------------------------------
173: update ap_expense_feed_lines efl
174: set reject_code = 'INVALID CARD NUM'
175: where feed_line_id=i.feed_line_id;
176: end;
177: end if;

Line 182: update ap_expense_feed_lines efl

178: else -- Bug 5586412
179: --------------------------------------------------------------------
180: l_debug_info := 'Reject Line if invalid card';
181: --------------------------------------------------------------------
182: update ap_expense_feed_lines efl
183: set reject_code = 'INVALID CARD NUM'
184: where feed_line_id=i.feed_line_id;
185: end if; */
186: --8726861

Line 188: update ap_expense_feed_lines

184: where feed_line_id=i.feed_line_id;
185: end if; */
186: --8726861
187: end loop;
188: update ap_expense_feed_lines
189: set
190: card_number=-1
191: where
192: card_id is not null and reject_code='UNTESTED';

Line 201: update ap_expense_feed_lines efl

197: -- Bug 10238210. Added NOT EXISTS condition.
198: -- Employee id will not be updated for supplier
199: -- card transactions.
200:
201: update ap_expense_feed_lines efl
202: set employee_id =
203: (select c.employee_id
204: from ap_cards c
205: where c.card_id = efl.card_id)

Line 216: update ap_expense_feed_lines efl

212:
213: --------------------------------------------------------------------
214: l_debug_info := 'Check for duplicate reference number. ';
215: --------------------------------------------------------------------
216: update ap_expense_feed_lines efl
217: set reject_code = 'DUPLICATE REFERENCE'
218: where exists
219: (select 'A corresponding line already exists with this reference number'
220: from ap_expense_feed_lines efl2

Line 220: from ap_expense_feed_lines efl2

216: update ap_expense_feed_lines efl
217: set reject_code = 'DUPLICATE REFERENCE'
218: where exists
219: (select 'A corresponding line already exists with this reference number'
220: from ap_expense_feed_lines efl2
221: where efl.reference_number = efl2.reference_number
222: and efl.feed_line_id <> efl2.feed_line_id
223: and efl2.card_program_id = P_CARD_PROGRAM_ID)
224: and reject_code = 'UNTESTED';

Line 229: update ap_expense_feed_lines efl

225:
226: --------------------------------------------------------------------
227: l_debug_info := 'Check for invalid Posted Currency Code';
228: --------------------------------------------------------------------
229: update ap_expense_feed_lines efl
230: set reject_code = 'INVALID POST CURR'
231: where posted_currency_code is not null
232: and not exists
233: (select 'A corresponding currency exists in FND_CURRENCIES'

Line 246: update ap_expense_feed_lines efl

242: --------------------------------------------------------------------
243: l_debug_info :=
244: 'If a posted currency has not been specified, default from card program';
245: --------------------------------------------------------------------
246: update ap_expense_feed_lines efl
247: set posted_currency_code =
248: (select cp.card_program_currency_code
249: from ap_card_programs cp
250: where cp.card_program_id = efl.card_program_id)

Line 257: update ap_expense_feed_lines efl

253:
254: --------------------------------------------------------------------
255: l_debug_info := 'Check for invalid Transaction Currency Code';
256: --------------------------------------------------------------------
257: update ap_expense_feed_lines efl
258: set reject_code = 'INVALID TRX CURR'
259: where not exists
260: (select 'A corresponding currency exists in FND_CURRENCIES'
261: from fnd_currencies_vl fndcvl

Line 272: update ap_expense_feed_lines efl

268:
269: --------------------------------------------------------------------
270: l_debug_info := 'Check for invalid Card Code';
271: --------------------------------------------------------------------
272: update ap_expense_feed_lines efl
273: set reject_code = 'INVALID CARD CODE'
274: where not exists
275: (select 'A corresponding card code exists in AP_CARD_CODES'
276: from ap_card_codes cc,

Line 294: update ap_expense_feed_lines efl

290:
291: --------------------------------------------------------------------
292: l_debug_info := 'Check for Distribution Required';
293: --------------------------------------------------------------------
294: update ap_expense_feed_lines efl
295: set reject_code = 'DIST REQUIRED'
296: where exists
297: (select 'Employee verification or manager approval required'
298: from ap_card_profiles cp,

Line 308: -- It is mandatory to have a valid employee in ap_expense_feed_lines

304: and nvl(create_distribution_flag,'N') <> 'Y'
305: and reject_code = 'UNTESTED';
306:
307: /* Bug 10238210. Start
308: -- It is mandatory to have a valid employee in ap_expense_feed_lines
309: -- for supplier card transactions when notifications are enabled
310: -- for the card profile. If notifications are not enabled, then
311: -- employee validation will not be performed. Following two checks
312: -- for valid employee and null employee cases.

Line 319: update ap_expense_feed_lines efl

315: --------------------------------------------------------------------
316: l_debug_info := 'Check for valid employee for supplier card transactions ' ||
317: 'when employee or manager notifications are set.' ;
318: --------------------------------------------------------------------
319: update ap_expense_feed_lines efl
320: set reject_code = 'EMPLOYEE NOT VALID'
321: where not exists
322: (select 1
323: from hr_employees_current_v hremp

Line 338: update ap_expense_feed_lines efl

334: --bug 13071875,
335: l_debug_info := 'check if the employee is inactive';
336: ----------------------------------------------------------------------
337:
338: update ap_expense_feed_lines efl
339: set reject_code = 'EMPLOYEE INACTIVE'
340: where reject_code = 'UNTESTED'
341: and not exists (select 'employee is in hr_employees_current_v'
342: from hr_employees_current_v hremp

Line 353: update ap_expense_feed_lines efl

349: --------------------------------------------------------------------
350: l_debug_info := 'Check for null employee id for supplier card transactions ' ||
351: 'when employee or manager notifications are set.' ;
352: --------------------------------------------------------------------
353: update ap_expense_feed_lines efl
354: set reject_code = 'EMPLOYEE REQUIRED'
355: where not exists
356: (select 1
357: from ap_card_profiles cp

Line 377: update ap_expense_feed_lines

373: --------------------------------------------------------------------
374: --
375: -- These are valid lines
376: --
377: update ap_expense_feed_lines
378: set reject_code = ''
379: where card_program_id = P_CARD_PROGRAM_ID
380: and posted_date between nvl(P_START_DATE, posted_date - 1) and
381: nvl(P_END_DATE, posted_date + 1)

Line 417: -- o CDF denotes AP_EXPENSE_FEED_LINES.CREATE_DISTRIBUTION_FLAG

413: --
414: -- Where
415: -- o EVM denotes AP_CARD_PROFILES.EMP_NOTIFICATION_LOOKUP_CODE
416: -- o MAM denotes AP_CARD_PROFILES.MGR_APPROVAL_LOOKUP_CODE
417: -- o CDF denotes AP_EXPENSE_FEED_LINES.CREATE_DISTRIBUTION_FLAG
418: -- o BAFCF denotes AP_CARD_PROFILES.BUILD_ACCT_FROM_CODE_FLAG
419: -- (AP_CARD_PROFILES is parent of AP_CARDS).
420: --
421: ---------------------------------------------------------------------------

Line 447: l_card_code_value AP_EXPENSE_FEED_LINES.card_code_value%TYPE;

443: l_chart_of_accounts_id GL_SETS_OF_BOOKS.chart_of_accounts_id%TYPE;
444: l_debug_info VARCHAR2(100);
445: l_feed_line_id NUMBER;
446: l_amount NUMBER;
447: l_card_code_value AP_EXPENSE_FEED_LINES.card_code_value%TYPE;
448: l_exception_clearing_ccid NUMBER;
449: l_build_acct_from_code_flag AP_CARD_PROFILES.build_acct_from_code_flag%TYPE;
450: l_default_acct_template AP_CARD_PROFILES.default_acct_template%TYPE;
451: l_distribution_status AP_EXPENSE_FEED_DISTS.status_lookup_code%TYPE;

Line 495: from ap_expense_feed_lines efl,

491: 'Y','VALIDATED',
492: 'I','VALIDATED',
493: 'APPROVED')),
494: efl.description
495: from ap_expense_feed_lines efl,
496: ap_card_programs cpg,
497: ap_card_profiles cpr,
498: ap_cards c,
499: hr_employees_current_v hremp,

Line 698: update ap_expense_feed_lines

694: --------------------------------------------------------------
695: l_debug_info := 'Update the REJECT_CODE for INVALID ACCOUNT';
696: --------------------------------------------------------------
697:
698: update ap_expense_feed_lines
699: set reject_code = 'INVALID ACCOUNT'
700: where feed_line_id = l_feed_line_id;
701: else
702: if (l_cant_flexbuild_flag) then

Line 736: ap_expense_feed_lines

732: -- Insert record into AP_EXPENSE_FEED_DISTS
733: --
734: select org_id into l_org_id
735: from
736: ap_expense_feed_lines
737: where
738: feed_line_id=l_feed_line_id;
739: Mo_Global.set_policy_context('S',l_org_id);
740: insert into AP_EXPENSE_FEED_DISTS_ALL