Fonction SAP BS01_INQUIRY_CREATE - Customer Inquiry: Create with BOS

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
BEHAVE_WHEN_ERROR BAPIFLAG-BAPIFLAG C 1 X Error Handling
BINARY_RELATIONSHIPTYPE BRELTYP-RELTYPE C 4 X Binary Relationship type (private)
INQUIRY_HEADER_IN BAPISDHD1 u 918 Document Header Data
INQUIRY_HEADER_INX BAPISDHD1X u 120 X Checkbox for header data
INT_NUMBER_ASSIGNMENT BAPIFLAG-BAPIFLAG C 1 X Internal Item Number Assignment
LOGIC_SWITCH BAPISDLS u 5 X Internal Control Parameter
SALESDOCUMENT BAPIVBELN-VBELN C 10 X Inquiry 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 Sales and Distribution Document Number

Paramètre Reférence Long. Facultatif Description
EXTENSIONIN BAPIPAREX 990 X Customer Enhancment Import
INQUIRY_CFGS_BLOB BAPICUBLB 256 X Configuration: BLOB internal data (SCE)
INQUIRY_CFGS_INST BAPICUINS 233 X Configuration: Instances
INQUIRY_CFGS_PART_OF BAPICUPRT 123 X Configuration: Part-of Specifications
INQUIRY_CFGS_REF BAPICUCFG 397 X Configuration: Reference data
INQUIRY_CFGS_REFINST BAPICUREF 20 X Configuration: Reference Item / Instance
INQUIRY_CFGS_VALUE BAPICUVAL 276 X Configuration: Characteristic values
INQUIRY_CFGS_VK BAPICUVK 55 X Configuration: Variant Condition Key
INQUIRY_CONDITIONS_IN BAPICOND 336 X Conditions
INQUIRY_ITEMS_IN BAPISDITMBOS 1267 X Item Data
INQUIRY_ITEMS_INX BAPISDITMXBOS 167 X Checkbox Item Data
INQUIRY_KEYS BAPISDKEY 189 X Output Table of Reference Keys
INQUIRY_PARTNERS BAPIPARNR 664 X Document partner
INQUIRY_SCHEDULES_IN BAPISCHDL 198 X Schedule line data
INQUIRY_SCHEDULES_INX BAPISCHDLX 109 X Checkbox Schedule Line Data
INQUIRY_SERVICES BAPISDESLLCBOS 554 X Services
INQUIRY_SERVICES_TEXT BAPIESLLTX 158 X Service Line Texts
INQUIRY_TEXT BAPISDTEXT 160 X Texts
RETURN BAPIRET2 548 X Return Messages

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

  • Inquiry header data (via structure INQUIRY_HEADER_IN) and

  • Partner data (via table INQUIRY_PARTNERS)

  • You enter the item data via table INQUIRY_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:
      • INQUIRY_CFGS_REF

      • INQUIRY_CFGS_INST

      • INQUIRY_CFGS_PART_OF

      • INQUIRY_CFGS_VALUE

      • You can transfer service data for the order item in tablesINQUIRY_SERVICES and INQUIRY_SERVICES_TEXT.
        Customer fields in tables VBAK, VBAP, VBEP and ESLL can be transferredusing the 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:
        INQUIRY_HEADER_IN : DOC_TYPE Sales document type
        SALES_ORG Sales organization
        DISTR_CHAN Distribution channel
        DIVISION Division
        INQUIRY_PARTNERS : PARTN_ROLE Partner role, sold-to party
        PARTN_NUMB Customer number
        INQUIRY_ITEMS_IN : MATERIAL Material number
        TARGET_QTY Target quantity in sales unit of
        measure
        INQUIRY_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 AFLV for "Anfrage mit
        Leistungsverzeichnis" = inquiry 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 sales document that iscreated.

        Description
        This parameter contains data for the sales document.
        You can find information on the individual parameters in theappropriate 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 the data parameter withan "X" in the checkbox strcutre are transferred.

            Description
            This parameter activates internal item number assignment. In some casesit is necessary that the SAP System assigns the item numbers, forexample, for articles for which a BOM in the order is exploded
            Example:
            An order with 2 items and a shcedule line each is to be created. Enterthe item numebrs 10 and 20 in INQUIRY_ITEM_IN and INQUIRY_SCHEDULES_IN,If the article for item 10 now receives a sales BOM, this BOM can beexploded and a subitem with item number 20 is created. The referenceschedule line - item no longer exists.
            Here it is necessary for item number assignment on the SAP side to takeplace internally.

            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 is for the purposes of entering a document number
            (external document number assignment).

            Default
            Space = internal number assignment

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

            Value range
            Space = Document is saved
            X = Document not saved

            Default
            Space

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

            Further information
            You can find further information in note 143580.

            Description
            Only relevant to configurable materials.
            You can find further information in the SAP Library under LO Logistics
            General -> LO Variant Configuration -> EDI for Configurable Materials.

            Description
            Only relevant to configurable materials.
            You can find further information in the SAP Library under LO Logistics
            General -> LO Variant Configuration -> EDI for Configurable Materials.

            Description
            Only relevant to configurable materials.
            You can find further information in the SAP Library under LO Logistics
            General -> LO Variant Configuration -> EDI for Configurable Materials.

            Description
            Only relevant to configurable materials.
            You can find further information in the SAP Library under LO Logistics
            General -> LO Variant Configuration -> EDI for Configurable Materials.

            Description
            Only relevant to configurable materials.
            You can find further information in the SAP Library under LO Logistics
            General -> LO Variant Configuration -> EDI for Configurable Materials.

            Description
            This parameter contains the condition data.

            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 input data for the sales document.
                You can find information on the individual parameter fields in theappropriate 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 item
                  I : Create a new SD document item
                  U : Change an existing SD document item
                  D : Delete an existing SD document item
                  • Control of field entry by checkbox structures

                  • If field UPDATEFLAG is set, only the fields of the data parameter withan "X" in the checkbox strcutre are transferred.

                    Description
                    You can enter partner data such as sold-to party and ship.to partyusing this parameter. You can do this on both header and item level.
                    The minimum requirement is the entry of a sold-to party on headerlevel. The further partner roles are then determined automatically.
                    Alternative addresses can also be entered in the structure. In thiscase, the language must also be entered.

                    Description
                    This parameter contains schedule line data.
                    You can find information on the individual parameter fields in theappropriate 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 new schedule lines
                      I : Create new schedule lines
                      U : Change existing schedule lines
                      D : Delete existing schedule lines
                      • Control of field entry by checkbox structures

                      • If field UPDATEFLAG is set, only the fields of the data parameter withan "X" in the checkbox strcutre are transferred.

                        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 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
                                      You can find information on the meaning of the individual parameterfields in the appropriate data element documentation in the ABAPdictionary.

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

                                      • text type LTXT for the long text in field TEXT_ID

                                      • the actual text lines in field TEXT_LINE

                                      • Very long texts have to be read line by line since a maximum of 132characters is allowed per line.
                                        If field FORMAT_COL remains empty, the standard format key * isassigned.
                                        The package number (PCKG_NO) forms the link to the service line forwhich the text is to be entered.

                                        Description
                                        You can transfer texts for the document items 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