【Message Control NACE】Configuration of message control

https://blogs.sap.com/2014/05/26/configuration-of-message-control/

Message control is a technique to control output of an application like invoice generation by print/mail/EDI or conditioning technique is a cross-application component used in several different areas. The biggest application is in pricing but also use for output determination in EDI.

          It is used to generate and manage output from an application and control their timing and medium of exchange.

/wp-content/uploads/2014/05/1_460210.png

 

Following outputs can be create when sales order is created:

  • MAIL: An internal mail message to the production control staff immediately
  • FAX: A sales order response to the customer via fax immediately
  • PRINT: Printed output for warehouse personnel when necessary
  • EDI: A sales order response to the customer via EDI at night
  • WORKFLOW: Workflow notification to the quality engineer at the end of the day
  • ALE: A sales order to another system via ALE 

The o/p depends on several conditions like for 3000 no customer send EDI otherwise print output.

Lots of applications are message control enabled, complete list of applications can find out by using the TCODE :NACE. This tcode use to execute the below components and used to do configurations.

Message control components:

  1. Messages, condition types or messages types refer to the Output types.
  2. Message schemas refer to procedures.
  3. Condition type and condition record are two different things.

 

Below chain diagram shows the configuration of message control:

/wp-content/uploads/2014/05/2_460374.png

Application ID: First need to identify the application for which we are going to do message control configuration

/wp-content/uploads/2014/05/3_460375.png

Communication Structure: It is used to make communication between application and message control. It acts as a container. It is naming convention is KOMxByy, where can be K or P. K means the header structure and P means the line−item structure. yy is the two−character application ID. Hence, KOMKBV1 is the communication structure for sales order header information.

Procedure: It is used to define the set of possible outputs, but only one can be configured as active. It has three main attributes which we need to configure.

  1. List of output types: It is set of outputs, that system evaluates for proposal to be output.

/wp-content/uploads/2014/05/4_460376.png

    2. Steps sequence to condition

    3. Requirement: This is used to define the prerequisites for an output ex. Sales order response should not be sent out unless the sales order is complete. For encapsulating logic for requirement go to the F4 help for particular requirement and select the requirement from F4 help then click on source text icon.

/wp-content/uploads/2014/05/5_460377.png

Then do coding as per your prerequisite requirement. For ex.

     form kobev_062.
      sy–subrc = 4.
      check : komkbv3–uvall ca ‘ C’.
      check : komkbv3–uvprs ca ‘ C’.
      check : komkbv3–uvals ca ‘ C’.
      check : komkbv3–relik eq space.
      check : komkbv3–rfbsk eq ‘C’.
      sy–subrc = 0.
   endform.

    4. Manual only: propose the output manual, meaning does not prompt to automatically.

We can create new procedures, output types, and requirements to your needs.

Output Type: It defines the characteristics and attributes of the output itself. To access go the tcode NACE by selecting application followed by the output type button click. Define the following attributes for the output type

/wp-content/uploads/2014/05/6_460378.png

Genral Data Tab

  • Access Sequence. Basically, this is a set of business rules.
  • Access to Condition:  if this flag set, the values for the output medium and timing are determined from the condition records using the access sequence.
  • CannotBeChanged: This determines whether the output can be edited.
  • Multiple IssuingThis determines whether multiple outputs are permitted.
  • Change Output: specify the program and form routine that determines whether changes made to the document             are relevant for sending the output in a change mode.

Default Value Tab

  • Transmission Medium. Possible values include EDI, print, SAP office mail, workflow, and ALE.
  • Dispatch Time. This determines whether the message is sent immediately or in batch.

            Other tabs are used to do some basic configuration like Storage mode, sort order, etc.

Access Sequence: It defines the sequence in which order business rules are encapsulated in against of proposed output types. Under this business rule values are cross checked with the values passed during application document generation. To view this go to the NACE tcode followed by the application module under which click the Access Sequence button.

            Each access sequence can also have some preconditions, which we can defined as same as defined on procedure level.

Select the sequence under which select the accesses.

/wp-content/uploads/2014/05/7_460379.png

Here, the exclusive or inclusive strategy specifies whether the system should exit after the first match of the business rule against the condition records or should continue to process other business rules in the access sequence.

/wp-content/uploads/2014/05/8_460380.png

On further drill down to Fields we can get the fields we are going to validate in condition records.

/wp-content/uploads/2014/05/9_460381.png

Condition Records: The records which are going to check with the application data are inserted in condition table. It contains the actual data against which the business rules are checked to propose an output. These records are considered master data.          

/wp-content/uploads/2014/05/10_460382.png

As the above procedure use to configure message control for any application defined under NACE.

Below are from help.sap.com

http://help-legacy.sap.com/saphelp_45b/helpdata/en/e7/dc2c7dd435d1118b3f0060b03ca329/content.htm

Tips for Fast Message Determination Setup

In this step, you are shown how to set up the message (output) determination facility quickly. In this case, you need not read the Implementation Guide (IMG) for the other steps to set up this facility, or need only read certain parts of it.

Setting up the message determination process: options

Message determination deactivated

You can output purchasing documents without the message determination facility. In this case, you must not assign any message determination schemas to the the individual purchasing documents (RFQ, purchase order, etc.). The system then generates a message of the type NEU (new) for each document to be outputted. To determine the printer, the system first checks the settings for the purchasing group. If no printer has been maintained there, it checks the user parameter. If no printer has been specified there either, the system checks the fixed value for the user. If no printer has been specified, the system does not generate a message record.

Message determination activated

Adopt standard setting

In the standard system, the message determination facility is active. A message determination schema is supplied for and assigned to each purchasing document. If you wish to work with this standard setting, you need not make any changes in Customizing.
It is necessary that you maintain condition records for the desired message types:

          1. Choose Master data -> Messages -> <Purchasing document> -> Create or Changefrom the Purchasing menu.

    2. Enter the message type and choose the key combination. The latter determines the condition table in which the condition record is stored.
    3. Make the necessary entries.
    4. On the next screen, create the individual condition records.
      5. Via the menu options 

Goto -> Means of communication

    , enter the desired means of communication (e.g. EDI, or an output device such as a printer) for each message record.
    6. Save your data

Include new message type

If you wish to do this, you must

    1. Create the message type and define its fine-tuned control (e.g. whether the message type is to be used only for new printouts or only for change notices),
    2. Assign the message type to a schema,
    3. Define the message determination
    4. Maintain condition records for the message type, as described above.

How is the printer determined for message output purposes?

The system checks whether a printer has been specified in the condition record.
If so, it is used.
If not, it checks the message type to see whether a print parameter has been set. If no parameter has been set, no message is generated.
If a parameter has been set, a printer is sought in accordance with this parameter. If a printer is found, it is used to output the message. If not, no message is generated.

Note:

You can change the printer when outputting messages (e.g. via the menu options Purchasing document> -> Messages -> Print/transmit):

          1. On the initial screen, select 

With message detail function

          2. On the list of documents to be outputted, choose 

Goto -> Message details,Edit -> Means of communication

原文地址:https://www.cnblogs.com/potatoo/p/6927562.html