SAP MDG · MDG FINANCE

How do I implement reusable SAP MDG change-request, CR-type, and Excel file-upload helper methods in ABAP?

Use a small public utility class that wraps standard MDG governance APIs for CR URL creation, safe CR submission/rollback, CR deletion, CR-type filtering, and XLSX read/template handling. The reusable pattern from the source centers on `IF_USMD_GOV_API`, `CL_USMD_WF_NAVIGATION_HANDLER`, `CL_USMD_CREQUEST_DELETE`, `CL_USMD2_CUST_ACCESS_SERVICE`, BAdI `USMD_CREQUEST_INTEGRATION`, and `CL_FDT_XL_SPREADSHEET`.

Use a small public utility class that wraps standard MDG governance APIs for CR URL creation, safe CR submission/rollback, CR deletion, CR-type filtering, and XLSX read/template handling. The reusable pattern from the source centers on `IF_USMD_GOV_API`, `CL_USMD_WF_NAVIGATION_HANDLER`, `CL_USMD_CREQUEST_DELETE`, `CL_USMD2_CUST_ACCESS_SERVICE`, BAdI `USMD_CREQUEST_INTEGRATION`, and `CL_FDT_XL_SPREADSHEET`.

A reusable SAP MDG helper class can cover four common building blocks: change-request navigation, safe CR submission with rollback, CR-type filtering for entity value help, and XLSX file handling. The source sample uses `IF_USMD_GOV_API` for lifecycle control, `CL_USMD_WF_NAVIGATION_HANDLER` for browser URLs, `CL_USMD2_CUST_ACCESS_SERVICE` plus BAdI `USMD_CREQUEST_INTEGRATION` for CR-type customizing, and `CL_FDT_XL_SPREADSHEET` for workbook upload/template generation.

Process flow

  1. Create a public utility class for MDG helper methods.
  2. Implement `build_cr_url` using `CL_USMD_WF_NAVIGATION_HANDLER` and `CL_WD_UTILITIES`.
  3. Implement `submit_cr` with check, save, dequeue, workflow start, and rollback deletion.
  4. Implement `delete_cr` with `CL_USMD_CREQUEST_DELETE`.
  5. Implement `get_cr_types_for_entity` with `CL_USMD2_CUST_ACCESS_SERVICE`, `AUTHORITY-CHECK`, and BAdI `USMD_CREQUEST_INTEGRATION`.
  6. Implement `is_mass_cr` using process/activity lookup and action check.
  7. Implement `is_parallel_cr` using `CL_USMD2_CUST_ACCESS_SERVICE=>IS_PARALLEL_CR_TYPE`.
  8. Implement `read_xlsx` with `CL_FDT_XL_SPREADSHEET` and return a dynamic table from the first worksheet.」「Implement `build_xlsx_template` by reading MIME content first and falling back to workbook creation from columns.

BAdI implementation for `USMD_CREQUEST_INTEGRATION` filtered by data model

Restrict CR types per model and entity in the reusable CR-type value help logic.

Referenced tables

ObjectPurpose
USMD_CREQAuthorization object checked for CR-type create access in the value-help logic.

The remaining configuration, implementation details, and testing guidance continue from this answer more…

Related questions and keywords

Alternative questions

  • How can I build a reusable MDG utility class for change request submission and file upload?
  • What is the standard ABAP pattern for MDG CR URL, CR-type filtering, and XLSX handling?
  • How do I reuse MDG governance APIs for submit, delete, and CR-type value help logic?

Possible questions

  • How do I build a change request URL in SAP MDG?
  • How do I submit an MDG change request safely with rollback?
  • How do I filter MDG CR types by entity and authorization?
  • How do I detect whether a CR type is mass or parallel?
  • How do I read an uploaded XLSX file into an internal table in ABAP?
  • How do I build an XLSX template from MIME repository or column metadata?

Keywords

SAP MDGABAPIF_USMD_GOV_APICL_USMD_WF_NAVIGATION_HANDLERCL_USMD_CREQUEST_DELETECL_USMD2_CUST_ACCESS_SERVICEUSMD_CREQUEST_INTEGRATIONCL_FDT_XL_SPREADSHEETCL_MIME_REPOSITORY_APICR type value helpXLSX uploadchange request lifecycle