SAPTechno

SAP Function BAPI_ALM_ORDER_MAINTAIN - Process Maintenance-/Service Order

TABLES
Parameter Reference Length Optional Text
ET_NUMBERS BAPI_ALM_NUMBERS 24 X Return Structure with Transferred and Issued Order Numbers
EXTENSION_IN BAPIPAREX 990 X Reference Structure for BAPI Parameters EXTENSIONIN/EXTENSIONOUT
IT_COMPONENT BAPI_ALM_ORDER_COMPONENT 499 X PM/CS BAPI Order Components
IT_COMPONENT_UP BAPI_ALM_ORDER_COMPONENT_UP 63 X PM/CS BAPI Order Components (Update Structure)
IT_HEADER BAPI_ALM_ORDER_HEADERS_I 952 X Import Structure for ALM Order Headers
IT_HEADER_SRV BAPI_ALM_ORDER_SRVDAT_E 221 X ALM Order BAPIs: Service-Specific Data, External Structure
IT_HEADER_SRV_UP BAPI_ALM_ORDER_SRVDAT_UP 13 X ALM Order BAPIs: Service-Specific Data, External Structure
IT_HEADER_UP BAPI_ALM_ORDER_HEADERS_UP 100 X Update Structure for ALM Order Headers
IT_METHODS BAPI_ALM_ORDER_METHOD 160 BAPI structure: Processing methods
IT_OBJECTLIST BAPI_ALM_ORDER_OBJECTLIST 464 X Object List - BAPI Structure
IT_OBJECTLIST_UP BAPI_ALM_ORDER_OLIST_UP 2 X Update Structure for Object List PM/CS
IT_OLIST_RELATION BAPI_ALM_OLIST_RELATION 16 X OPROL - Relation Operation Object List - BAPI Structure
IT_OPERATION BAPI_ALM_ORDER_OPERATION 830 X Input Structure for PM/CS BAPIs Operations
IT_OPERATION_UP BAPI_ALM_ORDER_OPERATION_UP 101 X Update Structure for PM/CS BAPI Operations
IT_PARTNER BAPI_ALM_ORDER_PARTN_MUL 40 X ALM Order BAPIs: Partner Data for Several Orders
IT_PARTNER_UP BAPI_ALM_ORDER_PARTN_MUL_UP 28 X ALM Order BAPIs: Partner Data for Several Orders, Update
IT_PRT BAPI_ALM_ORDER_PRT_I 289 X ALM Order BAPIs: Input Structure for Production Resources/Tools
IT_PRT_UP BAPI_ALM_ORDER_PRT_UP 27 X ALM Order BAPIs: Changes for Production Resources/Tools
IT_REFORDER_ITEM BAPI_REFORDER_ITEM_I 181 X BAPI: Header Component for Refurbishment Order (Import)
IT_REFORDER_ITEM_UP BAPI_REFORDER_ITEM_UP 23 X BAPI: Update Structure for Refurbishment Order Item
IT_REFORDER_OPERATION BAPI_REFORDER_OPERATION 652 X BAPI Input Structure for Refurbishment Order First Operation
IT_REFORDER_SERNO_OLIST_DEL BAPI_REFORDER_SERNO_OLIST_I 102 X BAPI: Import Structure for Serial Number Object List
IT_REFORDER_SERNO_OLIST_INS BAPI_REFORDER_SERNO_OLIST_I 102 X BAPI: Import Structure for Serial Number Object List
IT_RELATION BAPI_ALM_ORDER_RELATION 61 X BAPI Structure for ALM Order Relationships
IT_RELATION_UP BAPI_ALM_ORDER_RELATION_UP 13 X BAPI Structure for ALM Order Relationships
IT_SRULE BAPI_ALM_ORDER_SRULE 208 X PM/CS BAPI Settlement Rule
IT_SRULE_UP BAPI_ALM_ORDER_SRULE_UP 23 X PM/CS BAPI Settlement Rule (Update Structure)
IT_TASKLISTS BAPI_ALM_ORDER_TASKLISTS_I 37 X Parameter for Integrating Task Lists
IT_TEXT BAPI_ALM_TEXT 58 X Text Header for ALM Order BAPIs
IT_TEXT_LINES BAPI_ALM_TEXT_LINES 134 X SAPscript: Text Lines
IT_USERSTATUS BAPI_ALM_ORDER_USRSTAT 10 X Structure for ALM Order, User Status Change
RETURN BAPIRET2 548 X Return Parameter(s)

DOCUMENTATION

Functionality
This Business Application
Programming Interface (BAPI) is used to change maintenance or service
orders and their subobjects. The following objects of an order can be
processed (restrictions are listed at the end of the documentation):

  • Order header

  • Partner

  • User status

  • Order operations

  • Relationships

  • Components

  • Long text for order header, operations, and components

  • Settlement rules

  • Object list

  • Object list links

  • Production resources/tools

  • Function
    Calling this BAPI once allows you to perform all the operations. For
    this the system supplies the function module with a method table
    containing the methods to be performed. The entries in the method table
    refer to data records in the optionally filled-out data tables. All the
    methods from the method table are performed. Alternatively, just
    subobjects of existing orders can be changed, without changing the
    header.
    You can process the transferred data with the
    Business Add-In (BAdI)
    IBAPI_ALM_ORD_MODIFY to, for example, merge data from the external
    system with data from the SAP system. The BAdI is called as soon as the
    transferred data is converted to the internal formats. The checks then
    take place after this.
    INCLUDE BAPI_COMMIT OBJECT DOKU ID TX

    Structure of Method Table

    • REFNUMBER,,Reference number for linking object method to attributes

    • The reference number is the line of the database which contains the
      corresponding data. The data table is determined by the object type.
      • OBJECTTYPE,,Object type

      • The object category specifies which object from the order should be
        processed. The key words listed here are not language-dependent and must
        be transferred exactly as they are. The following objects exist:
        HEADER,,,,Order header
        PARTNER,,,,Partner data
        USERSTATUS,,User status
        OPERATION,,,,Operation data
        RELATION,,,,Relationships
        COMPONENT,,Component
        TEXT,,,,Long texts
        SRULE,,,,Settlement rule
        OBJECTLIST,,,,Object list
        OLISTRELATION,,,,Object list links
        TASKLIST,,,,General maintenance task list
        PRT,,,,,,Production resources/tools
        (Blank),,,,,,General BAPI functions (Save)
        • METHOD,,,,Method

        • The methods with which the data is to be processed. The following
          functions exist:
          CREATE,,,,,,Create objects
          CREATETONOTIF,,,,,,Create notifications
          CHANGE,,,,,,Change objects
          DELETE,,,,,,Delete objects
          RELEASE,,,,,,Release
          TECHNICALCOMPLETE,,Technically complete
          ATPCHECK,,,,,,Availability check
          CALCULATE,,,,,,Estimate costs
          SCHEDULE,,,,,,Schedule
          DELELTEDSEX,,,,Delete the status for external scheduling at operation
          level
          ADD,,,,,,Add (only possible for object TASKLIST)
          SAVE,,,,,,Save all data
          DIALOG,,,,,,Dialog call. See explanation below.
          TRACE,,,,,,Write trace file to the specified file at the front end
          • OBJECTKEY,,,,SAP-external object key

          • This key is for assigning the lower-level objects correctly to the
            corresponding objects, as there is always just one key in the data
            table. The key must have the following structure:
            1-12,,,,Order number
            When creating orders with internal number assignment, a reference number
            beginning with % must be entered here. The BAPI then returns this number
            and the number actually assigned.
            13-16,,Operation number
            17-20,,Suboperation number
            For relationships, the key is structured as follows:
            1-12,,,,Order number from
            13-16,,Operation number from
            17-28,,Order number to
            29-32,,Operation number to
            INCLUDE BAPI_ALM_ORDER_MAINTAIN OBJECT DOKU ID TX

            Data Tables and Update Tables
            The objects have one or more data tables. For some objects you can
            specify which of the fields specified in the structure should be
            changed. For this you must set the field in the corresponding table to
            X as in the data table. If no update table is transferred, then
            only those fields are set that have a value that is not initial.
            This simplifies the transfer data. However, this means it is not
            possible to delete fields. If an update structure should only be
            specified for some data records, the table with the update fields must
            nonetheless have the same number of lines as the data table. The empty
            lines are then treated as if no update structure was transferred. The
            objects "Partner", "User Status", "Text", and "Task List" have no update
            tables. The whole data record is always copied here.

            References
            The objects use the field REFNUMBER from the method table to
            refer to the lines in the data table. Counting always begins with 1. In
            doing this, REFNUMBER also refers to the update table. However,
            in the method table there is a second reference to the higher-level
            object for subobjects. The field OBJECTKEY must be filled with
            order number, operation number, and suboperation number, as specified
            above. If subobjects of a newly created order should be changed, then
            you must enter a temporary order number that must begin with %. Several
            orders can be numbered consecutively, for example, with %00000000001,
            %00000000002. For external number assignment, the external order number
            must be used here.
            The following objects have special handling for REFNUMBER:

            • Partner

            • Partners have an order number in the data table. During processing of
              the method table, all those entries in the data table are processed that
              have an order number that is the same as that in the line to which the
              method refers. Thus, through just one entry in the method table, several
              partners can be changed.
              • Texts

              • Texts are composed of two tables. The first table (IT_TEXT) is made up
                of the header data of the text. Here you must specify the object and the
                first and last line of the text table (both inclusive, counting from 1).
                This specifies a line segment in the text line table (IT_TEXT_LINES).

                Special Features in Processing
                The BAPI processes the transferred methods in a particular sequence
                , which need not correspond to the sequence in the methods table.

                • Write trace file

                • Change user status time 1

                • Delete objects (dependent first)

                • Create new objects

                • Change existing or newly created objects

                • Change user status time 2

                • Status change of order

                • Save data

                • The methods are performed such that subobjects can also be assigned to
                  newly created objects. For example, first the operations are created,
                  and then the components. Long texts can also be created for the objects.
                  Components have an exceptional position. Components are created
                  through the assignment to an operation, that is, using the "key" order/
                  operation (item number). However, as this is not the unique component
                  key, you can only access the components to change them, delete them, or
                  add long texts by using the reservation number/item, which is only given
                  after saving. This means that, for example, you cannot create a long
                  text when you create the component.
                  For settlement rules the following account assignment types are
                  supported:
                  • Cost center

                  • Order

                  • WBS element

                  • Asset

                  • G/L account

                  • Sales document

                  • User status changes can take place at two different time points.
                    Time point 1 is before the object changes, time point 2 is after the
                    object changes and before the status change of the system. These time
                    points should be defined in the transfer table in the CHANGE_EVENT
                    field. The field documentation contains the possible values.
                    The external scheduling is offered by the BAPI as a special
                    function. The BAPI can set the date field directly at the operation
                    level, and select the operation with the status DSEX (Date set by
                    external system). This status prevents any further scheduling of the
                    operation. The transferred dates are retained. For this, set the
                    category X in the restriction categories. When reading the
                    operation, this category is also returned, independent of the category
                    of restriction set in the dialog. To delete the status, you can call up
                    the method DELETEDSEX for the object operation. The external scheduling
                    cannot be influenced in dialog. All changes to the scheduling
                    restrictions in the dialog are saved, but they are not relevant for
                    scheduling as long as the status DSEX is active.
                    A SAVE or DIALOG method must be transferred in every call
                    of the BAPI. Usually, the BAPI call is thought of as a transaction. All
                    data that is changed in the BAPI should also be saved immediately to the
                    database. The BAPI checks whether a SAVE method exists. Otherwise, it
                    terminates processing. A test run of the BAPI consists of a standard
                    call with SAVE method, followed by a BAPI_TRANSACTION_ROLLBACK. To call
                    the BAPI without the SAVE method, for example, to realize dialog
                    transactions, the BAPI can be called with the DIALOG method. This
                    switches off the check for the SAVE method. The caller must then ensure
                    that later either a SAVE method or a BAPI_TRANSACTION_ROLLBACK is
                    called.
                    A BAPI_TRANSACTION_COMMIT without SAVE method terminates processing in
                    the update to ensure that no inconsistent data is written to the
                    database. The caller that called the BAPI does not receive any
                    confirmation of the termination of the update in the target system. This
                    logic is necessary as the order data was flagged for updating with
                    BAPI_TRANSACTION_COMMIT through the SAVE method. However, the status
                    information was already flagged for updating when the BAPI was called. A
                    BAPI_TRANSACTION_COMMIT without SAVE method then just saves the status
                    information and would generate inconsistent orders, if the updating was
                    not terminated.
                    The TRACE method is used to save an XML trace file on the front
                    end under the file name specified in the OBJECTKEY field. This
                    file can only be written if the BAPI is called from the dialog, that is,
                    from the SAP GUI. The file is not written if background processing is
                    used, nor is it written if the call originates in a different system.
                    This file can be used by SAP for analysis purposes. SAP does not intend
                    to use this data productively.

                    Customer Enhancement
                    The BAdI IBAPI_ALM_ORD_MODIFY can be used to change the
                    transferred data. The BAdI is called up after the conversion of the
                    transfer structure into the structures used internally. Additional data
                    can be transferred using the table EXTENSION_IN. Only then is the data
                    checked.

                    Refurbishment Order
                    BAPI BAPI_ALM_ORDER_MAINTAIN also supports the creation and change of
                    refurbishment orders.
                    Refurbishment-order-specific header data, item (component) data, and
                    serial number data is always created and updated together with the order
                    header data even though it is passed to the BAPI separately.
                    In order to support refurbishment-order-specific data, the interface of
                    the BAPI has been enhanced by the following table parameters:

                    • IT_REFORDER_ITEM (BAPI_REFORDER_ITEM_I)

                    • IT_REFORDER_ITEM_UP (BAPI_REFORDER_ITEM_UP)

                    • IT_REFORDER_SERNO_OLIST_INS (BAPI_REFORDER_SERNO_OLIST_I)

                    • IT_REFORDER_SERNO_OLIST_DEL (BAPI_REFORDER_SERNO_OLIST_I)

                    • Refurbishment order item data (IT_REFORDER_ITEM) is mandatory for the
                      creation of refurbishment orders. A refurbishment order cannot be
                      created without this data. If serial numbers are to be assigned to the
                      refurbishment order (object HEADER, method CREATE/CHANGE), they must
                      also be passed using the parameter IT_REFORDER_SERNO_OLIST_INS. If a
                      serial number is to be unassigned from the order during an update of the
                      order (object HEADER, method CHANGE), the parameter
                      IT_REFORDER_SERNO_OLIST_DEL must be passed to the BAPI. Only existing
                      serial numbers can be assigned to the refurbishment order.
                      Refurbishment-order-specific parameters are always processed together
                      with the order header data. This means that if the refurbishment order
                      is created or updated, the order header data structures must be provided
                      by the calling application. Even if the header data itself must not be
                      updated, at least the order number of the refurbishment order being
                      updated must be provided in the order header structures:
                      • IT_HEADER (BAPI_ALM_ORDER_HEADERS_I)

                      • IT_HEADER_UP (BAPI_ALM_ORDER_HEADERS_I_UP)

                      • In all cases, the update and creation of the data of the first component
                        in the refurbishment order (the refurbishment order item), as well as
                        the assignment and unassignment of serial numbers, is triggered by
                        providing the HEADER object with the corresponding method CREATE or
                        CHANGE in the method table
                        The HEADER object for a refurbishment order is also responsible for
                        creating and updating the refurbishment-order-specific data, for
                        example, plant from/to; storage location from/to, batch from/to,
                        valuation type from/to). There may be several serial numbers assigned to
                        a single refurbishment order, so the parameter table must always contain
                        the order number to which the serial number is assigned.
                        The data of the first component (refurbishment order item) is always
                        created with the order header data. In order to be able to create this
                        data, the HEADER function must be specified in the method table.
                        The data of the first component can be updated either with the header
                        data (object HEADER, method CHANGE) or separately by specifying the
                        function component update (object COMPONENT, method CHANGE) in the
                        method table. If the data of the first component is updated with the
                        order header data, then the structures for the header data must also be
                        passed to the BAPI interface (the order number at least must be
                        specified). If both methods of updating the component data are used
                        simultaneously in the method table, then the refurbishment order item
                        data is updated with the header data.
                        When the refurbishment order is created, the first operation is
                        generated automatically. If this generated data needs to be changed, an
                        update must be triggered in the method table. The first operation must
                        be generated for refurbishment orders (unlike standard orders) in order
                        to make it possible to create the data of the first component with the
                        refurbishment order header data.
                        The BAdI BADI_REFORDER_BAPI_MESG allows the user to suppress some
                        messages that are raised during the creation or update of a
                        refurbishment order. These messages are shown as warning messages when
                        the back-end transaction is executed, so this BAdI provides the user
                        with the flexibility to control the message type of these messages in
                        the BAPI.

                        Restrictions and Limitations

                        • The first operation cannot be created as an external operation.

                        • The first refurbishment order operation must not be created manually by

                        • passing the relevant data trough the method table.
                          • When more than one order is processed at once, the same serial number

                          • must not be assigned to several orders.
                            • The same serial number can be assigned to another order only if the

                            • first order has been successfully committed to the database table.
                              • Only existing serial numbers can be assigned to the refurbishment order.

                              • The first generated refurbishment order component cannot be updated

                              • within the execution of the same BAPI call.

                                DIMP-Specific Features

                                • An order can be created from a notification using the CREATETONOTIF

                                • method for the object type HEADER.
                                  • A notification can be created for the order.

                                  • The notification type has to passed within the parameter IT_HEADER

                                  • (BAPI_ALM_ORDER_HEADER_I-NOTIF_TYPE)
                                    • A notification can be separated from the order.

                                    • The notification type (NOTIF_TYPE) must be empty in the IT_HEADER, and

                                    • the corresponding update flag (NOTIF_TYPE) must be set in the update
                                      parameter IT_HEADER_UP.
                                      • An object list can be maintained for the refurbishment order.

                                      • DIMP-specific fields can be maintained at the header level:

                                      • Special stock is determined automatically from the equipment or
                                        material/serial number stock data if the refurbishment order is being
                                        created for a piece of equipment (BAPI_ALM_ORDER_HEADER_I-EQUIPMENT) or
                                        a material/serial number (BAPI_ALM_ORDER_HEADER_I-SERIALNO and
                                        BAPI_ALM_ORDER_HEADER_I-MATERIAL have to be specified in table
                                        IT_HEADER)
                                        Sales order, sales item (BAPI_ALM_ORDER_HEADER_I-SALES_ORD and
                                        BAPI_ALM_ORDER_HEADER_I-S_ORD_ITEM must be specified in the table
                                        IT_HEADER)
                                        • DIMP-specific fields can be changed at the component level. In

                                        • particular, the special stock indicator can be set for the component.

                                          Example
                                          The following examples illustrate usage:

                                          Creating an order
                                          OBJECTKEY should be filled with a temporary key. The BAPI returns
                                          this key together with the assigned order number in the return table
                                          ET_NUMBERS. The order number in the HEADER table should also be
                                          filled with the number. For external number assignment, the external
                                          number should be specified. The update structure can be transferred if
                                          necessary.
                                          Methods table
                                          REFNUMBER,,OBJECTTYPE,,METHOD,,OBJECTKEY
                                          1,,HEADER,,CREATE,,%00000000001
                                          IT_HEADER
                                          ORDERID,,ORDER_TYPE,,PLANPLANT,,...
                                          %00000000001,,PM01,,1000,,...

                                          Creation of an order with operation and long text
                                          Methods table
                                          REFNUMBER,,OBJECTTYPE,,METHOD,,OBJECTKEY
                                          1,,HEADER,,CREATE,,%00000000001
                                          1,,OPERATION,,CREATE,,%00000000001
                                          1,,TEXT,,CREATE,,%000000000010010
                                          IT_HEADER
                                          ORDERID,,ORDER_TYPE,,PLANPLANT,,...
                                          %00000000001,,PM01,,1000,,...
                                          IT_OPERATION
                                          ACTIVITY,,SUB_ACTIVITY,,CONTROL_KEY,,WRK_CNTR,,...
                                          10,,,,PM01,,MECHANIK,,...
                                          IT_TEXT
                                          ACTIVITY,,...,,TEXTSTART,,TEXTEND
                                          10,,...,,1,,2
                                          IT_TEXT_LINES
                                          TDFORMAT,,TDLINE
                                          *,,Long text for operation 10, line 1
                                          *,,Line 2 of the long text

                                          Creation of the refurbishment order header data with one serial number
                                          assigned (operation and first component are created automatically):
                                          Methods table
                                          REFNUMBER,,OBJECTTYPE,,METHOD,,OBJECTKEY
                                          1,,HEADER,,CREATE,,%00000000001
                                          1,, ,,SAVE,,
                                          IT_HEADER
                                          ORDERID,,ORDER_TYPE,,PLANPLANT,,...
                                          %00000000001,,PM04,,0001,,...
                                          IT_REFORDER_ITEM
                                          ORDERID,,REQUIREMENT_QUANTITY,,PLANT_TO,,PLANT_FROM,,...
                                          %00000000001,,3,,0001,,0002,,...
                                          IT_ REFORDER_SERNO_OLIST_INS
                                          ORDERID,,SERIALNO,,UII
                                          %00000000001,,SN01,,

                                          Creation of the refurbishment order data, changing the first operation
                                          data, adding the second operation and second component:
                                          Methods table
                                          REFNUMBER,,OBJECTTYPE,,METHOD,,OBJECTKEY
                                          1,,HEADER,,CREATE,,%00000000001
                                          1,,OPERATION,,CHANGE,,%000000000010010
                                          2,,OPERATION,,CREATE,,%00000000001
                                          1,,COMPONENT,,CREATE,,%00000000001
                                          1,, ,,SAVE,,
                                          IT_HEADER
                                          ORDERID,,ORDER_TYPE,,PLANPLANT,,...
                                          %00000000001,,PM04,,0001,,...
                                          IT_REFORDER_ITEM
                                          ORDERID,,REQUIREMENT_QUANTITY,,PLANT_TO,,PLANT_FROM,,...
                                          %00000000001,,3,,0001,,0002,,...
                                          IT_OPERATION
                                          ACTIVITY,,SUB_ACTIVITY,,...,,DESCRIPTION,,..
                                          0009,, ,,...,,Update of 1st Operation,,..
                                          0020,, ,,...,,New 2nd Operation,,..
                                          IT_OPERATION_UP
                                          ACTIVITY,,SUB_ACTIVITY,,...,,DESCRIPTION,,..
                                          X,, ,,...,,X,,..
                                          IT_COMPONENT
                                          RESERV_NO,,RES_ITEM,,PLANT,,MATERIAL,,...
                                          ,, ,,0001,,MN_01,,...

                                          Update of the data of the refurbishment order#s first component from
                                          header data (recommended):
                                          Methods table
                                          REFNUMBER,,OBJECTTYPE,,METHOD,,OBJECTKEY
                                          1,,HEADER,,CHANGE,,000004000001
                                          1,, ,,SAVE,,
                                          IT_HEADER
                                          ORDERID,,ORDER_TYPE,,PLANPLANT,,...
                                          000004000001,, ,, ,, ...
                                          IT_HEADER_UP
                                          ORDERID,,ORDER_TYPE,,PLANPLANT,,...
                                          000004000001,, ,, ,, ...
                                          IT_REFORDER_ITEM
                                          ORDERID,,REQUIREMENT_QUANTITY,,PLANT_TO,,PLANT_FROM,,...
                                          000004000001,,6,,9999,, ,,...
                                          IT_REFORDER_ITEM_UP
                                          ORDERID,,REQUIREMENT_QUANTITY,,PLANT_TO,,PLANT_FROM,,...
                                          000004000001,,X,,X,, ,,...
                                          IT_REFORDER_SERNO_OLIST_DEL
                                          ORDERID,,SERIALNO,,UII
                                          000004000001,,SN01,,

                                          Notes

                                          Using the BAPI to process the order data cannot support all the
                                          functions of the transaction. This applies in particular to the
                                          following functions:
                                          Order header data

                                          • The estimated costs cannot be processed - only the estimated overall

                                          • costs of the order.
                                            • Notification data cannot be processed with the order BAPI, even if the

                                            • settings in Customizing are such that the orders and notifications can
                                              be maintained on one screen. However, the system will create a
                                              notification with the order if this is specified in the Customizing
                                              settings.
                                              • Permits cannot be processed.

                                              • The order addresses cannot be processed.

                                              • Individual partner addresses cannot be maintained.

                                              • Order functions
                                                • Printing the papers is not possible.

                                                • Locking and unlocking the order is not possible.

                                                • Accepting and rejecting quotations is not possible.

                                                • Business completion is not possible.

                                                • Flagging for deletion is not possible.

                                                • The log cannot be displayed.

                                                • User default values are not used.

                                                • The field selection is not checked.

                                                • The Customer Exits/BAdIs are not executed completely.

                                                • Joint ventures are not supported.

                                                • Funds Management is not supported.

                                                • Investment orders are not supported.

                                                • No integration of service products with task lists is possible if

                                                • configuration data has to be maintained.
                                                  • No integration of configurable service products is possible if

                                                  • configuration data has to be manually maintained.
                                                    • Assignment of sales document items with service products in accordance

                                                    • with the aforementioned conditions.
                                                      Operation data
                                                      • A change of the control key in the operation is not possible, if this

                                                      • leads to a change of the processing type (internal/external processing).
                                                        • User status change not possible.

                                                        • Production resources and tools cannot be processed.

                                                        • Service lines cannot be processed.

                                                        • Integration of task lists with configurations is not supported, since

                                                        • manual maintenance of the characteristic valuations would be performed
                                                          in the dialog.
                                                          • Automatic linking of operations with object list is not

                                                          • supported. If a new operation is to be generated for a new object list
                                                            entry, you must do this by creating a new operation in the corresponding
                                                            BAPI method and linking to the object list entry using the object
                                                            OLISTRELATION.
                                                            Component data
                                                            • User status change not possible.

                                                            • BOM data cannot be processed.

                                                            • The delivery address cannot be processed.

                                                            • Further information
                                                              See also the documentation for the individual transfer tables.

                                                              Parameters
                                                              ET_NUMBERS
                                                              Table with the order numbers issued by the system. The temporary number
                                                              copied to the function module and the number assigned by the system are
                                                              assigned with this.

                                                              Value range
                                                              The temporary number begins with % z.B. %00000000001

                                                              EXTENSION_IN
                                                              Option of transferring customer-specific fields to the BAPI and
                                                              analyzing the fields in the BAdI
                                                              IBAPI_ALM_ORD_MODIFY or transferring
                                                              them to internal structures.

                                                              &WHAT_TO_DO&
                                                              The following enhancement structure exists for using the Customer Exit:

                                                              • BAPI_TE_ALM_ORDER_MAINTAIN

                                                              • The structure has the fields of the method table as key fields. Thus the
                                                                corresponding methods and thereby the referenced data structure can be
                                                                assigned uniquely.
                                                                The structure should be enhanced with the desired fields using append
                                                                technology.
                                                                For further information see the BAPI documentation on Customer Exits.

                                                                IT_COMPONENT
                                                                Table with the component data

                                                                IT_COMPONENT_UP
                                                                The update structure for IT_COMPONENT

                                                                Value range
                                                                ' '= Do not update field
                                                                'X' = Update field

                                                                Default
                                                                If the structure is left empty, then all the filled values (the values
                                                                that are not initial) are updated.

                                                                IT_HEADER
                                                                Header data of the order.

                                                                IT_HEADER_SRV
                                                                Service data of the order. This data must only be specified for service
                                                                orders. The same index as for IT_HEADER is used.

                                                                IT_HEADER_SRV_UP
                                                                The update structure for IT_HEADER

                                                                Value range
                                                                ' '= Do not update field
                                                                'X' = Update field

                                                                Default
                                                                If the structure is left empty, then all filled values (that is, values
                                                                that are not initial) are updated.

                                                                IT_HEADER_UP
                                                                The update structure for IT_HEADER

                                                                Value range
                                                                ' '= Do no update field
                                                                'X' = Update field

                                                                Default
                                                                If the structure is left empty, then all filled values (that is, values
                                                                that are not initial) are updated.

                                                                IT_METHODS
                                                                The methods table specifies which methods the BAPI executes. For this
                                                                the following data is always required:

                                                                • REFNUMBER,,A reference number for a data table line,

                                                                • OBJECTTYPE,,An object type, which specifies which data table(s) is

                                                                • referenced
                                                                  • METHOD,,,,A method which specifies what should be done to the object

                                                                  • OBJECTKEY,,A key as a reference to the corresponding higher-level object

                                                                  • Value range
                                                                    The following values are allowed:
                                                                    OBJECTTYPE

                                                                    • HEADER,,,,Order header

                                                                    • PARTNER,,,,Partner data

                                                                    • OPERATION,,Operation data

                                                                    • RELATION,,,,Relationships

                                                                    • COMPONENT,,Components

                                                                    • TEXT,,,,,,Long texts

                                                                    • PRT,,,,,,Production resource/tool

                                                                    • (empty),,,,,,General BAPI functions (Save)

                                                                    • METHOD,,,,
                                                                      • CREATE,,,,Create objects

                                                                      • CREATETONOTIF,,Create with reference to a notification

                                                                      • CHANGE,,,,Change objects

                                                                      • DELETE,,,,Delete objects

                                                                      • RELEASE,,,,Release

                                                                      • ATPCHECK,,,,Availability check

                                                                      • CALCULATE,,,,Calculate

                                                                      • SCHEDULE,,,,Schedule

                                                                      • SAVE,,,,,,Save all data

                                                                      • OBJECTKEY,,,,
                                                                        • 0-12,,,,Order number

                                                                        • 13-16,,,,Operation number

                                                                        • 17-20,,,,Suboperation number

                                                                        • 13-24,,,,Notification number (only for method CREATETONOTIF)

                                                                        • INCLUDE BAPI_ALM_ORDER_MAINTAIN OBJECT DOKU ID TX

                                                                          IT_OBJECTLIST
                                                                          Table of object list data

                                                                          IT_OLIST_RELATION
                                                                          Relationship of object list entry to operation

                                                                          IT_OPERATION
                                                                          Table containing the operation data

                                                                          IT_OPERATION_UP
                                                                          The update structure for IT_OPERATION

                                                                          Value range
                                                                          ' '= Do not update field
                                                                          'X' = Update field

                                                                          Default
                                                                          If the structure is left empty, then all filled values (that is, values
                                                                          that are not initial) are updated.

                                                                          IT_PARTNER
                                                                          Table for partner data. All entries with the same order number are
                                                                          processed and not just the entry which the method table indicates.

                                                                          IT_PARTNER_UP
                                                                          Update table for PARTNER

                                                                          Value range
                                                                          ' ' = Do not update field
                                                                          'X' = Update field

                                                                          IT_PRT
                                                                          Input table for production resources/tools in BAPIs for maintenance and
                                                                          service orders.
                                                                          The assignment of production resources/tools to orders and operations
                                                                          uses the method table.

                                                                          IT_PRT_UP
                                                                          Update table for IT_PRT for changing production resources/tools.
                                                                          The entry for changing a production resource/tool must be in the same
                                                                          line as the related entry in IT_PRT.
                                                                          Only the fields for which the change indicator is set are changed.
                                                                          Fields which have no change indicator (for example, item number) cannot
                                                                          be changed.

                                                                          Value range
                                                                          ' ' = Do not update field
                                                                          'X' = Update field

                                                                          IT_REFORDER_ITEM
                                                                          Table with the first component data of the refurbishment order, which is
                                                                          processed together with the header data.
                                                                          If the table is empty, the refurbishment order cannot be created.
                                                                          Component ORDERID specifies the order from table IT_HEADER for which the
                                                                          refurbishment component is to be created.

                                                                          IT_REFORDER_ITEM_UP
                                                                          The update structure for IT_REFORDER_ITEM.

                                                                          Value range
                                                                          ' ' = Do not update field
                                                                          'X' = Update field

                                                                          Default
                                                                          If this structure is left empty, all the filled values (those which are
                                                                          not initial) are updated.

                                                                          IT_REFORDER_OPERATION
                                                                          This parameter is used if the first operation of the refurbishment order
                                                                          is to be an external operation. It contains the same data as the
                                                                          IT_OPERATION table parameter. All other operations that are required
                                                                          must be transferred with the IT_OPERATION parameter.
                                                                          IF &[SWITCH]AD_ROTSUB_01_SFWS& = 'X'.
                                                                          In a subcontracting scenario, the subcontracting flag can be set for the
                                                                          external operation using this parameter.
                                                                          If there is supposed to be at least one external operation with the
                                                                          subcontracting flag set, the material provision indicator of the main
                                                                          component will be automatically set to Rework Material.
                                                                          In a planned modification scenario (independent of subcontracting), the
                                                                          material provision indicator of the main component will be automatically
                                                                          set to Rework Material. The rework component with material provision
                                                                          indicator set to Rework Material from Subcontr has to be passed manually
                                                                          into the BAPI importing components' table.
                                                                          ENDIF.

                                                                          IT_REFORDER_SERNO_OLIST_DEL
                                                                          Table with serial number object list data that is to be deleted from the
                                                                          refurbishment order while the refurbishment order is changed.
                                                                          The order from which the serial numbers are to be deleted is specified
                                                                          by component ORDERID.

                                                                          IT_REFORDER_SERNO_OLIST_INS
                                                                          Table with serial number object list data that is to be assigned to the
                                                                          refurbishment order while the refurbishment order is created or changed.
                                                                          The order to which the serial numbers are to be assigned is specified by
                                                                          component ORDERID.

                                                                          IT_RELATION
                                                                          Table with the relationships.
                                                                          relationships.

                                                                          IT_RELATION_UP
                                                                          The update structure for IT_RELATION

                                                                          Value range
                                                                          ' '= Do not update field
                                                                          'X' = Update field

                                                                          Default
                                                                          If the structure is left empty, then all filled values (that is, values
                                                                          that are not initial) are updated.

                                                                          IT_SRULE
                                                                          Table with the allocation rules for the order settlement

                                                                          IT_SRULE_UP
                                                                          The update structure for IT_SRULE.

                                                                          Value range
                                                                          ' '= Do not update field
                                                                          'X' = Update field

                                                                          Default
                                                                          If you do not enter a value in the structure, the system updates all the
                                                                          filled values (that is, the values that are not initial).

                                                                          IT_TASKLISTS
                                                                          Table of maintenance task lists or general task lists that are to be
                                                                          included.
                                                                          For each task list, you can define:

                                                                          • If operations that already exist in the operation are to be deleted

                                                                          • If only operations for the task list or the general task list are to be

                                                                          • selected with a particular work center
                                                                            • If the work centers in the task list or general task list are to be

                                                                            • replaced by another work center

                                                                              Value range
                                                                              DELETE_OLD_OPERATIONS:
                                                                              WORKCENTER_SEL, PLANT_SEL: Only the operations that are assigned to this
                                                                              work center are selected.
                                                                              WORKCENTER_USE, PLANT_USE: The work center in the operations of the
                                                                              general task list is replaced with this work center.
                                                                              USE_WORKCENTER_FROM_HEAD: If this indicator is set, the work center in
                                                                              the operations from the general task list will be replaced with the work
                                                                              center from the order header. This indicator overrides values for
                                                                              WORKCENTER_USE and PLANT_USE.

                                                                              IT_TEXT
                                                                              Table with header data for the texts.
                                                                              The object must be specified here and the first and the last lines from
                                                                              the text table must be specified (inclusive respectively, count from
                                                                              1). This specifies a line segment in the text line table
                                                                              (IT_TEXT_LINES).

                                                                              IT_TEXT_LINES
                                                                              Text lines in SAPscript format

                                                                              IT_USERSTATUS
                                                                              Transfer table for the user status.

                                                                              RETURN
                                                                              Return table by BAPI standard with all the notifications that arose
                                                                              during processing. If notifications of category E or A are
                                                                              among them, then the data is not saved.

RELATED NOTES
1582742BAPI: Cost is not getting determined for an order
1492064BAPI: Dump MESSAGE_TYPE_X with change of service orders
771448BAPI: Text is not updated "on commit" first
1499323MESSAGE_TYPE_X with CO888 when changing superior network
745385BAPI: Error message CK598 in repair requests
1149099Authorization check BAPI_ALM_ORDER_MAINTAIN HEADER
1441350Unable to execute PS transactions after BAPI execution
1395731BAPI: Authorization not checked during PM/CS order release
1392389BAPI: Purchasing details not checked for the material
1394844PM/CS : Priority not copied from Notification to Order

Based on SAP ECC6.