Skip to Content
Author's profile photo Former Member

Deciding on a Project Coding Mask


In SAP Project Systems, a Project Coding Mask is used to create a structure for the project number. Masks help in displaying complex project numbers and  in indicating the position of a WBS element in the project hierarchy.

Complex projects often require a complex numbering structure. A WBS element number may look like this: M-EIPL123-02-A7/18. Here a project coding mask can be used to provide this structure uniformly to all WBS elements in that project, without giving scope to user errors.

The project coding mask is made up of 2 parts: Project Coding Key and Coding Mask.

A. Project Coding Key:

  1. The Key is present at the start of the project coding mask, in the above example being ‘M’. The Key determines the structure used for coding the Project definition and WBS elements, hence it is a mandatory field if a company decides to use a coding mask for their projects.
  2. What if the user enters a different Key while creating a project? The system can be customized to prevent the user from entering a different Key.
  3. The project coding mask can have a maximum of, but not necessarily, 24 characters. Out of these 24 characters, the Key can have a maximum of 5 characters (For ex. ABCDE). This maximum possible length for the Key needs to be specified in customizing under Define special characters for projects.
  4. The Key has a few restrictions:
    1. If a project is created using say 3 characters for the Key, then the length as specified above cannot be edited to a lower value unless the project is deleted.
    2. This length specified in customizing, say 3, is then reserved for the Key out of the 24 characters for all the projects in the system. The balance quantity can be used by the mask section. This is irrespective of the Key length specified while creating a project coding mask. That means even if the Key is assigned as 1 character, the mask section can still have a maximum of 21 characters only.
    3. No two keys can start with the same character. That is, if you have a key ‘G’ for a particular coding mask, then you cannot have another one as say ‘GRK’. For this reason the Key is not limited to numeric or alphanumeric characters. It can be created using any character.

B. Coding Mask:

  1. The coding mask can consist of numeric characters (represented by ‘0’), alphanumeric characters (represented by ‘X’), and separators.
  2. A separator is a symbol which distinctly separates the coding mask from the Key. It is also used to represent the next level of WBS elements. A separator can be any of the following: / . : > ; – < =. A separator is also counted as a character.
  3. Thus a project coding mask may be represented as, say, ABC-XXXXXXX-000.XX/00. Here each separator creates the next WBS element level representation. Thus ‘XXXXXXX’ represents the top level WBS element (Level 1), ‘000’ represents WBS elements of Level 2, ‘XX’ Level 3 and so on.
  4. The coding mask also has a few restrictions:
    1. The first character following the Key must be a separator.
    2. At each WBS element level the mask can either be numeric characters (-00) or alphanumeric characters (-XX), but not both (-X0).
    3. Once a project is created using a project coding mask, the mask cannot be deleted in customizing unless the project itself is deleted.

Creating a project with a Project Coding Mask:

  1. While creating a project, the system identifies the coding mask from the Key being entered by the user. If the project coding Key consists of more than 1 character, it is mandatory for the user to enter the entire Key exactly. Otherwise it will reject the entry.
  2. Once the Key is entered correctly, the system creates the project and displays the project coding mask on the screen.PCM.png
  3. The system cannot prevent the user from creating the project definition with just the coding Key. It can make automatic corrections in some other cases. These corrections vary in nature for numeric and alphanumeric coding masks. For example, if the project coding mask is TFP/XXXXX-0-0-0, following are the user entries and the corresponding system corrections:




TFP (No change)


TFP/000 (No change)










Error (There should be a number in place of ‘a’)

If the project coding mask is TFP/00000-0-0-0:



























TFP123456789 Error

In any other case the system will give an error.

  • If more than one project coding mask is present in the system, the system can be customized to limit the user to entering only the required coding key.
  • If no project definition text is entered by the user, the system automatically names it as ‘Project Definition [project number entered by user]’. The text field is editable and can have a maximum of 40 characters.

Limitations of using project coding mask:

There is one limitation of using the coding mask. While creating the project definition, the user must enter the exact number of characters as given in the coding mask after the first separator. That is, for TFP/XXXXX-0-0-0, the user must enter the definition with 5 characters after “TFP/”. The system is unable to prevent the user from doing otherwise. There are 2 scenarios:

  1. When the system converts a user entry TFP-ABCD133 to TFP/ABCD1-3-3, the user should manually trim it down to TFP/ABCD1. This is because when the system generates the WBS element number, it copies the entire definition number and adds one level to the same. For example, if the definition is kept unchanged as TFP/ABCD1-3-3, the top level WBS element (level 1) is named as TFP/ABCD1-3-3-1. As per the coding mask TFP/XXXXX-0-0-0, the system then identifies this WBS element to be at level 4, which is the last level. Beyond the last level in the coding mask, the system only provides a temporary number (%00000001) which cannot be saved as is.
  2. If the user enters TFP/ABC, the project definition stays as TFP/ABC. However, the top level WBS element (level 1) gets named as TFP/ABC1, and a subordinate WBS element gets named as TFP/ABC11. As per the coding mask TFP/XXXXX-0-0-0, the system then identifies both the WBS elements to be at level 1, which is not desired.

Structuring the client’s Project Coding Mask:

Considering all the above points, assuming that the client has specified 5 WBS element levels, the coding mask can be structured as follows:



Project Coding Key


First Mandatory Separator


Subordinate WBS levels

4 x 2 = 8

Separators for each subordinate WBS level

4 x 1 = 4

Provision for one more subordinate WBS level in the future (including separator)


Balance quantity available for top level WBS element




The project coding Key is assigned only 1 character so that more characters can be available for the top level WBS element. The Key characters can be one of the following:

G – indicates projects involving ground mounted structures

R – indicates projects involving roof mounted structures

M – Mixed

  In the mask section for this client, alphanumeric characters are desired for the project definition, while numeric characters are desired for the WBS element levels. Thus the sample project coding mask would show as: G-XXXXXXX-00-00-00-00

Any suggestions / corrections are most welcome.

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Navaneetha Krishnan
      Navaneetha Krishnan

      Hi Pratap,

      Excellent write up on coding mask.

      Very basic and extremely essential for all PS consultants to know.

      Especially the section on interpreting the coding mask is very good.

      I have a qn though.

      In the area B-4-B you say WBS element can be either XX or 00 but not X0. But I have worked in one of the projects where the WBS element always ends with 000X. There is only one level of WBS element in the projects we used. Can you confirm your statement or tell me how is 000X possible in the case. Honestly I dont know the answer.

      Second, can you just explain how this conversion happens



      Couldnt find the importance of > and =. Please explain.

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Hi Navaneetha,

      Many thanks for your feedback.

      1. In point B-4-b I have mentioned that a coding mask cannot have -X0, not WBS element. So if you were able to see WBS elements with 000X, that means either:

      a. the coding mask was framed as XXXX (since alphanumeric X includes numbers as well) - If the coding mask was framed as 0000, then you would not be able to create such WBS elements,

      b. or there was no coding mask in the system,

      c. or there was a coding mask but the "Edit" in Define special characters for projects was not check-marked. This allows projects with definitions other than the keys defined in customizing to be defined in any way, which again allows for user errors.

      For example in the images below, the key 'Z' has a coding mask Z/000-XXX-000/XXXX, so you cannot create Z/00A. But since the "Edit" is not check-marked in customizing you can create M/00A (since character M has no coding mask in customizing) or even 00A. Once you check-mark "Edit" then the system will not allow M/00A.

      If you want the user to use no other coding mask than with key "Z", then you check-mark "Lck" on the rest in Define Project Coding Mask.






      2. As I explain in point B-2, / - > and = are all recognized as separators by the system. These separators should be present in Define special characters for projects for the system to recognize them. Once that happens, it knows that the coding mask with key TFP has the following separators: / - - -, so it converts our entry to these. The number 1 is present after the 4th separator so it is placed there. If our entry was TFP/->1=, then the result would be TFP/00000-0-1, since it eliminates the last separator =. The appearance of 0's occurs only for numeric coding masks. For the alphanumeric mask TFP/XXXXX-0-0-0, TFP/->=1 would become TFP/     -0-0-1 (5 blank spaces).

      Author's profile photo Shubham Srivastava
      Shubham Srivastava

      good work

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Thank you

      Author's profile photo Nathan Genez
      Nathan Genez

      In my experience, using a single character as the leading determination of the mask is a bad  idea.  it locks you into only having 26 possible types of projects.  As PS gets rolled out across entities or for other types of projects (both are very common), a single character ends up costing the customer in flexibility.

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      You're right Nathan! I hadn't checked the coding mask in that way while preparing the document, so I was under the impression that once a character is used as the first character to create a mask then you cannot use it again as the first character for another mask. But this applies only to masks using a single character as the coding key. Hence, as you said the range gets limited. This limit is 26 only because using characters other than alphabets doesn't look professional. But if we use at least two characters right from the start, then we get 26^2 possibilities. I will correct my document for point no. A-4-c. Thank you for this valuable input.

      Author's profile photo Mandar Mahuli
      Mandar Mahuli

      What is the significance of Extreme left box before PL filed?