Fonction SAP BAPI_QUOTATION_CREATEBOS - Create Customer Quotation with BOS

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
BEHAVEWHENERROR BAPIFLAG-BAPIFLAG C 1 SPACE X Error Handling
BINARYRELATIONSHIPTYPE BAPIRELTYPE-RELTYPE C 4 SPACE X Binary Relationship type (private)
COSTINGVARIANT ESLL-KLVAR C 4 X Costing Variant
INTNUMBERASSIGNMENT BAPIFLAG-BAPIFLAG C 1 SPACE X Internal item number assignment
LOGICSWITCH BAPISDLS u 5 X Internal control parameter
QUOTATIONHEADERIN BAPISDHD1 u 918 Document Header Data
QUOTATIONHEADERINX BAPISDHD1X u 120 X Checkbox for header data
SALESDOCUMENTIN BAPIVBELN-VBELN C 10 X Quotation Number
SENDER BAPI_SENDER u 10 X Logical system - Sender
TESTRUN BAPIFLAG-BAPIFLAG C 1 X Simulation mode

Paramètre Reférence Type Long. Description
SALESDOCUMENT BAPIVBELN-VBELN C 10 Number of Generated Document

Paramètre Reférence Long. Facultatif Description
EXTENSIONIN BAPIPAREX 990 X Customer Enhancment Import
QUOTATIONCFGSBLOB BAPICUBLB 256 X Configuration: BLOB internal data (SCE)
QUOTATIONCFGSINST BAPICUINS 233 X Configuration: Instances
QUOTATIONCFGSPARTOF BAPICUPRT 123 X Configuration: Part-of Specifications
QUOTATIONCFGSREF BAPICUCFG 397 X Configuration: Reference data
QUOTATIONCFGSREFINST BAPICUREF 20 X Configuration: Reference item / instance
QUOTATIONCFGSVALUE BAPICUVAL 276 X Configuration: Characteristic values
QUOTATIONCFGSVK BAPICUVK 55 X Configuration: Variant condition key
QUOTATIONCONDITIONSIN BAPICOND 336 X Conditions
QUOTATIONCOSTITEMS BAPIBOSCOST 444 X Communication Fields: Sales Document Item With BOS & Costing
QUOTATIONCOSTMODEL BAPIBOSCOSTMODEL 36 X Communication Fields: Sales Document Item With BOS & Costing
QUOTATIONITEMSIN BAPISDITMBOS 1267 X Item Data
QUOTATIONITEMSINX BAPISDITMXBOS 167 X Checkbox Item Data
QUOTATIONKEYS BAPISDKEY 189 X Output Table of Reference Keys
QUOTATIONMODELVALUE BAPIBOSCOSTMODEL_CHARA_VALUE 311 X BOS ECP : Structure for Characteristic Value Assignment
QUOTATIONPARTNERS BAPIPARNR 664 Partner Data
QUOTATIONSCHEDULESIN BAPISCHDL 198 X Schedule Lines
QUOTATIONSCHEDULESINX BAPISCHDLX 109 X Checkbox Structure: Schedule Lines
QUOTATIONSERVICES BAPISDESLLCBOS 554 X Services
QUOTATIONSERVICESCOND BAPIBOSCD 296 X Service Conditions
QUOTATIONSERVICESTEXT BAPIESLLTX 158 X Service Texts
QUOTATIONTEXT BAPISDTEXT 160 X Texts
RETURN BAPIRET2 548 X Return Messages

Exception Description
PROCESSING_ERROR Kalkulation konnte nicht erzeugt werden (vgl. Meldungen)

Functionality
You can use this method to create a customer quotation with BOS.

Notes
Minimum requirements for creating a customer quotation
The following parameters, at least, must be transferred:

  • Quotation header data via parameter QuotationHeaderIn

  • ,,DOC_TYPE,,sales document type
    ,,SALES_ORG,,sales organization
    ,,DISTR_CHAN,,distribution channel
    ,,DIVISION,,division
    The sales document type must be entered in correspondance with thelogon language.
    • Partner data via parameter QuotationPartners

    • ,,PARTN_ROL,,partner function AG (sold-to party),,
      ,,PART_NUMB,,customer number
      If you do not enter a ship-to party, then ship-to party = sold-toparty.
      The partner function must be consistent with the logon language.
      Minimum entry requirements for creating a document item
      • Document item data via parameter QuotationItemsIn

      • ,,ITM_NUMBER ,,item number
        ,,MATERIAL,,material number
        There are two options for number assignment:
        • If you choose external number assignemnt via parameter
        • IntNumberAssignment, you must enter the item number in fieldITM_NUMBER.
          • If you choose internal number assignment via parameter
          • IntNumberAssignment, the system assigns the item numbersaccording to your settings in Customizing. For internal numberassignment, field ITM_NUMBER must remain initial.
            Minimum entry requirements for creating a document item with BOS
            In addition to the document items, you must also transfer the followingparameters if you want to create a document item with BOS:
            • The package number for the BOS PCKG_NO must be transferred via
            • parameter QuotationItemsIn. This must correspond to the
              PCKG_NO of the initial node (uppermost outline level withhierarchy level 0) in transfer parameter QuotationServices.
              There must be exactly one schedule line for a document item with BOS.You must set a quantity of 1. You enter the dtaes via theschedule line data.
              You must enter the following data via parameterQuotationSchedulesIn:
              ,,ITM_NUMBER,,item number
              ,,SCHED_LINE,,schedule line number
              ,,REQ_DATE,,schedule line date
              ,,REQ_QTY ,,quotation quantity in sales unit of measure
              Creating Services
              You can transfer service data for the quotation item via parametersQuotationServices and QuotationServicesText andQuotationServicesCond.
              Customer fields - tables VBAK, VBAP, VBEP and ESLL can be transferred via parameter ExtensionIn.
              Transfer of Configuration Data
              If you are dealing with configurable data, you must transfer theconfiguation data in the following parameters:
              ,,QuotationCfgsRef,,,,configuration: reference data
              ,,QuotationCfgsInst,,,,configuration: instances
              ,,QuotationCfgsPartOf,,,,configuration: instances
              ,,QuotationCfgsValue,,,,configuration: characteristic values
              Commit Control
              This method does not include a database commit. This means that thecalling application must exit the commit so that changes can be made onthe database. The following method is available for this:BAPI_TRANSACTION_COMMIT.
              Return Values
              After you have created the customer quotation successfully, thedocument number is returned via parameter SalesDocument.
              If errors occur during processing, they are returned to table parameterReturn. Information messages are also logged in this parameter.

              Further information
              SAP note number 93091 contains general information for BAPIs inSales and Distribution (SD).

              Description
              This parameter returns the customer quotation number created by theBAPI.

              Description
              The program reaction when an error occurs is controlled by thisparameter.
              INCLUDE BOS_BAPI_BEHAVEWHENERROR OBJECT DOKU ID TX

              Description
              Describes the significance that a link between two objects (in theirroles) has.

              Description
              This parameter is for entering the costing variant.
              If you create a cost estimate in an operative BOS, the system requiresyou to assign a costing variant. It means that, via the costingvariant, different additions, deductions and assessments are availableon costing item level.

              Description
              Indicator for item number assignment
              There are two options for assigning item numbers:

              • If you do not set the indicator, you must assign the item numbers
              • manually via field ITM_NUMBER in table parameter
                QuotationItemsIn.
                • If you set the indicator, the system assigns the item numbers (internal
                • number assignment) according to your Customizing settings. For internalnumber assignment, field ITM_NUMBER in table parameterQuotationItemsIn must remain initial.
                  &EXAMPLE&
                  In some cases, internal number assignment is required, for example, forarticles for which a BOM is exploded in the quotation.
                  A quotation with two items and a schedule line for each is to becreated. For this, you enter item numbers 10 and 20 in
                  QuotationItemsIn and QuotationSchedulesIn. If the article foritem 10 now receives a sales BOM, it can be exploded and a sub-item 20is created. The reference schedule line (VBEP) - item (VBAP
                  ) no longer exists. Internal number assignment is required here.

                  Value range
                  Space,,external item number assignment
                  X,,internal item number assignment

                  Default
                  Space
                  INCLUDE BOS_BAPI_LOGICSWITCH OBJECT DOKU ID TX

                  Description
                  This parameter contains the document header data.
                  INCLUDE BOS_BAPI_ANKREUZLEISTE OBJECT DOKU ID TX

                  Value range
                  Field UPDATEFLAG contains the value SPACE or I.
                  The checkboxes are not to be filled.

                  Default
                  For field UPDATEFLAG:
                  SPACE,,create a new quotation

                  Description
                  This parameter is for entering the SD document number.

                  Value range
                  You have two options for assigning the SD number:

                  • You can assign the SD number manually by entering it in the appropriate
                  • field.
                    • The system assigns the SD number (internla number assignment). In this
                    • case, the parameter must remain initial. The assignment takes placeaccording to your settings in Customizing.

                      Description
                      This parameter is for entering the sending system.
                      This entry is required if object references are to be written.

                      Description
                      This parameter serves as a test indicator.
                      If the indicator is set, the document is not saved.

                      Value range
                      Space,,document is saved
                      X,,document is not saved

                      Default
                      Space
                      INCLUDE BOS_BAPI_EXTENSIONIN OBJECT DOKU ID TX
                      INCLUDE BOS_BAPI_KONFIGURATION OBJECT DOKU ID TX
                      INCLUDE BOS_BAPI_KONFIGURATION OBJECT DOKU ID TX
                      INCLUDE BOS_BAPI_KONFIGURATION OBJECT DOKU ID TX
                      INCLUDE BOS_BAPI_KONFIGURATION OBJECT DOKU ID TX
                      INCLUDE BOS_BAPI_KONFIGURATION OBJECT DOKU ID TX
                      INCLUDE BOS_BAPI_KONFIGURATION OBJECT DOKU ID TX
                      INCLUDE BOS_BAPI_KONFIGURATION OBJECT DOKU ID TX

                      Description
                      Tis parameter contains the condition data for the document item.
                      INCLUDE BOS_BAPI_KONDITION OBJECT DOKU ID TX

                      Description
                      This parameter contains the cost items for service lines.
                      A service line or an outline level is identified by the package numberPCKG_NO and the internal line number LINE_NO .
                      A costing item is identified via the following fields (key):

                      • ITM_NUMBER ,,,,Quotation Item

                      • PCKG_NO,,,,Package number

                      • LINE_NO,,,,,,Internal Line number

                      • ITEM_NUMBER,,,,Cost item number

                      • You must transfer the following identification fields for a costingitem that you wish to create:
                        • Item category in field ITEM_CATEGORY

                        • Cost element in field COST_ELEM

                        • Quantity in field QUANTITY/PRICE_QUNATITY

                        • If you are dealing with an amount you need to specify:
                          • Currency in field,,CURRENCY

                          • Price in field ,,,,PRICE_TOTAL/ PRICE_FIXED

                          • Unit of measure ,,BASE_UOM/PRICE_QUANTITY_UNIT

                          • Note
                            For each costing item there must be a corresponding data record (thesame PCKG_NO and LINE_NO ) in transfer parameterQuotationServices.,,
                            It is not possible to attach costing item with outline and main item.
                            LogicSwitch must have a value in it if, you want to be transfercost back to service line level

                            Description
                            This parameter contains the costing model for service lines.
                            A service line or an outline level is identified by the package numberPCKG_NO and the internal line number LINE_NO.
                            A costing model is identified via the following fields (key):

                            • ITM_NUMBER ,,Quotation Item

                            • PCKG_NO,,,,Package number

                            • LINE_NO,,,,Internal Line number

                            • Additionally, you must transfer identification field COSTMODELfor the cost model that you wish to create.
                              Note
                              For each costing model there must be a corresponding data record, thesame PCKG_NO and LINE_NO in transfer parameterQuotationServices.
                              It is not possible to attach costing item with outline and main item.
                              LogicSwitch must have a value in it if you want to be transfercost back to service line level.

                              Description
                              THis parameter contains the item data for a quotation.
                              You must fill at least the following fields if you want to be able tovcreate a BOS:

                              • If you choose external number assignment via parameter
                              • IntNumberAssignment, you must enter the item number in fieldITM_NUMBER.
                                • If you choose internal number assignemnt via parameter
                                • IntNumberAssignment, the system assigns the item numbersaccording to your settings in Customizing. Field ITM_NUMBER mustremain initial.
                                  • A material with the appropriate settings in field MATERIAL has
                                  • to be transferred if you want to be able to create a BOS.
                                    • The PCKG_NO of the document item must correspond to the
                                    • PCKG_NO of the initial node (uppermost outline level withhierarchy level 0) in transfer parameter QuotationServices.
                                      You can find further information on the meaning of the individualparameter fields in the appropriate data element documentation in theABAP dictionary.
                                      INCLUDE BOS_BAPI_ANKREUZLEISTE OBJECT DOKU ID TX

                                      Value range
                                      Field UPDATEFLAG contains the value SPACE (forcreation).
                                      The checkboxes are not to be filled.

                                      Default
                                      Field UPDATEFLAG:,,SPACE,,
                                      Checkboxes:,,SPACE

                                      Description
                                      This parameter contains the cost model characteristic for cost model.
                                      A service line or an outline level is identified by the package numberPCKG_NO and the internal line number LINE_NO.
                                      A cost model characteristic is identified via the following fields(key):

                                      • ITM_NUMBER ,,Quotation Item

                                      • PCKG_NO,,,,Package number

                                      • LINE_NO,,,,Internal Line number

                                      • You must transfer the following identification fields for a cost modelcharacteristic for cost model
                                        • Characteristic field CHARACTERISTIC

                                        • Characteristic value CHARA_VAL

                                        • Note
                                          For each cost model characteristic there must be a corresponding datarecord ( same PCKG_NO and LINE_NO) in transfer parameterQuotationServices and QuotationCostModel.
                                          INCLUDE BOS_BAPI_PARTNERDATEN OBJECT DOKU ID TX
                                          INCLUDE BOS_BAPI_EINTEILUNGSZEILEN OBJECT DOKU ID TX
                                          There must be exactly one schedule line with quantity 1 for a documentitem with a BOS.
                                          For this, you have to enter the following data (at least):
                                          ITM_NUMBER,,item number
                                          SCHED_LINE,,schedule line number
                                          REQ_DATE,,schedule line date
                                          REQ_QTY ,,quantity in sales unit of measure
                                          INCLUDE BOS_BAPI_ANKREUZLEISTE OBJECT DOKU ID TX

                                          Value range
                                          Field UPDATEFLAG contains the value SPACE (forcreation).
                                          The checkboxes are not to be filled.

                                          Default
                                          Field UPDATEFLAG:,,SPACE
                                          Checkboxes: ,,SPACE

                                          Description
                                          This transfer parameter contains the service lines and outline levelsof the BOS for the quotation that is to be created.
                                          INCLUDE BOS_BAPI_SERVICE_IDENTIFY OBJECT DOKU ID TX
                                          INCLUDE BOS_BAPI_CREATESERVICELINE OBJECT DOKU ID TX
                                          INCLUDE BOS_BAPI_CREATEOUTLINE OBJECT DOKU ID TX

                                          • You can asign the PCKG_NO freely. The system converts the number
                                          • you enter to an internal value.
                                            The top node of a BOS (top outline level with hierarchy level 0)must also exist in the transfer parameter. For this, create an outlinelevel and check the PCKG_NO and LINE_NO. The PCKG_NO
                                            must correspond to field PACKNO if the appropriate documentitem in transfer structure QuotationItem.

                                            Description
                                            This parameter contains the service conditions for service lines. Youcannot create or change header conditions.
                                            A service line or an outline level is identified by the package numberPCKG_NO and the internal line number LINE_NO.
                                            A service condition record is identified via the following fields(key):
                                            ITM_NUMBER,,quotation item
                                            PCKG_NO,,package number
                                            LINE_NO,,internal line number
                                            COND_ST_NO,,condition level
                                            COND_COUNT,,counter within the condition level
                                            You must transfer further identification fields for a condition recordthat you want to create:

                                            • Condition type in field COND_TYPE

                                            • Condition amount in field COND_VALUE

                                            • If you are dealing with an amount:

                                            • Currency in field CURRENCY (according to the Customizingsettings)
                                              Condition price unit in field COND_P_UNT
                                              Condition unit of measure in field COND_UNIT
                                              Note:
                                              • You must transfer the basic price for a newly created service line
                                              • (condition type of condition category H in Customizing for Bill ofServices under Pricing for BOS). An exception is the transfer of aservice line from the service master record. In this case, theconditions can be read from the service master conditions.
                                                • For each condition record there must be a corresponding data record
                                                • (the same PCKG_NO and LINE_NO) in transfer parameterQuotationServices.
                                                  • When transferring condition record for the BOS, field PRICING
                                                  • in parameter LogicSwitch must have a value in it if you want tobe able to perform pricing anew on service line level.
                                                    • &RANGE&

                                                    • INCLUDE BOS_BAPI_LEISTUNGSKONDITION OBJECT DOKU ID TX
                                                      INCLUDE BOS_BAPI_SERVICESTEXTS OBJECT DOKU ID TX

                                                      Value range
                                                      The following entries are possible for field TEXT_ID:
                                                      LTXT,,line long text / outline long text
                                                      LLTX,,serviec long text
                                                      If FORMAT_COL is empty, the standard format key * is assigned.
                                                      INCLUDE BOS_BAPI_TEXTE OBJECT DOKU ID TX

                                                      Description
                                                      If errors occur during processing, they are returned in the tableparameter Return. Information messages are also logged in thistable parameter.

                                                      Value range
                                                      If no error occurs, the return parameter is initial. Otherwise theappropriate error messages with short text are displayed.

1472384BOS SD BAPIs/function modules and CAM addresses (1)