Application Development and Automation 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: 
Read only

REPORT

Former Member
0 Likes
642

WHAT IS MODIF ID

4 REPLIES 4
Read only

Former Member
0 Likes
620

Hi,

Please refer to the docu below :

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.

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.

Thanks,

Sriram Ponna.

Read only

Former Member
0 Likes
620

hi ,

when you have 2 radio buttons if 1 is selected the something is to display and some thing had to grade out ,

when u select 2 then the rest will be displayed and the previous will be grade out, for this u use this command.

check this coding,

TABLES sscrfields.

PARAMETERS: p_r1 RADIOBUTTON GROUP grp1 USER-COMMAND us DEFAULT 'X',

p_r2 RADIOBUTTON GROUP grp1.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.

PARAMETERS: p_mat TYPE mara-matnr MODIF ID id1,

p_ven TYPE lfa1-lifnr MODIF ID id2

.

SELECTION-SCREEN END OF BLOCK b1.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

CASE screen-group1.

WHEN 'ID1'.

IF p_r1 = 'X'.

screen-active = 1.

ELSE.

screen-active = 0.

ENDIF.

WHEN 'ID2'.

IF p_r2 = 'X'.

screen-active = 1.

ELSE.

screen-active = 0.

ENDIF.

ENDCASE.

MODIFY SCREEN.

ENDLOOP.

AT SELECTION-SCREEN ON p_mat.

CHECK sscrfields-ucomm NE 'US'.

IF p_mat IS INITIAL.

  • MESSAGE e000 WITH 'mat is required'.

ENDIF.

reward points if useful,

venkat.

Read only

Former Member
0 Likes
620

hi Gautam,

Check out the below link

http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/select_o.htm

Regards,

Santosh

Read only

vinod_vemuru2
Active Contributor
0 Likes
620

Hi,

Modif ID is used to assign screen group name to the selection screen parameters. So if u want to modify any thing in the selection screen(Enable/Disable some fields based on user input) then we can code our logic by using screen group name.

Check the example below.

SELECT-OPTIONS so_vkorg FOR vbak-vkorg MODIF ID XXX.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'XXX'.

SCREEN-INVISIBLE = 1.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Here all the selection screen elements which assigned under this modif ID will be disabled.

Thanks,

Vinod.