My Oracle Support Banner

Funding API Error: 'The proposed amount 99999999999999999.99999 on the agreement must be more than or equal to the per invoice limit 170000000000000000000. Enter a valid value and retry.' (PA_IGT_AGR_AMT_INV_AMT_VALID) in API Output (Doc ID 2976128.1)

Last updated on JULY 18, 2024

Applies to:

Oracle Project Billing - Version 12.2.12 and later
Information in this document applies to any platform.

Symptoms

Error occurs in the API output for all Project Agreements that are integrated with Project Contracts when using Funding API:

Funding API Error Msg from funding_api_error Exception = The proposed amount 99999999999999999.99999 on the agreement must be more than or equal to the per invoice limit 170000000000000000000. Enter a valid value and retry.
Error Code Short Name = PA_IGT_AGR_AMT_INV_AMT_VALID

Reproduce By Steps

 Create Agreements AGM_API_NINV (Without Per Invoice Limit) AGM_API_INV (With Per Invoice Limit) using code below:

DECLARE
    l_msg_count                  NUMBER;
    l_msg_data                   VARCHAR2(2000);
    l_return_status              VARCHAR2(1);
  l_agr_rec_in_type            PA_AGREEMENT_PUB.agreement_rec_in_type;
  l_agr_rec_out_type           PA_AGREEMENT_PUB.agreement_rec_out_type;
  l_fund_in_tbl_type           PA_AGREEMENT_PUB.funding_in_tbl_type;
  l_fund_out_tbl_type           PA_AGREEMENT_PUB.funding_out_tbl_type;
BEGIN
    MO_GLOBAL.SET_POLICY_CONTEXT('S',1885);
    
    fnd_global.apps_initialize (user_id        => xxxx,
                                   resp_id        => xxxx,
                                resp_appl_id   => 275    );
  l_agr_rec_in_type.customer_id := xxxx;
  l_agr_rec_in_type.customer_num := xxxx;
  l_agr_rec_in_type.agreement_num := 'AGM_API_INV';
  l_agr_rec_in_type.agreement_type := 'Purchase Orders';
  l_agr_rec_in_type.term_id := 4    ;
  l_agr_rec_in_type.owned_by_person_id := xxxx;
  l_agr_rec_in_type.owning_organization_id := xxxx;
  l_agr_rec_in_type.agreement_currency_code := 'USD';
  l_agr_rec_in_type.pm_agreement_reference := '123';
  l_agr_rec_in_type.revenue_limit_flag := 'N';
  l_agr_rec_in_type.template_flag := 'N';
  --Case1: No Amount fails
  --Case1: UnComment below, with amount success
  --l_agr_rec_in_type.amount := 400;
  --Case2: UnComment below amount < inv_limit fails
  --l_agr_rec_in_type.amount := 400;
  --l_agr_rec_in_type.inv_limit := 400.55;
  --Cas3: UnComment below amount >= inv_limt success
  --l_agr_rec_in_type.amount := 400;
  --l_agr_rec_in_type.inv_limit := 400.45;

PA_AGREEMENT_PUB.create_agreement(p_api_version_number    => 1.0
                                 ,p_commit            => FND_API.G_FALSE
                                 ,p_init_msg_list    => FND_API.G_FALSE
                                 ,P_msg_count         => l_msg_count
                                 ,P_msg_data          => l_msg_data
                                 ,P_return_status    => l_return_status
                                 ,p_pm_product_code => '123'
                                 ,p_agreement_in_rec    => l_agr_rec_in_type
                                 ,p_agreement_out_rec    => l_agr_rec_out_type
                                 ,p_funding_in_tbl    =>    l_fund_in_tbl_type
                                 ,p_funding_out_tbl    => l_fund_out_tbl_type
                                 ,p_submit_approval => 'N');

DBMS_OUTPUT.PUT_LINE('Agreement Id: '||l_agr_rec_out_type.agreement_id);
DBMS_OUTPUT.PUT_LINE('Return Status: '||l_return_status);
DBMS_OUTPUT.PUT_LINE('MSG Count: '||l_msg_count);
DBMS_OUTPUT.PUT_LINE('MSG Data: '||l_msg_data);
END;

 

Update Agreement AGM_API_NINV, Per Invoice Limit to (<= amount) or (null) using code below:

DECLARE
    l_msg_count                  NUMBER;
    l_msg_data                   VARCHAR2(2000);
    l_return_status              VARCHAR2(1);
  l_agr_rec_in_type            PA_AGREEMENT_PUB.agreement_rec_in_type;
  l_agr_rec_out_type           PA_AGREEMENT_PUB.agreement_rec_out_type;
  l_fund_in_tbl_type           PA_AGREEMENT_PUB.funding_in_tbl_type;
  l_fund_out_tbl_type           PA_AGREEMENT_PUB.funding_out_tbl_type;
BEGIN
    MO_GLOBAL.SET_POLICY_CONTEXT('S',1885);
    
    fnd_global.apps_initialize (user_id        => xxxx,
                                   resp_id        => xxxx,
                                resp_appl_id   => 275    );
  l_agr_rec_in_type.agreement_id := xxxx;
  l_agr_rec_in_type.customer_id := xxxx;
  l_agr_rec_in_type.customer_num := xxxx;
  l_agr_rec_in_type.agreement_type := 'Purchase Orders';
  l_agr_rec_in_type.term_id := 4    ;
  l_agr_rec_in_type.owned_by_person_id := xxxx;
  l_agr_rec_in_type.owning_organization_id := xxxx;
  l_agr_rec_in_type.agreement_currency_code := 'USD';
  l_agr_rec_in_type.pm_agreement_reference := '123';
  l_agr_rec_in_type.revenue_limit_flag := 'N';
  l_agr_rec_in_type.template_flag := 'N';
  --Case1: Updating inv_limit to a value > amount, fails
  --l_agr_rec_in_type.inv_limit := 400.66;
  --Case2: Updating inv_limit to a value <= amount, success
  --l_agr_rec_in_type.inv_limit := 400.36;
  --Case3: Updating amount to a value < inv_limit, fails
  --l_agr_rec_in_type.amount := 399;
  --Case4: Updating amount & inv_limit as amount >= inv_limit, success
  --l_agr_rec_in_type.amount := 450;
  --l_agr_rec_in_type.inv_limit := 445;
  --Case4: Updating amount & inv_limit as amount < inv_limit, fails
  --l_agr_rec_in_type.amount := 450;
  --l_agr_rec_in_type.inv_limit := 455;
  --Case5: Updating inv_limit to null, success
  --l_agr_rec_in_type.inv_limit := null;
PA_AGREEMENT_PUB.update_agreement(p_api_version_number    => 1.0
                                 ,p_commit            => FND_API.G_FALSE
                                 ,p_init_msg_list    => FND_API.G_FALSE
                                 ,P_msg_count         => l_msg_count
                                 ,P_msg_data          => l_msg_data
                                 ,P_return_status    => l_return_status
                                 ,p_pm_product_code => '123'
                                 ,p_agreement_in_rec    => l_agr_rec_in_type
                                 ,p_agreement_out_rec    => l_agr_rec_out_type
                                 ,p_funding_in_tbl    =>    l_fund_in_tbl_type
                                 ,p_funding_out_tbl    => l_fund_out_tbl_type
                                 ,p_submit_approval => 'N');

DBMS_OUTPUT.PUT_LINE('Return Status: '||l_return_status);
DBMS_OUTPUT.PUT_LINE('MSG Count: '||l_msg_count);
DBMS_OUTPUT.PUT_LINE('MSG Data: '||l_msg_data);
END;

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.