Skip to Content
Author's profile photo Former Member

User Defaults in SRM User Interface Add-On

User defaults is one of the features that has been incorporated from the old SRM shopping Cart into the SRM UI Add-On SC. Using this feature users can change the default values maintained for them in the back-end. These changed values will be applied to all the items added thereafter.The user can navigate to the User Defaults Screen by clicking on the icon on the right corner of the application.

Userdef1.png

Userdef2.png

The User Settings view is similar to Item Details view with different sections for basic data, account assignment, internal note and the shipping address.

The changes done in the user defaults view will be reflected in the Can’t find screen and the Limit Form.

For example, if user adds a internal note in the user settings view and click on “apply and close” and then open the Limit Form, the internal note will be seen.

Userdef3.png

Userdef4.png

The  changed user default value will only be applied to the items added after setting the user default, the item already added in the cart will not have the updated user default values.

The changes done in the user default view will only be applied on click of “Apply and Close”.

Please follow the below example to see how it works.

Change the Additional Name field in Shipping Address In User Settings and click on “Apply and Close”.

Userdef5.png

Now add a free text item and click on Review Cart. Go to item details.

Userdef6.png

The Additional Name field in Shipping Address will be changed to the value set in User Setting.

User defaults can be extended and new fields can be added using the extensibility framework for SRM UI Add-On.

For more information please go through the link Extensibility in SAP SRM User Interface Addon 1.0.

Note: Users can change the meta data for the fields in the User Settings.

This can be done using the BADI /SRMNXP/BD_USER_DEF_METADATA”.

A default implementation “/SRMNXP/CL_USER_DEF_METADATA” exists for the above BADI.

Assigned Tags

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

      Hi Vaibhav,

      Will these User Settings be retained after submission of the Shopping Cart?  Or must the user enter the default values prior to starting each Shopping Cart? (i.e., if creating multiple Shopping Carts within a single UI Add-on session)

      Thank you,

      Brent Mattson

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

      Dear Brent,

      No the user settings will be retained only for a particular session, On order of the shopping cart, the screen is refreshed and the session is refreshed, therefore the

      user settings are lost.

      Thanks and Regards,

      Vaibhav Agarwal

      Author's profile photo Andreas Hoffmann
      Andreas Hoffmann

      Hi Vaibhav Agarwal,

      what's the correct way in UI to keep the user settings persistant? User settings should be user settings and not lost after ordering a shopping cart.

      Thanks

      Andreas

       

      Author's profile photo Former Member
      Former Member

      We need to dynamically hide few feilds on header and line item. Can we use /SRMNXP/BD_USER_DEF_METADATA badi to achieve it?

      Author's profile photo Former Member
      Former Member

      Hello,

      we need to remove the item User Settings and add two new Items.

      menuItem.removeAllItems(); remove user Settings

      var oMenuItem = new sap.ui.commons.MenuItem("item1",{text: "Text1",  });
      var oMenuItem1 = new sap.ui.commons.MenuItem("item2",{text: "text2"});
      menuItem.addItem(oMenuItem,1);
      menuItem.addItem(oMenuItem1,2);

      both items are displayed

      http://www.directupload.net/file/d/5076/8hfgz5q5_png.htm

      buttonoMenuItem.attachSelect( function(){ window.open("webdynpro url", '_blank');

      now the problem if i press item1 or item 2 the web dynpro windows is opening but second popup windows is opening.

      http://www.directupload.net/file/d/5076/9ovn3k4o_png.htm

      Have you any idea to resolve the problem or any other method to do that.

      thanks