cancel
Showing results for 
Search instead for 
Did you mean: 

Adding custom fields to SRM UI Add-on

venkat_annam
Explorer
0 Kudos

Dear SAP Experts,


We enabled SRM UI and followed the SAP provided configuration guide to complete all the required setup's. we are able to create shopping cart using the new UI without any issues.

Now we are trying to enable custom fields on new SRM UI which are currently available on Web dynpro SC UI. we followed the configuration steps (2.1 Extending screens via SPRO configurations) provided in the Extensibility-Customer_CookBook_SP04_1.pdf.



After the configuration is completed, we are able to see the new custom fields on the new UI screen, but we are not seeing the description as expected - the description is shown as VIEWKEY_FieldName_L eventhough we maintained the label text.

And also any data that is entered in the new custom fields are not saved to database and therefore not available in BBP_PD transaction.

Please see the attached screenshot for more details.Please provide your guidance in resolving the issue.


SRM UI Add-on Extensibility cook book is available as an attachment to the note: 1830075 - Extensibility Cookbook (Customer Fields)


Thank you and appreciate your quick response.

Regards

Venkat

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Venkat,

I am starting with SAPSRM UI5 last Week and find the Cookbook little bit confusing.

For adding a text label instead a technical name you have to add a new OTR-Text in transaction SOTR_EDIT.

Type the alias you created in the field "Label text for field" and it will apear.

Regards

Rico

venkat_annam
Explorer
0 Kudos

Hi Rico,

Thanks for the tip. It worked..now we are able to see the description for the custom fields.

Thank you

Venkat

Answers (3)

Answers (3)

prabhu_s2
Active Contributor
0 Kudos

hi venkat

pls can you point me from where i can access "Extensibility-Customer_CookBook_SP04_1.pdf."?

venkat_annam
Explorer
0 Kudos

Hi Prabhu,

SRM UI Add-on Extensibility cook book is available as an attachment to the note: 1830075 - Extensibility Cookbook (Customer Fields).


Also check service market place for an updated cookbook depending on your version of UI.


Hope this helps.


Venkat

Former Member
0 Kudos

Dear all,

 

I have also tried modifying the SAP SRM UI5 add-on solution using the examples from the cookbook (Extensibility-Customer_CookBook_SP04_1.pdf) and it is working well.

One example is regarding adding a new navigation item, using the following code snippit:

Desired output

  
 

When using the above code snippit, I get a different result however. When I load the page the first time, the new menu item is not showing, if I then click on another menu item, like  “My Favorites”, the new menu item are added multiple times, instead of just one time.

 

Please let me know your suggestions on how to solve this.

Looking forward to your reply.

Best Regards,  Emilie

Former Member
0 Kudos

Hi again,

I added the following statement:

   if (sap.ui.getCore().byId("zni_po"))
   return;

Now it is no longer displaying multiple entries.

Best Regards,  Emilie

venkat_annam
Explorer
0 Kudos

Hi Emilie, Thanks for the update.

Former Member
0 Kudos

Hello again,

The source code for adding a new navigation item now look like this:

The menu item is now displaying nicely. The next question is then, how to add a link and page title, when clicking on the newly created navigation item. 

I'm looking forward to your reply.

Best regards, Emilie

venkat_annam
Explorer
0 Kudos

Hi Emilie,

I haven't worked on creating a new page and adding business logic to it. But, what i think is that you have to create:

1. Odata Service (Tcode: SEGW) which has all the business logic (depending on your requirement).

2. You have to create a View.

3. You have to create a controller.

To get a better understanding on how the SRM UI5 (or UI5) applications are build - Go to SE80 and display the shopping cart BSP application /SRMNXP/SHOPPINGCART and verify the structure or logic included in the components under "Shopping cart" folder.

Create Your First SAPUI5 Application - UI Development Toolkit for HTML5 (SAPUI5) - SAP Library

Hope this helps.

Regards

Venkat

Former Member
0 Kudos

Dear Venkat,

Thank you very much for your reply.

I tried creating the new view and controller and I can view it, by replacing one of the standard views.

I used the example described here: http://scn.sap.com/community/srm/blog/2014/08/26/replace-a-standard-view-with-a-custom-view-in-srm-u...

The question is then, how do I add my new custom view, to the newly created navigation item?

Any suggestions are most welcome.


Best regards, Emilie

Former Member
0 Kudos

Venkat, We are trying to enhance the UI5 Shopping Cart using Extensibility-Customer_CookBook_SP04_1.pdf but I don't see the fields showing up in UI5 shopping cart and below are the steps that I followed.

I am trying to add Location field in SRMShoppingCartItem (2nd row in below screen shot)

I enhanced the Staging Structure (/SRMNXP/S_CUST_ITEM_LIST) , Customer Include (​INCL_EEW_PD_ITEM_CSF_SC) & Cust-MD Structure (/SRMNXP/S_ITEM_UI_MET_CUST) and went to SPRO and did this config for adding fields to UI screen.

SAP Supplier Relationship Management---->SAP SRM User Interface Add-on---->Extension and Field Controls---->Configuration for Extension of Fields

I didn't add column to database and Odata Service Model. My Goal is to show Location Field first on the  SRMShoppingCartItem and then want to enhance Database & OdataModel.

Below are the Steps I followed.

1) Enhanced Staging Structure :  /SRMNXP/S_CUST_ITEM_LIST

Appended the Component Type : ZCUSTITEMLIST with Field ZLOCATION of Type Char20

2) Enhanced  Customer Include ​INCL_EEW_PD_ITEM_CSF_SC

Appended the Component Type : ZAINCL_EEW_PD_ITEM_CSF_SC with Field ZLOCATION of Type Char20

3) Enhanced Cust-MD Structure  /SRMNXP/S_ITEM_UI_MET_CUST

Appended the Component Type : ZITEMUIMETCUST with Field ​ZLOCATION_V, ZLOCATION_E, ZLOCATION_R of Type XFELD

4)  SPRO

   

  SAP Supplier Relationship Management---->SAP SRM User Interface Add-on---->Extension and Field Controls---->Configuration for Extension of Fields

Added this new entry:

But I don't see this Location field  showing up in the UI5 Shopping Cart. Please let me know if I am missing any thing in Configuration.

If possible can you provide the steps that you followed.

Thanks,

Venu.

venkat_annam
Explorer
0 Kudos

Hi Venu,

Based on our requirement, we added the custom fields in view key: singleitemdet_id_bd by following the process provided in the cook book. And these fields are visible under "More Details" (item details) of the SC line item.

If you wanted to see the custom fields under "Can't find" screen, use the view key: wi_home_assist.

Let me know how it goes.

Regards

Venkat


Former Member
0 Kudos

Venkat, Thank You very much for the info. Is it possible for you to share the steps that you followed to create the custom UI element on shopping cart.

In my previous post can you let me know if I miss any thing in configuration, I am using key ItemList.

To load data on shopping cart for "Search" & "Catalogs"  screen we need Trex Installed ?

Thanks,

Venu.

venkat_annam
Explorer
0 Kudos

Hi,

1. The only difference I can see is appending custom fields under this path:

SRM Server Cross – Application Basic Settings Extension and Field Controls (Personalization) Configure Customer Fields Define Customer Fields on Item Level Append for Customer Cross-Document Item Database Fields.

2. Are you able to see this custom field in your existing Shopping cart WD UI (Portal / NWBC) ?

3.  TREX is mandatory for "Cross Catalog Search" in SRM UI.

4. You can use catalogs without TREX also - using the puchout functionality - SRM new UI also supports catalog punchout. But the main aim of SRM UI is to use the cross catalog search so that users get "Amazon" kind of shopping experience.

If you want to use the catalogs (w/o cross catalog search functionality), just assign the catalog to the user in the org structure.

Let me know how it goes.

Regards

Venkat

Former Member
0 Kudos

Venkat, I couldn't able to add Field to ItemList Screen but when I could able to add to MoreDetails screen. I followed the same steps that I did for ItemList and field is showing on MoreDetails screen. One issue I have with custom field in more details screen was the label is not getting set. We followed below step

Label text for field

Enter a title for the new field. This title appears as the field label on the UI.

Note: If you do not enter the label text for field and if the component type (data element) of the field has a field label, this field label must be the label for the newly added field.

but still it's defaulting to viewkey_Field Name_L.(Any suggestions here).

Thank You very much for Trex related info. For now I am play with the system with out Trex by assigning the catalog to the user in the org structure.

Thanks,

Venu.

venkat_annam
Explorer
0 Kudos

Venu,

For the label,

1. you have to create the label in SOTR_EDIT by entering "Text" field & "Alias".

2. Copy the same value from "Alias" field from SOTR_EDIT into the "Label Text for field" in SPRO.

Then you will see the field label is displayed with the text maintained in "Text" field in SOTR_EDIT.

Let me know if this helps.

Regards

Venkat