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

SELECTION OPTION

Former Member
0 Likes
1,144

dear experts,

fallowing is my selection options.....whe r1 radio button is pressed p_mblnr must be disabled .....when r2 is pressed p_pure must be diabled..this is my requriment,

please help me out......i dont want in module pool....is there any posibility if so please help me

SELECTION-SCREEN:BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

PARAMETERS : RT1 RADIOBUTTON GROUP A .

PARAMETERS:p_prue LIKE qamb-prueflos OBLIGATORY MATCHCODE OBJECT zre.

PARAMETERS : RT2 RADIOBUTTON GROUP A .

PARAMETERS:p_MBLNR LIKE qamb-prueflos OBLIGATORY .

PARAMETERS:p_end LIKE qals-paendterm .

parameters:p_stat type c obligatory.

SELECTION-SCREEN:END OF BLOCK b1.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,111

AT SELECTION-SCREEN.

if RT1 = 'X'.

LOOP AT SCREEN.

IF SCREEN-NAME = 'P_MBLNR'.

SCREEN-INPUT = 0.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

elseif RT2 = 'X.

LOOP AT SCREEN.

IF SCREEN-NAME = 'P_PURE'.

SCREEN-INPUT = 0.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

endif.

10 REPLIES 10
Read only

Former Member
0 Likes
1,112

AT SELECTION-SCREEN.

if RT1 = 'X'.

LOOP AT SCREEN.

IF SCREEN-NAME = 'P_MBLNR'.

SCREEN-INPUT = 0.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

elseif RT2 = 'X.

LOOP AT SCREEN.

IF SCREEN-NAME = 'P_PURE'.

SCREEN-INPUT = 0.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

endif.

Read only

prabhu_s2
Active Contributor
0 Likes
1,111

yes it isn popssible without module pool. make use of at screen of selection and loop at screen...endloop. where u wuill set the value as 0 and 1 accordinyl. u can check in abap help also

Read only

Former Member
0 Likes
1,111

AT SELECTION-SCREEN OUTPUT

Check the value of your radio button, then loop at screen and accordingly disable a field.

Example of loop at screen

LOOP AT SCREEN.

*--Logic to make pernr and bukrs fields read only.

IF screen-name = 'PNPBUKRS-LOW'.

screen-active = '1'.

screen-input = '0'.

screen-output = '1'.

ENDIF.

*--Start of change:RD1K903781 ZOFSNADG

IF screen-name = 'P_CUTOFF'.

screen-active = '1'.

screen-input = '0'.

screen-output = '1'.

ENDIF.

*--End of change:RD1K903781 ZOFSNADG

*--Logic to hide extra Payroll area field from selection screen

IF screen-name = 'PNPABKRS-LOW'.

screen-active = '1'.

screen-input = '0'.

screen-output = '1'.

screen-invisible = '1'.

ENDIF.

IF screen-name = '%_PNPABKRS_%_APP_%-TEXT'.

screen-active = '1'.

screen-input = '0'.

screen-output = '1'.

screen-invisible = '1'.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

Reward points if helpfull.

Regards

Sachin

Read only

hymavathi_oruganti
Active Contributor
0 Likes
1,111

have u ever heard about tabkle "<b>SCREEN</b>". it is the temporary table which is stored in the buffer when the report is executing.

in this table, u have many fields like NAME,REQUIRED, INPUT, OUTPUT, ACTIVE, DIABLED, GROUP1 etc. u just go thru the table.

what we can do in the report is,

in screen table NAME field contains the current screen field name. u can check it out in debugging.

in the event

<b>AT SELECTION SCREEN OUTPUT.</b>

<b>LOOP AT SCREEN .</b> (looping at the screen table)

<b>if r1 = 'X'.

if screen-name = 'A' or screen-group1 = 'A'.</b>DO SOME THING...........

-


endiF.

<b>modify SCREEN.</b>

ENDLOOP.

ENDIF.

Read only

Former Member
0 Likes
1,111

HI ,

Refer the code below it will work ,,

Copy and paste in your editor ..

PARAMETERS: p_rad1 RADIOBUTTON GROUP rad1 USER-COMMAND a DEFAULT 'X'.

PARAMETERS: p_rad2 RADIOBUTTON GROUP rad1.

PARAMETERS : p_prue(100) TYPE c MODIF ID mo1," default 'nazeer',

p_MBLNR(10) type c modif id mo2." default '2naz'.

  • At selection Screen Output Event

AT SELECTION-SCREEN OUTPUT.

IF p_rad1 EQ 'X'.

LOOP AT SCREEN.

IF screen-group1 = 'MO2'.

screen-input = 0.

MODIFY SCREEN.

ENDIF.

IF screen-group1 = 'MO1'.

screen-input = 1.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ELSE.

LOOP AT SCREEN.

IF screen-group1 = 'MO1'.

screen-input = 0.

MODIFY SCREEN.

ENDIF.

IF screen-group1 = 'MO2'.

screen-input = 1.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

rewards

regards,

nazeer

Read only

Former Member
0 Likes
1,111

PARAMETERS : R1 RADIOBUTTON GROUP RG USER-COMMAND R DEFAULT 'X'.

parameters : a(10) type c modif id abc.

PARAMETERS : R2 RADIOBUTTON GROUP RG .

parameters : b(10) type c modif id def.

at selection-screen output.

IF R1 = 'X'.

LOOP AT SCREEN.

IF screen-group1 = 'DEF' .

screen-input = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

IF R2 = 'X'.

LOOP AT SCREEN.

IF screen-group1 = 'ABC'.

screen-input = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

Thnaks & Regards

Bhaskar rao.M

Read only

Former Member
0 Likes
1,111

Hi Naveen,

Refer this code :

SELECTION-SCREEN:BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

PARAMETERS : RT1 RADIOBUTTON GROUP A .

PARAMETERS:p_prue LIKE qamb-prueflos OBLIGATORY MATCHCODE OBJECT zre.

PARAMETERS : RT2 RADIOBUTTON GROUP A .

PARAMETERS:p_MBLNR LIKE qamb-prueflos OBLIGATORY .

PARAMETERS:p_end LIKE qals-paendterm .

parameters:p_stat type c obligatory.

SELECTION-SCREEN:END OF BLOCK b1.

AT SELECTION SCREEN OUTPUT.

if RT1 = 'X'.

LOOP AT SCREEN.

IF SCREEN-NAME = 'P_MBLNR'.

SCREEN-INPUT = 0.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

elseif RT2 = 'X.

LOOP AT SCREEN.

IF SCREEN-NAME = 'P_PURE'.

SCREEN-INPUT = 0.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

endif.

REWARD POINTS IF HELPFUL.

Regards,

Hemant

Read only

Former Member
0 Likes
1,111

Hi Naveen.. try your requirement this way .. will help you in solving your query.,..

************************************************************************

  • S E L E C T I O N - S C R E E N *

************************************************************************

selection-screen begin of block blk3 with frame title text-t03.

parameters : p_fr1 radiobutton group gr2 user-command CLICK ,

p_bk1 radiobutton group gr2 .

selection-screen end of block blk3 .

selection-screen begin of block blk1 with frame title text-t01 .

parameters : p_file like rlgrap-filename .

parameters : p_erf like rlgrap-filename .

selection-screen end of block blk1 .

selection-screen begin of block blk2 with frame title text-t02 .

parameters : dsn like rlgrap-filename default '/interf/thaon_vosges'.

parameters :dsn_err like rlgrap-filename default '/interf/thaon_vosges'.

selection-screen end of block blk2 .

************************************************************************

**

    • A T S E L E C T I O N - S C R E E N

**

************************************************************************

at selection-screen on value-request for p_file .

call function 'F4_FILENAME'

importing

file_name = vv_file.

p_file = vv_file .

at selection-screen on value-request for p_erf .

call function 'F4_FILENAME'

importing

file_name = vv_file2.

p_erf = vv_file2 .

at selection-screen output .

IF V_INITIAL IS INITIAL .

LOOP AT SCREEN .

if screen-name cs 'DSN' or

screen-name cs 'DSN_ERR' .

"screen-name cs 'P_FILE' or

"screen-name cs 'P_ERRF' OR

" screen-name cs 'P_FORE' or

" screen-name cs 'P_BACK' OR

"screen-name cs 'P_ERR' .

screen-active = 0 .

modify screen .

endif.

ADD 1 TO V_INITIAL .

ENDLOOP .

ENDIF.

if p_fr1 = 'X' .

loop at screen .

if screen-name cs 'DSN' or

screen-name cs 'DSN_ERR' .

screen-active = 0 .

modify screen .

endif.

endloop .

elseif p_bk1 = 'X'.

loop at screen .

if screen-name cs 'P_FILE' or

screen-name cs 'P_ERF' .

screen-active = 0 .

modify screen .

endif.

endloop .

endif.

Regards,

Jayant

Read only

Former Member
0 Likes
1,111

Hi Naveen,

<b>

Just read the following explaination and copy and paste this program,this solves your problem.</b>

You had put the parameter field as mandatory.So it is not possible to do, as you said.

But see the below, i removed obligatory option for the parameters.Now it is working fine

i.e., according to your requirement.Just copy and paste,TEST IT.

One important thing is, if you really want to make these fields as mandatory.

<b>"PROGRAM STARTS HERE:</b>

data:

w_flag TYPE i.

SELECTION-SCREEN:BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

PARAMETERS : RT1 RADIOBUTTON GROUP A USER-COMMAND US1.

PARAMETERS:p_prue LIKE qamb-prueflos. <b>" OBLIGATORY MATCHCODE OBJECT <b>"zre.</b>

PARAMETERS : RT2 RADIOBUTTON GROUP A .

PARAMETERS:p_MBLNR LIKE qamb-prueflos. <b>" OBLIGATORY</b> .

PARAMETERS:p_end LIKE qals-paendterm .

parameters:p_stat type c. <b> " obligatory.</b>

SELECTION-SCREEN:END OF BLOCK b1.

<b>AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF w_flag = 1 AND SCREEN-NAME = 'P_MBLNR'.

SCREEN-INPUT = 0.

ELSEIF w_flag = 2 AND SCREEN-NAME = 'P_PRUE'.

SCREEN-INPUT = 0.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

AT SELECTION-SCREEN.

if rt1 = 'X'.

w_flag = 1.

else.

w_flag = 2.

endif.</b>

  • "One important thing is, if you really want to make these fields as mandatory.

<b>IF sy-ucomm = 'ONLI'. " when you press F8 only this condition satisfies......

if p_prue IS INITIAL OR

p_MBLNR IS INITIAL OR

p_stat IS INITIAL.

message 'Fill entries' TYPE 'E'.

endif.

ENDIF.</b>

<b>

This solves your problem.</b>

<b>

Reward all helpful answers</b>

Regards,

V.Raghavender.

Read only

Former Member
0 Likes
1,111

Pls Find the code attached for ur querry

TABLES : SSCRFIELDS.

SELECTION-SCREEN:BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

PARAMETERS : RT1 RADIOBUTTON GROUP A DEFAULT 'X' USER-COMMAND FLAG.

PARAMETERS : RT2 RADIOBUTTON GROUP A .

SELECTION-SCREEN:END OF BLOCK b1.

SELECTION-SCREEN:BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.

PARAMETERS:p_prue LIKE qamb-prueflos OBLIGATORY MATCHCODE OBJECT zre.

PARAMETERS:p_MBLNR LIKE qamb-prueflos OBLIGATORY .

PARAMETERS:p_end LIKE qals-paendterm .

parameters:p_stat type c obligatory.

SELECTION-SCREEN:END OF BLOCK b2.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF RT1 = 'X'.

IF screen-NAME = 'P_MBLNR' .

screen-ACTIVE = '0'.

ELSEIF screen-NAME = '%_P_MBLNR_%_APP_%-TEXT'.

screen-ACTIVE = '0'.

ENDIF.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

Please Award POints for it