76: FROM
77: ra_customer_trx_all
78: WHERE
79: customer_trx_id = cp_customer_trx_id
80: AND created_from = jai_constants.created_fr_ar_invoice_api; /* 'AR_INVOICE_API' */
81:
82: ln_exists NUMBER(2) ;
83:
84:
473: /*
474: || check for action in trigger and pass the same to the procedure
475: */
476: IF INSERTING THEN
477: lv_action := jai_constants.inserting ;
478: ELSIF UPDATING THEN
479: lv_action := jai_constants.updating ;
480: ELSIF DELETING THEN
481: lv_action := jai_constants.deleting ;
475: */
476: IF INSERTING THEN
477: lv_action := jai_constants.inserting ;
478: ELSIF UPDATING THEN
479: lv_action := jai_constants.updating ;
480: ELSIF DELETING THEN
481: lv_action := jai_constants.deleting ;
482: END IF ;
483:
477: lv_action := jai_constants.inserting ;
478: ELSIF UPDATING THEN
479: lv_action := jai_constants.updating ;
480: ELSIF DELETING THEN
481: lv_action := jai_constants.deleting ;
482: END IF ;
483:
484: IF INSERTING THEN
485:
501: , pv_err_msg => lv_return_message
502: , pv_err_flg => lv_return_code
503: );
504:
505: if lv_return_code in (jai_constants.expected_error, jai_constants.unexpected_error) then
506: raise le_error ;
507: end if;
508:
509: else
519: pv_return_code => lv_return_code ,
520: pv_return_message => lv_return_message
521: );
522:
523: IF lv_return_code <> jai_constants.successful then
524: RAISE le_error;
525: END IF;
526:
527: END IF ;
535: pv_return_code => lv_return_code ,
536: pv_return_message => lv_return_message
537: );
538:
539: IF lv_return_code <> jai_constants.successful then
540: RAISE le_error;
541: END IF;
542:
543: END IF ;
551: pv_return_code => lv_return_code ,
552: pv_return_message => lv_return_message
553: );
554:
555: IF lv_return_code <> jai_constants.successful then
556: RAISE le_error;
557: END IF;
558:
559: END IF ;
567: pv_return_code => lv_return_code ,
568: pv_return_message => lv_return_message
569: );
570:
571: IF lv_return_code <> jai_constants.successful then
572: RAISE le_error;
573: END IF;
574:
575: END IF ;
587: pv_return_code => lv_return_code ,
588: pv_return_message => lv_return_message
589: );
590:
591: IF lv_return_code <> jai_constants.successful then
592: RAISE le_error;
593: END IF;
594:
595: END IF ;
608: pv_return_code => lv_return_code ,
609: pv_return_message => lv_return_message
610: );
611:
612: IF lv_return_code <> jai_constants.successful then
613: RAISE le_error;
614: END IF;
615:
616: END IF ;
624: pv_return_code => lv_return_code ,
625: pv_return_message => lv_return_message
626: );
627:
628: IF lv_return_code <> jai_constants.successful then
629: RAISE le_error;
630: END IF;
631:
632: END IF ;
644: pv_return_code => lv_return_code ,
645: pv_return_message => lv_return_message
646: );
647:
648: IF lv_return_code <> jai_constants.successful then
649: RAISE le_error;
650: END IF;
651:
652: END IF ;