Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://scn.sap.com
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata

Purpose

Buttons on Confirmation screen are not always active and visible. This page shows an entry point of code where conditions behind button visibility can be debugged.

Overview

The following chapter contains an entry point of code to debug different conditions of different buttons, and let the debugger find out why a button is enabled or disabled in it's current case.

Buttons on Confirmation screen

Various checks are performed at different points of code before a Confirmation is displayed. Each button is bounded to different conditions.
Instead of providing each condition related to buttons (which conditions could change by time by SAP Notes), there are breakpoints offered to self-check why a button is disabled or enabled.

Breakpoint 1:
Class:      /SAPSRM/CL_CH_WD_MAP_IDENT
Method:   UPDATE_ACTIONS 

There is a loop on table MT_IDR_ACTIONS in method UPDATE_ACTIONS that contains the possible buttons, which could be enabled or disabled. In this example:

 

MT_IDR_ACTIONS:=
1        CONFIRM8        SAVE15        MEMORY_SNAPSHOT
2        RETURN9        DELETE16        FPM_CHECK_CLOSE
3        APPROVE10        CANCEL17        PRINT_PREVIEW
4        REJECT11        REVERT18        CHECK
5        SUBMIT_REVIEW12        RETURNDELIVERY19        EDIT
6        SHOW_MY_TASKS13        EVALUATESUPPLIER20        DISPLAY
7        CONFIRM_CANCELLATION14        SYSTEM_STATUS21        REFRESH

 

Breakpoint 2:
Class:      /SAPSRM/CL_PDO_META_BO_CONF
Method:   /SAPSRM/IF_PDO_META_CONSUMER~GET_ACTION_METADATA

Evaluation of conditions starts at method GET_ACTION_METADATA.

Field IV_ACTION contains the name of current button. You can switch between buttons by pressing F8 because of the loop at method UPDATEACTIONS. The code will run further until the next element in the list. Variable rv_enabled will contain X at the end of the method if button is enabled, and it will be initial if the button is disabled.

If more details are needed about reasons why button is enabled or disabled, then GET_ACTION_METADATA is the starting method wherefrom different code logics can be reached for different buttons.