Skip to Content

To restrict the copy functionality of text from description text type to vendor text type on UI

Requirement – to restrict the copy text from description to vendor text type if all mandatory fields are not entered on UI

In TCODE – BSP_WD_CMPWB

Please see image 1 of attachments.

GO inside the selected class –

Please see image 2 of attachments.

Select the EH_ONSAVE method,

Code written for the requirement mentioned above –

***code logic to retrict the copy text from desc to vendor text type if all mandatory fields are not entered on UI
    lr_controller ?= comp_controller->m_parent.
    lr_msg_srv ?= me->view_manager->get_message_service( ).
* If the mandatory fields check is already performed
* in the redefined child method,´it need not run again.

    IF cl_crm_uiu_bt_tools=>mandatory_flds_no_save_allowed( ir_controller = lr_controller
                                                           ir_msg_srv    = lr_msg_srv ) = abap_true.
      EXIT.
    ENDIF.
***code logic to retrict the copy text from desc to vendor text type if all mandatory fields are not entered on UI

Be the first to leave a comment
You must be Logged on to comment or reply to a post.