cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Custom HDM: Implementation BADI_HDM_CUSTOM_ENABLE examples

benoit-schmid
Contributor
0 Kudos
956

Good Morning,

I would like to use Custom Harmonized Document Management, in S4 2021 system, as documented in SAP Note 3253615.

As the Badi BADI_HDM_CUSTOM_ENABLE is not well documented and I am not ABAP developper, I am looking for implementation examples of this Badi.
If you you have implemented this badi, could you post your implementation?

Have a nice day.

Accepted Solutions (0)

Answers (1)

Answers (1)

wagener-mark
Contributor
0 Kudos

Hi,

it's super easy. You just need one line of coding:

class ZCL_BADI_HDM_CUSTOM_ENABLE definition
  public
  final
  create public .

public section.
  interfaces IF_BADI_INTERFACE .
  interfaces IF_HDM_CUSTOM_ENABLE .
protected section.
private section.
ENDCLASS.

CLASS ZCL_BADI_HDM_CUSTOM_ENABLE IMPLEMENTATION.
  method IF_HDM_CUSTOM_ENABLE~CHECK_HDM_CUSTOM_ENABLE.
    ev_enable = abap_true.
  endmethod.
ENDCLASS.

 

benoit-schmid
Contributor
0 Kudos

Good Morning,

Thanks for this late answer 🙂

Your documentation is quite different from what I performed:
SE18 -> Badi Name:BADI_HDM_CUSTOM_ENABLE -> Create
Enhancement Spot: ZES_HDM_ATTACHMENTS
Composite Enhancement Spot: ZES_HDM_ATTACHMENTS
Create Composite Spot
Composite Enhancement Spot: ZES_HDM_ATTACHMENTS
Short Text: Enable Custom HDM
Package: ZBC
Save
Save
Enhancement Implementation -> Activate
Enh. Spot Element Definitions -> Create Badi
Name: ZES_HDM_ATTACHMENTS
Description: Activate Custom HDM
Enh. Spot Element Definitions -> Right Click on BADI_HDM_CUSTOM_ENABLE
-> Create Badi implementation
Implementation -> Right Click -> Create Badi implementation
Badi Implementation: ZES_HDM_ATTACHMENTS
Description: Activate Custom HDM
Implementing Class: ZCL_HDM_CUSTOM_ENABLE
Implementing Class -> Double Click -> Create Implementation
---
method IF_HDM_CUSTOM_ENABLE~CHECK_HDM_CUSTOM_ENABLE.
EV_ENABLE = 'X'.
endmethod.
---
Save
Activate
Back -> Activate

Have a nice day.