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 81: update ap_expense_feed_lines efl

77: --
78: -- No need to validate lines for which distributions have already
79: -- been created
80: --
81: update ap_expense_feed_lines efl
82: set reject_code = 'UNTESTED'
83: where card_program_id = P_CARD_PROGRAM_ID
84: and posted_date between nvl(P_START_DATE, posted_date - 1) and
85: nvl(P_END_DATE, posted_date + 1)

Line 94: /* update ap_expense_feed_lines efl

90:
91: --------------------------------------------------------------------
92: l_debug_info := 'Find the matching card number in AP_CARDS';
93: --------------------------------------------------------------------
94: /* update ap_expense_feed_lines efl
95: set card_id =
96: (select c.card_id
97: from ap_cards c
98: where c.card_number = efl.card_number)

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

101:
102: /*-------------------------------------------------------------------------------------------------------*/
103: --Changes done for PCARD project to reflect the new IBY Cards Model
104: /*We would allow the user to enter the card number from the control file(sql loader) and then
105: store it in ap_expense_feed_lines.Now while validation we would check if the card number
106: exists which would return instrument id if it exists and this with card-program-id would
107: be used to get the card_id which would be populated eventually*/
108: /*-------------------------------------------------------------------------------------------------------*/
109: for i in (select card_number,feed_line_id

Line 110: from ap_expense_feed_lines where reject_code='UNTESTED'

106: exists which would return instrument id if it exists and this with card-program-id would
107: be used to get the card_id which would be populated eventually*/
108: /*-------------------------------------------------------------------------------------------------------*/
109: for i in (select card_number,feed_line_id
110: from ap_expense_feed_lines where reject_code='UNTESTED'
111: )
112: loop
113: iby_fndcpt_setup_pub.card_exists(1.0,NULL,
114: x_return_status, x_msg_count, x_msg_data,

Line 125: update ap_expense_feed_lines efl

121: if (x_instr_id is null) then
122: --------------------------------------------------------------------
123: l_debug_info := 'Reject Line if invalid card';
124: --------------------------------------------------------------------
125: update ap_expense_feed_lines efl
126: set reject_code = 'INVALID CARD NUM'
127: where feed_line_id=i.feed_line_id;
128: else
129: begin

Line 132: update ap_expense_feed_lines

128: else
129: begin
130: select card_id into l_card from
131: ap_cards where card_reference_id=x_instr_id and rownum=1;
132: update ap_expense_feed_lines
133: set
134: card_id=l_card
135: where
136: feed_line_id=i.feed_line_id;

Line 142: update ap_expense_feed_lines efl

138: when NO_DATA_FOUND then
139: --------------------------------------------------------------------
140: l_debug_info := 'Reject Line if invalid card';
141: --------------------------------------------------------------------
142: update ap_expense_feed_lines efl
143: set reject_code = 'INVALID CARD NUM'
144: where feed_line_id=i.feed_line_id;
145: end;
146: end if;

Line 151: update ap_expense_feed_lines efl

147: else -- Bug 5586412
148: --------------------------------------------------------------------
149: l_debug_info := 'Reject Line if invalid card';
150: --------------------------------------------------------------------
151: update ap_expense_feed_lines efl
152: set reject_code = 'INVALID CARD NUM'
153: where feed_line_id=i.feed_line_id;
154: end if;
155: end loop;

Line 156: update ap_expense_feed_lines

152: set reject_code = 'INVALID CARD NUM'
153: where feed_line_id=i.feed_line_id;
154: end if;
155: end loop;
156: update ap_expense_feed_lines
157: set
158: card_number=-1
159: where
160: card_id is not null and reject_code='UNTESTED';

Line 165: update ap_expense_feed_lines efl

161:
162: --------------------------------------------------------------------
163: l_debug_info := 'Update employee_id on line ';
164: --------------------------------------------------------------------
165: update ap_expense_feed_lines efl
166: set employee_id =
167: (select c.employee_id
168: from ap_cards c
169: where c.card_id = efl.card_id)

Line 177: update ap_expense_feed_lines efl

173:
174: --------------------------------------------------------------------
175: l_debug_info := 'Check for duplicate reference number. ';
176: --------------------------------------------------------------------
177: update ap_expense_feed_lines efl
178: set reject_code = 'DUPLICATE REFERENCE'
179: where exists
180: (select 'A corresponding line already exists with this reference number'
181: from ap_expense_feed_lines efl2

Line 181: from ap_expense_feed_lines efl2

177: update ap_expense_feed_lines efl
178: set reject_code = 'DUPLICATE REFERENCE'
179: where exists
180: (select 'A corresponding line already exists with this reference number'
181: from ap_expense_feed_lines efl2
182: where efl.reference_number = efl2.reference_number
183: and efl.feed_line_id <> efl2.feed_line_id
184: and efl2.card_program_id = P_CARD_PROGRAM_ID)
185: and reject_code = 'UNTESTED';

Line 190: update ap_expense_feed_lines efl

186:
187: --------------------------------------------------------------------
188: l_debug_info := 'Check for invalid Posted Currency Code';
189: --------------------------------------------------------------------
190: update ap_expense_feed_lines efl
191: set reject_code = 'INVALID POST CURR'
192: where posted_currency_code is not null
193: and not exists
194: (select 'A corresponding currency exists in FND_CURRENCIES'

Line 207: update ap_expense_feed_lines efl

203: --------------------------------------------------------------------
204: l_debug_info :=
205: 'If a posted currency has not been specified, default from card program';
206: --------------------------------------------------------------------
207: update ap_expense_feed_lines efl
208: set posted_currency_code =
209: (select cp.card_program_currency_code
210: from ap_card_programs cp
211: where cp.card_program_id = efl.card_program_id)

Line 218: update ap_expense_feed_lines efl

214:
215: --------------------------------------------------------------------
216: l_debug_info := 'Check for invalid Transaction Currency Code';
217: --------------------------------------------------------------------
218: update ap_expense_feed_lines efl
219: set reject_code = 'INVALID TRX CURR'
220: where not exists
221: (select 'A corresponding currency exists in FND_CURRENCIES'
222: from fnd_currencies_vl fndcvl

Line 233: update ap_expense_feed_lines efl

229:
230: --------------------------------------------------------------------
231: l_debug_info := 'Check for invalid Card Code';
232: --------------------------------------------------------------------
233: update ap_expense_feed_lines efl
234: set reject_code = 'INVALID CARD CODE'
235: where not exists
236: (select 'A corresponding card code exists in AP_CARD_CODES'
237: from ap_card_codes cc,

Line 255: update ap_expense_feed_lines efl

251:
252: --------------------------------------------------------------------
253: l_debug_info := 'Check for Distribution Required';
254: --------------------------------------------------------------------
255: update ap_expense_feed_lines efl
256: set reject_code = 'DIST REQUIRED'
257: where exists
258: (select 'Employee verification or manager approval required'
259: from ap_card_profiles cp,

Line 275: update ap_expense_feed_lines

271: --------------------------------------------------------------------
272: --
273: -- These are valid lines
274: --
275: update ap_expense_feed_lines
276: set reject_code = ''
277: where card_program_id = P_CARD_PROGRAM_ID
278: and posted_date between nvl(P_START_DATE, posted_date - 1) and
279: nvl(P_END_DATE, posted_date + 1)

Line 315: -- o CDF denotes AP_EXPENSE_FEED_LINES.CREATE_DISTRIBUTION_FLAG

311: --
312: -- Where
313: -- o EVM denotes AP_CARD_PROFILES.EMP_NOTIFICATION_LOOKUP_CODE
314: -- o MAM denotes AP_CARD_PROFILES.MGR_APPROVAL_LOOKUP_CODE
315: -- o CDF denotes AP_EXPENSE_FEED_LINES.CREATE_DISTRIBUTION_FLAG
316: -- o BAFCF denotes AP_CARD_PROFILES.BUILD_ACCT_FROM_CODE_FLAG
317: -- (AP_CARD_PROFILES is parent of AP_CARDS).
318: --
319: ---------------------------------------------------------------------------

Line 345: l_card_code_value AP_EXPENSE_FEED_LINES.card_code_value%TYPE;

341: l_chart_of_accounts_id GL_SETS_OF_BOOKS.chart_of_accounts_id%TYPE;
342: l_debug_info VARCHAR2(100);
343: l_feed_line_id NUMBER;
344: l_amount NUMBER;
345: l_card_code_value AP_EXPENSE_FEED_LINES.card_code_value%TYPE;
346: l_exception_clearing_ccid NUMBER;
347: l_build_acct_from_code_flag AP_CARD_PROFILES.build_acct_from_code_flag%TYPE;
348: l_default_acct_template AP_CARD_PROFILES.default_acct_template%TYPE;
349: l_distribution_status AP_EXPENSE_FEED_DISTS.status_lookup_code%TYPE;

Line 393: from ap_expense_feed_lines efl,

389: 'Y','VALIDATED',
390: 'I','VALIDATED',
391: 'APPROVED')),
392: efl.description
393: from ap_expense_feed_lines efl,
394: ap_card_programs cpg,
395: ap_card_profiles cpr,
396: ap_cards c,
397: hr_employees_current_v hremp,

Line 582: update ap_expense_feed_lines

578: --------------------------------------------------------------
579: l_debug_info := 'Update the REJECT_CODE for INVALID ACCOUNT';
580: --------------------------------------------------------------
581:
582: update ap_expense_feed_lines
583: set reject_code = 'INVALID ACCOUNT'
584: where feed_line_id = l_feed_line_id;
585: else
586: if (l_cant_flexbuild_flag) then

Line 620: ap_expense_feed_lines

616: -- Insert record into AP_EXPENSE_FEED_DISTS
617: --
618: select org_id into l_org_id
619: from
620: ap_expense_feed_lines
621: where
622: feed_line_id=l_feed_line_id;
623: Mo_Global.set_policy_context('S',l_org_id);
624: insert into AP_EXPENSE_FEED_DISTS_ALL