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:
|