A class already exists with the name "LCL_CUSTOM_HEADER"

2 months ago 16

Below is my codification to specify a class. When I activate it, it has mistake connection : A people already exists with the sanction "LCL_CUSTOM_HEADER". And I tin spot determination are 2 people with aforesaid sanction successful the relation group. Why?

CLASS lcl_custom_header DEFINITION
      INHERITING FROM cl_foreign_application_view_mm.
  PUBLIC SECTION.

    METHODSconstructor
                  IMPORTING im_dynpro         TYPE sy-dynnr
                            im_prog           TYPE sy-repid
                            im_priority       TYPE OPTIONAL
                            im_foreign_prog   TYPE sy-repid
                            im_foreign_dynpro TYPE sy-dynnr
                            im_metafield      TYPE mmpur_metafield.
  PROTECTED SECTION.
    METHODSbuild_dynpro_fields  REDEFINITION.
    METHODStransport_from_model REDEFINITION.

  PRIVATE SECTION.
    DATAcustom_metafield TYPE mmpur_metafield.
ENDCLASS.                    "lcl_custom_header DEFINITION
*----------------------------------------------------------------------*
*       CLASS lcl_custom_header IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS lcl_custom_header IMPLEMENTATION.
  METHOD constructor.

    CALL METHOD super->constructor
      EXPORTING
        im_dynpro         im_dynpro
        im_prog           im_prog
        im_priority       im_priority
        im_foreign_prog   im_foreign_prog
        im_foreign_dynpro im_foreign_dynpro.
    custom_metafield im_metafield.
  ENDMETHOD.                    "CONSTRUCTOR
  METHOD build_dynpro_fields.
    DATAl_dynpro_entry LIKE LINE OF my_dynpro_fields.
    l_dynpro_entry-metafield custom_metafield.
    INSERT l_dynpro_entry INTO TABLE my_dynpro_fields.
  ENDMETHOD.                    "BUILD_DYNPRO_FIELDS
  METHOD transport_from_model.
    foreign_application_ok mmpur_yes.

*    set model to function group
    processed_model my_model.
  ENDMETHOD.                    "transport_from_model
ENDCLASS.                    "lcl_custom_header IMPLEMENTATION

Read Entire Article