Continue by adding everything to the uml diagram. Take care to not violate abap syntax and types. Use a config to clarify which part should be displayed or not, e.g. datatypes or method parameters,...
PARAMETERS:
  p_obj TYPE seoclsname, " Object name (Class/Interface)
  p_pkg TYPE devclass.   " Package name

" Ensure at least one parameter is provided

AT SELECTION-SCREEN.
  IF p_obj IS INITIAL AND p_pkg IS INITIAL.
    MESSAGE 'Please specify either an object name or a package name.' TYPE 'E'.
  ENDIF.

  " Data declarations
  DATA: lo_uml_scanner TYPE REF TO cl_uml_class_scanner,
        lv_puml_text   TYPE string.

  " Create an instance of the UML Class Scanner
  CREATE OBJECT lo_uml_scanner.

  " Set up scanner configuration
  lo_uml_scanner->set_scanner_configuration(
    EXPORTING
      scan_local_types       = abap_true
      add_structures         = abap_true
      scan_used_types        = abap_true
      scan_function_groups   = abap_false
      scan_programs          = abap_false
      scan_deep              = abap_false
      scan_business_objects  = abap_false
      max_scan_depth         = 10
  ).

  " Define which types to scan (type range)
  DATA: lt_scan_types TYPE cl_uml_class_scanner=>uml_range_types,
        ls_scan_type  LIKE LINE OF lt_scan_types.

  IF p_obj IS NOT INITIAL.
    ls_scan_type-sign   = 'I'.
    ls_scan_type-option = 'CP'.
    ls_scan_type-low    = p_obj.
    APPEND ls_scan_type TO lt_scan_types.
  ENDIF.

  " Define which packages to scan (package range)
  DATA: lt_scan_packages TYPE cl_uml_class_scanner=>uml_range_packages,
        ls_scan_package  LIKE LINE OF lt_scan_packages.

  IF p_pkg IS NOT INITIAL.
    ls_scan_package-sign   = 'I'.
    ls_scan_package-option = 'CP'.
    ls_scan_package-low    = p_pkg.
    APPEND ls_scan_package TO lt_scan_packages.
  ENDIF.

*  SELECT DISTINCT devclass AS low, 'I' AS sign, 'EQ' AS option FROM tadir
*    APPENDING CORRESPONDING FIELDS OF TABLE @et_so_packages   ##TOO_MANY_ITAB_FIELDS
*  WHERE obj_name IN @et_so_objects.

  " Execute the scanner
  TRY.
      lo_uml_scanner->execute(
        EXPORTING
          scan_packages = lt_scan_packages
          scan_types    = lt_scan_types
      ).
    CATCH cx_root INTO DATA(lx_root).
      MESSAGE lx_root->get_text( ) TYPE 'E'.
      EXIT.
  ENDTRY.

  " Get the diagram data
  DATA: lv_kind TYPE c,
        lr_data TYPE REF TO data.

  lo_uml_scanner->get_diagram(
    IMPORTING
      e_kind = lv_kind
    CHANGING
      c_data = lr_data
  ).

  " Check if the returned kind is the expected UML table
  IF lv_kind <> lo_uml_scanner->c_kind_uml_tab.
    MESSAGE 'Unexpected diagram kind' TYPE 'E'.
    EXIT.
  ENDIF.

  " Assign the diagram data to a field symbol
  FIELD-SYMBOLS: <lt_uml_tab> TYPE cl_uml_class_scanner=>uml_tab.
  ASSIGN lr_data->* TO <lt_uml_tab>.

  IF sy-subrc <> 0 OR <lt_uml_tab> IS INITIAL.
    MESSAGE 'Failed to retrieve diagram data' TYPE 'E'.
    EXIT.
  ENDIF.

  " Generate PlantUML text from the diagram data
  DATA: lt_output TYPE TABLE OF string,
        lv_line   TYPE string.

  APPEND '@startuml' TO lt_output.

  " Collect relations separately
  DATA: lt_relations TYPE STANDARD TABLE OF cl_uml_class_scanner=>uml_line.

  " Process classes and interfaces
  LOOP AT <lt_uml_tab> ASSIGNING FIELD-SYMBOL(<ls_uml_line>).