SAP DYNPRO PUSH BUTTON ABEXA

Get Example source ABAP code based on a different SAP table
  


ARTIClE

Screens, Pushbuttons
The example shows how to process pushbuttons on screens.

ABAP_SOURCE_CODE
ABAP_EXEC

ABAP_DESCRIPTION
The static next screen number of screen 100 is 100. The screen field of output has been set as not ready for input in the Screen Painter. If the user chooses one of the pushbuttons, the event PAI is triggered. The function code of the pushbutton is assigned to the screen field ok_code which in turn is assigned to the ABAP field of the same name. Then the module user_command_0100 is processed. First, the contents of the field ok_code are assigned to the auxiliary variable save_ok, and ok_code is initialized. This procedure is always recommended since it makes sure that the screen field ok_code is also reinitialized in the PBO event and does not contain any unintended value. The control structure CASE then assigns a text symbol to the output field depending on the pushbutton chosen which is then displayed in the output field of the screen, or the program is quit when the Cancel button is chosen.