You are on page 1of 37

Contents

Introduction .................................................................................................................................................. 2
Configuration ................................................................................................................................................ 2
Create condition tables ............................................................................................................................. 3
Define Access Sequence ........................................................................................................................... 7
Define Message Type .............................................................................................................................. 12
Define Fine-Tuned Control: Purchase Order ........................................................................................... 14
Define Message Determination Schema ................................................................................................ 17
Assign Message Determination Schema to Purchase Order .................................................................. 20
Create Message Master Records ................................................................................................................ 22
System Demo .............................................................................................................................................. 27
Print messages for multiple purchase orders ............................................................................................. 34
Condition Technique used in message determination ............................................................................... 35



Introduction
"Messages" are forms of output send to vendors in the purchasing processing. It is based on a MM
document in SAP (Such as purchase requisition or purchase order) and also it can be a printed document
based on the purchase order or an output sent via EDI. SAP is using famous condition technique for
message control as well. (Click here to see more details about the condition technique in SAP)This is
same as output type configuration in SD. You can view more info on this regard using this link.
Let's see how you can configure message control settings for purchase orders.
Configuration
IMG Path:

The complete configuration is done under above IMG node.
Create condition tables
IMG Path:


Under this IMG node, we can create a new condition table. But before creating a new condition table,
please check whether you can use standard SAP tables. Only if those cannot be used, then create a new
table by copying an existing table. If you want to create a new table, the new table number has to be
between 501 and 999.
For example, I will create a new condition table "999".
Enter the new table number in the field "Table". If you want to copy an existing table, insert the
existing table number in the field "Table" under section "Copy from condition"

Press Enter key. Then you will be able to see the below screen

Double click on the fields in the section to add it to the section. The
fields in the section will be used for the condition table generation. Please
make sure to double click in the sequence you want them to see in condition record
maintenance. Eg: If you want the new table to be Purchasing Doc. Type / Purch. Organization /
Vendor, then you need to double click on the same sequence
Once you double click on it, those fields will be moved to section

The description of the table will be automatically generated, based on the fields you move to
section. If you want to change this description, you can do it by selecting the
button . Once you press this button, you should be able to edit the table description.

As you see above, the field descriptions are displayed. If you want to see the technical names of
the field you have added, you can press the button . Then you will see those fields
as below

The column , determine where the field should be appear (Header or Footer) in the condition
master record creation.
Once all fields are added successfully, generate the new table by selecting button . You will
have to select the correct development package for this as table generation is a "Workbench
task"

Once table is successfully generated, you should be able to see the log as below

Please note that; this new table was generated with the prefix "B". If you want to view this table in
transaction SE11 or SE16, you need to maintain the table name as "B999". (For pricing condition tables
the prefix is "A")


In the same manner you can create multiple tables which need to be added in to the access sequence
later. Tables you have created under this step will be used to create an access sequence for the
condition type.
Define Access Sequence
In the message control settings, the next step is to create an access sequence using condition tables.
This access sequence will be assigned to the message type. When determining message in the purchase
order, system will go through the access sequence (Looking for condition table entries) for a valid
condition record.
IMG Path:

Create your own access sequence by pressing button

Give a name and a description for your new access sequence. Then highlight the access
sequence and double click on the node to add your condition tables

Press button to add the tables in the sequence. Under "No." Column; maintain a
sequence for those tables. It is always advisable to keep a gap between each step number. If you
have a gap, later you can add a table in between 2 steps. Therefore I will add tables with steps
numbers as 10, 20, 30, etc

Please note down below columns in the access sequence.
o Requirement -
Under this column, you can assign an ABAP Routine to your condition table. Only if the
requirement is valid, the condition record will be determined in the purchase order.
If you want to create a new requirement routine, you can do it under below IMG Path:
IMG Path:


You will have to get a ABAP developer help to create a new requirement routine. Once
new requirement routine is created, you can assign it against your condition table under
column "Requirement"
o Exclusive -
This field control whether system stop searching for a valid condition record after the
first successful access within this access sequence
Once tables are added with the step numbers, highlight each table and double click on the node
.
Important:
If you don't do this step, the field assignment will be note generated in the access sequence. Therefore
system will never able to find a record for this access level. Therefore it is very important to go to
node for each table you have added to the access sequence.

Step 10:

Step 20:

Once this step is done for all tables, please save your access sequence

Define Message Type
Under this IMG path, you can create a new message type for your purchase order.
IMG Path:


Standard SAP message type for purchase orders is "NEU". You can copy that and create your
own message type. Else select button to create a new message type.
Under "Genera data" tab do below;
o Give a ID and description for the message type
o Assign the new access sequence for the message type

Under "Default values" tab, you can set below;
o Dispatch time - This is to define how the message should be generated when the
purchase order is created in the system. But the setting you do under this field will only
to define a default value for the message type condition record creation. You can
change this setting in the condition record
o Transmission medium - This is to specify how the message should be transmitted to the
third party (Vendor). Eg: Print out, EDI Message, etc
o Partner Function - Default partner function which the message should be sent to. This
will be proposed during message master record creation.


Double click on the node to add the print program and the form for the
print out generation under Medium "1 - Print output".
You can ask your ABAP developer to create a new print program based on the print layout which
needs to be sent out to the vendor. This should contain all relevant details of your purchase
order for this vendor

Once you're done, save the new message type
Define Fine-Tuned Control: Purchase Order
IMG Path:


This configuration is mandatory, if you want to system to determine a message automatically in the
purchase order.
Press to add a new record

With the operation "1 - New" add your new condition type

Save the record
Important:
If you do not maintain above record, system will not automatically determine a message during
purchase order creation.
o You will see below warning message during purchase order creation

Message No: 06261
Message Text: No message generated for output of purchasing document
Message details:

o If you go to "Message" option, you will not see the message

o If you look at the message determination analysis in the purchase order, you will see that the
message has been found.

Therefore, in order to avoid such an issue in the purchase order on automatic determination of
messages, please maintain fore said entry.
Define Message Determination Schema
Now the next task is to create a new message determination schema and assign the newly created
condition type to it. This message determination schema is like a basket which contains all message
types which should be considered when creating purchase orders. Therefore you will have to assign this
schema later to your purchase order type.
IMG Path:


Standard message determination schema is RMBEF1. You can create your own one if required
In order to create a new schema, press the button

Once it is done, highlight the new schema, and double click on the node

Press button to add the message type to this schema

Like in the access sequence, it is always advisable to have step numbers with a gap. Within one step
number, you can have multiple counter numbers to represent different message types.

Please note down below fields in the schema
o Requirement -
If you want to satisfy any specific requirement for a message type, you can create a
routine to check that and assign it under this field.
o Manual Only -
If you want this message type to be determined only manual, then mark that field.
Like shown above, you can add multiple message types to this schema. Once purchase order is
created, system will go through each condition record to find a valid master record.
After adding all message types required, save the schema

Assign Message Determination Schema to Purchase Order
Under this IMG path, you need to assign the newly created message determination schema to purchase
order.
IMG Path:


Under this IMG node, please assign the new schema.

Here you have to assign your schema based on the usage and application area.
Save the assignment
The major difference between output type in SD and messages settings in MM is that; In SD, the output
determination procedure can be attached to each sales document type under below IMG Path:
Therefore you can have any number of output determination procedure based on the sales document
type. But in MM, you can have only one schema per application.



Let's look at the sales document type "OR"

Therefore it is good to have the purchase document type as a field in the message condition table.
Create Message Master Records
Transaction: MN04
Easy Access Menu Path:

Select your message type and press Enter key

Based on the access sequence (The condition tables) attached to this message type, the popup
will appear to select the relevant access level (Condition table). If there is only one condition
table in the access sequence, then there will be no popup.

Above is same as my access sequence customizing (See below)

Select the relevant access level (Condition table) and press Enter key
Fill the values based on the condition table entries

Things to remember:
Here you should be able to see the "Medium" is shown as "1 - Print output" and the
"Date/Time" is set to "4 - Send immediately (when saving the application") and the "Partner
function" is shown as "VN". These default values appear based on the default values you have
set in the message type customizing.

But you can override these values. The values in the message master record will have a higher priority
over configuration. Configuration is only to provide a default value in the master record creation.
The other thing you should see here is the fields "Purchasing Doc Type
and "Purch. Organization" appears in the Header of the screen. This is because, in the condition
table "999", we specify those fields as header fields (Rather not Footer fields).

Now if you create another table with "Purch. Organization" marked as a "Footer Field"; then you will see
the "Purch. Organization" field appear together with "Vendor" field during message master record
creation.
For example I will create a new table "998" with "Purch. Organization" field marked as "Footer field".
See the difference now;

The advance table of having more fields in the footer is, you can enter multiple records inside MN04
transaction without saving. Else you need to save the record before going in to other combination.
Highlight the line and click on the button . Under this button you can maintain
when the output needs to be printed, etc



Eg:

The advantage of having "Local destination" as "LOCL" is, when your purchase order is created in the
system, the message will be directed to the default printer in your local machine. Based on where your
printer is physically located, user can get the printout.
Once all data is entered, save the message master record
Now if you check the table "B999", you should be able to see this record


System Demo
Let's create a purchase order with purchase document type "NB" in the purchase organization "A300"
for vendor "A400" to see how message get determined.
Transaction: ME21N
Click on the button to check the message

As you see below, the message is automatically determined.

If you click on the , you will see the dispatch time is set to "4" This is coming from the
message master data setup you have done.


Now if you go back and click on the button, you will see other values also
set based on the message master record


If you go to menu -> Go to / Determination Analysis, you can see how this condition record was
determined.

Based on below criteria (From the message master record), this message was determined in the
purchase order

Save the purchase order
Since the dispatch time was set to , system
generate the output immediately
Based on the print program and Form attached to your message type, the layout will be
displayed.
Eg:

Now if you check the button in the purchase order, you can see the status was set to
"Green"

You can check the processing log in the button

If you want to re-create the same output, highlight the existing message record in the screen
and press the button .
It will add another line to the same screen. Now you can process that as you did before.

After you press the button, the new line will be added as below;

You can preview this output within the purchase order by pressing the button .
This will generate the print preview within SAP system

Eg:


Print messages for multiple purchase orders
The above explained method will generate purchase order message for each and every purchase order
saved in the system. Let's say business wants to print all purchase order printouts at the end of the day
without printing one by one. SAP has provided a transaction for bulk printing of purchase order
messages.
Transaction: ME9F
Easy Access Menu Path:

Go in to the transaction
Using proper selection criteria get all purchase order which needs to generate a message
Keep the "Processing Status" as "0 - Not processed"
Execute the program using button

Now you will see all messages which were not processed in those purchase orders
Select all purchase orders by selecting and press the button

Now all messages for those purchase orders will be printed.
Condition Technique used in message determination
Now let's see how system determined the message type "ZAW1" for this purchase order. The
determination steps are known as condition technique in SAP.
1. When you create the purchase order, based on the purchasing application, it determined the
message determination schema to the purchase order -> IMG: Assign Message Determination
Schema to Purchase Order. Here you have assigned the message determination schema to the
purchasing application
2. With the determined Message Determination Schema, all message types attached to it also
follow -> IMG: Define Message Determination Schema. Here you have attached all relevant
condition types to the schema
3. Based on each message type, now system gets the corresponding access sequence attached ->
IMG: Define Message Type. Here you have attached the access sequence to your message type
4. From the access sequence, now system gets all condition tables attached to it -> IMG: Define
Access Sequence. Here you have attached your message condition tables to the access sequence
5. If there is any requirement routine assigned to the access sequence and if it is satisfied, now
system accesses those condition tables. This is based on the message master data you have
setup in the transaction MN04.
6. If there is any table entry found, system determined that message type to the purchase order
7. Based on how you have setup the message master record, system will process the message
immediately or wait till a background job execute it
This can be summarized graphically as follows;


Author: Anupa Wijesinghe
E-Mail: anupaw@gmail.com / anupaw@learnsaptips.com
Website: www.learnsaptips.com
View my profile in LinkedIn
Follow me on Twitter


Disclaimer

This article is done based on my research and readings, unless otherwise stated. The views expressed
are my own and not of anyone else.
Author accepts no liability for the content of the articles in this website or for the consequences of any
actions taken on the basis of the information provided. Using this information is at the users own
discretion and responsibility.

You might also like