Skip to Content
Author's profile photo Leenu Peter

Custom Field for SRM SC WebDynpro Application

 

Requirement

An Enterprise implementing SAP SRM 7.0 Solution has a requirement of adding custom fields to the Web Dynpro application of the shopping cart. The field should appear in the header field and Item Detail of the shopping Cart Application.

SAP provides a standard method of adding fields to the Web Dynpro component without making modifications in SE80 Web Dynpro component through Enhancement.

 

This can be achieved by extending the Standard structures through Enhancement as expliained in the steps below.

Step 1: Create a new field in the SC Enhancement Structure

Addition of a checkbox to the header Structure:

The field can be extended using SPRO settings:

IMG Path->SAP Implementation Guide->SAP Supplier Relationship Management->SRM Server->Cross Application Basic Settings-> Extensions and Field Control (Personalization) -> Configure Customer Fields -> Define Customer Fields on Header Level.

/wp-content/uploads/2013/09/screenshot1_282496.png

 

Choose ‘Append for Customer Fields on Shopping Cart Header’.

Enter the new field that has to be added in the Header data of the Shopping cart. Here, we are creating a checkbox in the header level.

/wp-content/uploads/2013/09/screenshot2_282513.png

Maintain the Enhancement Category:

/wp-content/uploads/2013/09/screenshot3_282514.png

 

Once the Structure is created and Enhancement Category appropriately assigned, activate the structure. Thereby, the field will be added to all the Data Dictionary Objects to which it’s corresponding SAP structure belongs to. In our case the standard structure is INCL_EEW_PD_HEADER_CSF. This will ensure that the value populated at runtime can be accessed from anywhere in the same workflow.

Similarly, the same field has to be extended to Cross-Document Database structures.

Choose ‘Append for Customer Cross-Document Database Fields on Shopping Cart Header’.

/wp-content/uploads/2013/09/screenshot4_282515.png

/wp-content/uploads/2013/09/screenshot5_282516.png

 

By doing this the value can be passed into the database tables and can be accessed across different work processes.

Step 2: Addition of a checkbox to the Item Structure.

The field can be extended using SPRO settings: 

IMG Path->SAP Implementation Guide->SAP Supplier Relationship Management->SRM Server->Cross Application Basic Settings-> Extensions and Field Control (Personalization) -> Configure Customer Fields -> Define Customer Fields on Item Level.

/wp-content/uploads/2013/09/screenshot6_282517.png

As mentioned in Step – Addition of a checkbox to the header Structure, Add the new field ZZCHECKBOX using

       –Append for Customer Fields on Shopping cart Item.

/wp-content/uploads/2013/09/screenshot7_282521.png

  

   – Append for Customer Cross-Document Fields on Shopping cart Item.

/wp-content/uploads/2013/09/screenshot8_282522.png

Step 3: Create Metadata for Header and Item Fields.

Metadata is used to configure the display of the field.

You have following four options:

  Field Visible;

  Field Editable;

  Field Required;

  Field Post-editable

In addition, you can customize the display using dynamic class as well. You can create your own Custom class to dynamically control  the field attribute.

Access the following path for Metadata:

IMG Path->SAP Implementation Guide->SAP Supplier Relationship Management->SRM Server->Cross Application Basic Settings->  Extensions and Field Control (Personalization) -> Configure Field control-> Configure control for Fields on Header Level.

/wp-content/uploads/2013/09/screenshot9_282527.png

/wp-content/uploads/2013/09/screenshot10_282523.png

As mentioned in the above screenshot, ZZCHECKBOX has been added and enabled the attributes – Visibility and Editing.

 

We can further control the attributes of the field dynamically by creating a Z-class. In the example, we control the properties of
ZZCHECKBOX dynamically through CHANGE_META_DATA in the Z-Class ZCL_SC_DYNAMIC_METADATA.

Similarly create METADATA for the new field at Item Level.

/wp-content/uploads/2013/09/screenshot11_282528.png

/wp-content/uploads/2013/09/screenshot12_282529.png

There it is!! We have created two fields in the SRM front end!!

 

Screenshots from the Front End Portal:

 

When you execute the front end portal and look into the Item details of any shopping cart, you can see the newly added checkbox field at the Header Level and Item Level. 

Header Level:

/wp-content/uploads/2013/09/screenshot13_282548.png

Item Level:

/wp-content/uploads/2013/09/screenshot14_282541.png

Assigned Tags

      6 Comments
      Comments are closed.
      Author's profile photo Former Member
      Former Member

      Good post. Thanks for publish.

      Author's profile photo Former Member
      Former Member

      I was searching for a long time for short step-by-step description for that topic. Many thanks for that.

      Just one question: How come the second to last hardcopy does not show a checkbox but an input field?

      Author's profile photo Former Member
      Former Member

      I am new to SRM.

      It is very much useful. Good post...

      Author's profile photo Ashish Shah
      Ashish Shah

      This is already posted earlier by ricardo Ricardo Romero

      Add custom field to SC and POWL

      Plese do not post similar documents.

      Author's profile photo Jon Azcorra Olano
      Jon Azcorra Olano

      I was not looking in the right place, i can see that the new fields have been added.

      Regards

      Jon

      Author's profile photo Former Member
      Former Member

      Super document