SAP Function BAPI_INSPECTIONPLAN_CREATE - Create Inspection Plan

Parameter Reference Type Length Default Optional Text
PROFILE BAPI1012_CONTROL_DATA-PROFILE C 7 X Profile To Be Used
TESTRUN BAPIFLAG u 1 SPACE X Switch to Simulation Mode for Write BAPIs

Parameter Reference Type Length Text
GROUP BAPI1191_TSK_C-TASK_LIST_GROUP C 8 Key for Task List Group
GROUPCOUNTER BAPI1191_TSK_C-GROUP_COUNTER C 2 Group Counter

Parameter Reference Length Optional Text
INSPCHARACTERISTIC BAPI1191_CHA_C 715 X Inspection Characteristics in CREATE-BAPI for Inspection Plans
INSP_CHAR_VALUES BAPI1191_CHV_C 472 X Specific Insp. Characteristic Specifications in CREATE_BAPI for Insp. Plans
MATERIALTASKALLOCATION BAPI1191_MTK_C 227 X Material-Task List Assignment in CREATE_BAPI for Inspection Plans
OPERATION BAPI1191_OPR_C 417 X Operations in CREATE-BAPI for Inspection Plans
PRODUCTIONRESOURCE BAPI1191_PRT_C 401 X PRT Assignments in CREATE_BAPI for Inspection Plans
REFERENCEOPERATION BAPI1191_REF_OPR_C 122 X Ref. Operation Set Ref. in CREATE_BAPI for Insp. Plans
RETURN BAPIRET2 548 X Return Parameter
TASK BAPI1191_TSK_C 178 Task List Header Data in CREATE-BAPI for Inspection Plans
TEXT BAPI1012_TXT_C 134 X Long Text Lines for Inspection Plans
TEXTALLOCATION BAPI1191_TXT_HDR_C 101 X Text Assignments in CREATE-BAPI for Inspection Plans

Functionality
You can use this function module to create inspection plans and all itssubordinate objects.
You can create a key date view and the complete history of aninspection plan. It is useful to have a history when transferring datafrom external systems.

Example
You want to create an inspection plan with operations and inspectioncharacteristics for key date 01.01.2000. Make an entry in the followingtables for each object:

  • TASK

  • OPERATION

  • INSPCHARACTERISTIC

  • If you want to assign test equipment to the inspection characteristicin field ITEM_NO_OF_PRODUCTION_RESOURCE, you must have assigned thistest equipment in PARAMETER PRODUCTIONRESOURCE.

    Notes
    If no error occurs during the transfer of data, the export parametersGROUP and GROUPCOUNTER contain the key for the task list created. ACOMMIT WORK must be executed for writing data to the database.
    All errors that have occured are logged in the export parameter RETURN.If there are inconsistencies, the inspection plan to be created isrejected.

    Description
    When data is transferred successfully, the id of the created inspectionplan is displayed in this parameter. You can use this id later toaccess the inspection plan.

    Description
    When data is successfully transferred, the group counter for thecreated inspection plan is entered in this parameter. You can accessthe inspection plan later using the task list group in the parameterGROUP.

    Description
    Default values can be defined for certain attributes in the inspectionplan by specifying a profile. These values are then always used if thecorresponding values were not transferred. If a profile has not beenspecified, entries must be made for the following attributes in the tasklist header (structure TASK):
    PLANT
    TASK_MEASURE_UNIT
    TASK_LIST_USAGE
    TASK_LIST_STATUS
    In the same way as for the task list header data, default values canalso be defined for the attributes in an operation using the profile. Ifno default values have been defined in the given profile for theseattributes or no profile has been specified, entries must be made forthe following attributes in the structure OPERATION:
    CONTROL_KEY
    BASE_QUANTITY
    NOMINATOR
    DENOMINATOR
    The profiles can be maintained in Customizing of the SAP system.

    Description
    You can use this parameter to define whether the transferred data isonly checked for consistency, or also saved to the database if the datais consistent.

    Value range
    Allowed values are:
    " ",,,,Check and mark for saving if there are no inconsistencies
    "X",,,,Only check

    Default
    The default value is " ". This means that if there are noinconsistencies, the data is marked for saving.

    Description
    In this table, the data for the inspection characteristics to becreated are transferred.
    The operation is identified by specifying the operation ID in the fieldOPERATION_ID. If this is not available, the system then trys todetermine the operation using the operation number in the fieldACTIVITY.
    You should enter an inspection characteristic number in the fieldINSPCHAR to identify inspection characteristics. You can createinspection charactetistics with or without reference to a masterinspection characteristic, if you enter a master inspectioncharacteristic (MSTR_CHAR and PMSTR_CHAR fields). Enter the referencefor the master inspection characteristic in the fieldCHA_MASTER_IMPORT_MODUS (mode for reference to the master inspectioncharacteristic).

    • "L" for reference

    • In this case, the master inspection characteristic must be completelymaintained. In parameter INSPCHARACTERISTIC, you must only enter datain the fields, in which data cannot be transferred from themaster inspection characteristic.
      • "C" for copy (flexible reference)

      • In this case, the data is copied from the master inspectioncharacteristic to the inspection characteristic.
        • "N" for creating a flexible reference

        • In this case, no data is transferred from the master inspectioncharacteristic. You must enter all fields in parameterINSPCHARACTERISTIC.
          For "L" or "C", you can copy the control indicators for the inspectioncharacteristic directly from the master inspection characteristic. For"N" or if you do not enter a master inspection characteristic, you mustenter the control indicators individually or enter a key for thecontrol indicators in field PRESET_CTRL_INDS_KEY, if you have definedthis key in Customizing.
          Hints
          • If you want to assign test equipment to the inspection characteristic
          • in the field ITEM_NO_OF_PRODUCTION_RESOURCE, you must have assignedthis test equipment in parameter PRODUCTIONRESOURCE to the operation.
            • If you specify a standard text key, the control indicators are copied
            • after the specifications for the standard text key from Customizing.You cannot enter individual control indicators at the same time.
              • If you enter a tolerance key, the data is automatically copied from the
              • tolerance key. If you enter an upper or lower tolerance specificationlimit, you must also set the control indicator for the upper or lowerspecification limit.
                • If you enter a production resource/tool, you must set the control
                • indicator for the production resource/tool.
                  • If you enter a formula, you must set the control indicator for a
                  • calculated characteristic.
                    • If you specify a sampling procedure, you must set the control indicator
                    • for the sampling procedure. If you enter SPC criterion, you must setthe control indicator for SPC characteristic.
                      • If you define dynamic modification criterion, these must be consistent
                      • with the dynamic modification rule.
                        • You can only specify a task list group if you use external number
                        • assignment. For internal number assignment, the task list group isautomatically determined during processing.
                          You can find information on the meaning of single parameter fields inthe corresponding data element documentation in the ABAP dictionary.

                          Value range
                          If you enter the control indicators individually in the inspectioncharacteristic, note the following features of the attribute for theindicators:

                          • SCOPE_IND: Inspection scope

                          • " ",,,,Unrestricted inspection scope
                            "<",,,,Smaller inspection scope permitted
                            ">",,,,Larger inspection scope permitted
                            "=",,,,Fixed inspection scope
                            • RESULT_RECORDING_TYPE: Recording type

                            • "-",,,,No recording
                              "*",,,,Classed recording
                              "+",,,,Single recording
                              " ",,,,Summarized recording
                              • DOCU_REQU: Documentation required for inspection results

                              • " ",,,,No documentation required
                                ".",,,,Documentation required
                                "+",,,,Document all inspection results
                                • CONFIRMATION_CATEGORY Characteristic category

                                • " ",,,,Optional characteristic
                                  "+",,,,Required for the acceptance of the previous requiredcharacteristic
                                  "-",,,,Required for the rejection of the previous requiredcharacteristic
                                  "X",,,,Required characteristic
                                  • PRINT_IND: Print control

                                  • " ",,,,Print
                                    "x",,,,Do not print
                                    "*",,,,No print at skip

                                    Description
                                    The dependent characteristic specifications for the task list to becreated are transferred in this table.
                                    The following attributes must have a value, otherwise the consistency ofthe task list cannot be guaranteed:

                                    • OPERATION_ID (Identification of Operation)

                                    • INSPCHAR (Identification of Inspection Characteristic)

                                    • NO_OF_SPEC_VALUE (Identification of Dependent Characteristic
                                    • Specifications)
                                      You use the fields
                                      • MATERIAL (Material Number)

                                      • PLANT (Plant)

                                      • VENDOR (Vendor)

                                      • CUSTOMER (Customer)

                                      • SEARCH_FIELD (Search Field)

                                      • MS_OBJTYPE (Type of Object for Multiple Specifications)

                                      • MS_OBJECT (Object for Multiple Specifications)

                                      • to create a connection to the material-task list assignment that is tobe created. These fields must therefore be filled.
                                        It is only permitted to specify a task list group (attributesTASK_LIST_GROUP and GROUP_COUNTER) in case of external numberassignment. For internal number assignment, the task list group and thegroup counter are determined automatically by the system duringprocessing.
                                        For more information about the meaning of the individual parameterfields, see the relevant data element documentation in the ABAPdictionary.

                                        Description
                                        In this table, the data is transferred for the material-task listassignments to be created.
                                        You must enter data for the following attributes to ensure theconsistency of the task list.

                                        • MATERIAL

                                        • PLANT

                                        • You can only specify a task list group (Attribute TASK_LIST_GROUP andGROUP_COUNTER) with external number assignment. For internal numberassignment, the task list group is automatically determined duringprocessing.
                                          For more information on the single parameter fields, see thecorresponding data element documentation in the ABAP dictionary.

                                          Description
                                          In this table, the data is transferred for the operations to becreated. Create one entry in this table for each operation.
                                          You should specify a unique key for each operation in the fieldOPERATION_ID to clearly identify the operation - above all when usingthem in subordinate structures (for example, component assignment).This operation ID must contain at least one non-numerical character(for example, VORG0010). This ID is never changed for the operation.
                                          You must enter values for the following attributes to ensure theconsistency of the operation:

                                          • ACTIVITY (operation number)

                                          • CONTROL_KEY (control key)

                                          • WORK_CNTR (work center) and PLANT (plant for work center)

                                          • You can only specify a task list group (attributes TASK_LIST_GROUP andGROUP_COUNTER) with external number assignment. For internal numberassignment, the task list group is determined automatically duringprocessing.
                                            For information on the single parameter fields, see the correspondingdata element documentation in the ABAP dictionary.

                                            Description
                                            In this table, the data is transferred for the production resource/toolassignments to be created.
                                            Operation identification is performed by specifying the operation ID inthe field OPERATION_ID. If this is not available, the system then trysto determine the operation using the operation number in fieldACTIVITY.
                                            The following objects can be assigned to an operation as a productionresource/tool, where the respective object type is specified in thefield PRT_CATEGORY:

                                            • Production resource/tool (Material)

                                            • The material is determined using the fields MATERIAL and PRT_PLANT.
                                              • Equipment

                                              • The assigned equipment is defined in the field EQUIPMENT.
                                                • Documents

                                                • The assigned document is defined in the fields DOCUMENT_TYPE,DOCUMENT_NUMBER, DOCUMENT_PART, and DOCUMENT_VERSION
                                                  • Other

                                                  • The production resource/tool to be assigned is defined in fieldMISCELLANEOUS.
                                                    You must enter values for the following attributes to ensure theconsistency of the task list:
                                                    • CTRL_KEY (control key)

                                                    • You can only specify a task list group with external number assignment.For internal number assignment, the task list group is automaticallydetermined during processing.
                                                      For information on single parameter fields, see the corresponding dataelement documentation in the ABAP dictionary.

                                                      Value range
                                                      The object type is defined in the field PRT_CATEGORY for the productionresource/tool to be assigned.
                                                      "M",,,,Material
                                                      "E",,,,Equipment
                                                      "D",,,,Documents
                                                      "S",,,,Other

                                                      Description
                                                      In this table, the data is transferred for the reference operation setreferences that are to be created.
                                                      You should create a unique key for each reference in the fieldOPERATION_ID to identify the reference operation. This must contain atleast one non-numerical character (for example, REF01). This key isnever changed for the reference operation.
                                                      You specify the reference operation set to be referenced in the fieldsREFERENCED_TASK_LIST_GROUP (task list group) andREFERENCED_GROUP_COUNTER (group counter).
                                                      You specify the operation number for the reference operation within theinspection plan in the field ACTIVITY.
                                                      You can only specify a task list group with external number assignment.For internal number assignment, the task list group is alwaysdetermined during processing.
                                                      For information on the single parameter fields, see the correspondingdata element documentation in the ABAP Dictionary.

                                                      Description
                                                      All messages that have occured while the inspection plan was createdare collected in this table. These messages can be used as a basis forcorrecting a data inconsistency if necessary.

                                                      Description
                                                      In this table, the relevant header data is transferred for the tasklist that is to be created.
                                                      You must enter a value for the following attributes to ensure theconsistency of the header data:

                                                      • TASK_LIST_USAGE

                                                      • PLANT

                                                      • TASK_LIST_STATUS

                                                      • TASK_MEASURE_UNIT (unit of measure)

                                                      • You can only specify a task list group (attributes TASK_LIST_GROUP andGROUP_COUNTER) with external number assignment. For internal numberassignment, the task list group and the group counter are automaticallydetermined during processing.
                                                        For information on the single parameter fields, see the correspondingdata element documentation in the ABAP dictionary.

                                                        Description
                                                        In this table, the long texts to be processed are transferred by linewhen inspection plans are created or changed. A format parameter canalso be transferred for each line.
                                                        The long text lines that are assigned to an object are determined usingboth attributes LINE_FROM and LINE_TO for table TEXTALLOCATION.
                                                        For information on the single parameter fields, see the correspondingdata element documentation in the ABAP dictionary.

                                                        Description
                                                        You can use the data defined in this table to assign long texts whencreating or changing inspection plans. First, you must define therespective object type, to which the long text is to be assigned, inattribute OBJECT_TYPE. The following values are allowed:
                                                        "10",,,,Inspection plan header
                                                        "13",,,,Operation
                                                        "15",,,,Reference for reference operation set
                                                        "17",,,,Production resource/tool
                                                        "19",,,,Inspection characteristics
                                                        You can enter values for the additional attributes of each object typeto clearly identify the object. The attributes LINE_FROM and LINE_TOare pointers to the corresponding text table, in which the current longtext lines are to be transferred. LINE_FROM defines the first line ofthe long text. LINE_TO represents the last line.
                                                        You must enter values for the following attributes to ensure theconsistency of the operation:

                                                        • INSPCHAR_NO (inspection characteristic number)

                                                        • CHA_TEXT_TYPE (text for inspection characteristic)

                                                        • "C" for the inspection characteristic long text
                                                          "S" for the physical-sample drawing long text for the inspectioncharacteristic
                                                          For information on the single parameter fields, see the correspondingdata element documentation in the ABAP dictionary.

453765No date check BAPI for master record objects QM