cancel
Showing results for 
Search instead for 
Did you mean: 

Control display fo custom field

Former Member
0 Kudos

Hi,

We are on SRM 7.1 ECS.

We ahev a requirement to create a custom field under BASIC DATA tab in shopping cart screen but we would like to display this field only if the item is a service item.

In SRM 5,we had to implement the badi BBP_CUF_BADI_2 for the same reqt.

But in SRm 7,how do we implement this?

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

In SM30 > /SAPSRM/V_MDF_IC you can assign suitable "item type" for business object BUS2121. Still if you could not get expected results, you need to create your own dynamic class.

Ganapathi

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello,

Customzie below entries in

SPRo-> Configure Control field->Configure Control for Fields on Item Level->Metadata for Fields on Item Level

Structure Field Name Z_fields

Bus. Object Type BUS2121

Bus. Object Subtype

Transaction Type SHC

Field visible : X

Field enable : X

Dyn. Customer Class z_CL_ITM_DYN

Dyn. Customer Method /SAPSRM/IF_MDF_ITM_DYN_CONTROL~CHANGE_METADATA

Create a Class z_CL_ITM_DYN with interface

/SAPSRM/IF_MDF_ITM_DYN_CONTROL and in method give /SAPSRM/IF_MDF_ITM_DYN_CONTROL~CHANGE_METADATA

In this Method /SAPSRM/IF_MDF_ITM_DYN_CONTROL~CHANGE_METADATA

use code below:-

DATA : ls_sc_item TYPE bbps_sc_item_badi.

MOVE-CORRESPONDING is_item TO ls_sc_item.

IF condition

IF iv_field_name = Z_fields .

cs_metadata-visible = abap_true.

cs_metadata-enabled = abap_true.

cs_metadata-required = abap_false.

ENDIF.

ENDIF.

Regards,

Neelima

Former Member
0 Kudos

Thanks Neelima and Ganapathi.

I have just one quetion regarding the f4 help for teh custom field.

What are the best ways to provide f4 help for any customfield in SRM 7 other then custom search help?

The custom field I want to create is for USER ID field.Any suggestions?

Former Member
0 Kudos

Hi,

May be creating a 'custom search help' is the best option, but it will not validate the entried done by the users. You should validate the entries by BBP_DOC_CHECK_BADI.

Ganapathi.

Former Member
0 Kudos

Thanks Ganapathi.

Are there any options through config?

Former Member
0 Kudos

I am not sure, whether you could using Message Control. I dont think you can do it... But doc_check_badi is easy/flexible.

Former Member
0 Kudos

thanx for the very useful input.

I would like to know how I could control the content of the new fields in conditions?