Sei sulla pagina 1di 14

SAP: Message control / Output control

Configuring Message Control and understanding how Message Control


works

Most SD and MM process use Message Control. The concept of Message control is to generate and
manage outputs from an application and control their timing and medium of exchange.

Below are the details for configuring the message control and understanding how message control
works.

Configuring Message control:

Message Control Components:

Communication Structure:

The communication structure passes application information to the Message control. The
communication structure for output determination uses the naming convention as KOMxByy, where x
can be K (header structure) or P (Item structure), and yy is two character application ID.

The two character application ID can be found from the NACE transaction depending on the
application.
The Procedure

A Procedure defines a set of possible outputs for an application. A procedure is assigned a six
character name. Several procedures can be defined for an application but only one can be configured
as active.

A list of procedure can be seen in NACE transaction for the required application.

A procedure has three main attributes:

- A List of output types – set of outputs that are possible for an application

- A Requirement field

- A manual flag

Set of Outputs those are possible for applications are listed in the output types.
Manual Flag is set if the output has to be selected by the user manually instead of selecting
automatically.

For Sales, Procedures can be assigned to Sales document type using V/43 transaction.

Preconditions are captured in Requirements. These conditions are written in VOFM transaction.

We can write the conditions for the Requirement selected from the above list by creating routine which
will start from 900.
ABAP code can be written in the routine for checking the condition.

Output Type:

An Output type defines the characteristics and attributes of the output itself.

Output type can also be selected from the NACE transaction.


Access sequence is the set of business rules for proposing an output type.

If the flag “Access to condition” is set then the medium and timing are determined from the condition
records using access sequence.

If the flag is not set then the medium and timing data is taken from the customer master.

“CannotBeChanged” determines whether the output can be edited.

“Multiple issuing” determines whether multiple outputs are permitted.

Access Sequence:

Access sequence defines a sequence in which the business rules are checked for proposing an output
type. A business rule is checked by comparing the values passed in the application data with the
values defined in the condition records of the condition table. If a match occurs the business rule is
considered satisfied. After a business rule is satisfied the output values from the condition records are
used for the output type.
The “exclusive” or “inclusive strategy” specifies whether the system should exit after the first match of
the business rule against the condition record or should continue to process other business rule in the
access sequence.

The reason for an inclusive strategy is to have an output type proposed multiple times. However, one
of the attributes (partner function, partner number or language) must be different. The system does not
allow two output types to have identical values.

Condition Tables:

The condition table specifies the key field for a business rule. You use this key to access the condition
records for output values such as output medium, partner function, partner number, output language
and output time for the message.
If the standard condition tables supplied in the system do not meet your requirements, you can create
new condition tables.

Condition Records:

Condition records are inserted in the condition tables. Condition records contain the actual business
data against which the business rules are checked to propose an output. They are considered master
data maintained by customer.

You can create condition records for the each application in NACE transaction by clicking the condition
record button for the required application.

You will have to select the business rule for which condition record is to be maintained.

Specify the values for the key fields and maintain the output medium, output timing, partner number
and partner function for each record and save the entries.
Message Control is a three step process:

1. Output proposal
2. Output editing
3. Output processing

Output Proposal

When an application is created or changed, after saving the application data the communication
structure is filled and is passed to the Message control along with the application id (f.ex EF for
purchase order) and procedure (f.ex RMBEF1 for purchase order).
The various outputs defined in the procedure are processed one at a time. The output marked as
manual will be processed manually by the user.

The requirement, if specified for an output type is executed to check if the output meets the
requirement. If the requirements are met then further checking continues.

If the conditions are not met then the next output type will be processed from the list.

The short listed output types are checked for the access condition flag.
If the flag is not set then the output medium and timing are determined from the customer master
data.

If the access condition flag is set then the processing continues for determining the output medium
and timing (this is stored in the condition records). For these output types the access sequence
associated is accessed for various business rules and determines which of the business rules are
satisfied. The values from the communication structure are checked with the values maintained in the
condition tables.

F.ex: Access Sequence ‘Z001’

Accesses the condition tables: B918/B27/B900/B26 and B983 and it searches for a valid condition
record:

In the condition record (master data) we store the output medium, output timing, partner number and
partner function (tx MN06):
Output Editing:

After the output proposal process is completed, the list of proposed outputs displays on the output
control screen of an application as shown below. (These are the entries in the NAST-table after
saving the application data.)

Cfr. NAST

To reach he output control screen we can got for Extras ->Output->Edit (for sales order) or by Goto-
>Messages (for Purchase order).

The initial status of these outputs will be 0 (Not Processed) which is displayed as yellow light.

The processed outputs will be displayed as green light.

For EDI, the partner number in the proposed output is validated against the partner profile entry.
The flow chart below explains the Output proposal procedure.

Output Processing:

After the final selection of the output is done and the application document is saved, entries are
created in the NAST table with application ID, Application document number, output type, output
medium, output timing and Status code.

If the output is not processed the Status code will have values as 0 (Not processed).

The entries in the NAST table are processed by RSNAST00 program. If the entries whose timing is set
to immediately (NAST-VSZTP = 4 (dispatch time picked up from the condition record)), the program
will immediately process those entries. For other entries you will have to schedule the program
RSNAST00 (RSNAST00: is the selection program for Issuing Outputs, it issues outputs from all
applications with send times 1 and 2 (NAST- VSZTP (=dispatch time).)

Dispatch Time 1: The message is processed through report program RSNAST00.


This report program can be scheduled periodically or started
manually.

Dispatch Time 2: As in time 1, but the message contains an earliest


processing date and a requested processing time. The message is
ignored by report program RSNAST00 before the requested date.

Dispatch Time 3: The message is selected and processed by application


specific programs. Processing can take place online or in the
background.
Dispatch Time 4: The message is processed when the application document is
saved. No further processing of the message is necessary.

The RSNAST00 program checks the TNAPR table for each entry from NAST table and processes the
program associated with the output medium in the TNAPR table.

For EDI a Standard routine EDI_PROCESSING exist in RSNASTED program.

(RSNASTED: Analysis of NAST Record for Output Type 6 (EDI)

Report for processing a NAST record for the message type EDI.
Exactly one NAST record is processed. Depending on the definitions for the output mode maintained
in the EDI partner profile, only one Intermediate Document is generated or written directly to a file and
the external converted is, possibly, also initiated. The routine EDI_PROCESSING is usually called
automatically by the
program RSNASTED.)

The EDI_PROCESSING routine reads the Message control record in the partner profile and
determines the process code.

The process code will be having a Function module which will be having the standard interface for its
input and output parameters. The function module will read the application document data and will
format the data into the idoc format.

The idoc data and the control record from the function modules received through the output
parameters will be used by the EDI_PROCESSING program to convert it into physical Idoc.
The complete Outbound process with Message control is as shown below:

The setting of the Output mode field in the partner profile is read to determine the timing for
dispatching the idoc.

If the mode is set to ‘Transfer Idoc immed.’ then the idoc is immediately passed to the operating
system and if the mode is set to ‘Collect Idoc’ then the Idoc is not immediately passed to the operating
system until the RSEOUT00 program is executed explicitly.

If the flag for ‘Start subsystem’ is set then the subsystem program name is read from port definition
and the subsystem program is started.

Potrebbero piacerti anche