Fonction SAP BAPI_DEBITMEMOREQ_CREATEBOS - Create Debit Memo Request with BOS (Service Entry Sheet)

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
BEHAVEWHENERROR BAPIFLAG-BAPIFLAG C 1 X Error Handling
BINARYRELATIONSHIPTYPE BAPIRELTYPE-RELTYPE C 4 X Binary Relationship Type (Private)
DEBITMEMOREQHEADERIN BAPISDHD1 u 918 Document Header Data
DEBITMEMOREQHEADERINX BAPISDHD1X u 120 X Checkbox for header data
INTNUMBERASSIGNMENT BAPIFLAG-BAPIFLAG C 1 X Internal item number assignment
LOGICSWITCH BAPISDLS u 5 X Internal control parameter
SALESDOCUMENTIN BAPIVBELN-VBELN C 10 X Sales Document 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
DEBITMEMOREQCCARD BAPICCARD 268 X Credit Card Data
DEBITMEMOREQCFGSBLOB BAPICUBLB 256 X Configuration: BLOB internal data (SCE)
DEBITMEMOREQCFGSINST BAPICUINS 233 X Configuration: Instances
DEBITMEMOREQCFGSPARTOF BAPICUPRT 123 X Configuration: Part-of Specifications
DEBITMEMOREQCFGSREF BAPICUCFG 397 X Configuration: Reference data
DEBITMEMOREQCFGSREFINST BAPICUREF 20 X Configuration: Reference item / instance
DEBITMEMOREQCFGSVALUE BAPICUVAL 276 X Configuration: Characteristic values
DEBITMEMOREQCFGSVK BAPICUVK 55 X Configuration: Variant condition key
DEBITMEMOREQCONDITIONSIN BAPICOND 336 X Conditions
DEBITMEMOREQITEMSIN BAPISDITMBOS 1267 X Item Data
DEBITMEMOREQITEMSINX BAPISDITMXBOS 167 X Checkbox Item Data
DEBITMEMOREQKEYS BAPISDKEY 189 X Output Table of Reference Keys
DEBITMEMOREQPARTNERS BAPIPARNR 664 Document partner
DEBITMEMOREQSCHEDULESIN BAPISCHDL 198 X Schedule Lines
DEBITMEMOREQSCHEDULESINX BAPISCHDLX 109 X Checkbox Structure: Schedule Lines
DEBITMEMOREQSERVICES BAPISDESLLCBOS 554 X Services
DEBITMEMOREQSERVICESTEXT BAPIESLLTX 158 X Service Line Text
DEBITMEMOREQTEXT BAPISDTEXT 160 X Texts
EXTENSIONIN BAPIPAREX 990 X Customer Enhancment Import
RETURN BAPIRET2 548 X Return Messages

&FUNCTIONALITY&
You can use this method to create a debit memo request that containsservice entry sheets. A service entry sheet corresponds to a documentitem with BOS.

Notes
Minimum entries for creating a debit memeo request
At least the following parameters have to be transferred:

  • Document header data using parameter DebitMemoReqHeaderIn

  • ,,DOC_TYPE,,sales docuemnt type
    ,,SALES_ORG,,sales organization
    ,,DISTR_CHAN,,distribution channel
    ,,DIVISION,,division
    ,,REFDOCTYPE,,document type of reference object
    ,,REF_DOC,,document number of the reference document
    ,,REFDOC_CAT,,document category of preceding SD document
    ,,
    The sales document type has to be consistent with the logon language.
    • Partner data using parameter DebitMemoReqPartners

    • ,,PARTN_ROL,,partner function AG (sold-to party),,
      ,,PART_NUMB,,customer number
      If no ship-to party is entered, then ship-to party = sold-to party.
      The partner function has to be enetered consistently with the logonlangauge.
      Minimum entries for creating a document item with BOS (serviceentry sheet)
      At least the following item data has to be transferred:
      • Document item data using parameter DebitMemoReqItemsIn

      • ,,ITM_NUMBER ,,item number
        ,,MATERIAL,,material number
        You have two options for item number assignment:
        If you choose external number assignment via parameterIntNumberAssignment, you have to enter the item number in fieldITM_NUMBER.
        If you choose internal number assignment via parameterIntNumberAssignment, the system assigns the item numbers.Internal number assignment takes place in accordance with yourCustomizing settings. Field ITM_NUMBER must remain initial.
        • The package number for the bill of services PCKG_NO must also be
        • transferred via parameter DebitMemoReqItemsIn. This mustcorrespond to the PCKG_NO of the initial node (uppermostoutline level with hierarchy level 0) in the transfer parameterDebitMemoReqServices.
          • A service entry sheet must link to a sales order for which the you want
          • to make the service entry. You can make this link via the followingfields in parameter: DebitMemoReqItemsIn:
            ,,REF_DOC,,reference to the sales order
            ,,REF_DOC_IT,,reference to the order item
            ,,REF_DOC_CA,,document categpry C for a sales order
            • Exactly one schedule line must be created for a service entry sheet.
            • The quantity must be set to 1. You must enter the following datavia parameter DebitMemoReqSchedulesIn:
              ,,ITM_NUMBER,,item number
              ,,SCHED_LINE,,schedule line number
              ,,REQ_DATE,,schedule line date
              ,,REQ_QTY ,,quantity in sales unit of measure
              Minimum entries for creating service lines
              • Service data for the document item are transferred via parameter
              • DebitMemoReqServices and DebitMemoReqServicesText.
                • You can enter scheduled and unscheduled services. Scheduled services
                • link to a service line in the referenced sales order. For this, use thefollowing fields in parameterDebitMemoReqServices:
                  ,,PLN_PCKG,,PCKG_NO for the service line in the sales order
                  ,,PLN_LINE,,LINE_NO for the service line in the sales order
                  Create Customer Fields
                  Customer fields for tables VBAK, VBAP, VBEP andESLL can be transferred using parameter ExtensionIn.
                  Commit Control
                  This method does not perform a database commit. This means that thecalling application has to leave the commit so that changes can be madeon the database. You can use the following method for this:BAPI_TRANSACTION_COMMIT.
                  Return Values
                  After the debit memeo request has been created successfully, thedocument number is returned via parameter SalesDocument.
                  If errors occur during processing, they are returned in table parameterReturn. Information messages are also logged in this parameter.

                  Description
                  This parameter returns the document number created by the BAPI.

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

                  Description
                  Describes the significance that a link between two objects has (intheir roles).

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

                  Value range
                  Field UPDATEFLAG is filled with value SPACE or I(for creation).
                  The checkboxes are not to be filled.

                  Default
                  For field UPDATEFLAG:
                  SPACE

                  Description
                  Indicator for item number assignment.
                  THere are two options for item number assignment:

                  • If you do not set the indicator, you have to assign the item numbers
                  • mnanually via field ITM_NUMBER in the table parameterDebitMemoReqItemsIn.
                    • If you set the indicator, the system assigns the item numbers (internal
                    • number assignment). Item number assignment then takes place accordingto the settings that have been made in Customizing. FieldITM_NUMBER has to remain empty in table parameterDebitMemoReqItemsIn for internal number assignment.

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

                      Default
                      Space
                      INCLUDE BOS_BAPI_LOGICSWITCH OBJECT DOKU ID TX

                      Description
                      This parameter is for entering the SD document number.

                      Value range
                      There are two options for SD document number assignment:

                      • You can assign the SD document number manually. In this case, enter the
                      • number in the appropriate field.
                        • This parameter must remain initial for internal number assignment
                        • (i.e.: the system assigns the SD document number according to yourCustomizing settings).

                          Description
                          Tihs parameter is for the entry of the sending system.
                          This entry is required if object referneces are to be written.

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

                          Value range
                          SPACE,,document should be saved
                          X,,document should not be saved

                          Default
                          SPACE
                          INCLUDE BOS_BAPI_KREDITKARTENDATEN 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
                          This parameter contains condition data for the document item.
                          INCLUDE BOS_BAPI_KONDITION OBJECT DOKU ID TX

                          Description
                          This parameter contains the item data for the debit memeo request withBOS (service entry sheet).
                          You must enter a value in at least the following fields if you want tobe able to create a service entry sheet:

                          • If you choose external number assignment using parameter
                          • ExtNumberAssignment, you must enter the item number in fieldITM_NUMBER.
                            • If you choose to use internal number assignment using parameter
                            • IntNumberAssignment, the system assigns the item numbers.Internal number assignment then takes place according to your settingsin Customizing. Field ITM_NUMBER must remain initial.
                              • To be able to create a BOS, a material number with the appropriate
                              • settings in field MATERIAL must be transferred.
                                • 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 DebitMemoReqServices.
                                  • A debit memo request with BOS has to link to a sales order for which
                                  • the service entry sheets are to be created. You can create this linkvia the following fields:
                                    ,,REF_DOC,,reference to the sales order
                                    ,,REF_DOC_IT,,reference to the order item
                                    ,,REF_DOC_CA,,document category C for a sales order
                                    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 is filled with value SPACE (for creation).

                                    The checkboxes are not to be filled.

                                    Default
                                    Field UPDATEFLAG:,,SPACE
                                    Checkboxes:,,SPACE
                                    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 schedule line following data (atleast):
                                    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 LS>UPDATEFLAG contains value SPACE (for creation).
                                    The checkboxes are not to be filled.

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

                                    Description
                                    This transfer parameter contains the service lines of the service entrysheets that are to be created.
                                    The initial node of a service entry sheet (uppermost outlinelevel with hierarchy level 0) must exist in the transfer parameter. Forthis, create an outline level and transfer the PCKG_NO andLINE_NO. The PCKG_NO must correspond to field PCKG_NO
                                    of the appropriate document item in transfer structureDebitMemoReqItem.
                                    You can enter planned services. Service lines exist for theseservice lines in the referenced sales order. Depending on your settingsin Customizing, you can also enter unplanned services. There areno service lines for these in the appropriate sales order.
                                    When you create service lines, you transfer at least thefollowing fields:

                                    • Internal identification takes place via fields PCKG_NO and
                                    • LINE_NO. Assignment of a service line to an outline level takesplace via fields PCKG_NO of the service line and SUBPCKG_NO
                                      of the outline level.
                                      • You must transfer the quantity via field QUANTITY.

                                      • If you are delaing with an informatory line, you do not neeed totransfer a value.
                                        You must transfer the quantity 1 for a blanket line.
                                        If you want to transfer a service line from neither a service masterrecord nor a standard BOS, you must transfer the following data:
                                        • Short text via field SHORT_TEXT

                                        • Unit of measure either via field BASE_UOM or via field
                                        • UOM_ISO
                                          If you are dealing with an informatory line, you do not need totransfer a value.
                                          If you want to transfer a service master record to a service line, youmust transfer the following data:
                                          • Service master record number via field SERVICE

                                          • If you want to transfer a service description from a standard BOS, youmust trasnfer the following data:
                                            • Description of service type via field SERV_TYPE

                                            • Edition of service type via field EDITION

                                            • Standard BOS item via field SSC_ITEM
                                            • Description
                                              Long texts for the service lines are transferred in this parameter.

                                              Value range
                                              For field TEXT_ID:
                                              LTXT,,line long text
                                              LLTX,,service long text
                                              INCLUDE BOS_BAPI_TEXTE OBJECT DOKU ID TX
                                              INCLUDE BOS_BAPI_EXTENSIONIN OBJECT DOKU ID TX

                                              Description
                                              If errors occur during processing, they are returned in the tableparameter Return. In addition, information messages are loggedin this table 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)