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: 

Hi...

Former Member
0 Kudos

Hi all,

here is my requirement,

There should two radio buttons in the output screen..

if i check one radio button it has to show two text fields in the same screen.

if i check second radio button it has to show two check boxes in the same screen...

it would be appreciated by reward points if any one clarifies my doubt...

Regards

Nagi

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

See this sample program and do accordingly

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

PARAMETERS: pa_file TYPE rlgrap-filename MODIF ID abc,

pa_lifnr TYPE lfa1-lifnr MODIF ID abc,

pa_vkorg TYPE vbak-vkorg MODIF ID abc.

SELECTION-SCREEN END OF BLOCK b1.

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

PARAMETERS: pa_kunnr TYPE vbak-kunnr MODIF ID def.

SELECT-OPTIONS: s_lifnr FOR gs_lfa1-lifnr MODIF ID def,

s_date FOR gs_lfa1-erdat MODIF ID def,

s_augru FOR gs_vbak-augru MODIF ID def,

s_vbeln FOR gs_vbak-vbeln MODIF ID def.

SELECTION-SCREEN END OF BLOCK b2.

SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS: pa_upd RADIOBUTTON GROUP g1 USER-COMMAND uc01 DEFAULT 'X'."#EC *

SELECTION-SCREEN COMMENT 3(60) text-004 FOR FIELD pa_upd.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS: pa_rep RADIOBUTTON GROUP g1 ."#EC *

SELECTION-SCREEN COMMENT 3(60) text-005 FOR FIELD pa_rep.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK b3.

IF pa_rep EQ gc_x.

LOOP AT SCREEN.

IF screen-group1 = gc_abc.

screen-input = gc_zero_num.

ELSEIF screen-group1 = gc_def.

screen-active = gc_one_num.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ELSEIF pa_upd EQ gc_x.

*For Reprocessing

LOOP AT SCREEN.

IF screen-group1 = gc_def.

screen-input = gc_zero_num.

ELSEIF screen-group1 = gc_abc.

screen-active = gc_one_num.

ENDIF.

MODIFY SCREEN.

CLEAR pa_upd.

ENDLOOP.

ENDIF.

<b>Reward points for useful Answers</b>

Regards

Anji

9 REPLIES 9

Former Member
0 Kudos

Hi

See this sample program and do accordingly

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

PARAMETERS: pa_file TYPE rlgrap-filename MODIF ID abc,

pa_lifnr TYPE lfa1-lifnr MODIF ID abc,

pa_vkorg TYPE vbak-vkorg MODIF ID abc.

SELECTION-SCREEN END OF BLOCK b1.

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

PARAMETERS: pa_kunnr TYPE vbak-kunnr MODIF ID def.

SELECT-OPTIONS: s_lifnr FOR gs_lfa1-lifnr MODIF ID def,

s_date FOR gs_lfa1-erdat MODIF ID def,

s_augru FOR gs_vbak-augru MODIF ID def,

s_vbeln FOR gs_vbak-vbeln MODIF ID def.

SELECTION-SCREEN END OF BLOCK b2.

SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS: pa_upd RADIOBUTTON GROUP g1 USER-COMMAND uc01 DEFAULT 'X'."#EC *

SELECTION-SCREEN COMMENT 3(60) text-004 FOR FIELD pa_upd.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS: pa_rep RADIOBUTTON GROUP g1 ."#EC *

SELECTION-SCREEN COMMENT 3(60) text-005 FOR FIELD pa_rep.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK b3.

IF pa_rep EQ gc_x.

LOOP AT SCREEN.

IF screen-group1 = gc_abc.

screen-input = gc_zero_num.

ELSEIF screen-group1 = gc_def.

screen-active = gc_one_num.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ELSEIF pa_upd EQ gc_x.

*For Reprocessing

LOOP AT SCREEN.

IF screen-group1 = gc_def.

screen-input = gc_zero_num.

ELSEIF screen-group1 = gc_abc.

screen-active = gc_one_num.

ENDIF.

MODIFY SCREEN.

CLEAR pa_upd.

ENDLOOP.

ENDIF.

<b>Reward points for useful Answers</b>

Regards

Anji

Former Member
0 Kudos

hi,

Check the code

parameters:ch type i.

case ch.

when 1.

write:/ 'Test'.

when 2.

selection-screen begin of screen 900.

parameters:name(30) type c ,

name1(30) type c.

selection-screen end of screen 900.

call selection-screen 900..

endcase.

0 Kudos

hi raja,

i want this requirement without using screens.

Former Member
0 Kudos

hi,

Then u should use

Loop at screen.

screen-active = 0.

modify screen.

Endloop.

whatever screen u want to be active make it 1.

0 Kudos

hi roja,

can u explain clearly how to get using loop at screen.

0 Kudos

Tables: VBAK.

Parameters: P_RB1 Rsdiobutton Group GRP1 User-command ucomm Default 'X'.

Select-options: S_VBELN For VBAK-VBELN Modif Id 123.

Parameters: P_RB2 Radiobutton Group GRP1.

Parameters: P_CHK1 As Checkbox Modif Id 234,

P_CHK2 As Checkbox Modif Id 234.

At Selection-screen Output.

Loop At Screen.

If P_RB2 Is Not Initial.

If Screen-Group1 = '123'.

Screen-Input = 0.

Modify Screen.

EndIf.

EndIf.

If P_RB1 Is Not Initial.

If Screen-Group1 = '234'.

Screen-Input = 0.

Modify Screen.

EndIf.

EndIf.

EndLoop.

If you want the fields to totally disapper instead of input ...put active = 0.

santhosh

0 Kudos

hi,

see this code.

tables:sscrfields.

PARAMETERS:check RADIOBUTTON GROUP rad1 USER-COMMAND RAD DEFAULT 'X',

field RADIOBUTTON GROUP rad1.

PARAMETERS:field1(10),field2(10).

PARAMETERS:check1 as CHECKBOX,

check2 AS CHECKBOX.

AT SELECTION-SCREEN OUTPUT.

if check = 'X'.

LOOP AT SCREEN.

if screen-name = 'CHECK1' OR SCREEN-NAME = 'CHECK2'.

screen-ACTIVE = 1.

MODIFY SCREEN.

ELSEIF screen-name = 'FIELD1' OR SCREEN-NAME = 'FIELD2' OR

SCREEN-NAME = '%_FIELD1_%_APP_%-TEXT'OR SCREEN-NAME = '%_FIELD2_%_APP_%-TEXT'.

screen-ACTIVE = 0.

MODIFY SCREEN.

endif.

ENDLOOP.

elseif FIELD = 'X'.

LOOP AT SCREEN.

if screen-name = 'FIELD1' OR SCREEN-NAME = 'FIELD2' OR

SCREEN-NAME = '%_FIELD1_%_APP_%-TEXT'OR SCREEN-NAME = '%_FIELD2_%_APP_%-TEXT'.

screen-ACTIVE = 1.

MODIFY SCREEN.

ELSEIF screen-name = 'CHECK1' OR SCREEN-NAME = 'CHECK2'.

screen-ACTIVE = 0.

MODIFY SCREEN.

endif.

ENDLOOP.

endif.

at SELECTION-SCREEN.

case sscrfields-ucomm.

when 'RAD'.

if check = 'X'.

LOOP AT SCREEN.

if screen-name = 'CHECK1' OR SCREEN-NAME = 'CHECK2'.

screen-ACTIVE = 1.

MODIFY SCREEN.

ELSEIF screen-name = 'FIELD1' OR SCREEN-NAME = 'FIELD2' OR

SCREEN-NAME = '%_FIELD1_%_APP_%-TEXT'OR SCREEN-NAME = '%_FIELD2_%_APP_%-TEXT'.

screen-ACTIVE = 0.

MODIFY SCREEN.

endif.

ENDLOOP.

elseif FIELD = 'X'.

LOOP AT SCREEN.

if screen-name = 'FIELD1' OR SCREEN-NAME = 'FIELD2' OR

SCREEN-NAME = '%_FIELD1_%_APP_%-TEXT'OR SCREEN-NAME = '%_FIELD2_%_APP_%-TEXT'.

screen-ACTIVE = 1.

MODIFY SCREEN.

ELSEIF screen-name = 'CHECK1' OR SCREEN-NAME = 'CHECK2'.

screen-ACTIVE = 0.

MODIFY SCREEN.

endif.

ENDLOOP.

endif.

ENDCASE.

<b>reward if helpful</b>

rgds,

bharat.

Former Member
0 Kudos

hi,

Look at this.

I have designed the selecton screen like this

PARAMETERS:RB_PRE RADIOBUTTON GROUP G1 DEFAULT 'X' USER-COMMAND RB,

RB_APP RADIOBUTTON GROUP G1 ,

P_FILE_A TYPE dxfields-longpath MODIF ID AAA DEFAULT

'\usr\sap\II3\DVEBMGS00\WORK\cust.txt',

P_FILE TYPE RLGRAP-FILENAME MODIF ID BBB.

Then i gave the code to make one active and the other inactive

AT SELECTION-SCREEN OUTPUT.

*----When file from Presentation server is selected

IF RB_PRE = 'X'.

*----To make the application server inactive

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'AAA'.

SCREEN-ACTIVE = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ELSE.

*----When file from Presentation server is selected

RB_APP = 'X'.

*----To make the application server inactive

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'BBB'.

SCREEN-ACTIVE = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

*

Former Member
0 Kudos

hi reddy

we can satisfy your requiremnet only thro module pool if that ok wid you let me send you the program..

cheers

ASHA