SAP ABAP IMG Activity N1_PERFORM_SRV_CHECK (BAdI when Performing/Releasing Services - Check)
Hierarchy
BBPCRM (Software Component) BBPCRM
   CRM (Application Component) Customer Relationship Management
     CRM_APPLICATION (Package) All CRM Components Without Special Structure Packages
       NORD (Package) R/3MED: Services processing EDV-G
IMG Activity
ID N1_PERFORM_SRV_CHECK BAdI when Performing/Releasing Services - Check  
Transaction Code S_KK4_98000142   (empty) 
Created on 20040107    
Customizing Attributes N1_PERFORM_SRV_CHECK   BAdI when Performing/Releasing Services - Check 
Customizing Activity N1_PERFORM_SRV_CHECK   BAdI when Performing/Releasing Services - Check 
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name N1_PERFORM_SRV_CHECK    

Use

You use this BAdI to perform your own customer-specific checks when performing and releasing services. You can also use this BAdI to cancel the performance/release, or re-call the dialog boxes (Perform/Release dialog box, where the date, time, and employee responsible are entered and the movement reference are created) contained there.

However, this BAdI should not be used to update additional data! The N1_PERFORM_SRV_SAVE BAdI is available for this.

You cannot display your own messages in this BAdI. You can use the error handler (C_ERRORHANDLER parameter) for this, where you can transfer any number of messages to the perform/release function. This function will then display the messages.

The I_FUNCTION parameter provides information whether the service(s) will be performed or released:

  • I_FUNCTION = 'DONE': Services will be performed
  • I_FUNCTION = 'REL': Services will be released

When performing/releasing, the system will call this BAdI at three different times. You can determine at which time the BAdI is being called using the I_ACTION parameter:

  • I_ACTION = 'POPUP': After the Perform/Release dialog box (this is the dialog box where you enter the date, time, and responsible employee). The services, where the statuses will later be set to "performed" or "released", are transferred to IT_NLEI and IT_NLEM. IT_NLLZ is blank. I_DATE and I_TIME contain the date and time which were entered in the dialog box. I_EMPLOYEE contains the responsible employee entered in the dialog box. I_NBEW is blank, as the movement reference will be created later. You should note that the services will be transferred to the BAdI in their original state this time, i.e. in their original status and possibly without a case reference.
  • I_ACTION = 'MOVEMENT': After the movement has been determined. Again, IT_NLEI and IT_NLEM contain the services to be changed and IT_NLLZ is blank. I_DATE, I_TIME, I_EMPLOYEE are filled as above. I_NBEW now contains the movement, which was previously determined (when releasing performed services I_NBEW is blank).
    Again, services will not be written to the database in this state.
  • I_ACTION = 'UPDATE': Before the update is called. Here the data now has the format with which it will be written to the database, i.e. the case reference has been created, and the service status has been changed. IT_NLEI and IT_NLEM contain the services which will be written to the database. IT_NLLZ contains the connection records between the services. I_DATE, I_TIME, I_EMPLOYEE and I_NBEW are not filled here.
    You should note that once this point is reached, it is only possible to completely cancel the performance/release. You can no longer re-call the dialog boxes of the other times.
    You should also note that, if you are performing/releasing performable and non-performable services together, this time the system will call the BAdI separately for the performable and non-performable services and the tables (IT_NLEI, etc.) will only contain the services, which are currently being processed (i.e. performable services first and then non-performable services, which must be replaced).

You can control the perform/release process using the return parameters of the BAdIs. The parameters have the following meanings:

E_RC: This is the return code. As with SY-SUBRC, E_RC = 0 means that the corresponding function call was successful. E_RC <> 0 means that an error occurred and the performance/release will immediately be canceled. If you also wish the system to display the error messages, you can transfer them to the C_ERRORHANDLER parameter.

E_CANCEL_ACTION: You can use this parameter to determine that the previously executed dialog box (i.e. either the perform/release dialog box or the movement search dialog box) should be called again. If you set E_CANCEL_ACTION = 'X' the system will execute the dialog box again. This means that you can check the data which was entered in the perform/release dialog box and to re-call the dialog box as often as required, until the data you desire has been entered.


Requirements

Standard settings

The BAdI is not active as standard.

The BAdI cannot be used multiple times.

The BAdI is filter-dependent. The filter type is the data element ISH_COUNTRY (country version of IS-H).

Activities

After you call the IMG activity, the system displays a dialog box where you enter a name for the implementation.

If implementations of this Business Add-In have already been created, the system displays them in a dialog box. You then choose one of them by choosing Create, and continue as follows:

  1. In the dialog box, enter a name for the implementation of the Add-In and choose Create.
    The system displays the initial screen for creating Business Add-In implementations.
  2. On this screen, enter a short description for your implementation in the Implementation Short Text field.
  3. If you choose the Interface tab, you will notice that the system has populated the Name of the Implementing Class field automatically, by assigning a class name based on the name of your implementation.
  4. Save your entries and assign the Add-In to a package.
  5. To edit a method, double-click its name.
  6. Enter your implementation code between the method <Interface Name>~<Name of Method>. and endmethod. statements.
  7. Save and activate your code. Navigate back to the Change Implementation screen.
    Note: You can also create an implementation for an Add-In and not activate it until later. If you want to do this, do not perform the following step:
  8. Choose Activate.
    When the application program is executed, the code you created is run through.

Example

See also

Methods: EXIT_PERFORM_CHECK

Business Attributes
ASAP Roadmap ID 257   Create User Exits 
Mandatory / Optional 2   Optional activity 
Critical / Non-Critical 2   Non-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 N1_PERFORM_SRV_CHECK 0 I010004302 Service Management 
Maintenance Objects
Maintenance object type E   Business Add-In - Definition 
History
Last changed by/on SAP  20040107 
SAP Release Created in 472