DBA Data[Home] [Help]

APPS.CN_PREPOST_PVT dependencies on CN_PREPOSTBATCHES

Line 51: p_posting_batch_rec IN OUT NOCOPY CN_PREPOSTBATCHES.posting_batch_rec_type,

47: x_msg_count OUT NOCOPY NUMBER ,
48: x_msg_data OUT NOCOPY VARCHAR2 ,
49: x_loading_status OUT NOCOPY VARCHAR2 ,
50: p_loading_status IN VARCHAR2 ,
51: p_posting_batch_rec IN OUT NOCOPY CN_PREPOSTBATCHES.posting_batch_rec_type,
52: x_status OUT NOCOPY VARCHAR2
53: )
54: IS
55: l_api_name CONSTANT VARCHAR2(30) := 'Initialize_Batch';

Line 79: IF (CN_PREPOSTBATCHES.G_BATCH_ID is null) THEN

75: -- API body
76: -- Check a global batch ID exists for the session
77: -- Do nothing if global batch ID already exists
78: -- Create batch if global batch ID does not exist for session
79: IF (CN_PREPOSTBATCHES.G_BATCH_ID is null) THEN
80: -- Get next batch sequence ID
81: CN_PREPOSTBATCHES.Get_UID( p_posting_batch_rec.posting_batch_id );
82: -- Return and Set global batch ID
83: CN_PREPOSTBATCHES.G_BATCH_ID := p_posting_batch_rec.posting_batch_id;

Line 81: CN_PREPOSTBATCHES.Get_UID( p_posting_batch_rec.posting_batch_id );

77: -- Do nothing if global batch ID already exists
78: -- Create batch if global batch ID does not exist for session
79: IF (CN_PREPOSTBATCHES.G_BATCH_ID is null) THEN
80: -- Get next batch sequence ID
81: CN_PREPOSTBATCHES.Get_UID( p_posting_batch_rec.posting_batch_id );
82: -- Return and Set global batch ID
83: CN_PREPOSTBATCHES.G_BATCH_ID := p_posting_batch_rec.posting_batch_id;
84: ELSE
85: x_status := 'BATCH ALREADY EXISTS';

Line 83: CN_PREPOSTBATCHES.G_BATCH_ID := p_posting_batch_rec.posting_batch_id;

79: IF (CN_PREPOSTBATCHES.G_BATCH_ID is null) THEN
80: -- Get next batch sequence ID
81: CN_PREPOSTBATCHES.Get_UID( p_posting_batch_rec.posting_batch_id );
82: -- Return and Set global batch ID
83: CN_PREPOSTBATCHES.G_BATCH_ID := p_posting_batch_rec.posting_batch_id;
84: ELSE
85: x_status := 'BATCH ALREADY EXISTS';
86: -- Validate the batch is not loaded
87: IF p_posting_batch_rec.load_status = 'LOADED' THEN

Line 135: -- This is done by setting CN_PREPOSTBATCHES.G_BATCH_ID and

131: -- ============================================================================
132: -- Procedure : Terminate_Batch
133: -- Description : This PRIVATE procedure is used to terminate the current
134: -- batch for a session.
135: -- This is done by setting CN_PREPOSTBATCHES.G_BATCH_ID and
136: -- G_BATCH_NAME to NULL.
137: -- Calls :
138: -- ============================================================================
139: PROCEDURE Terminate_Batch IS

Line 141: -- Set CN_PREPOSTBATCHES.G_BATCH_ID to NULL

137: -- Calls :
138: -- ============================================================================
139: PROCEDURE Terminate_Batch IS
140: BEGIN
141: -- Set CN_PREPOSTBATCHES.G_BATCH_ID to NULL
142: CN_PREPOSTBATCHES.G_BATCH_ID := NULL;
143: END Terminate_Batch;
144: -- ============================================================================
145: -- Procedure : Validate_PrePostDetails

Line 142: CN_PREPOSTBATCHES.G_BATCH_ID := NULL;

138: -- ============================================================================
139: PROCEDURE Terminate_Batch IS
140: BEGIN
141: -- Set CN_PREPOSTBATCHES.G_BATCH_ID to NULL
142: CN_PREPOSTBATCHES.G_BATCH_ID := NULL;
143: END Terminate_Batch;
144: -- ============================================================================
145: -- Procedure : Validate_PrePostDetails
146: -- Description : This procedure is used to validate the parameters that

Line 262: l_posting_batch_rec CN_PREPOSTBATCHES.posting_batch_rec_type;

258: l_api_version CONSTANT NUMBER := 1.0;
259: l_loading_status VARCHAR2(4000);
260: l_status VARCHAR2(4000);
261: l_pmt_trans_rec CN_PMT_TRANS_PKG.pmt_trans_rec_type;
262: l_posting_batch_rec CN_PREPOSTBATCHES.posting_batch_rec_type;
263: l_profile_value VARCHAR2(1);
264:
265: CURSOR get_comm_line_rec IS
266: (SELECT CN_API.G_MISS_ID payment_transaction_id,

Line 267: CN_PREPOSTBATCHES.G_BATCH_ID posting_batch_id,

263: l_profile_value VARCHAR2(1);
264:
265: CURSOR get_comm_line_rec IS
266: (SELECT CN_API.G_MISS_ID payment_transaction_id,
267: CN_PREPOSTBATCHES.G_BATCH_ID posting_batch_id,
268: --C_EXPENSE posting_type,
269:
270: cl.credited_salesrep_id,
271: cl.credited_salesrep_id payee_salesrep_id,

Line 341: CN_PREPOSTBATCHES.G_BATCH_ID posting_batch_id,

337: AND cl.quota_id = pe.quota_id
338: AND cl.srp_payee_assign_id IS NULL)
339: UNION --this is added for assign payees for fixing bug#2495614
340: (SELECT CN_API.G_MISS_ID payment_transaction_id,
341: CN_PREPOSTBATCHES.G_BATCH_ID posting_batch_id,
342: payee.payee_id credited_salesrep_id,
343: payee.payee_id payee_salesrep_id,
344: cl.quota_id,
345: cl.pay_period_id,

Line 587: -- Note : This procedure assumes that CN_PREPOSTBATCHES.G_BATCH_ID

583: -- Assumes batch has already been created.
584: -- Calls : Get_Batch_ID()
585: -- Validate_PrePostDetails()
586: -- CN_PREPOSTDETAILS.Begin_Record()
587: -- Note : This procedure assumes that CN_PREPOSTBATCHES.G_BATCH_ID
588: -- has already been set via the Initialize_Batch()
589: -- public procedure.
590: -- ============================================================================
591: PROCEDURE Create_PrePostDetails

Line 747: AND pb.posting_batch_id = CN_PREPOSTBATCHES.G_BATCH_ID;

743: AND ( pr.status = 'PAID'
744: OR pr.status = 'PAID_WITH_RETURNS')
745: AND ws.posting_status = C_UNPOSTED
746: AND pb.load_status = C_UNLOADED
747: AND pb.posting_batch_id = CN_PREPOSTBATCHES.G_BATCH_ID;
748:
749: --Manual Expense cursor declaration
750: CURSOR get_ws_manual_exp ( v_payment_worksheet_id IN NUMBER ) IS
751: SELECT wsb.quota_id ,

Line 767: and pb.posting_batch_id = CN_PREPOSTBATCHES.G_BATCH_ID

763: cn_posting_batches pb
764: where pr.pay_period_id = ps.period_id
765: and (pr.status = 'PAID' or pr.status = 'PAID_WITH_RETURNS')
766: and pb.load_status = C_UNLOADED
767: and pb.posting_batch_id = CN_PREPOSTBATCHES.G_BATCH_ID
768: and ps.start_date between pb.start_date and pb.end_date
769: and not exists ( select 1
770: from cn_payment_worksheets ws
771: where ws.payrun_id = pr.payrun_id

Line 792: -- Validate a CN_PREPOSTBATCHES.G_BATCH_ID exists

788: -- Initialize API return status to success
789: x_return_status := FND_API.G_RET_STS_SUCCESS;
790: -- API body
791:
792: -- Validate a CN_PREPOSTBATCHES.G_BATCH_ID exists
793: -- The assumption is that the batch already exists and with parameters
794: -- to drive posting.
795:
796: IF CN_PREPOSTBATCHES.G_BATCH_ID is NULL THEN

Line 796: IF CN_PREPOSTBATCHES.G_BATCH_ID is NULL THEN

792: -- Validate a CN_PREPOSTBATCHES.G_BATCH_ID exists
793: -- The assumption is that the batch already exists and with parameters
794: -- to drive posting.
795:
796: IF CN_PREPOSTBATCHES.G_BATCH_ID is NULL THEN
797: FND_MESSAGE.SET_NAME('CN', 'CN_POSTING_BATCH_UNINITIALIZED');
798: --FND_MESSAGE.SET_TOKEN('COMMISSION_LINE_ID', TO_CHAR(p_commission_line_id));
799: FND_MSG_PUB.ADD;
800: l_loading_status := 'CN_POSTING_BATCH_UNINITIALIZED';

Line 837: l_pdet_rec_tbl(i).posting_batch_id := CN_PREPOSTBATCHES.G_BATCH_ID;

833: l_pdet_rec_tbl(i).posting_type := C_NON_REC;
834: l_pdet_rec_tbl(i).trx_type := C_COMM_NREC;
835: l_pdet_rec_tbl(i).incentive_type_code := C_COMMISSION;
836: l_pdet_rec_tbl(i).amount := l_pay_ws_rec.COMM_NREC;
837: l_pdet_rec_tbl(i).posting_batch_id := CN_PREPOSTBATCHES.G_BATCH_ID;
838: l_pdet_rec_tbl(i).status := C_UNLOADED;
839: l_pdet_rec_tbl(i).loaded_date := NULL;
840: l_pdet_rec_tbl(i).payee_salesrep_id := l_pay_ws_rec.salesrep_id;
841: l_pdet_rec_tbl(i).credited_salesrep_id := l_pay_ws_rec.salesrep_id;

Line 858: l_pdet_rec_tbl(i).posting_batch_id := CN_PREPOSTBATCHES.G_BATCH_ID;

854: l_pdet_rec_tbl(i).posting_type := C_REC;
855: l_pdet_rec_tbl(i).trx_type := C_COMM_REC;
856: l_pdet_rec_tbl(i).incentive_type_code := C_COMMISSION;
857: l_pdet_rec_tbl(i).amount := l_pay_ws_rec.COMM_REC;
858: l_pdet_rec_tbl(i).posting_batch_id := CN_PREPOSTBATCHES.G_BATCH_ID;
859: l_pdet_rec_tbl(i).status := C_UNLOADED;
860: l_pdet_rec_tbl(i).loaded_date := NULL;
861: l_pdet_rec_tbl(i).payee_salesrep_id := l_pay_ws_rec.salesrep_id;
862: l_pdet_rec_tbl(i).credited_salesrep_id := l_pay_ws_rec.salesrep_id;

Line 879: l_pdet_rec_tbl(i).posting_batch_id := CN_PREPOSTBATCHES.G_BATCH_ID;

875: l_pdet_rec_tbl(i).posting_type := C_TO_REC;
876: l_pdet_rec_tbl(i).trx_type := C_COMM_TO_REC;
877: l_pdet_rec_tbl(i).incentive_type_code := C_COMMISSION;
878: l_pdet_rec_tbl(i).amount := l_pay_ws_rec.COMM_TO_REC;
879: l_pdet_rec_tbl(i).posting_batch_id := CN_PREPOSTBATCHES.G_BATCH_ID;
880: l_pdet_rec_tbl(i).status := C_UNLOADED;
881: l_pdet_rec_tbl(i).loaded_date := NULL;
882: l_pdet_rec_tbl(i).payee_salesrep_id := l_pay_ws_rec.salesrep_id;
883: l_pdet_rec_tbl(i).credited_salesrep_id := l_pay_ws_rec.salesrep_id;

Line 900: l_pdet_rec_tbl(i).posting_batch_id := CN_PREPOSTBATCHES.G_BATCH_ID;

896: l_pdet_rec_tbl(i).posting_type := C_REC;
897: l_pdet_rec_tbl(i).trx_type := C_BONUS_REC;
898: l_pdet_rec_tbl(i).incentive_type_code := C_BONUS;
899: l_pdet_rec_tbl(i).amount := l_pay_ws_rec.BONUS_REC;
900: l_pdet_rec_tbl(i).posting_batch_id := CN_PREPOSTBATCHES.G_BATCH_ID;
901: l_pdet_rec_tbl(i).status := C_UNLOADED;
902: l_pdet_rec_tbl(i).loaded_date := NULL;
903: l_pdet_rec_tbl(i).payee_salesrep_id := l_pay_ws_rec.salesrep_id;
904: l_pdet_rec_tbl(i).credited_salesrep_id := l_pay_ws_rec.salesrep_id;

Line 921: l_pdet_rec_tbl(i).posting_batch_id := CN_PREPOSTBATCHES.G_BATCH_ID;

917: l_pdet_rec_tbl(i).posting_type := C_TO_REC;
918: l_pdet_rec_tbl(i).trx_type := C_BONUS_TO_REC;
919: l_pdet_rec_tbl(i).incentive_type_code := C_BONUS;
920: l_pdet_rec_tbl(i).amount := l_pay_ws_rec.BONUS_TO_REC;
921: l_pdet_rec_tbl(i).posting_batch_id := CN_PREPOSTBATCHES.G_BATCH_ID;
922: l_pdet_rec_tbl(i).status := C_UNLOADED;
923: l_pdet_rec_tbl(i).loaded_date := NULL;
924: l_pdet_rec_tbl(i).payee_salesrep_id := l_pay_ws_rec.salesrep_id;
925: l_pdet_rec_tbl(i).credited_salesrep_id := l_pay_ws_rec.salesrep_id;

Line 948: l_pdet_rec_tbl(i).posting_batch_id := CN_PREPOSTBATCHES.G_BATCH_ID;

944: l_pdet_rec_tbl(i).incentive_type_code := C_MANUAL;
945: l_pdet_rec_tbl(i).amount := l_manual_exp_rec.amount;
946: l_pdet_rec_tbl(i).srp_plan_assign_id := l_manual_exp_rec.srp_plan_assign_id;
947: l_pdet_rec_tbl(i).quota_id := l_manual_exp_rec.quota_id;
948: l_pdet_rec_tbl(i).posting_batch_id := CN_PREPOSTBATCHES.G_BATCH_ID;
949: l_pdet_rec_tbl(i).status := C_UNLOADED;
950: l_pdet_rec_tbl(i).loaded_date := NULL;
951: l_pdet_rec_tbl(i).payee_salesrep_id := l_pay_ws_rec.salesrep_id;
952: l_pdet_rec_tbl(i).credited_salesrep_id := l_pay_ws_rec.salesrep_id;