In SAP Plant Maintenance, there might be a requirement to enable a custom button on IH08 transaction Output to perform some action. For example, say Print Equipment Labels from IH08.
I would explain how to Enable the Custom Button on IH08 Output Transaction which can be used for different purpose.
BADI : BADI_EAM_RIEQUI20_FCODE_CUS1
Image may be NSFW.
Clik here to view.
Here there are 2 Function codes, one for RIEQUI20 & one for RIEQUI21. Our Interest will be the function code +CUS1 on RIEQUI20.
Image may be NSFW.
Clik here to view.
Implement the above said BADI, provide BADI implementation name (ZXXXXXXXXXXX) and BADI implementing class (ZCL_XXXX_XXXXX)
Image may be NSFW.
Clik here to view.
This will implement the Interface Method IF_EX_BADI_EAM_LIST_FCODE~EXECUTE_FUNCTION_CODE.
Now Provide Function text, Any ICON(according to your Requirement, from INCLUDE <ICON>) and ICON text.
Image may be NSFW.
Clik here to view.
My Example, for ‘Equipment Print’
Image may be NSFW.
Clik here to view.
You have Enabled Custom Button now, Write code in the method IF_EX_BADI_EAM_LIST_FCODE~EXECUTE_FUNCTION_CODE of class ZCL_XXXX_XXXXX.