2006 Nov 30 5:20 AM
can any one tell how to use the keyword " MODIF ID " in the normal screen(module pool) for the group of fields so that i can call that group based on the group name.
2006 Nov 30 5:22 AM
Whatever name you specify for MODIF ID will be the group name of a field.
After that when you want to change screen elements at run time
LOOP AT SCREEN.
IF SCREE-GROUP1 = 'XXX'.
.....
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Regards,
Ravi
2006 Nov 30 5:23 AM
2006 Nov 30 5:23 AM
hi,
pls refre this thread.
https://forums.sdn.sap.com/click.jspa?searchID=233561&messageID=1329434
rgds
anver
2006 Nov 30 5:23 AM
ckeck this code
tables :kna1.
select-options : kunnr for kna1-kunnr DEFAULT '100' modif id scr.
at selection-screen output.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'SCR' . SCREEN-INPUT = '0'.
screen-ACTIVE = '1'.
MODIFY SCREEN.
CONTINUE.
ENDIF.
endloop.
regards,
aswin.
2006 Nov 30 5:24 AM
Please check this from documentation:
Assigning a Modication Group on the Selection Screen
Addition
... MODIF ID modid
Effect
This addition assigns screen objects ( Comment, Underscore line, Parameter, ...) to a modification group and hence allows dynamic modification of the selction screen display.
The modification group name modid must be specified directly and must be no longer than 3 characters. The addition MODIF ID assigns modid to the column SCREEN-GROUP1 of the predefined internal table SCREEN. Parameters assigned to a modification group can be changed together using the LOOP AT SCREEN and MODIFY SCREEN statements at the event AT SELECTION SCREEN OUTPUT or in the subroutine PBO of the database program of the assigned logical database.
You can use this addition with:
- SELECTION-SCREEN COMMENT
- SELECTION-SCREEN ULINE
- SELECTION-SCREEN PUSHBUTTON
- PARAMETERS
- SELECT-OPTIONS
In each case all relevant screen objects are assigned to the modification group.
Without the MODIF ID addition, the SCREEN-GROUP1 component is empty. The remaining three fields for modification groups in the SCREEN table are populated by the runtime environmentand can be analyzed:
GROUP2 contains the value "DBS" for elements that are defined in a logical database.
GROUP3 contains the following values depending on the screen element:
BLK for SELECTION-SCREEN ... BLOCK ...: Block
COF for SELECTION-SCREEN COMMENT ... FOR FIELD ...: Field-related comment
COM for SELECTION-SCREEN COMMENT: Comment
HGH for SELECTION-OPTIONS: Interval upper limit
ISX for PARAMETERS ... AS SEARCH PATTERN: Komplex selection
LOW for SELECTION-OPTIONS: Interval lower limit
OPU for SELECTION-OPTIONS: Selection option icons
PAR for PARAMETERS: Parameters
PBU for SELECTION-SCREEN PUSHBUTTON ...: Pushbutton
TAB for SELECTION-SCREEN TAB: Tab title
TOT for SELECTION-OPTIONS: Text of interval upper limit
TST for SELECTION-SCREEN ... TABBED ...: Tabstrip
TXT for PARAMETERS, SELECT-OPTIONS: Selection text
ULI for SELECTION-SCREEN ULINE: Horizontal Line
VPU for SELECT-OPTIONS: Pushbutton for multiple selection
GROUP4 is intended solely for internal use.
Kind Regards
Eswar
2006 Nov 30 5:28 AM
parameters: a type c modif id '001',
b type c modif id '001',
c type c modif id '001',
d type c,
e type c radiobutton group g1 .
At selection-screen ouput.
loop at screen.
if e is not initial.
if screen-group1 = '001'.
...
endif.
modify screen.
endif.
endloop.
2006 Nov 30 5:46 AM
Hi,
As suggested,you have to use the same inside the loop for modifying screen.
loop at screen.
if screen-group1 = 'Z1' and screen-name = 'P1'.
screen-input = 1."Enable P1 for input
else.
screen-input = 0.
endif.
modify screen.
endloop.