Skip to Content
0
Former Member
Aug 14, 2012 at 02:13 PM

Disable ITM_TYPE field at shopping cart item level

131 Views

Hi,

I have a requirement to disable field ITM_TYPE of shopping cart item for editing and I am doing it through metadata framework.

Have made the following entry in SPRO ->Extension & field control -> Configure field control -> Configure control for fields at item level \

Structure Field Name ITM_TYPE Item Category

Bus. Object Type BUS2121 Shopping Cart

Bus. Object Subtype 0 Standard Business Object Subtype

Transaction Type SHC Shopping cart

Item Type 0 Standard Item

Item Process Type 0 Initial Item Process Type

Field visible X

Field editable

Dyn. Customer Class ZCL_ALL_ITM_DYN_STD_FLD dynamic class for item std fields

Dyn. Customer Method /SAPSRM/IF_MDF_ITM_DYN_CONTROL~CHANGE_METADATA

Also added the code in method change_metadata to disable the field:

IF iv_field_name = 'ITM_TYPE'.

cs_metadata-enabled = abap_false.

ENDIF.

This is not working and the field ITM_TYPE is still editable. Please advise a solution.

Thanks in advance,

CM