SAP ABAP IMG Activity /MRSS/SGU_RES_MESSAG (BAdI: Send Messages to Resources)
Hierarchy
MRSS_NW (Software Component) SAP Multiresource Scheduling for SAP Net
   PM-WOC-MO (Application Component) Maintenance Orders
     /MRSS/SGU (Package) User Interface for Interactive Planning Board
IMG Activity
ID /MRSS/SGU_RES_MESSAG BAdI: Send Messages to Resources  
Transaction Code /MRSS/01000027   (empty) 
Created on 20070226    
Customizing Attributes /MRSS/SGU_RES_MESSAG   BAdI: Send Messages to Resources 
Customizing Activity /MRSS/SGU_RES_MESSAG   BAdI: Send Messages to Resources 
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name /MRSS/SGU_RES_MESSAG    

Use

You can use this BAdI to send short messages to resources in the planning board. The BAdI is used in the application component PM-WOC-MO. It is called when the resource planner wants to send a short message to the resource using the context menu for the resource.

Requirements

  1. You have defined the permitted communication types in the Customizing activity Define Permitted Communication Types for Short Messages to Resources.
  2. You have maintained the communication data for each resource in the HR master record under the "Communication" infotype.

Standard settings

The BAdI is not active in the standard shipment. There is no default implementation. The BAdI is not filter dependent and not intended for multiple use.

The BAdI provides the following methods:

  • CHECK_COMM_DATA: This method checks the valid communication data for the resources.

    Changing:
    CT_EMP_COMMN - Table with list of personnel numbers and communication types that exist in HR

    Exporting:
    EV_FAILED - X if SMS is not to be sent to any resource

    ET_MESSAGES - Table with messages
    This method obtains the personnel numbers of the resources and their corresponding communication types that are maintained in the HR master record in the "Communication" infotype.

    The personnel numbers of the resources to which the SMS is to be sent are filtered in accordance with the customer logic: If CT_EMP_COMMN is blank (that is, no resources exist to which the SMS is to be sent), EV_FAILED has to return the value X.

    The returned CT_EMP_COMMN is filtered again based on the communication types that are maintained in the Customizing table (see prerequisite 1). Note: This occurs after calling method CHECK_COMM_DATA.
  • SEND_SMS_TO_RESOURCE: This method sends the message to the resources selected in the dialog box. It is called once the user has confirmed the text entries.


Importing:
IT_RECIPIENT - List of recipients
IS_SUBJECT - Subject line of short message
IT_TEXT - Text/Content of short message
EV_FAILED - If sending the message fails for at least one of the selected resources, EV_FAILED X is returned.
ET_MESSAGES - Message table consisting of the error messages and the details of the resource to which the message could not be sent

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

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 /MRSS/SGU_RES_MESSAG 0 HLB0009110 Cross-Application Components 
Maintenance Objects
Maintenance object type E   Business Add-In - Definition 
History
Last changed by/on SAP  20090903 
SAP Release Created in 606