Fonction SAP BS01_QUOTATION_CREATE - Quoation: Create with BOS

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
BEHAVE_WHEN_ERROR BAPIFLAG-BAPIFLAG C 1 SPACE X Error Handling
BINARY_RELATIONSHIPTYPE BRELTYP-RELTYPE C 4 SPACE X Binary Relationship Type (Private)
INT_NUMBER_ASSIGNMENT BAPIFLAG-BAPIFLAG C 1 SPACE X Internal item number assignment
LOGIC_SWITCH BAPISDLS u 5 SPACE X Internal control parameter
QUOTATION_HEADER_IN BAPISDHD1 u 918 Document Header Data
QUOTATION_HEADER_INX BAPISDHD1X u 120 X Checkbox for header data
SALESDOCUMENT BAPIVBELN-VBELN C 10 X Quotation Number
SENDER BAPI_SENDER u 10 X Logical system - Sender
TESTRUN BAPIFLAG-BAPIFLAG C 1 X Test run

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

Paramètre Reférence Long. Facultatif Description
EXTENSIONIN BAPIPAREX 990 X Customer Enhancment Import
QUOTATION_CFGS_BLOB BAPICUBLB 256 X Configuration: BLOB internal data (SCE)
QUOTATION_CFGS_INST BAPICUINS 233 X Configuration: Instances
QUOTATION_CFGS_PART_OF BAPICUPRT 123 X Configuration: Part-of specifications
QUOTATION_CFGS_REF BAPICUCFG 397 X Configuration: Reference data
QUOTATION_CFGS_REFINST BAPICUREF 20 X Configuration: Reference item / instance
QUOTATION_CFGS_VALUE BAPICUVAL 276 X Configuration: Characteristic values
QUOTATION_CFGS_VK BAPICUVK 55 X Configuration: Variant condition key
QUOTATION_CONDITIONS_IN BAPICOND 336 X Conditions
QUOTATION_ITEMS_IN BAPISDITMBOS 1267 X Item Data
QUOTATION_ITEMS_INX BAPISDITMXBOS 167 X Checkbox Item Data
QUOTATION_KEYS BAPISDKEY 189 X Output Table of Reference Keys
QUOTATION_PARTNERS BAPIPARNR 664 X Document partner
QUOTATION_SCHEDULES_IN BAPISCHDL 198 X Schedule line data
QUOTATION_SCHEDULES_INX BAPISCHDLX 109 X Checkbox Schedule Line Data
QUOTATION_SERVICES BAPISDESLLCBOS 554 X Services
QUOTATION_SERVICES_COND BAPIBOSCD 296 X Service Line Conditions
QUOTATION_SERVICES_TEXT BAPIESLLTX 158 X Service Line Text
QUOTATION_TEXT BAPISDTEXT 160 X Texts
RETURN BAPIRET2 548 Return Messages

Functionality
You can use this function module to create customer quotations thatcontain a BOS.
You must enter at least the following as input parameters:

  • Quotation header data (via structure QUOTATION_HEADER_IN) and

  • Partner data (via table QUOTATION_PARTNERS)

  • You enter the item data via table QUOTATION_ITEMS_IN.
    There are two options for assigning item numbers:
    • Manually - you fill the appropriate fields.

    • Automatically - the appropriate fields remain initial (blank). Item
    • number assignment then takes place according to the settings inCustomizing.
      If you are dealing with configurable materials, you must enter theconfiguration data in the following tables:
      • QUOTATION_CFGS_REF

      • QUOTATION_CFGS_INST

      • QUOTATION_CFGS_PART_OF

      • QUOTATION_CFGS_VALUE

      • You can transfer credit card data using structure BAPICCARD, on the onehand credit card identification data and on the other hand data on anauthorization that has taken place in anexternal system.
        You can enter BOS data for the order item via the following tables:
        • QUOTATION_SERVICES

        • QUOTATION_SERVICES_TEXT (service line texts)

        • QUOTATION_SERVICES_COND (service line conditions)

        • You can transfer customer fields in tables VBAK, VBAP, VBEP and ESLLusing structure EXTENSIONIN.
          After the customer order has been created successfully. you receive itsdocument number (parameter SALESDOCUMENT). Any errors that occur arereturned via parameter RETURN.

          Notes
          Required entries:
          QUOTATION_HEADER_IN :DOC_TYPE Sales document type
          SALES_ORG Sales organization
          DISTR_CHAN Distribution channel
          DIVISION Division
          QUOTATION_PARTNERS :PARTN_ROLE Partner role, sold-to party
          PARTN_NUMB Customer number
          QUOTATION_ITEMS_IN :MATERIAL Material number
          TARGET_QTY Target quantity in sales unit of
          measure
          QUOTATION_SCHEDULES : REQ_QTY Order quantity in sales unit of
          measure
          You only have to maintain one quantity:
          target quantity or order quantity in sales unit of measure.
          Ship-to party:
          If you do not enter a ship-to party, the following applies:
          ship-to party = sold-to party
          Key words in German:
          The following key words have to be entered in German irrespective of
          the logon language:
          DOC_TYPE
          Sales document type, for example AGLV for "Angebot mit
          Leistungsverzeichnis" = quotation with BOS
          PARTN_ROLE
          Partner role, for example, WE for "Warenempfänger" = ship-to party

          Further information
          You can find further information in OSS. Note 93091 contains generalinformation on the BAPIs in SD.

          Description
          This parameter contains the number of the generated sales document.
          This parameter activates the internal provision of the item number.
          Sometimes the SAP System has to perform internal provision of the itemnumber (such as for articles where a BOM is exploded in an order).
          Example
          You want to create an order with two items, each with a schedule line.Therefore, you enter item numbers 10 and 20 in QUOTATION_ITEM_IN andQUOTATION_SCHEDULES_IN.
          If the article in item 10 contains a sales BOM, you can explode thisBOM and the system creates a sub-item with item number 20. This meansthat the reference from the item to the schedule line is lost.Therefore, the system has to provide the item number internally.

          Default
          Space means the system attempts to create the order with external itemnumbers.

          Description
          You can control the internal program behaviour with this parameter. Itis for excluding specific processes where data is transferredexternally.
          Examples: - Pricing has been performed by the SPE (Sales Pricing
          Engine). The results are be transferred to the sales
          document. No pricing os to take place in the SAP System.
          - The same applies to the SCE (Sales Configuration Engine).

          Default
          PRICING = G The results of external pricing are transferred item by
          item. In the SAP System, pricing is performed with
          price determination type G for each item.

          Description
          This parameter contains SD document header data.
          You can find information on the meaning of the individual parameters inthe appropriate data element documentation in the ABAP dictionary.

          Description
          This parameter is used for the following:

          • Control of the processing functions by the value in field UPDATEFLAG
          • (change indicator)
            ' ': Create a new SD document
            I : Create a new SD document
            U : Change an existing SD document
            D : Delete an existing SD document
            • Control of field entry by checkbox structures

            • If field UPDATEFLAG is set, only the fields of parameterQUOTATION_HEADER_IN with an "X" in the checkbox strcutre aretransferred.

              Description
              This parameter is for entering a document number (external documentnumber assignment).

              Default
              Space = interne Belegnummernvergabe

              Description
              This parameter is a test switch.
              If you set the switch, the document is not saved.

              Value range
              Space = Save document
              X = Do not save document

              Default
              Space

              Description
              If you have defined customer fields in tables VBAK, VBAP, VBEP andESLL, you can transfer the data in these fields using this parameter.

              Further information
              You can find further information in note 143580.

              Description
              Only relevant for configurable material.
              For more information, see the SAP Library under Logistics - General(LO) -> Variant Configuration (LO-VC) -> EDI for KMATs (Information onCreating Your Own).

              Description
              Only relevant for configurable material.
              For more information, see the SAP Library under Logistics - General(LO) -> Variant Configuration (LO-VC) -> EDI for KMATs (Information onCreating Your Own).

              Description
              Only relevant for configurable material.
              For more information, see the SAP Library under Logistics - General(LO) -> Variant Configuration (LO-VC) -> EDI for KMATs (Information onCreating Your Own).

              Description
              Only relevant for configurable material.
              For more information, see the SAP Library under Logistics - General(LO) -> Variant Configuration (LO-VC) -> EDI for KMATs (Information onCreating Your Own).

              Description
              Only relevant for configurable material.
              For more information, see the SAP Library under Logistics - General(LO) -> Variant Configuration (LO-VC) -> EDI for KMATs (Information onCreating Your Own).

              Description
              This parameter contains the condition data for the document item.

              Value range
              You must distinguish between the following cases when fields COND_VALUEand CURRENCY are filled:

              • The calculation type of the condition is expressed as a percentage.

              • In this case, the CURRENCY field should be left empty and you mustenter the percentage value to the correct number of decimal places.
                Example: percentage of 20% should be entered as 20,0000 in fieldCOND_VALUE.
                • The calculation type of the condition is not expressed as a percentage.

                • In this case, field COND_VALUE is a currency field. If the conversiomis to take place correctly, field CURRENCY or CURRENCY_ISO must also befilled. The amount must be entered to the correct number of decimalplaces.
                  If neither field CURRENCY nor field CURRENCY-ISO is filled, the systempresumes entry as a percentage. If, however, the calculation type isnot a percentage, the amount entered is incorrect.

                  Description
                  This parameter contains the item entry data for the sales document.
                  Information on the individual parameter fields is contained in therelevant data element documentation in the ABAP Dictionary.

                  Description
                  You use this parameter for the following two activities:

                  • Control of the processsing functionality using the value in field
                  • UPDATEFLAG (change indicator).
                    • Control of field entry by checkbox structures.

                    • If you set field UPDATEFLAG, the system only copies those fields from
                      the data parameter that have 'X' in the check box fields.

                      Value range
                      The following entries are possible for field UPDATEFLAG (changeindicator):
                      Space: Create new sales document item
                      I : Create new sales document item
                      U : Change existing sales document item
                      D : Delete existing sales document item

                      Description
                      You enter partners, such as sold-to party and ship-to party, using thistable parameter. You can do this on header and item level.
                      You must at least enter a sold-to party on header level. The systemdetemrines the other partner functions automatically.
                      You can also enter different addresses in the structure. If you dothis, you must also enter the language.

                      Description
                      This parameter contains the scheduling data.
                      Information on the individual parameter fields is contained in therelevant data element documentation in the ABAP Dictionary.

                      Description
                      You use this parameter for the following two activities:

                      • Control of the processsing functionality using the value in field
                      • UPDATEFLAG (change pointer).
                        ' ': Create new schedule lines
                        I : Create new schedule lines
                        U : Change existing schedule lines
                        D : Delete existing schedule lines
                        • Control of field entry by check box fields

                        • If you set field UPDATEFLAG, the system only copies those fields fromthe data parameter that have 'X' in the check box fields.

                          Description
                          This table contains services and outline layouts for the order.
                          You can define a line as an outline line using field OUTL_IND.
                          You can assign a service line to an outline line using fields PCKG_NO(service line) and SUBPCKG_NO (outline line).
                          The hierarchy for the outline is represented by fields LINE_NO andHI_LINE_NO. Field HI_LINE_NO links to field LINE_NO of the superioroutline.
                          You can change the subcontractor group via field BOSGRP.
                          You can assign a line type to the service line, for example, line typealternative line, informatory line, blanket line or basic line.
                          The assignment takes place via the following fields:

                          • Basic line

                          • 'X' in field BASIC_LINE
                            • Alternative line

                            • 'X' in field ALTERNAT
                              Link to the appropriate basic line in field BASLINE_NO
                              A reference to a basic line must exist for alternative lines.
                              • Blanket line

                              • 'X' in field INFORM
                                '1' in field QUANTITY
                                The quantity is always 1 for blanket lines.
                                • Supplementary line

                                • 'X' in field SUPP_LINE
                                  • Bidder line

                                  • 'X' in field BIDDER
                                    • Contingency line

                                    • 'X' in field EVENTUAL
                                      • Informatory line

                                      • 'X' in field INFORM
                                        • Internal line

                                        • 'X' im Feld BOSINTER
                                          You can find information on the meaning of the individual parameterfields in the appropriate data element documentation in the ABAPdictionary.

                                          Description
                                          This parameter contains condition data for the service lines.

                                          Value range
                                          You must distinguish between the following cases when fields COND_VALUEand CURRENCY are filled:

                                          • The calculation type of the condition is expressed as a percentage.

                                          • In this case, the CURRENCY field should be left empty and you mustenter the percentage value to the correct number of decimal places.
                                            Example: percentage of 20% should be entered as 20,0000 in fieldCOND_VALUE.
                                            • The calculation type of the condition is not expressed as a percentage.

                                            • In this case, field COND_VALUE is a currency field. If the conversiomis to take place correctly, field CURRENCY or CURRENCY_ISO must also befilled. The amount must be entered to the correct number of decimalplaces.
                                              If neither field CURRENCY nor field CURRENCY-ISO is filled, the systempresumes entry as a percentage. If, however, the calculation type isnot a percentage, the amount entered is incorrect.

                                              Description
                                              You can transfer the long text for the service line in this table:

                                              • text type LTXT for long text in field TEXT_ID

                                              • the actual text line in field TEXT_LINE

                                              • Very long texts have to be read line by line since a maximum of 132characters is allowed per line.
                                                If FORMAT_COL is empty, the standard format key * is assigned.
                                                The poackage number (PCKG_NO) creates the link to the the service linefor which the text is to be entered.

                                                Description
                                                You can transfer the texts for the document item in this table:

                                                • the allowed text types in field TEXT ID

                                                • the actual text lines in field TEXT_LINE
                                                • Description
                                                  The messages that are displayed when the sales document is created arecollected in this table.

                                                  Sructure:
                                                  TYPE Message type: S Success, E Error, W Warning, I Information
                                                  ID Message ID
                                                  NUMBER Message number
                                                  MESSAGE Message text
                                                  LOG_NO Application log: log number
                                                  LOG_MSG_NO Application log: sequence number of message
                                                  MESSAGE_V1 Message varaible
                                                  MESSAGE_V2 Message variable
                                                  MESSAGE_V3 Message variable
                                                  MESSAGE_V4 Message variable
                                                  PARAMETER Parameter name
                                                  ROW Line in parameter
                                                  FIELD Field in parameter
                                                  SYSTEM System (logical system) from which the message originates