0% found this document useful (0 votes)
19 views

Enable/Disable Input Fields When Press ENTER".: Zexper

This document describes how to enable and disable input fields in ABAP based on pressing the ENTER key. When the screen is first displayed, the EBELN field is enabled for input and the MATNR field is disabled. When the user enters a value in EBELN and presses ENTER, the MATNR field will become enabled, allowing the user to enter a value. Modif IDs are used to group elements and control field attributes at runtime based on user input.

Uploaded by

Ram Praneeth
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Enable/Disable Input Fields When Press ENTER".: Zexper

This document describes how to enable and disable input fields in ABAP based on pressing the ENTER key. When the screen is first displayed, the EBELN field is enabled for input and the MATNR field is disabled. When the user enters a value in EBELN and presses ENTER, the MATNR field will become enabled, allowing the user to enter a value. Modif IDs are used to group elements and control field attributes at runtime based on user input.

Uploaded by

Ram Praneeth
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Enable/Disable Input fields when press ‘ENTER”.

REPORT ZEXPER NO STANDARD PAGE HEADING.

PARAMETERS EBELN TYPE EKKO-EBELN MODIF ID EBE.

PARAMETERS MATNR TYPE MARA-MATNR MODIF ID MAT .

“Modif id is used in screen group elements

AT SELECTION-SCREEN OUTPUT.
IF EBELN IS INITIAL.
LOOP AT SCREEN .
IF SCREEN-NAME = 'EBELN'.
SCREEN-GROUP1 = 'EBE'.
SCREEN-INPUT = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.

LOOP AT SCREEN.
IF SCREEN-NAME = 'MATNR'.
SCREEN-GROUP1 = 'MAT'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.

IF EBELN IS NOT INITIAL.


LOOP AT SCREEN .
IF SCREEN-NAME = 'EBELN'.
SCREEN-GROUP1 = 'EBE'.
SCREEN-INPUT = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.

LOOP AT SCREEN .
IF SCREEN-NAME = 'MATNR'.
SCREEN-GROUP1 = 'MAT'.
SCREEN-INPUT = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
* ENDCASE.
ENDIF.
Here when executed EBELN is imput ready and MATNR is hide.

When the USER provide any input in the EBELN and press ENTER button in Keyboard
then MATNR field is enabled for input.

Press ENTER.Now provide values for MATNR.

Note : Use of user-command


1. We shouldn’t use (we can use but depends on reqirement) User-command keyword
with along with parameters using Fields (can use Modif id).
2. Using user-command keyword with a parameter with fields makes no sense.
3. It is used mainly with radiobuttons, check boxes etc.

You might also like