Thursday, August 29, 2019

Auto mail send at Goods Receipt in SAP

In this post, i am going to explain of setting up auto mail at goods receipt functionality in SAP Materials Management.
Pr-requisite
The basic knowledge of SAP Materials Management (MM) is required to make use of this document in real practice.
 Overview:
 The purchaser or department head or indent-er can get the mail when their material received at warehouse.All the details of the goods receipt can be captured in the mail message.
Purpose of this document
  The goods receipt mail message functionality and the IMG settings required in SAP MM. The details that are relevant for the goods receipt can be captured in the mail message. Hence the buyer is aware of all the information with regard to goods receipt. 

IMG setting:
SAPIMG >Materials Management > Inventory Management and Physical Inventory >Output Determination >Maintain Output Types

The settings for Message type MLGR must be carried out as shown below:


Make sure the program and FORM routine are mentioned as below.


The transmission medium should be Simple Mail, and the partner function is Mail partner.


Make sure that the FORM routine TEXT_PARAMETER is maintained in the Mail tab.


The mail text can be maintained as given below so that the mail recipient gets all the details of the goods receipt.





Maintain Output Determination Procedure:
SAPIMG >Materials Management > Inventory Management and Physical Inventory >Output Determination > Maintain Output Determination Procedures
SAPIMG > Materials Management > Inventory Management and Physical Inventory > Output Determination > Maintain Conditions

Maintain the condition record for the message type MLGR.





If there is a requirement for an express message, the following can be maintained in the communication method:


GR Message Process
1) Purchase order creation – transaction code ME21n
The GR message checkbox has to be checked in the Purchase order.


2) Goods receipt against purchase order – transaction MB01 or MIGO.
Goods receipt is done using MB01 to illustrate the automatic creation of the message in the material document.


The message is created while doing GR in MB01.


4) User navigates to the inbox to check the message. The body of the message shows the details like material, quantity, purchase order number, and quantity delivered.


Wednesday, August 21, 2019

SAP Transaction and Screen variants with an Example

The topics related to transaction and screen variants have been discussed many times in this forum. We still find many discussion threads and questions regarding how can we make a screen field invisible or how can we provide a field to a certain group of users in display mode. This is another attempt to discuss transaction and screen variants in a detailed manner with an example of CS02 (change material BOM) transaction code.
Introduction:
Transaction Variants are very important for the following key features:
  • Restrict access to unnecessary data fields to the users. In an integrated ERP like SAP, data flows from one module to another and sometimes it is required to hide few specific data fields to a corresponding group of users.
  • Optimized data access and screen access: for example, a group of users are responsible to update few specific fields, and they are not interested in other fields irrelevant to them.
  • Reducing the risk and restricting users to actions: for example, you do not want a group of users to change the quantities inside a production order, or change quantities inside BOM, or delete a component inside BOM etc.
As the name suggests, it is a ‘variant’ of the standard transaction inside SAP.
Scope:
The knowledge:
  • How to create a transaction and screen variant, and attach it to a custom transaction code.
  • What are the options available during creation and change?
This is very important to all the functional/ technical/ techno-functional consultants working in SAP.
Process:
The step by step procedure of creating screen variants, transaction variants and variant transaction codes is discussed in this section with an example in IDES with EhP 4.
Here we take the case of changing a material BOM (CS02) with the following constraints attached:
  • The user is authorized to change only the consumption storage location.
  • The user cannot delete any item, or change any other fields, or delete the BOM itself.
The transaction variant should be created in the development system, and then transported to quality and production system after prior testing.
Transaction variants are created in SHD0 transaction code:
1.JPG
1.JPG
After providing the name of the transaction variant you are going to create, click on the create button or press ‘F5’ to create the transaction variant. This will take you to the original transaction, and record the screen fields to the screen variants which are going to be created in this process.
1.JPG
Press Enter. You will see a pop-up appearing to ‘confirm screen entries’, you can make the necessary changes during recording, or record all the screen entries and making decision at the end. We will follow the second option in this example.
There may be an option for ‘menu functions’ in that pop-up screen. It is used to deactivate any menu functions (as in this case, we are not allowing the user to delete any components or the BOM, so we will think of deactivating the ‘Delete’ pushbutton (a function key), and you can control what are the menu options you want to be unavailable to the user.)
This process also shares a great knowledge regarding the flow of the actual standard transactions; you get to know what are the ‘function key’s already deactivated in a specific screen.
1.JPG
For example, in standard CS02, the option of deleting BOM is deactivated in the initial screen. In standard CS02:
1.JPG
So, if we try to deactivate it over here, system should let me know that it is already deactivated. Click on the ‘menu functions’ button to call the interface variant:
1.JPG
Click on the folder with a ‘+’ sign to expand:
1.JPG
1.JPG
I think the concept of ‘interface variant’ is now clear. We press Enter to continue to the BOM components screen (General Item Overview).
1.JPG
Press Enter, system will again show up a pop-up screen to indicate the screen fields are being recorded in the screen variant.
1.JPG
The interface variant for this screen will be required, since we do not want to allow the users to delete a component (or other function keys or menu options). Click on the ‘Menu functions’ button:
1.JPG
1.JPG
1.JPG
Press Enter.
Continue pressing Enter until you reach the General Item Overview screen again.
In this process we record all the screens inside BOM. The person creating the transaction variant must have a fair idea of the ways the user can make changes, all the menu options that he may follow; otherwise it will not be full-proof and safe.
For example, in this recording we also capture screens from the component details screens, BOM header screen, all the tabs, and deactivate menu functions whenever necessary.
After capturing the screens, press the exit key (Shift + F3):
1.JPG
You will reach to the Change transaction variant screen. All thescreen recordings are now complete and you are going to decide:
  • Which fields will be ‘display only’
  • Which fields will be ‘invisible’
  • Which menu functions will be deactivated during this variant transaction
1.JPG
Use ‘page down’ and ‘page up’ keys to navigate through all the screen variants.
1.JPG
1.JPG
Since the user was responsible to change the consumption location, we allow entry in this filed.
1.JPG
Make the settings for deactivated buttons as shown:
1.JPG
The process is complete. We will now save the screen variants and the transaction variant.
Click on the ‘save’ button:
System will ask for a package during save. Provide suitable package to which you are saving.
1.JPG
Press Enter.
System will show a pop-up for a workbench request, so that this can later be transported to quality and production system.
Continue pressing enter to save all the screen variants to this single workbench request and with the same package, until you reach the transaction variant screen again.
1.JPG
So, now the transaction variant is saved and we are ready to test the same.
Press the back button (F3).
1.JPG
Press F8 or click on the test button to test this transaction variant:
1.JPG
1.JPG
1.JPG
So, this has successfully been tested now.
Now we will create a custom transaction code (variant transaction), that uses this transaction variant.
From the transaction variant screen, press Shift + F6 or follow the menu path:
1.JPG
1.JPG
Press Enter.
1.JPG
Save the custom transaction code. During save, provide the same package and the workbench request number that we have used.
1.JPG
Now we are ready to use this variant transaction.
Authorizations:
The specific group for which we have created this variant transaction ‘ZCS02’ will now be authorized to this transaction code by BASIS with proper roles and authorizations.
The following section has been included in version 2 and this section is inspired by the feedback provided by expert Jeevan Sagar:
Requirement:
We take here an example case where the ‘material memo’ pushbutton for long text should be made invisible from MD04 screen for all the users.
Please find the below SCN thread and let us extend this case for all the users:
In this case, we are not going to create a variant transaction. Instead we will activate this transaction variant to the standard MD04.
Go to the Standard variants tab as shown below.
3.JPG
After entering the transaction variant, click on the Activate button. System will show an information message: ‘Standard variant also set at beginning of transaction without variant!’
Press Enter. Now you will see that the ‘deactivate’ button becomes active. This can be used anytime to deactivate the usage of the transaction variant to the standard transaction.
You can now test the MD04 transaction, it will use the transaction variant that has been activated.

Tuesday, August 20, 2019

Setting up simple Release Procedure for Purchase Requisitions

Release Procedures (approval) can be used for Purchase Requisitions (PR), Purchase Orders (PO), RFQ's, Outline Agreements and Service Entry Sheets. The principle is exactly the same for all. If you can master one, you will know them all.

Lets set up release procedures for PR for the following example:

Our company have got 2 plants: Plant 3100 (London) and plant 3600 (New York).
  • For New York (plant 3100), if PR item value is between 0 - 1000 dollars, then PR needs to be released by one person (person B)
  • For New York (plant 3100), if PR item value is bigger than 1000 dollars, then PR needs to be released by two people (first by person B, then person C)
  • For London (plant 3600), if PR item value is bigger than 1000 dollars, then PR needs to be released by two people (first by person A, then person C).



Key terminology:
  • Release Codes - The different levels that the approval will go through.
  • Release Groups - Grouping of strategies.
  • Release Strategy - Unique, set of condition, sequence and levels of releases. Every line in diagram is a Strategy (so we have 3).
  • Release Indicator / Status - The status of PR as it moves through the strategy. Example 'Block' (can't create PO yet) or 'Final Release' (can create PO from PR)
Here is a summary of the steps to follow to set up our example:
  • Create Characteristics & link to comm. structre (CEBAN for PR)
  • Create Class & link to characteristic
  • Create Release Groups & link to class
  • Create Release Codes
  • Release Indicator
  • Set up strategies
    - Strategies & Codes
    - Prerequeirements
    - Status
    - Assign values for strategies
  • Set overall / item for doc type (PR only)
  • Create and allocate autorisation profiles
--------------- DETAILS OF SETTING IT UP ---------------

Create Characteristics & link to communication structure (CEBAN for PR)

Here we define which fields are used to determine the strategy that will kick in. In our case we used 'Plant' and 'Item value'. Not all fields in the PR can be used. For a full list of fields that can be used to determine the release startegy, see tcode se12 table CEBAN.






So the two fields that will be used is:

Field CEBAN-WERKS for Plant
Field CEBAN-GSWRT for Item Value

We need to create a characteristic for every field. tcode ct04
Any characteristic name can be used. Keep something descriptive to avoid confusion.

For Item Value -- lets create characteristic Z_GSWRT


First go to Additional Data tab and enter the table/field (and Enter)


Enter currency to be used in the Basic data tab.
Also select multiple values and Intervals allowed

The Intervals allowed will allow us to assign a range of values, example: If PR value is 0 - 1000 USD .....



Save the characteristic

For Plant -- characteristic Z_WERKS
Again, the table/field name in Additional Data to enter table/field



Again set multiple values and save the characteristic
The multiple values is to assign more than one plant to strategy, example: If PR for plant 3100 and plant 3600 is ...

Create Class & link to characteristic

Create a class (simply to group the characteristics). Again any name can be used. Tcode CL01 -- Create Class. The Class Type must be 032.



Configure Release Procedures

Above actions was all master data. We now need to do some configuration. Menu: IMG > Materials Management > Purchasing > Purchase Requisition > Release Procedure > Procedure with classification > Set up procedure -- (tcode OMGQ in older SAP versions)



Create Release Groups & link to class

We have two groups to create AA and AB. We need to indicate the class we are working with, in out case Z_PR.



Create Release Codes

Create all the release code / group combinations. This is all the dots in diagram above. So we have 4.



Later on, authorisation profiles will be linked to these code / group combinations.

Release Indicator

First we create the different statusses that the PR can be in throughout it lifecycle. Later on (below), we will be linking using these statusses. Here is the standard SAP indicators, wou probably wouldn't need to add any.



We will be using two of these -- X (Block) and 2 (Released)





Under the Details section, you can indicate which documents can be created from this PR. For Indicator 2, one can create PO's and RFQ's.

With Field Selection you can define which fields can be changed. This is the same indicator that gets used with document type configuration to make some fields read only, mandatory, hidden.

Set up strategies - Strategy & Codes

Every line in our diagram above is a strategy. So We have three
Lets call them:
Group AA / Startegy S1 -- Code L1 (for plant 0001)
Group AA / Startegy S2 -- Code L1 & L2 (for plant 0001)
Group AA / Startegy S2 -- Code L1 & L2 (for plant 0002)



Here are the settings for AA / S2



Set up strategies - Prerequisites

For every strategy, we need to define a release prerequisites. This indicate if one code need to take place before the other. In this case, level 2 (L2) can only take place if level 1 (L1) has been released.



Set up strategies - Status

This is also done for every strategy. The screen is dependant on what groups were linked to the strategy as well as prerequisites that was set up. In this example:

- if nobody release it then PR is block.
- if L1 release the PR, the PR is still blocked
- if L1 and L2 release the PR, the PR can be converted to RFQ/PO

Out of interest, the reason why there is not a L2 only option is because of the setting in the prerequisites.



Set up strategies - Values for strategies

The values linked to strategies are master data (not configuration) and can be set in two places. Either within the configuration itself -- selecting the classification button





Or, in classification, example CL24N




Both methods work, the advantage of CL24N is that all the strategies can be viewed easier.

Set overall / item for doc type (PR only)

For Puchase Requisitions, there is an option to release either on item level or on document level. For PO / RFQ / Contracts, one can only release on header level. Back to the PR, it is highly recommended to use item release. This can be done in two places.

Firstly where the groups were created



On the document type configuration for PR
Config menu: Materials Management > Purchasing > PR > Define document types



Create and allocate authorisation profiles

In our example we will have three people releasing, so three profiles will need to be created. Authorisation profiles can be created using tcode PFCG.

Usage of PFCG are not being discussed here, but see below for relevant screen where the profile was created.



--------------- USING RELEASE PROCEDURES ---------------

Create a Purchase Requisition

Lets create a PR, and see if the release procedure kicks in. In our case we will create it for plant 3600 and any value. So we will expect Strategy AB / S2 to kick in.

Create PR -- me51n


If no 'Release strategy' tab, then it didn't work. In this case all is fine. The user can see the Release Group (AB), Strategy (S2) and release indicator (X).

(SAVE)

Release a Purchase Requisition

Releasing can be done per PR or collective. Lets' use the collective release. SAP Menu: Logistics > Material Management > Purchasing > Purchasing Requisition > Release > Collective Release -- ME55



Select all the items to be released and then hit Save. You will see the status of the item change to the next Release Indicator.



This is the absolute basics of setting up Release Procedures for Purchase Requisitions. For more posts on Release Procedures, see index of posts.