Skip to Content
Author's profile photo Former Member

Enumeration in PI 7.1


Issue: While consuming a Web service that is provided by SAP PI  7.1/7.0, external application program that consumes the web service need to get  the values for particular field restricted with list of values. 

For  example: For Country_Code field in outbound structure I need restricted 20  country codes (where my business is operative) and I want Country_Code field  value to be in CAPs. Like IND, USA, AUS etc… 

Consider  creation of a customer in External System, and it is using web service generated  by SAP PI, and updating customers in SAP ECC. The user must select only  restricted company code values or a reconciliation account provided in the drop  down as per their company. 

In  order to achieve this feature, PI 7.1/7.0 has provided us with data type  enumeration in XSD Editor while creating Data Types. 


Definition: The most abstract definition of an enumeration of a  set is an exact listing of all of its elements (perhaps with repetition). 

  1. W.r.t  SAP PI, enumeration restricts the value range to a set of individual areas .The  values must be separated by blanks or commas in the XSD Editor. 

Implementation of enumeration in PI: 

We  Implement Enumeration in “Data type” level under Details column in the XSD  editor or simply press the button provided in the XSD Editor. Data type  enumeration is given below. 

  1. Data Type Filed à Details à   enumeration.  

At  the corresponding field level select the details column wherein enter the  required enumerated values separated by a space or a comma as below. 


Once    we consume web service generated on this data type Company_Code field will shows    a drop down list that holds enumerated values i.e. the restricted values are    displayed as follows:   


Here  we have used Microsoft InfoPath as  Web Client. 



drop down list is appeared with all restricted filed values for  selection by using Enumeration in SAP PI 7.1

Assigned Tags

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

      Hi Madhu,

      Good work...!


      Author's profile photo Former Member
      Former Member

      Hi Madhu,

           Is it possible to add enumeration values with spaces, like:

      0 Automotive Reseller

      1 Wholesale Trader

      2 Creative Director

      3 Professional Service Provider


      or, should I use:

      0 AutomotiveReseller

      1 WholesaleTrader

      2 CreativeDirector

      3 ProfessionalServiceProvider

      P.S. The numbers are only for illustration. I don't intend to include numbers in the beginning. 😛

      Author's profile photo Mickael HUCHET
      Mickael HUCHET

      Hi Madhu,

      The solution I found to have enumeration values with space like “0 Automotive Reseller” is to:

      1. To set any value in enumeration (as shown in this blog),
      2. To download the XSD file of your Data Type.
      3. By using Notepad to modify your enumeration value by written the good value which is containing space like “0 Automotive Reseller“.
      4. To upload your XSD file to your Data Type.
      5. To save and activate your Data Type.



      Mickael Huchet