SAP ABAP IMG Activity IM_SM_BADI_READT399A (BAdI: Assign Work Center to Service Product)
Hierarchy
BBPCRM (Software Component) BBPCRM
   CRM-CIC (Application Component) Interaction Center WinClient
     INSC (Package) Application Development R/3 Plant Maintenance Customizing
IMG Activity
ID IM_SM_BADI_READT399A BAdI: Assign Work Center to Service Product  
Transaction Code S_AL0_96000861   (empty) 
Created on 20020207    
Customizing Attributes IM_SM_BADI_READT399A   BAdI: Assign Work Center to Service Product 
Customizing Activity IM_SM_BADI_READT399A   BAdI: Assign Work Center to Service Product 
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name IM_SM_BADI_READT399A    

You can use this BAdI to:

  • Generate a missing entry in table T399A during runtime
  • Change the results of accessing this table

Use

This BAdI is particularly suitable for simplified maintenance of service products.This ensures that exactly one combination of maintenance planning plant and responsible work center can be assigned to each service product.

Likewise, an interactive variant, in which the user can use a dialog box to enter data for generating orders, is conceivable.

By using BAPIs for the material master, the maintenance plant or work center methods can be determined according to rules that take into account data from the material master or the product hierarchy.

Restrictions

This BAdI cannot be implemented multiple times.

Further notes

The BAdI will run when table T399A is accessed from a sales order item for the service product and plant in accordance with the specifications.

The following data exists for the import parameter:

  • The plant, which, for example, is transferred to an SD item as a supplying plant (I_WERK)
  • The material number, which must be checked to see whether maintained parameters exist for a service product in the specified plant (I_SVOBJ)
  • The service object ID (I_SVOBJ_ID)
  • An indicator which shows whether repairs processing should be executed (I_RMA_ACTIVE)
  • The system return value after accessing table T399A, which is not equal to zero for non-existent entries (I_SELECTION_SUBRC)
  • The contents of table lines from table T399A, if the selection returned data (I_SELECTION_RESULT)

You can deduce from the service object ID, whether table T399A is accessed within maintenance planning or for the generation of a service order from a sales order. This parameter has the value '06' for maintenance planning, and the value '01' for the generation of a service order from a sales order.

Depending on the value of the service object ID, not all the BAdI's export parameters are used. If the value is '01', the parameters which correspond to the fields from transaction OISD (create/process service products) are evaluated. If the value is '06', those parameters that correspond to the maintainable fields in transaction OISF (process service products for maintenance plan) are the most important.

For changing the results of the selection from table T399A when generating a service order from a sales order, the following fields can be influenced:

  • the responsible work center for maintenance tasks E_T399A_VAPLZ
  • the plant for the responsible work center E_T399A_VAWRK
  • the business area E_T399A_GSBER
  • the key of the planning group of a task list to be integrated E_T399A_STDNR with group counter E_T399A_STDAL
  • the reference type for automatic creation of maintenance-/service order E_T399A_BZGSART
  • the technical reference object category E_T399A_BZGSOBJTYP
  • the equipment number of a sample piece of equipment E_T399A_BZGSOBJ

If the access to table T399A should be influenced from the maintenance plan view, the following fields can be changed:

  • the order category E_T399A_AUART
  • the responsible work center for maintenance tasks E_T399A_VAPLZ
  • the maintenance activitiy type E_T399A_ILART
  • the plant for the responsible work center E_T399A_VAWRK
  • the business area E_T399A_GSBER
  • the key of the planning group of a task list to be integrated E_T399A_STDNR with group counter E_T399A_STDAL

Accordingly, the fields E_T399A_AUART and E_T399A_ILART are not evaluated during the generation of a service order from a sales order, for the determination of the service product from the maintenance plan view there is no evaluation of the reference object data.

After running through the customer-specific logic, the following conditions are checked:

  • For the specification of reference type 03, only reference object category 02 is allowed. The value for the sample piece of equipment is only evaluated for this combination.
  • The combination of task list number and planned alternative must correspond to an existing plan with category "A".
  • The work center must exist and belong to the specified maintenance planning plant.
  • The order type must be indicated as a service order type.
  • The maintenance activity type must be valid for the specified order type.
  • The specified business area must exist.

If one of the conditions is not fulfilled, the system terminates the generation of the service order.

Note that, in principle, the values transferred in the BAdI take precedence over existing entries in table T399A.

If you do not want an active implementation of the BAdI to influence the selection results, you should not fill any export variables, because the system will then exclusively use the value determined by table T399A instead of the BAdI export parameter.

Requirements

Standard settings

Activities

Example

Business Attributes
ASAP Roadmap ID 257   Create User Exits 
Mandatory / Optional 2   Optional activity 
Critical / Non-Critical 1   Critical 
Country-Dependency A   Valid for all countries 
Assigned Application Components
Documentation Object Class Documentation Object Name Current line number Application Component Application Component Name
SIMG IM_SM_BADI_READT399A 0 ALR0000118 Service Products 
Maintenance Objects
Maintenance object type E   Business Add-In - Definition 
History
Last changed by/on SAP  20020314 
SAP Release Created in 470