cancel
Showing results for 
Search instead for 
Did you mean: 

Hide Supplier Field in SOS tab of Shopping cart based on a codition

Former Member
0 Kudos

Hi Gurus,

I have a requirement of hiding the Supplier field and Assign supplier button on the SOS tab of the shopping cart items.

It should be hidden based on the gross price of the item chosen.

The problem is that in the modify method of view V_DODC_SC_I_SOS , there is no access to ITEM GUID as it is associated to a switch which is associated to a business function PPS.

Without the GUID i will not be able to identify the SC Item, and hence not get the gross price value based on this i need to hide the supplier field.

So is there any other way to do so?

Regards,

Cruiser

Accepted Solutions (1)

Accepted Solutions (1)

richa_singh2
Explorer
0 Kudos

Hi Crusier,

In SRM7.0, we can hide the fields from metadata view.

Standard SAP fields are controlled by -

/SAPSRM/V_MDF_HD-For Header fields

/SAPSRM/V_MDF_IT-For item fields

/SAPSRM/V_MDFS-For sub-structures(The accounting tab, SOS tab etc substructures are controlled by this)

Custom fields are controlled by -

/SAPSRM/V_MDF_HC-For Header fields

/SAPSRM/V_MDF_IC-For item fields

/SAPSRM/V_MDFSBC-For sub-structures(The accounting tab, SOS tab etc substructures are controlled by this)

You can also check this in SPRO -

SAP Supplier Relationship Management->SRM Server->Cross-Application Basic Settings->Extensions and Field Control (Personalization)->Configure Field Control->Configure Control for Fields of Substructures

You can also check the documentation available here.

The dynamic class and method field in these metadata view helps to control the visibility of the fields dynamically.

Hope this helps.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Cruiser,

I had similar requirement.

Here is the code I wrote iIn the post-exit of WDDOMODIFYVIEW in order to get guid (and details)

of selected item.

DATA:

lo_task_factory TYPE REF TO /sapsrm/if_cll_taskcon_factory,

lo_task_container TYPE REF TO /sapsrm/if_cll_task_container,

lo_bom_sc TYPE REF TO /sapsrm/if_cll_bom_sc,

lo_pdo_sc TYPE REF TO /sapsrm/cl_pdo_bo_sc,

lv_guid_item TYPE bbp_guid,

lo_task_factory = /sapsrm/cl_ch_wd_taskcont_fact=>get_instance( ).

lo_task_container = lo_task_factory->get_task_container( ).

lv_bustype = lo_task_container->get_bo_type( ).

CHECK lv_bustype EQ 'BUS2121'.

lo_bom_sc = lo_task_container->get_bom_sc( ).

CHECK lo_bom_sc IS NOT INITIAL.

lo_pdo_sc ?= lo_bom_sc->/sapsrm/if_cll_xo_mapper~get_pdo( ).

CHECK lo_pdo_sc IS NOT INITIAL.

CALL METHOD lo_bom_sc->/sapsrm/if_cll_item_admin~get_lead_selection

RECEIVING

rv_lead_selection = lv_guid_item.

IF NOT lv_guid_item IS INITIAL.

TRY.

CALL METHOD lo_pdo_sc->/sapsrm/if_pdo_bo_sc~get_item_detail

EXPORTING

iv_item_guid = lv_guid_item

IMPORTING

et_item = lt_item.

CATCH /sapsrm/cx_pdo_no_authorizatio INTO lx_pdo_ex.

RAISE EXCEPTION TYPE /sapsrm/cx_wf_error EXPORTING previous = lx_pdo_ex.

CATCH /sapsrm/cx_pdo_abort INTO lx_pdo_ex.

RAISE EXCEPTION TYPE /sapsrm/cx_wf_abort EXPORTING previous = lx_pdo_ex.

ENDTRY.

ENDIF.

I hope this helps,

Kind regards,

Marta

Former Member
0 Kudos

Thanx Rising High and MArta.. Issue solved.

cruiser