on 07-26-2022 9:54 PM
Hello sap community , i m new to abap and i m trying to write a simple program that takes input from the user in selection screen and i want to add a button to the selection screen in a way that when the user click the button the informations entered in the fields will be displayed to him , can i get a little of help on how could i do that .
Here is the code i wrote till now :
TABLES sscrfields.
DATA : matricule type STRING ,
button1 TYPE C ,
button2 TYPE C .
SELECTION-SCREEN BEGIN OF BLOCK PERIODE WITH FRAME TITLE TEXT-001.
PARAMETERS : DATE_DEB TYPE sy-datum .
PARAMETERS : DATE_FIN TYPE sy-datum .
SELECTION-SCREEN END OF BLOCK PERIODE .
SELECTION-SCREEN BEGIN OF BLOCK SALARIE WITH FRAME TITLE TEXT-002.
PARAMETERS : MATRICUL TYPE STRING .
PARAMETERS :NOM TYPE STRING .
PARAMETERS : PRENOM TYPE STRING .
SELECTION-SCREEN END OF BLOCK SALARIE.
SELECTION-SCREEN BEGIN OF BLOCK AFFICHAGE WITH FRAME TITLE TEXT-003 .
PARAMETERS : RESULT TYPE STRING .
SELECTION-SCREEN PUSHBUTTON 2(10) butto1 USER-COMMAND but1.
SELECTION-SCREEN PUSHBUTTON 2(10) butto2 USER-COMMAND but2.
SELECTION-SCREEN END OF BLOCK AFFICHAGE .
AT SELECTION-SCREEN.
CASE sscrfields.
WHEN 'BUT1'.
MESSAGE 'Button 1 was clicked' TYPE 'I'.
WHEN 'BUT2'.
MESSAGE 'Button 2 was clicked' TYPE 'I'.
ENDCASE.
INITIALIZATION.
button1 = 'Button 1'.
button2 = 'Button 2'.
PUSHBUTTON 2(10) but1 USER-COMMAND cli1
use this statement to create a button ,
then use case ...endcase block within it
write
WHEN cli1.
write: <name of parameter>,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
12 | |
10 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.