SAP Function BS01_CDMEMOREQUEST_CREATE - Customer QTO: Creation of a Customer QTO

Parameter Reference Type Length Default Optional Text
BEHAVE_WHEN_ERROR BAPIFLAG-BAPIFLAG C 1 X Error Handling
BINARY_RELATIONSHIPTYPE BRELTYP-RELTYPE C 4 X Binary Relationship Type (Private)
CDMEMOREQUEST_HEADER_IN BAPISDHD1 u 918 Document Header Data
CDMEMOREQUEST_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 Sales Document Number
SENDER BAPI_SENDER u 10 X Logical system - Sender
TESTRUN BAPIFLAG-BAPIFLAG C 1 X Test run

Parameter Reference Type Length Text
SALESDOCUMENT_EX BAPIVBELN-VBELN C 10 Number of Generated Document

Parameter Reference Length Optional Text
CDMEMOREQUEST_CCARD BAPICCARD 268 X Credit Card Data
CDMEMOREQUEST_CFGS_BLOB BAPICUBLB 256 X Configuration: BLOB internal data (SCE)
CDMEMOREQUEST_CFGS_INST BAPICUINS 233 X Configuration: Instances
CDMEMOREQUEST_CFGS_PART_OF BAPICUPRT 123 X Configuration: Part-of specifications
CDMEMOREQUEST_CFGS_REF BAPICUCFG 397 X Configuration: Reference data
CDMEMOREQUEST_CFGS_REFINST BAPICUREF 20 X Configuration: Reference item / instance
CDMEMOREQUEST_CFGS_VALUE BAPICUVAL 276 X Configuration: Characteristic values
CDMEMOREQUEST_CFGS_VK BAPICUVK 55 X Configuration: Variant condition key
CDMEMOREQUEST_CONDITIONS_IN BAPICOND 336 X Conditions
CDMEMOREQUEST_ITEMS_IN BAPISDITMBOS 1267 X Item Data
CDMEMOREQUEST_ITEMS_INX BAPISDITMXBOS 167 X Checkbox Item Data
CDMEMOREQUEST_KEYS BAPISDKEY 189 X Output Table of Reference Keys
CDMEMOREQUEST_PARTNERS BAPIPARNR 664 X Document partner
CDMEMOREQUEST_SCHEDULES_IN BAPISCHDL 198 X Schedule line data
CDMEMOREQUEST_SCHEDULES_INX BAPISCHDLX 109 X Checkbox Schedule Line Data
CDMEMOREQUEST_SERVICES BAPISDESLLCBOS 554 X Services
CDMEMOREQUEST_SERVICES_TEXT BAPIESLLTX 158 X Service Line Text
CDMEMOREQUEST_TEXT BAPISDTEXT 160 X Texts
EXTENSIONIN BAPIPAREX 990 X Customer Enhancment Import
RETURN BAPIRET2 548 Return Messages

Functionality
You can create debit memeo requests/service entry sheets with thisfunction module.
As import parameters you must transfer at least the following:

  • Order header data (via structre CDMEMOREQUEST_HEADER_IN) and

  • Partner data (über die Tabelle CDMEMOREQUEST_PARTNERS)

  • You can transfer item data using table CDMEMOREQUEST_ITEMS_IN.
    There are two options for assigning item numbers:
    • Manually (you fill the appropriate fields)

    • Automatically (the appropriate fields remain blank). Item number
    • assignemnt takes place according to settings in Customizing.
      If you are dealing with configurable materials, you must transfer theconfiguration data in the following fields:
      • CDMEMOREQUEST_CFGS_REF

      • CDMEMOREQUEST_CFGS_INST

      • CDMEMOREQUEST_CFGS_PART_OF

      • CDMEMOREQUEST_CFGS_VALUE

      • You can transfer credit card data using structure BAPICCARD - on theone hand card identification and on the other hand data on anauthorization which took place in an external system.
        You transfer servce data for the document item using the followingtables:
        • CDMEMOREQUEST_SERVICES

        • CDMEMOREQUEST_SERVICES_TEXT (text for the service line)

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

          Notes
          Required entries:
          CDMEMOREQUEST_HEADER_IN : DOC_TYPE SD document type
          SALES_ORG Sales organization
          DISTR_CHAN Distribution channel
          DIVISION Division
          CDMEMOREQUEST_PARTNERS..: PARTN_ROLE Partner role, sold-to party
          PARTN_NUMB Customer number
          CDMEMOREQUEST_ITEMS_IN..: MATERIAL Material number
          TARGET_QTY Target quantity in
          sales unit of measure
          CDMEMOREQUEST_SCHEDULES.: REQ_QTY Order quantity in
          sales unit of measure
          You only have to maintain one quantity:
          Target quantity or order quantity in slaes unit of measure.
          Ship-to party:
          If no ship-to party is entered, then the following applies:
          ship-to party = sold-to party
          Key words in German:
          The following words must be entered in German, irrespective of the
          logon language:
          DOC_TYPE
          Sales document type, for example LALV for"Aufmaß/Lastschriftanforderung" = service entry sheet/debit memorequest
          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 BAPIs in SD.

          Description
          This parameter contains the number of the SD document created.

          Description
          This parameter contains data for the sales document header.
          You can find information on the individual parameters in theappropriate data element documentation in the ABAP dictionary.

          Description
          DThis parameter has two purposes:

          • It controls the processing functionality by the value in field
          • UPDATEFLAG (change indicator).
            The following entries are possible:
            ' ': Create a new SD document
            I : Create a new SD document
            U : Change an existing SD documewnt
            D : Delete an existing SD document
            • It controls the entries in the fields by the use of checkboxes

            • If field UPDATEFLAG has been set, only the fields of parameterORDER_HEADER_IN which have the value "X" in the checkbox aretransferred.

              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 CDMEMOREQUEST_ITEM_IN andCDMEMOREQUEST_SCHEDULES_IN, If the article for item 10 now receives asales BOM, this BOM can be exploded and a subitem with item number 20 iscreated. The reference schedule line - item no longer exists.
              Here it is necessary for item number assignment on the SAP side to takeplace internally.

              Default
              Space, in other words, an attempt is made to create the order withexternal number assignment.

              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 entering a document number (external documentnumber assignment).

              Default
              Space = internal document number assignment

              Description
              This parameter is a test indicator. If the indicator is set, thedocument is not saved.

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

              Default
              Space

              Description
              The table contains credit card data, identificationn data andauthorization.
              You must enter the currency if you want the amounts in the amountfields to be converted correctly.

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

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

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

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

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

              Description
              This parameter contains the condition data.

              Value range
              You should distinguish betweeen the following cases when fieldsCOND_VALUE and CURRENCY are filled:

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

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

                • In this case, field COND_VALUE is a currency quantity field. FieldsCURRENCY and CURRENCY_ISO also have to be filled if a correctconversion is to take place. The amount has to be entered to thecorrect number of decimal places.
                  If neither of the fields (CURRENCY or CURRENCY-ISO) is filled, en entryas a percentage is presumed. If the condition type is not, however, apercentage, an incorrect amount is entered.

                  Description
                  This parameter contains item input data for the SD 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 partners such as sold-to party, ship-to party using thistable parameter. You can do this on both header and item level.
                      The minimum requirement is the entry of a sold-to poarty on headerlevel. The other partner roles are then determined automatically.
                      You can also enter alternative addresses in the structure. The languagemust then 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 the services and the outline layouts for the order.
                          You can define a line as an outline line via field OUTL_IND.
                          Service lines are assigned to outline lines via fields PCKG_NO (serviceline) and SUBPCKG_NO (outline line).
                          The hierarchy od 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 enter 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, 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 one for blanket lines.
                                • Supplementary line

                                • 'X' in field SUPP_LINE
                                  • Bidder's line

                                  • 'X' in field BIDDER
                                    • Contingency line

                                    • 'X' in field EVENTUAL
                                      • Informatory line

                                      • 'X' in field INFORM
                                        • Internal line

                                        • 'X' in field BOSINTER
                                          You can find further information on the individual parameter fields inthe appropriate data element documentation in the ABAP dictionary.

                                          Description
                                          You can transfer the long text for the 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 lines have to be read line by line since a maximum of 132characters are allowed per line.
                                            If FORMAT_COL is empty. the standard key * is assigned.
                                            The package number (PCKG_NO) forms the link to the service line forwhich the text is to be entered.

                                            Description
                                            You can transfer texts fro the document item in the table:

                                            • the allowed text types in field TEXT ID

                                            • the actual text lines in field TEXT_LINE
                                            • 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
                                              The messages that are displayed when the SD 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