cancel
Showing results for 
Search instead for 
Did you mean: 

Hide item type in PO

Former Member
0 Kudos

Hello,

Here is my question. How can I hide the Limit item type for some PO type?

By example, for the PO type ZTYP1, the user can't see and choose Limit type in the droplist. But he can always create a Service item.

Thanks a lot.

Regards,

Ruijia

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Malay,

You can do this perform an enhancement in a WD component /SAPSRM/WDC_UI_PO_DOTC_IT in the view V_PO_DOTC_BASIC.

Go to WDDOMODIFYVIEW method and you will create a post-exit method.

take this example:


  LO_LIMIT_ITEM ?= VIEW->GET_ELEMENT('ADD_LIMIT').

  IF NOT  LO_LIMIT_ITEM IS INITIAL.

    LO_LIMIT_ITEM->SET_VISIBLE('').

  ENDIF.

  LO_NODE = WD_CONTEXT->GET_CHILD_NODE( NAME = IF_V_PO_DOTC_BASIC=>WDCTX_COMP_CONTEXT ).

  LO_ELEMENT = LO_NODE->GET_CHILD_NODE( NAME = IF_V_PO_DOTC_BASIC=>WDCTX_ITEMS ).

  LO_INFO = LO_ELEMENT->GET_NODE_INFO( ).

  LE_ATTRIBUTES = LO_INFO->GET_ATTRIBUTE( NAME = LC_POS_TYPE ).

  DELETE LE_ATTRIBUTES-VALUE_SET WHERE VALUE = '03'."Limite

*
  LO_INFO->SET_ATTRIBUTE_VALUE_SET( NAME = LC_POS_TYPE VALUE_SET = LE_ATTRIBUTES-VALUE_SET ).

Regards,

Emanuel

Answers (2)

Answers (2)

former_member228602
Contributor
0 Kudos

Hello Ruijia,

     If you are planning to limit the use of "limit"(pun unintended) only in PO then the best option would be to write a enhancement in the WDDOMODIFYVIEW basic view of /SAPSRM/WDC_UI_PO_DOTC_IT

component. On the layout you will see a button which has many options line item,limit, product category. In enhancement find the element and make the limit entry to invisible.

     However this would disable only addition of limit item in PO screen and if a PO created from SC or RFX has limit it will still be visible.

Thanks and Regards,

Veera

Former Member
0 Kudos

That's exact what i want. Thanks for the answer.

Best Regards,

Ruijia

Former Member
0 Kudos

Hi,

Please try with the BADI "BBP_UI_CONTROL_BADI" and method "BBP_PO_UI_CTRL".

With Regards,

Malay

Former Member
0 Kudos

Hi Malay,

I don't want to hide the field but an option in this dropdown list. The implementing BBP_UI_CONTROL_BADI just hide the item type field.

Regards,

Ruijia