Simplify SAP R/3 development with Excel VBA/VB RFC  
Home> Bapi>CustomerQuotation




The business object Customer quotation is a offer by a sales
area to a customer for the delivery of goods or the rendering of services according to fixed terms.

The offer legally binds the company for a certain period of time.

A customer quotation can refer to a partner sales activity or it can be used by the sales area to reply to a customer inquiry.

A customer quotation consists of several items containing the quantity
of the material or service on offer. This total quantity can be divided
into different partial quantities with the corresponding delivery dates
in the schedule lines. The items can be set in a hierarchy. This makes
it possible to differentiate between batches or to separate the different components of a material (BOM - bills of material).

In the item conditions, the valid conditions for the items are listed.
They can be distributed among the items from an overall condition valid for the whole quotation.


Other than sold-to party as customer, you can also specify business
partners with different partner functions (e.g. ship-to party).



Available Methods

  • Change : Change Customer Quotation [ BAPI_CUSTOMERQUOTATION_CHANGE ]
  • CreateFromData : Customer quotation: Create customer quotation [ BAPI_QUOTATION_CREATEFROMDATA ]
  • CreateFromData2 : Customer Quotation: Create Customer Quotation [ BAPI_QUOTATION_CREATEFROMDATA2 ]




Using this method, you can change or delete customer quotations.

Header, item, schedule line and configuration data can be changed.

The following is a general rule:

  1. Only enter the fields you wish to change.
  2. Select the fields you wish to change.

  3. Fill in the UPDATEFLAG field with a U.
  4. Always enter the key fields when you make a change,even in the checkbox.
  5. An exception here is configuration. If you wish to change this, you need to fill it in completely.
  6. Maintain the quantities and dates via the schedule line data.

  7. Possible UPDATEFLAGS: U = change
    D = delete
    I = insert


    1. Delete quotation completely.
    2. Delete quotation item.
    3. Changes to quotation.

    4. Change configuration.


      1. Minimum specifications:

      The quotation number must definitely be entered in the SALESDOCUMENT structure.
      Always enter key fields when you make a change.
      The update indicator QUOTATION_HEADER_INX must always be entered.

      1. Commit control

      The BAPI does not have a database. This means that the relevantapplication must leave the commit, in order that changes can be carriedout on the database. The BAPI BAPI_TRANSACTION_COMMIT is available for this.




      You can create customer quotations with this method.

      Enter at least the header data (using the ORDER_HEADER_IN structure) and partner data (using the ORDER_PARTNERS table).

      Enter the item data in the ORDER_ITEMS_IN table. You can enter the item
      number manually by filling in the relevant field or, if you leave thefield blank, it will be entered automatically according to the settings in Customizing.

      If the item is configurable, enter the configuration data in the ORDER_CFGS_REF, ORDER_CFGS_INST, ORDER_CFGS_PART_OF and
      ORDER_CFGS_VALUE tables.

      Once the customer quotation has been successfully created the systemissues the document number (SALESDOCUMENT field) and detailed data about the participating partners (using the SOLD_TO_PARTY,SHIP_TO_PARTY and BILLING_PARTY fields). Any errors are displayed in the RETURN paramter.

      The ORDER_ITEMS_OUT table provides you with the detailed information needed to judge pricing and availability for an item.




      Using this method, you can create customer quotations.

      For this, you must enter at least header data (via the structure QUOTATION_HEADER_IN) and partner data (via the structureQUOTATION_PARTNERS) as input parameters.

      Enter the item data via the table QUOTATION_ITEMS_IN. The item number
      can be entered manually, by filling out the relevant fields, orautomatically, according to Customizing, by leaving the relevant fields blank.

      If you are dealing with configurable items, you must enter the configuration data in the tables QUOTATION_CFGS_REF,
      QUOTATION_CFGS_INST, QUOTATION_CFGS_PART_OF and QUOTATION_CFGS_VALUE.When you have successfully created a customer quotation, you will

      receive the document number (SALESDOCUMENT field). Any errors that might occur will be announced via the parameter RETURN.


      1. Required entries:
        ORDER_HEADER_IN : DOC_TYPE Sales document type
        SALES_ORG Sales organization
        DISTR_CHAN Distribution channel
        DIVISION Division
        ORDER_PARTNERS..: PARTN_ROLE Partner role, party

        PARTN_NUMB Customer number
        ORDER_ITEMS_IN..: MATERIAL Material number
      2. Ship-to party:
        If no ship-to party is entered, use the following: Sold-to party = Ship-to party.
      3. Commit Control:
        The BAPI does not have a Commit Database. This means that the relevant
        application must make sure that Commit carries out changes on the database. The following BAPI code is available:BAPI_TRANSACTION_COMMIT. BAPI_TRANSACTION_COMMIT