SAP MDG: How to make user to create only one record of ERP Vendor

Table of contents


Scenario

What’s the Plan of action - once user clicks on new button, ERP Vendor he enters inside to enter data of CC & PO for Supplier, once he return back -
New Button will be hide.

So, No more usage of creating one more ERP Vendor

Go to Component Customizing - CL_BS_BP_GUIBB_MLT_ASSIGNMENTS

Create Enhancement & Post Exit

Add The Code to Post Exit

 LOOP AT ct_selected_lines ASSIGNING FIELD-SYMBOL(<fs_sel_line>).
      READ TABLE ct_action_usage ASSIGNING FIELD-SYMBOL(<fs_act_usg>) WITH KEY id = '_CREA_'.
      READ TABLE ct_action_usage ASSIGNING FIELD-SYMBOL(<fs_act_usg1>) WITH KEY id = 'BOL_COPY'.

      IF <fs_sel_line>-tabix = 1.
        <fs_act_usg>-enabled = abap_true.
        <fs_act_usg>-visible = '01'.

        <fs_act_usg1>-enabled = abap_true.
        <fs_act_usg1>-visible = '01'.

      ENDIF.

ENDLOOP.

Thanks & Regards,

Suggu Sandeep.