Friday, 26 December 2025

Generate GST TAX_INVOICE_NUM in Shipping for India Localization in Oracle APPS R12

Case: GST TAX_INVOICE_NUM in Shipping for India Localization is not generated.

Fix: 

Option-1: We need to insert records for these delivery-Ids into ja.jai_wsh_exceptions_t table and then run "India - Process Delivery OM/INV Interface" request.

BEGIN
    INSERT INTO ja.jai_wsh_exceptions_t
                (exception_id,
                 delivery_id,
                 exception_type,
                 exception_entity,
                 error_message)
    VALUES      (2222,
                 15723609,
                 'U', --U : User Defined E : Unhandled
                 'OM_INTERFACE',
                 'GST Inv not generated');

    COMMIT;
END; 

Option-2: 

/*API To Generate GST TAX_INVOICE_NUM in Shipping for India Localization in APPS R12*/
DECLARE
    v_process_status  VARCHAR2(30);
    v_process_message VARCHAR2(2000);
    CURSOR c IS
      SELECT a.entity_code,
             a.event_class_code,
             a.event_type_code,
             a.tax_event_class_code,
             a.tax_event_type_code,
             a.trx_id,
             SYSDATE tax_invoice_date
      FROM   jai_tax_det_factors a,
             jai_tax_lines x
      WHERE  a.det_factor_id = x.det_factor_id
             AND a.trx_id = 15723609 --DELIVERY_ID
             AND a.application_id = 707
             AND a.entity_code = 'SALES_ORDER_ISSUE'
      HAVING Max(x.tax_invoice_num) IS NULL
      GROUP  BY a.entity_code,
                a.event_class_code,
                a.event_type_code,
                a.tax_event_class_code,
                a.tax_event_type_code,
                a.trx_id;
BEGIN
    FOR c1 IN c LOOP
        jai_inv_num_gen_pkg.Process_generation(pn_application_id => 707,
        pv_entity_code => c1.entity_code, pv_event_class_code =>
        c1.event_class_code,
        pv_event_type_code => c1.event_type_code,
        pv_tax_event_class_code => c1.tax_event_class_code,
        pv_tax_event_type_code => c1.tax_event_type_code,
        pv_interface_flag => NULL, pn_trx_id => c1.trx_id,
        pn_delivery_id => c1.trx_id,
        pd_invoice_date => c1.tax_invoice_date,
        pv_process_status => v_process_status,
        pv_process_message => v_process_message);

        dbms_output.Put_line('Status=>'
                             ||v_process_status
                             ||':'
                             ||v_process_message);

        --FND_FILE.PUT_LINE(FND_FILE.LOG,'Status=>'||v_process_status||':'||v_process_message);
        COMMIT;
    END LOOP;
END; 

No comments:

Post a Comment