SAP MDG: How to get the Custom List UIBB NEW button to work

Suggu Sandeep's photo
·

2 min read


Prerequisite

This blog continuation after previous blog Click here to check


Credits:

Vinay


Requirement


Process

Create a class in SE24 & Assign Super Class

Redefine The Method & Choose Filter Option

IF_FPM_GUIBB_LIST~GET_DATA

Add the code for following method

IF_FPM_GUIBB_LIST~GET_DATA

Remove entire code & paste below code

  METHOD if_fpm_guibb_list~get_data.
*CALL METHOD SUPER->IF_FPM_GUIBB_LIST~GET_DATA
*  EXPORTING
*    IV_EVENTID                =
**    it_selected_fields        =
**    iv_raised_by_own_ui       =
**    iv_visible_rows           =
**    iv_edit_mode              =
**    io_extended_ctrl          =
**  IMPORTING
**    et_messages               =
**    ev_data_changed           =
**    ev_field_usage_changed    =
**    ev_action_usage_changed   =
**    ev_selected_lines_changed =
**    ev_dnd_attr_changed       =
**    eo_itab_change_log        =
*  CHANGING
*    CT_DATA                   =
*    CT_FIELD_USAGE            =
*    CT_ACTION_USAGE           =
*    CT_SELECTED_LINES         =
*    CV_LEAD_INDEX             =
*    CV_FIRST_VISIBLE_ROW      =
**    cs_additional_info        =
**    ct_dnd_attributes         =
*    .

    CALL METHOD super->if_fpm_guibb_list~get_data
      EXPORTING
        iv_eventid                = iv_eventid
        it_selected_fields        = it_selected_fields
        iv_raised_by_own_ui       = iv_raised_by_own_ui
        iv_visible_rows           = iv_visible_rows
        iv_edit_mode              = iv_edit_mode
        io_extended_ctrl          = io_extended_ctrl
      IMPORTING
        et_messages               = et_messages
        ev_data_changed           = ev_data_changed
        ev_field_usage_changed    = ev_field_usage_changed
        ev_action_usage_changed   = ev_action_usage_changed
        ev_selected_lines_changed = ev_selected_lines_changed
        ev_dnd_attr_changed       = ev_dnd_attr_changed
        eo_itab_change_log        = eo_itab_change_log
      CHANGING
        ct_data                   = ct_data
        ct_field_usage            = ct_field_usage
        ct_action_usage           = ct_action_usage
        ct_selected_lines         = ct_selected_lines
        cv_lead_index             = cv_lead_index
        cv_first_visible_row      = cv_first_visible_row
        cs_additional_info        = cs_additional_info
        ct_dnd_attributes         = ct_dnd_attributes.
    READ TABLE ct_action_usage ASSIGNING FIELD-SYMBOL(<fs_action_usage1>) WITH KEY id =
   '_CREA_'.
    IF <fs_action_usage1> IS ASSIGNED.
      <fs_action_usage1>-enabled = abap_true.
      <fs_action_usage1>-visible = '02'.
      UNASSIGN <fs_action_usage1>.
    ENDIF.
    ev_action_usage_changed = abap_true.




  ENDMETHOD.

Now, New Button will work on CR UI & Rows going to create.


Thank You,

Suggu Sandeep.

(Connect me on LinkedIn -

Let’s get Collaborate & Share Knowledge)