Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Create a new method in the implementation class that will be called from the redefine method GET_OBJECT_DETAILS.

The purpose of this method is the define the actions (e.g. Approve/Reject) that will be made available in OneList for the specific Object (in this case Purchase Order) that the user will be viewing.

Method Parameters


Parameter Type
Parameter Name
Description
Data Type
ReturningRT_PO_ACTIONSPurchase Order Actions/IQX/OL_ACTIONS_TT


Method Implementation

The following ABAP code should be added to define the available actions and their behaviour. In this example, we are defining:

  • a green button with the label "Release" and the action RELEASE which will require the user to enter comments.
  • a red button with the label "Reject" and the action REJECT with the option to enter comments.


Code Block
method GET_PO_ACTION.

    DATA: ls_action_approve TYPE /iqx/ol_actions_st.

    ls_action_approve-action_type = 'Action'                ##NO_TEXT.
    ls_action_approve-action_name = 'Release'               ##NO_TEXT.
    ls_action_approve-action_id = 'RELEASE'                 ##NO_TEXT.
    ls_action_approve-comment_option = 'Required'           ##NO_TEXT.
    ls_action_approve-action_css_cls_name = 'btn-success'   ##NO_TEXT.
    APPEND ls_action_approve TO rt_po_action.

    CLEAR ls_action_approve.
    ls_action_approve-action_type = 'Action'                ##NO_TEXT.
    ls_action_approve-action_name = 'Reject'                ##NO_TEXT.
    ls_action_approve-action_id = 'REJECT'                  ##NO_TEXT.
    ls_action_approve-comment_option = 'Optional'           ##NO_TEXT.
    ls_action_approve-action_css_cls_name = 'btn-danger'    ##NO_TEXT.
    APPEND ls_action_approve TO rt_po_action.

  endmethod.