SAP Function EAM_TASKLIST_CREATE - Create API for task list

Parameter Reference Type Length Default Optional Text
IS_HEADER EAM_S_HDR_INS u 259 Task List API: Header data insert structure
IV_CLEAR_BUFFER_IF_ERROR CHAR1 C 1 'X' X Indicator to clear the buffers if exception occurs
IV_DATE DATUM D 8 SY-DATUM X Date
IV_PROFILE PROFID_STD C 7 SPACE X Profile

Parameter Reference Type Length Text
EV_PLNAL PLNAL C 2 Group Counter
EV_PLNNR PLNNR C 8 Key for Task List Group

Parameter Reference Length Optional Text
ET_RETURN BAPIRETTAB 548 X Table with BAPI Return Information
IT_COMPONENTS EAM_T_COMPONENT_INS 80 X Table Type for material Components Used for Task Lists
IT_MPACKAGES EAM_T_TL_MPACK 31 X Task List API Table of Maintenance Packages
IT_OPERATIONS EAM_T_TL_OPR 505 X Task List: Table for Operations Insert/Update in API
IT_PRTS EAM_T_TL_PRT 242 X Task List API: Table for PRT Detail
IT_RELATIONS EAM_T_TL_REL 61 X Task List Relations Dialog Table Type
IT_SPACK_CONTR_LIMITS EAM_T_TL_SPACK_CONTR_LIMITS 145 X Task list API: Service package contract limits
IT_SPACK_LIMITS EAM_T_TL_SPACK_LIMITS 238 X Task list API: Service package limit data
IT_SPACK_LINES EAM_T_TL_SPACK 553 X Task List API: Serviceline Data Detail
IT_SPACK_OUTLINES EAM_T_TL_SPACK_OUTLINE 199 X Task list API: Table containing service package outlines
IT_TEXT EAM_T_TEXT 118 X Table with Text Header for Task List APIs
IT_TEXT_LINES EAM_T_TEXT_LINES 134 X Table with Text Lines for Task List APIs

Functionality
Application interface for creating task lists in the buffer table. Thisfunction module enables you to create the components of a single tasklist, including all alternatives. The function module can also be calledrepeatedly in order to create new entries in buffer tables withoutcommitting them to the database. Important to note is that after anunsuccessful creation attempt, the entries are removed from buffertables.
Supported task list types are:

  • Equipment task lists

  • Functional location task lists

  • General task lists

  • In order to create a new task list, enter the new records into theIMPORTING and TABLES parameters.
    The import parameters define the task list header data to be created,the date the task list is valid from (default value is current date) andthe optional parameter profile. The additional objects of the task listare:
    • Operations

    • Production resource/tools

    • Material components

    • Operation relations

    • Service packages lines

    • Service packages outlines

    • Service packages limits

    • Service packages contracts limits

    • Maintenance packages

    • Additionally, long texts can be maintained for the following objects:
      • Task list header

      • Task list operations

      • Task list production resource/tools
      • Example
        CALL FUNCTION 'EAM_TASKLIST_CREATE'
        EXPORTING
        IS_HEADER = LS_HEADER " Task listheader data to be created
        IV_DATE = SY-DATUM " Date thetask list is valid from
        IV_PROFILE = LV_PROFILE " Profilewith task list default values
        IMPORTING
        EV_PLNNR = LV_PLNNR
        EV_PLNAL = LV_PLNAL
        TABLES
        IT_OPERATIONS = LT_OPERATIONS_INS " Operationsto be created
        IT_COMPONENTS = LT_COMPONENTS_INS " Componentsto be created
        IT_PRTS = LT_PRTS_INS " PRTs to becreated
        IT_RELATIONS = LT_RELATIONS_INS " Relationsto be created
        IT_SPACKS_LINES = LT_SPACKS_LINES_INS " Servicepackages to be created
        IT_SPACKS_OUTLINES = LT_SPACKS_OUTLINES_INS " Servicepackages to be created
        IT_SPACKS_LIMITS = LT_SPACKS_LIMITS_INS " Servicepackages to be created
        IT_SPACKS_CONTR_LIMITS = LT_SPACKS_CONTR_LIMITS_INS " Servicepackages to be created
        IT_MPACKAGES = LT_MPACKAGES_INS " Maintenance
        packages to be created
        IT_TEXT = LT_TEXT_INS " Long textheaders to be created
        IT_TEXT_LINES = LT_TEXT_LINES_INS " Long textlines to be created
        ET_RETURN = LT_RETURN " BAPI return
        table containing messages
        .

        Notes
        To finalize the creation and to write the data into the database, callfunction module EAM_TASKLIST_POST followed by function moduleBAPI_TRANSACTION_COMMIT.
        If a creation fails due to inconsistent values, ALL buffer tables aredeleted and all unsaved data (no call of EAM_TASKLIST_POST) is lost.
        The APIs can be called even in the dialog mode. This means it ispossible to call sequences of create and update APIs without committingeach single change into the database table. In order to write the finaldata into the database table the function module EAM_TASKLIST_POST mustbe called for each task list group separately.
        Fields STLTY, STLNR, STLAL and STLKN of parameter IT_COMPONENTS_INS areoptional input parameters, representing keys of a non standard BOM item.Keys of a non standard BOM item should only be given for the case, whena certain existing non standard BOM item with a category other than "S"is to be used for a new component being created.

        Description
        Group counter of the created task list.

        Description
        Group number of the created task list.

        Description
        Mandatory importing structure containing header data for the task listto be created. The structure must contain the field for the task listtype (PLNTY). If the task list for the technical object is supposed tobe created (PLNTY = 'T' or 'E')<(>,<)> it must contain either thefunctional location number (TPLNR) or equipment number (EQUNR). In casethe general task list is supposed to be created (PLNTY = 'A')<(>,<)> itmay contain the external task list number (PLNNR) and counter (PLNAL).Otherwise these fields (PLNNR and PLNAL) will be generated. Additionallythe creation of a general task list requires the valid maintenance plant(WERKS) and status (STATU).

        Description
        If you set this parameter, it indicates that the task list buffer needsto be cleared in case any error occurred during task list processing.

        Default
        In case any error occurred during task list processing, the buffer iscleared by default. If you want the application logic to behavedifferently, set the indicator from the calling application accordingly.

        Description
        Date on which the task list is created. All objects, for example<(>,<)>header or operation that are being created are created for this keydate.

        Default
        The default value for the key date is the current date.

        Description
        A profile is a collection of default values and settings for maintenanceof routings or standard networks. Profile can be maintained or createdfor certain task list application in customizing table TCA41.

        Default
        Profile is not a mandatory field and can be left empty.

        Description
        Table with all the messages sent by the BAPI.

        Description
        Import table containing data for components to be inserted into the tasklist operation. The operation to which the new components are assignedmust be specified in each table line. If no components are to beinserted, the table parameter must remain empty.

        Description
        Export table containing task list maintenance packages.

        Description
        Import table containing data for operations to be created for the tasklist alternative. The task list alternative in which the new operationis to be created must be specified in each table line. If the task listshould not contain any operations<(>,<)> the table must remain empty.
        Mandatory fields of structure EAM_S_TL_OPR are:

        • PLNTY ,,,,Task List Type

        • PLNNR ,,,,Key for Task List Group, if this was
        • specified in parameter IS_HEADER
          • PLNAL ,,,,,,Group Counter, if this was specified in
          • parameter IS_HEADER
            • VORNR ,,,,,,Operation/Activity Number
            • Description
              Import table containing production resources/tools (PRT) to be insertedfor the task list operation. The operation to which the new PRTs areassigned must be specified in each table line. If no PRTs are to beinserted, the table parameter must remain empty.

              Description
              Import table containing relationships to be created for the task listoperation. The operation to which the new relationships are assignedmust be specified in each table line. If no relationships are to beinserted, the table parameter must remain empty.

              Description
              Insert table for MM service package contract limits. Mandatory fields ofstructure EAM_S_TL_SPACK_CONTR_LIMIT are:

              • PLNTY ,,,,Task List Type

              • PLNNR ,,,,Key for Task List Group

              • PLNAL ,,,,,,Group Counter

              • VORNR ,,,,,,Operation/Activity Number

              • HPACKNO ,,,,,,Highest package number

              • CONTRACT,,,,,,,,Purchasing Document Number

              • CONTRACT_ITEM Item Number of Purchasing Document

              • Description
                Insert table for MM service package limits. Mandatory fields ofstructure EAM_S_TL_SPACK_LIMIT are:

                • PLNTY ,,,,Task List Type

                • PLNNR ,,,,Key for Task List Group

                • PLNAL ,,,,,,Group Counter

                • VORNR ,,,,,,Operation/Activity Number

                • HPACKNO ,,,,,,Highest package number

                • OVERALL_LIMIT,,,,,,Overall Limit
                • Description
                  Insert table for MM service package lines. Mandatory fields of structureEAM_S_TL_SPACK are:

                  • PLNTY Task List Type

                  • PLNNR Key for Task List Group

                  • PLNAL Group Counter

                  • VORNR Operation/Activity Number

                  • HPACKNO Highest package number

                  • SRV_LINE Line Number

                  • SHORT_TEXT Short text

                  • QUANTITY Quantity

                  • UOM Unit of measure

                  • Hints:
                    • OUTLINE is only required if different from default outline 1.
                    • Description
                      Insert table for MM service package outlines. Mandatory fields ofstructure EAM_S_TL_SPACK_OUTLINE are:

                      • PLNTY ,,,,Task List Type

                      • PLNNR ,,,,Key for Task List Group

                      • PLNAL ,,,,,,Group Counter

                      • VORNR ,,,,,,Operation/Activity Number

                      • HPACKNO ,,,,,,Highest package number

                      • SHORT_TEXT ,,,,Short text

                      • OUTLINE_LEVEL_NAME,,,,Outline Level

                      • PARENT_OUTLINE,,,,Parent's Outline Number
                      • Description
                        Import table containing header data for long texts to be updated for asubobject of a task list alternative. The subobject key where the newlong text is supposed to be updated must be specified in each tableline. If the long text of a subobject should remain unchanged, the tablemust remain empty. Prerequisite for changing the long text assigned to atask list subobject is that the short text and the language key of thissubobject are marked for update. The reason is that the first line oflong text overwrites the short text of the corresponding task listsubobject.
                        Mandatory fields of structure IT_TEXT are:
                        ·,,PLNTY Task list type, mandatory if this was specified in parameterIS_HEADER
                        ·,,PLNNR Key for task list group, mandatory if this was specified inparameter IS_HEADER
                        ·,,PLNAL Group counter, mandatory if this was specified in parameterIS_HEADER
                        ·,,TEXTSTART First table line within API parameter IT_TEXT_LINES thatrefers to current line of IT_TEXT
                        ·,,TEXTEND Last table line within API parameter IT_TEXT_LINES thatrefers to current line of IT_TEXT
                        Optional fields of parameter IT_TEXT are:
                        ·,,LANGU ,,Language in which the long text is to be created. If leftempty the logon language is used.
                        ·,,VORNR ,,External identifier for operation/activity (mandatory foroperations, PRT and service packages)
                        ·,,PZLFH ,,External item counter for production resources/tools
                        Optional fields for service packages:
                        ·,,OUTLINE External identifier for outline number
                        ·,,SERVICE_LINE External identifier for service line assigned to aboveoutline number
                        ·,,TEXT_ID If equals to 'LTEXT', this refers to an 'outline long text'or a 'line text' of a service line
                        ,, If equals to 'LLTXT', this refers to a 'service text'of a service line

                        Description
                        Import table containing all text lines for longtexts to be created forall related subobjects of a task list alternative. The subobject keywhere the new longtext is supposed to be created must be specified inAPI parameter IT_TEXT. The first line of this parameter IT_TEXT_LINESwill overwrite the short text of the corresponding task list subobject.
                        Mandatory fields of structure IT_TEXT_LINES are:
                        ·,,TDFORMAT Style element name (paragraph, character string) inSAPscript format
                        ·,,TDLINE SAPscript text line with a length of 132 characters
                        The line index of API Parameter IT_TEXT_LINES refers to following threefields of API parameter IT_TEXT:
                        ·,,TEXTSTART First table line within API parameter IT_TEXT_LINES
                        that refers to a single (header) line ofIT_TEXT
                        ·,,TEXTEND Last table line within API parameter IT_TEXT_LINES
                        that refers to the same single (header)line of IT_TEXT
                        ·,,LANGU ,,Language in which the longtext is to be created. If leftempty the logon language is used.