Skip to Content
avatar image
Former Member

Errors when Creating an invoice...via ABSL

When Creating an invoice I am getting the following errors.. when I try to save after the "Action" that is used to create the invoiceRequest... But If I hit the save again it saves without issues....

the UI Shows

The following are the Debug errors the UI shows

Message (APCI_CUST_INV_REQUEST, CUSTOMER_INVOICE_REQUEST) Customer invoice processing type missing

Message (APCI_CUST_INV_REQUEST, PRICING_TERMS) Currency missing

Message (APCI_CUST_INV_REQUEST, PRICING_TERMS) Sales data or pricing terms not found for account

Message (APCI_CUST_INV_REQUEST, PRICING_TERMS) Currency missing

Message (APCI_CUST_INV_REQUEST, CashDiscountTerms.ROOT) Payment terms not determined; maintain sales arrangement

Message (APCI_CUST_INV_REQUEST, CUSTOMER_INVOICE_REQUEST) Party with role Invoicing Unit missing

Message (APCI_CUST_INV_REQUEST, CUSTOMER_INVOICE_REQUEST) Party with role Seller missing

Message (APCI_CUST_INV_REQUEST, CUSTOMER_INVOICE_REQUEST) Party with role Sales Unit missing

Message (APCI_CUST_INV_REQUEST, ITEM) General ledger account or product missing

Message (APCI_CUST_INV_REQUEST, PriceAndTaxCalculation.ITEM) Product, product category or tax code of item missing

Message (APCI_CUST_INV_REQUEST, PriceAndTaxCalculation.ITEM) Product, product category or tax code of item missing

Message (APCI_CUST_INV_REQUEST, PriceAndTaxCalculation.ITEM) Product, product category or tax code of item missing

Message (APCI_CUST_INV_REQUEST, PriceAndTaxCalculation.ITEM) Product, product category or tax code of item missing

The Code is as Follows and Sets all the Values....

var elCustomerInvoiceRequest_Root: elementsof CustomerInvoiceRequest;
var instCustomerInvoiceRequest;
var elCustomerInvoiceRequest_BPVT: elementsof CustomerInvoiceRequest.BusinessProcessVariantType;
var instCustomerInvoiceRequest_BPVT;
var elCustomerInvoiceRequest_BuyerParty: elementsof CustomerInvoiceRequest.Party;
var instCustomerInvoiceRequest_BuyerParty;
var elCustomerInvoiceRequest_SalesUnitParty: elementsof CustomerInvoiceRequest.Party;
var instCustomerInvoiceRequest_SalesUnitParty;
// CustomerInvoiceRequest: create new instance instCustomerInvoiceRequest = CustomerInvoiceRequest.Create(elCustomerInvoiceRequest_Root); // CustomerInvoiceRequest: maintain BPVT node // BusinessProcessVariantTypeCode = 3 describes type 'Manual Invoice' elCustomerInvoiceRequest_BPVT.BusinessProcessVariantTypeCode = "3"; // CustomerInvoiceRequest: create new BPVT instance // Without the BPVT node no modifications can be made to the CustomerInvoiceRequest instCustomerInvoiceRequest_BPVT = instCustomerInvoiceRequest.BusinessProcessVariantType.Create(elCustomerInvoiceRequest_BPVT); // CustomerInvoiceRequest: maintain customer invoice processing type - mandatory // CustomerInvoiceProcessingTypeCode = "CI" describes type 'Customer Invoice' instCustomerInvoiceRequest.CustomerInvoiceProcessingTypeCode = "CI"; // CustomerInvoiceRequest: maintain description - optional instCustomerInvoiceRequest.Name = "DESC"; // CustomerInvoiceRequest:: maintain buyer party - mandatory elCustomerInvoiceRequest_BuyerParty.PartyKey.PartyID.content = BP2.InternalID; // CustomerInvoiceRequest: create new party instance instCustomerInvoiceRequest_BuyerParty = instCustomerInvoiceRequest.BuyerParty.Create(elCustomerInvoiceRequest_BuyerParty);
elCustomerInvoiceRequest_SalesUnitParty.PartyKey.PartyID.content= BP2.SalesArrangement.GetFirst().SalesOrganisation.ID;
instCustomerInvoiceRequest.PricingTerms.CurrencyCode = cd.Amount.currencyCode.Trim();

// define CustomerInvoiceRequest item node var DLelCustomerInvoiceRequest_Item: elementsof CustomerInvoiceRequest.Item; var DLinstCustomerInvoiceRequest_Item; // define CustomerInvoiceRequest item accounting coding block node var DLelCustomerInvoiceRequest_ItemACBD: elementsof CustomerInvoiceRequest.Item.ItemAccountingCodingBlockDistribution; var DLinstCustomerInvoiceRequest_ItemACBD; // define CustomerInvoiceRequest item price component var DLelCustomerInvoiceRequest_Item_MainPrice: elementsof CustomerInvoiceRequest.PriceAndTaxCalculation.Item.ItemPriceComponent; var DLinstCustomerInvoiceRequest_Item_MainPrice; DLelCustomerInvoiceRequest_Item.Description.content = LI.INVDESC; DLelCustomerInvoiceRequest_Item.Quantity.content = 1; DLelCustomerInvoiceRequest_Item.Quantity.unitCode = "EA"; DLinstCustomerInvoiceRequest_Item = instCustomerInvoiceRequest.Item.Create(DLelCustomerInvoiceRequest_Item); DLelCustomerInvoiceRequest_ItemACBD.GeneralLedgerAccountAliasCode.content = LI.GLAL; DLinstCustomerInvoiceRequest_ItemACBD = DLinstCustomerInvoiceRequest_Item.ItemAccountingCodingBlockDistribution.Create(DLelCustomerInvoiceRequest_ItemACBD); DLinstCustomerInvoiceRequest_Item_MainPrice = DLinstCustomerInvoiceRequest_Item.PriceAndTaxCalculationItem.ItemMainPrice.Create(); DLinstCustomerInvoiceRequest_Item_MainPrice.Rate.DecimalValue = cd.Amount.content * -1; DLinstCustomerInvoiceRequest_Item.PriceAndTaxCalculationItem.TaxationCharacteristicsCode.content = "500";
capture.png (13.3 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Dec 06, 2016 at 01:10 PM

    Hello Billy,

    The save is performed but the Invoice will not be able to be active because of the errors.

    Bye,
    Horst

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 08, 2016 at 04:19 AM

    Hi Billy,

    Please try to write the instance creation order like this.

    I think it will solve Currency missing and SalesUnit missing.

    Regards,

    May

    var elCustomerInvoiceRequest_Root: elementsof CustomerInvoiceRequest;
    var instCustomerInvoiceRequest;
    var elCustomerInvoiceRequest_BPVT: elementsof CustomerInvoiceRequest.BusinessProcessVariantType;
    var instCustomerInvoiceRequest_BPVT;
    var elCustomerInvoiceRequest_BuyerParty: elementsof CustomerInvoiceRequest.Party;
    var instCustomerInvoiceRequest_BuyerParty;
    var elCustomerInvoiceRequest_SalesUnitParty: elementsof CustomerInvoiceRequest.Party;
    var instCustomerInvoiceRequest_SalesUnitParty;
    
    
    // CustomerInvoiceRequest: maintain BPVT node
    
    
    // BusinessProcessVariantTypeCode = 3 describes type 'Manual Invoice'
    
    
    elCustomerInvoiceRequest_BPVT
    .BusinessProcessVariantTypeCode = "3";
    
    
    
    
    elCustomerInvoiceRequest_Root
    .CustomerInvoiceProcessingTypeCode = "CI";
    
    
    // CustomerInvoiceRequest: create new instance 
    instCustomerInvoiceRequest = CustomerInvoiceRequest.Create(elCustomerInvoiceRequest_Root);
    
    
    //★★
    if
    (!instCustomerInvoiceRequest.PricingTerms.IsSet()){
    var temp = instCustomerInvoiceRequest.PricingTerms.Create();
    temp.CurrencyCode = "AUD"; // Test CurrencyCode
    }
    
    
    else
    {
    instCustomerInvoiceRequest.PricingTerms.CurrencyCode = "AUD"; // Test CurrencyCode
    }
    
    
    instCustomerInvoiceRequest.Name = "DESC";
    // CustomerInvoiceRequest:: maintain buyer party - mandatory
    elCustomerInvoiceRequest_BuyerParty.PartyKey.PartyID.content = BP2.InternalID;
    // CustomerInvoiceRequest: create new party instance 
    instCustomerInvoiceRequest_BuyerParty = instCustomerInvoiceRequest.BuyerParty.Create(elCustomerInvoiceRequest_BuyerParty);
    elCustomerInvoiceRequest_SalesUnitParty.PartyKey.PartyID.content= BP2.SalesArrangement.GetFirst().SalesOrganisation.ID;
    instCustomerInvoiceRequest.SalesUnitParty.Create(elCustomerInvoiceRequest_SalesUnitParty);
    ...........
    Add comment
    10|10000 characters needed characters exceeded

  • Feb 18, 2017 at 01:18 PM

    Hi Billy,

    do you already have an answer to this topic? I am facing exactly the same issue now. Would be great if you could share your results.

    Thx and BR,

    Michael

    Add comment
    10|10000 characters needed characters exceeded