Fonction SAP BS01_SALESORDER_CHANGE - Sales Order: Change with Bill of Services

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
BEHAVE_WHEN_ERROR BAPIFLAG-BAPIFLAG C 1 SPACE X Error Handling
INT_NUMBER_ASSIGNMENT BAPIFLAG-BAPIFLAG C 1 SPACE X Internal Item Number Assignment
LOGICSWITCH BAPISDLS u 5 SD Checkbox for the Logic Switch
ORDER_HEADER_IN BAPISDH1 u 778 Order Header
ORDER_HEADER_INX BAPISDH1X u 108 Sales Order Check List
SALESDOCUMENT BAPIVBELN-VBELN C 10 Document Number of Sales Order
SIMULATION BAPIFLAG-BAPIFLAG C 1 X Simulation mode

Paramètre Reférence Long. Facultatif Description
CONDITIONS_IN BAPICOND 336 X Conditions
CONDITIONS_INX BAPICONDX 46 X Conditions Checkbox
EXTENSIONIN BAPIPAREX 990 X Customer Enhancment Import
ORDER_CFGS_BLOB BAPICUBLB 256 X Internal configuration data (SCE)
ORDER_CFGS_INST BAPICUINS 233 X Configuration: Instances
ORDER_CFGS_PART_OF BAPICUPRT 123 X Configuration: Part-of specifications
ORDER_CFGS_REF BAPICUCFG 397 X Configuration: Reference data
ORDER_CFGS_REFINST BAPICUREF 20 X Configuration: Reference item / instance
ORDER_CFGS_VALUE BAPICUVAL 276 X Configuration: Characteristic values
ORDER_CFGS_VK BAPICUVK 55 X Configuration: Variant condition key
ORDER_ITEM_IN BAPISDITMBOS 1267 X Order Items
ORDER_ITEM_INX BAPISDITMXBOS 167 X Sales order items check table
ORDER_KEYS BAPISDKEY 189 X Output Table of Reference Keys
ORDER_SERVICE BAPISDESLLCBOS 554 X Services
ORDER_SERVICES_COND BAPIBOSCD 296 X Communication Fields to Maintain Service Line Condition
ORDER_SERVICES_CONDX BAPIBOSCDX 40 X Checkbox Structure: Maintain Service Line Conditions
ORDER_SERVICEX BS01ESLLCX 69 X Check box: Service Line
ORDER_SERVICE_TEXT BAPIESLLTX 158 X Service Line Text
ORDER_TEXT BAPISDTEXT 160 X Texts
PARTNERADDRESSES BAPIADDR1 1574 X BAPI Reference Structure for Addresses (Org./Company)
PARTNERCHANGES BAPIPARNRC 149 X Partner changes
PARTNERS BAPIPARNR 664 X Communications Fields: SD Document Partner
RETURN BAPIRET2 548 X Return code
SCHEDULE_LINES BAPISCHDL 198 X Schedule lines
SCHEDULE_LINESX BAPISCHDLX 109 X Check table for schedule lines

Functionality
You can change and delete sales orders with this method.
You can change header, item, schedule line, configuration data and BOSdata.
You can transfer custoemr fields in tables VBAK, VBAP, VBEP and ESLLusing structre EXTENSIONIN.
The following changes are not allowed:

  • Changes to a document item if the status does not allow this/if it has
  • the status "complete"
    • Deletion of a service line if a BOS laready exists for this service line

    • Line type of a service line if a BOS already exists for this service
    • line
      • Delete order completely

      • delete order item

      • Create, change and delete service lines
      • Notes
        Generaly speaking, the following applies:
        You should only enter the fields to be changed
        They should be marked with an X in the appropriate checkbox structure.
        Fill field UPDATEFLAG for the selected field.
        Possible UPDATEFLAGS: U = change
        D = delete
        I = create
        Exception: configuration. If you change the configuration, it must befilled completely.
        Maintain quantites and dates using the schedule line data.
        Minimum required entries:
        1. The document number must be entered in structure SALESDOCUMENT.
        2. Key fields must always be entered when a change is made, also in the
        checkbox structure.
        3. The update indicator in SALESORDER_HEADER_INX must always be entered.
        Commit Control:
        The BAPI does not perform a database Commit. This means that the
        calling application has to exit the Commit so that changes can be made
        on the database. BAPI "BAPI_TRANSACTION_COMMIT" is available for this.

        Further information
        INCLUDE SD_BEHAVE_WHEN_ERROR OBJECT DOKU ID TX
        INCLUDE SD_BAPI_INTNUMASS OBJECT DOKU ID TX

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

        Description
        This parameter contains the checkbox structure for the sales documentheader.
        The document number (DOC_NUMBER) and the update indicator (UPDATEFLAG)have to be entered.
        Define which fields of the header are to be changed by entering thecharacter "X".
        INCLUDE SD_BAPIVBELN_DOCU OBJECT DOKU ID TX

        Description
        If this parameter is set, the document is not changed. A general checktakes place, for example, whether the fields can have values entered inthem and can thereofre be changed.

        Value range
        Only the values "Space" and "X" are allowed.

        Default
        Space - no simulation takes place.

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

        Value range
        You should distinguish between the following cases when fieldsCOND_VALUE and CURRENCY are being filled.

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

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

          • In this case, field COND_VALUE is a currency quantity field. FieldCURRENCY or CURRENCY_ISO must be filled for a correct conversion. Youmust enter the amount to the correct number of decimal places.
            If neither field CURRENCY nor field CURRENCY-ISO is filled, the systempresumes that you have entered a percentage.
            If, however, the calculation type is not a percentage, an incorrectamount is entered.

            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 to configurable materials.
            You can find more information in the SAP Library under LO LogisticsGeneral -> LO Variant Configuration -> EDI for Configurable Materials.

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

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

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

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

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

            Description
            This parameter contains the checkbox structure for the sales documentitem.
            The item number (ITM_NUMBER) and the update indicator (UPDATEFLAG) haveto be entered.
            Define which fields are to be changed by entering the character "X".

            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 the checkbox structure for the sevrice line.
                            The package number(PCKG_NO), internal line number (LINE_NO) and theupdate indicator (UPDATEFLAG) have to be entered.
                            Define which fields of the service line are to be changed by enteringthe character "X".

                            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 d

                            • the actual text lines in field TEXT_LINE

                            • Very long texts 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 for the document item in this table:

                              • the allowed text types in field TEXT_ID

                              • the actual text lines in field TEXT_LINE
                              • Description
                                To change partner address.

                                Value range
                                The field UPDATEFLAG can have the following values:
                                I - to add new item partner
                                U - to change item partner
                                D - to delete item partner
                                If you want to create or change a document address, you must fill fieldBAPIPARNRC-ADDR_LINK and table BAPIADDR1. You must specifythe full address.

                                Description
                                Changing partner details.

                                Description
                                Adding a new Partner to the sales document, for example, a sales order.
                                INCLUDE SD_BAPI_RETURN OBJECT DOKU ID TX

                                Description
                                This parameter contains data for the SD document schedule lines.
                                You can find information on the individual parameter fields in theappropriate data element documentation in the ABAP dictionary.

                                Description
                                This parameter contains the checkbox structure for the SD document itemschedule line.
                                The item number (ITM_NUMBER), schedule line number (SCHED_LINE) and theupdate indicator (UPDATEFLAG) have to be entered.
                                By entering the character "X" you can define which fields in theschedule line are to be changed.