Jakob
Jakob

Reputation: 1

ABAP dynamic Dynpro programming in Class

I have created a class structure in which there is a class that is only responsible for the visual representation. This is what the class looks like:

CLASS uierstellung DEFINITION.
  PUBLIC SECTION.

    METHODS: constructor,
      initialisieren.

  PRIVATE SECTION.
    DATA: toollogic TYPE REF TO toollogic.
ENDCLASS.

CLASS uierstellung IMPLEMENTATION.

  METHOD constructor.
    CREATE OBJECT toollogic.
  ENDMETHOD.

  METHOD initialisieren.
    
    SELECTION-SCREEN BEGIN OF SCREEN 100.
    PARAMETERS: p_suche TYPE string.
    SELECTION-SCREEN: PUSHBUTTON 83(15) btn_akt USER-COMMAND akt.
    SELECTION-SCREEN END OF SCREEN 100.

    INITIALIZATION.
    btn_akt = 'aktualisieren'.
    
    CALL SCREEN 100.
  ENDMETHOD.
ENDCLASS.

In this class I want to add dynamic elements. The problem is that I get the error message that the SELECTION-SCREEN command may not be used in form and function modules. Conversely, this means that I cannot decide at runtime what the selection screen / dynpro displays. Does anyone have a solution for this?

Upvotes: 0

Views: 30

Answers (0)

Related Questions