DYNPRO deletes value after user interaction

Hi,

im neu in ABAP Welt and tried to write a calculator but whenever i click a button. it deletes field which i want to also see. Can You experts help me for this?

here is my code:

MODULE user_command_2000 INPUT.
   IF syucomm EQ ‘BACK’.
     LEAVE TO SCREEN 0.
   ELSEIF syucomm EQ ‘CLEAR’.
     CLEAR:
           gv_numinp1 ,
           gv_numinp2 ,
           gv_numoutp1.
   ELSEIF syucomm EQ ‘EXIT’ OR syucomm EQ ‘CANC’.
     LEAVE PROGRAM.
   ELSEIF syucomm EQ ‘CALC’.
     IF gv_numinp1 IS INITIAL AND gv_numinp2 IS INITIAL.
       MESSAGE ‘bitte’ TYPE ‘S’ DISPLAY LIKE ‘E’.
     ENDIF.
     CREATE OBJECT go_main EXPORTING iv_num1 gv_numinp1 iv_num2 gv_numinp2.
     IF gv_radplus EQ abap_true“Summe
       go_main->sum(

         IMPORTING
           ev_result =            gv_numoutp1  ” RESULT
       ).

     ELSEIF gv_radmin EQ abap_true“Minus
       go_main->subtraction(
       IMPORTING
           ev_result =            gv_numoutp1  ” RESULT
       ).

     ELSEIF gv_radmultip EQ abap_true“multiplication
       go_main->multiplication(
       IMPORTING
           ev_result =            gv_numoutp1  ” RESULT
       ).

     ELSEIF gv_raddiv EQ abap_true“division
       go_main->division(
       IMPORTING
           ev_result =            gv_numoutp1  ” RESULT
       ).
     ENDIF.

   ENDIF.
   WRITE gv_numoutp1.
 ENDMODULE.

 

and Photos:

before:

suem_1-1714998476491.png

and after click:

suem_2-1714998520272.png

BR.

 

 

Scroll to Top