Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

abap general

Former Member
0 Kudos

Hi all,

wht is the main purpose for

SELECTION-SCREEN [MODIF ID modid]

pls give a sample code for this.....

8 REPLIES 8

Simha_
Employee
Employee
0 Kudos

Hi,

Modif id is used ti identify particular group of fields which have the same modification identifier.. which u define..

If u want to change the selection-screen dynamically then u can use this modif id..

Cheers,

Simha.

Former Member
0 Kudos

Modif Id :

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.

Former Member
0 Kudos

Hi Alex,

modif id GR1.

this means in the selection screen if you want to modify any of the screen elements you can do so by using modif id

eg: loop screen .

if screen-group1 = 'GR1'.

screen-input = '0'.

endif.

endloop.

hope this helps.

Regards,

Kinshuk

please mark this as question

Former Member
0 Kudos

Hi,

Check this small example..

DEMO_SEL_SCREEN_PARAM_MODIF

REPORT demo_sel_screen_param_modif.

PARAMETERS: test1(10) TYPE c MODIF ID sc1,

test2(10) TYPE c MODIF ID sc2,

test3(10) TYPE c MODIF ID sc1,

test4(10) TYPE c MODIF ID sc2.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF screen-group1 = 'SC1'.

screen-intensified = '1'.

MODIFY SCREEN.

CONTINUE.

ENDIF.

IF screen-group1 = 'SC2'.

screen-intensified = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Regards,

Kumar

Former Member
0 Kudos

we can group the screen UI's into fur groups.

so any modification to group like visibility, input=0, etc, we cann apply to all UI's in one statement.

Former Member
0 Kudos

Hi,

It is the 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.

Example

DATA SAPLANE_WA TYPE SAPLANE.

...

SELECTION-SCREEN COMMENT /1(60) TEXT-010.

...

SELECT-OPTIONS S_PTYPE FOR SAPLANE_WA-PLANETYPE MODIF ID ABC.

...

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'ABC' OR

SCREEN-GROUP3 = 'COM'.

SCREEN-INTENSIFIED = '1'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

All screen objects (text, input fields, pushbuttons) belonging to the selection option S_PTYPE as well as all comments defined with SELECTION-SCREEN COMMENT are set to the output format INTENSIFIED.

Regards

Muthappan

Former Member
0 Kudos

Hi alex george,

PARAMETERS :

P_LPATH TYPE FILEPATH-PATHINTERN MODIF ID Z1,

P_OFILE TYPE RLGRAP-FILENAME.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'Z1' .

SCREEN-INVISIBLE = 1.

SCREEN-ACTIVE = 0.

ELSE.

SCREEN-INVISIBLE = 0.

SCREEN-ACTIVE = 1.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

Thanks

Vikranth Khimavath

Former Member
0 Kudos

Hello,

The addition MODIF ID assigns all the screen elements of the parameter to the modification group 'modid', which is assigned to the column 'group1' of the system table SCREEN. This enables them to be modified before the selection screen is displayed, using the statement MODIFY SCREEN.

You can change the attributes of the screen fields that are assigned to the same modif ID (identfied for each screen field for the group1 column in SCREEN table for the value with modid) at the same time in your event AT SELECTION-SCREEN OUTPUT. For example, in case you want a conditional display or non-display of field(s), you can use this extension.

Regards,

Deepa S.