Fonction SAP BAPI_MATINSPCTRL_REPLICATE - Prepare Inspection Setup (Inspection Types) for Distribution

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
MATPLNT BAPI1001004_MATPLNT u 104 Material and Plant

Paramètre Reférence Long. Facultatif Description
INSPTYPE_DEL BAPI1001004_DEL 8 X Inspection Types to be Deleted
RECIPIENTS BAPI_RECEIVER 10 X Target System(s) for Inspection Setup
RETURN BAPIRET2 548 Standard Return Parameters


This function module is defined as a BAPI and collates the inspectionsetup for distribution using ALE.
The filter object types are loaded from the distribution model and thenthe current values to be sent are written to the structurefilterobject_values depending on these types. The logical systemsinvolved are read from the distribution model using a function modulein connection with filterobject_values.
The import parameter is a structure that contains the material and itsplant. The inspection setup data for this material/plant combination isdistributed.
The function module is called once for each material/plant combination.The parameter INSPTYPE_DEL in the form of a table can (but must not)contain data for the material/plant combination to be transferred.
  • Data for the material/plant combination is loaded from QMAT and the
  • inspection setup for this material/plant combination is completelysent.
    Within this function module, a conversion is performed
    from the internal display (QMAT fields) to the display of external datafields (BAPI data fields).
    Import parameter:
    • MATPLNT is a key field, which contains the material and plant. This
    • data completely characterizes the material master and inspection setup.
      • INSPTYPE_DEL: If this parameter contains data, these are inspection
      • types that should be deleted generically (that is, with a place holder,if required) for the specified material/plant combination. INSPTYPE_DELis transferred in table form.
        Export parameter:
        • RETURN is the standard return parameter for a BAPI and issues messages
        • if there are errors.

          Description
          This import parameter is a structure that comprises a material numberand a plant description. This parameter describes the material-plantcombination to which the inspection setup is to be sent.

          Value range
          You have not defined a range. You can only specify one material-plantcombination. For example, if several materials, 'n', should betransferred, the module must be called up n-times. You should ensurethat the material-plant combination really exists in the source system,otherwise data cannot be edited or sent.

          Description
          This parameter has entries if inspection types assigned to a materialin the target system is to be generically deleted. Example: Ifinspection type '01' is to be deleted for the specified material, thevalue in the parameter INSPTYPE_DEL is '01'. If all inspection typesshould be deleted for the material, INSPTYPE_DEL is '*'. If allinspection types should be deleted for the material, the followingtemplate corresponds: '1?', (where ? can be a user-defined ASCIIcharacter), then INSPTYPE_DEL is '1?'.

          Value range
          The range of this parameter depends on the used inspection types andcan comprise of the special characters '?' and/or '*'.

          Description
          This parameter is the standard parameter for the return of messages. Ifa message (the message type is not important) is written within thisfunction module, the message is stored in this return table.
          Because exceptions are not allowed in BAPIs, this is the only way toreturn messages. If this table is empty, no errors have occured. Theparameter is required for a BAPI.