Skip to Content
author's profile photo Former Member
Former Member

Creating a Down Payment


We are currently looking for a way to create an invoice of type Down Payment, but did not find success so far.

There are two options that I've investigated :

  1. use standard ABSL coding such as what is described in the Repository Explorer documentation, along with this helpful thread:
  2. use the ManageCustomerInvoiceRequestIn inbound webservice

None of them allowed me to create an actual down payment. I was able to create a standard invoice though.

When using the webservice, I tried setting the PricingProcedure to PPGDP1 or PPNDP1, but got the error "could not copy tax details and price components". There was obvisouly a discrepancy somewhere, even when setting the price component type code to 7GDP or 7NDP. (gross down payment or net down payment). Using the standard PPSTD1 with a price component of type 7PR1 was working as expected.

When using standard ABSL coding, I tried setting the InvoiceProcessingType to "CDP" instead of the recommended "CI". This resulted in an error of type "invoice processing type missing".

Please note that in both cases I only use one item without a product reference (I added General Ledger and Taxation characteristics as instructed), and only one price component with the amount of the down payment.

Does anyone here have experience making this work? There is a painful lack of documentation on this particular type of invoice. I tried reproducing the values that I read in an existing, hand-created down payment (processing type, price and tax settings, etc.) but it got me nowhere.

Thanks !

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    Posted on Apr 08, 2016 at 08:33 AM


    If you want to try the inbound web service,

    Do not use "ManageCustomerInvoiceRequestIn".

    You should use "ManageDownPaymentCustomerInvoiceRequestIn".

    Please try it.

    Best regards,


    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 24, 2016 at 07:54 AM

    Hi again,

    I eventually managed to create an Invoice Request of Type Down Payment. The catch is the invoice item price is empty: every time I attempt to add a price component, it fails.

    Here is my logic of execution so far:

    1. Create an Invoice Request

    2. Assign it the business process variant types 3 (manual invoice) and 272 (down payment)

    3. Assign it the customer invoice processing type "CDP"

    4. Set Pricing Terms currency

    5. Set Buyer and Sales Unit parties

    6. Set Cash Discount Terms

    7. Create an Item on the invoice with an empty description and a quantity of 1 EA

    8. Create a Main Price component on the item: this does not work, regardless of what I tried (setting parameters before or after creation, etc.); I invariably receive the error "Price component is not valid"

    9. Set General Ledger Account

    10. Set Taxation Characteristics Code

    I had some minor success but an empty invoice is no use to me! Anyone, help?

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Will,

      Here is the code I'm using:

      // define CustomerInvoiceRequest root node
      var elCustomerInvoiceRequest_Root: elementsof BusinessObject::CustomerInvoiceRequest;
      var instCustomerInvoiceRequest;
      // define CustomerInvoiceRequest BusinessProcessVariantType node
      var elCustomerInvoiceRequest_BPVT: elementsof BusinessObject::CustomerInvoiceRequest.BusinessProcessVariantType;
      var instCustomerInvoiceRequest_BPVT;
      // define CustomerInvoiceRequest buyer party node
      var elCustomerInvoiceRequest_BuyerParty: elementsof BusinessObject::CustomerInvoiceRequest.Party;
      var instCustomerInvoiceRequest_BuyerParty;
      // define CustomerInvoiceRequest sales unit party node
      var elCustomerInvoiceRequest_SalesUnitParty: elementsof BusinessObject::CustomerInvoiceRequest.Party;
      var instCustomerInvoiceRequest_SalesUnitParty;
      // define CustomerInvoiceRequest item node
      var elCustomerInvoiceRequest_Item: elementsof BusinessObject::CustomerInvoiceRequest.Item;
      var instCustomerInvoiceRequest_Item;
      // define CustomerInvoiceRequest item accounting coding block node
      var elCustomerInvoiceRequest_ItemACBD: elementsof BusinessObject::CustomerInvoiceRequest.Item.ItemAccountingCodingBlockDistribution;
      var instCustomerInvoiceRequest_ItemACBD;
      // define CustomerInvoiceRequest item price component
      //var elCustomerInvoiceRequest_Item_MainPrice: elementsof BusinessObject::CustomerInvoiceRequest.PriceAndTaxCalculation.Item.ItemPriceComponent;
      var instCustomerInvoiceRequest_Item_MainPrice;
      // CustomerInvoiceRequest: create new instance
      //elCustomerInvoiceRequest_Root.CustomerInvoiceProcessingTypeCode = "CDP";
      instCustomerInvoiceRequest = BusinessObject::CustomerInvoiceRequest.Create();
      // CustomerInvoiceRequest: maintain BPVT node
      // BusinessProcessVariantTypeCode = 3 describes type 'Manual Invoice'
      elCustomerInvoiceRequest_BPVT.BusinessProcessVariantTypeCode = "3";
      elCustomerInvoiceRequest_BPVT.MainIndicator = true;
      instCustomerInvoiceRequest_BPVT = instCustomerInvoiceRequest.BusinessProcessVariantType.Create(elCustomerInvoiceRequest_BPVT);
      elCustomerInvoiceRequest_BPVT.BusinessProcessVariantTypeCode = "272";
      elCustomerInvoiceRequest_BPVT.MainIndicator = false;
      instCustomerInvoiceRequest_BPVT = instCustomerInvoiceRequest.BusinessProcessVariantType.Create(elCustomerInvoiceRequest_BPVT);
      // CustomerInvoiceRequest: maintain customer invoice processing type - mandatory
      // CustomerInvoiceProcessingTypeCode = "CI" describes type 'Customer Invoice'
      instCustomerInvoiceRequest.CustomerInvoiceProcessingTypeCode = "CDP";
      // pricing terms
      var instPricingTerms = instCustomerInvoiceRequest.PricingTerms;
      if(!instPricingTerms.IsSet()) { instPricingTerms = instCustomerInvoiceRequest.PricingTerms.Create(); }
      instPricingTerms.CurrencyCode = "EUR";
      // CustomerInvoiceRequest:: maintain buyer party - mandatory
      elCustomerInvoiceRequest_BuyerParty.PartyKey.PartyID.content = sales_order.BuyerParty.PartyKey.PartyID.content;
      // CustomerInvoiceRequest: create new party instance
      instCustomerInvoiceRequest_BuyerParty = instCustomerInvoiceRequest.BuyerParty.Create(elCustomerInvoiceRequest_BuyerParty);
      // CustomerInvoiceRequest:: maintain sales unit party - mandatory
      elCustomerInvoiceRequest_SalesUnitParty.PartyKey.PartyID.content = sales_order.SalesUnitParty.PartyKey.PartyID.content;
      // CustomerInvoiceRequest: create new party instance
      instCustomerInvoiceRequest_SalesUnitParty = instCustomerInvoiceRequest.SalesUnitParty.Create(elCustomerInvoiceRequest_SalesUnitParty);
      // cash terms
      var elCashTerms : elementsof BusinessObject::CustomerInvoiceRequest.CashDiscountTerms;
      elCashTerms.Code.content = "001";
      var instCashTerms = instCustomerInvoiceRequest.CashDiscountTerms.Create(elCashTerms);
      // CustomerInvoiceRequest.Item: maintain description - mandatory
      elCustomerInvoiceRequest_Item.Description.content = "Down Payment for Sales Order " + this.InternalID.content.RemoveLeadingZeros();
      elCustomerInvoiceRequest_Item.Quantity.content = 1;
      elCustomerInvoiceRequest_Item.Quantity.unitCode = "EA";
      elCustomerInvoiceRequest_Item.QuantityTypeCode.content = "EA";
      elCustomerInvoiceRequest_Item.ProcessingTypeCode = "CII";
      instCustomerInvoiceRequest_Item = instCustomerInvoiceRequest.Item.Create(elCustomerInvoiceRequest_Item);
      var elCustomerInvoiceRequest_Item_MainPrice : elementsof BusinessObject::CustomerInvoiceRequest.PriceAndTaxCalculation.Item.ItemPriceComponent;
      var elCustomerInvoiceRequest_Price : elementsof BusinessObject::CustomerInvoiceRequest.PriceAndTaxCalculation.PriceComponent;
      elCustomerInvoiceRequest_Item_MainPrice.Description.content = "Gross Down Payment";
      elCustomerInvoiceRequest_Item_MainPrice.TypeCode.content = "7GDP";
      elCustomerInvoiceRequest_Item_MainPrice.Rate.DecimalValue = 100;
      elCustomerInvoiceRequest_Item_MainPrice.Rate.CurrencyCode = "EUR";
      // CustomerInvoiceRequest.Item.ItemAccountingCodingBlockDistribution: maintain GL-account - mandatory
      elCustomerInvoiceRequest_ItemACBD.GeneralLedgerAccountAliasCode.content = "A-1500";
      // CustomerInvoiceRequest.Item: create new ItemAccountingCodingBlockDistribution instance
      instCustomerInvoiceRequest_ItemACBD = instCustomerInvoiceRequest_Item.ItemAccountingCodingBlockDistribution.Create(elCustomerInvoiceRequest_ItemACBD);
      // CustomerInvoiceRequest.Item.PATCItem: maintain tax code - mandatory (code 501 = Sales Tax - Standard Rate)
      instCustomerInvoiceRequest_Item.PriceAndTaxCalculationItem.TaxationCharacteristicsCode.content = "501";
      // external ref
      instCustomerInvoiceRequest.ReferenceBusinessTransactionDocumentID.content = sales_order.BuyerID.content;
      // CustomerInvoiceRequest: maintain description - optional
      instCustomerInvoiceRequest.Name = "Down Payment for Sales Order " + this.InternalID.content.RemoveLeadingZeros();

      Thanks again, hope you will find something interesting!

  • author's profile photo Former Member
    Former Member
    Posted on Mar 23, 2016 at 11:32 AM


    You need to set the ProcessingTypeCode to DPI as CDP is a down payment request.



    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi and thank your for your response.

      Using "DPI" as the processing type code gives me back errors about the pricing procedure which can't be determined. More precisely, this is what I read in the log:

      16:14:18 [2:E] Message (APCI_CUST_INV_REQUEST, PRICING_TERMS) Determination of pricing procedure not possible with APCI_02, , and

      16:14:18 [2:E] Message (APCI_CUST_INV_REQUEST, PRICING_TERMS) Determination of pricing procedure not possible with APCI_02, , and

      16:14:18 [2:E] Message (APCI_CUST_INV_REQUEST, PRICING_TERMS) Pricing procedure not determined

      All subsequent operations fail as a result.

      This is the order in which I do things:

      1. Create Customer Invoice Request instance

      2. Set Business Process Variant Type Code to 3 (manual invoice)

      3. Set Customer Invoice Processing Type Code to DPI

      4. Set Pricing Terms currency

      5. Set Buyer and Sales Unit parties

      6. Set Cash Discount Terms

      7. Create an Item on the invoice

      8. Set General Ledger Account

      9. Set Taxation Characteristics Code

      10. Create a Main Price component on the item (setting the type code to "7NDP")

      Help! 😊

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.