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-screen radiobuttons

Former Member
0 Likes
738

hi,

I had created a selection-screen with : 2 radiobuttons(RB) customer and customer group,

date field and 3 push buttons.here date z mandatory.

Under customer radiobutton,there is customer input field.and for custgrp RB customer group as i/p field.

without entering date field,if i select second radiobutton its displaying error msg as fill in required fields.

But i want to make custgrp i/p as active whenever i select 2nd RB whether date field is empty or filled.Similarly if i select again the 1st RB the custgrp should get inactive irrespective of date field.

how to do this??..

DATA: G_KDGRP TYPE S504-KDGRP,

G_KUNNR LIKE S001-KUNNR,

G_DATE TYPE SY-DATUM.

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-029.

PARAMETERS:R1 RADIOBUTTON GROUP G1 DEFAULT 'X' USER-COMMAND CC.

SELECT-OPTIONS: CUSTOMER FOR G_KUNNR MODIF ID CC.

SELECTION-SCREEN SKIP 1.

PARAMETERS:R2 RADIOBUTTON GROUP G1.

SELECT-OPTIONS: CUSTGRP FOR G_KDGRP MODIF ID GG.

SELECTION-SCREEN END OF BLOCK B1.

SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-029.

SELECT-OPTIONS: DATE FOR G_DATE OBLIGATORY.

SELECTION-SCREEN SKIP 1.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN: PUSHBUTTON 33(9) P1 user-command PB1,

PUSHBUTTON 50(9) P2 user-command PB2,

PUSHBUTTON 66(9) P3 user-command PB3.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK B2.

AT SELECTION-SCREEN OUTPUT.

IF R1 = 'X'.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'CC'.

SCREEN-INPUT = '1'.

MODIFY SCREEN.

ENDIF.

IF SCREEN-GROUP1 = 'GG'.

SCREEN-INPUT = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ELSEIF R2 = 'X'.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'CC'.

SCREEN-INPUT = '0'.

MODIFY SCREEN.

ENDIF.

IF SCREEN-GROUP1 = 'GG'.

SCREEN-INPUT = '1'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

INITIALIZATION.

P1 = 'Print'.

P2 = 'Clear'.

P3 = 'Close'.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
697

hi,

SELECT-OPTIONS: MONTH FOR S001-SPMON OBLIGATORY DEFAULT SY-DATUM+0(6).

Encourage peoples to answer by assigning points to useful answers.

Regards

Madhu,

hi,

I had created a selection-screen with : 2 radiobuttons(RB) customer and customer group,

date field and 3 push buttons.here date z mandatory.

Under customer radiobutton,there is customer input field.and for custgrp RB customer group as i/p field.

without entering date field,if i select second radiobutton its displaying error msg as fill in required fields.

But i want to make custgrp i/p as active whenever i select 2nd RB whether date field is empty or filled.Similarly if i select again the 1st RB the custgrp should get inactive irrespective of date field.

how to do this??..

DATA: G_KDGRP TYPE S504-KDGRP,

G_KUNNR LIKE S001-KUNNR,

G_DATE TYPE SY-DATUM.

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-029.

PARAMETERS:R1 RADIOBUTTON GROUP G1 DEFAULT 'X' USER-COMMAND CC.

SELECT-OPTIONS: CUSTOMER FOR G_KUNNR MODIF ID CC.

SELECTION-SCREEN SKIP 1.

PARAMETERS:R2 RADIOBUTTON GROUP G1.

SELECT-OPTIONS: CUSTGRP FOR G_KDGRP MODIF ID GG.

SELECTION-SCREEN END OF BLOCK B1.

SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-029.

SELECT-OPTIONS: DATE FOR G_DATE OBLIGATORY.

SELECTION-SCREEN SKIP 1.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN: PUSHBUTTON 33(9) P1 user-command PB1,

PUSHBUTTON 50(9) P2 user-command PB2,

PUSHBUTTON 66(9) P3 user-command PB3.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK B2.

AT SELECTION-SCREEN OUTPUT.

IF R1 = 'X'.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'CC'.

SCREEN-INPUT = '1'.

MODIFY SCREEN.

ENDIF.

IF SCREEN-GROUP1 = 'GG'.

SCREEN-INPUT = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ELSEIF R2 = 'X'.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'CC'.

SCREEN-INPUT = '0'.

MODIFY SCREEN.

ENDIF.

IF SCREEN-GROUP1 = 'GG'.

SCREEN-INPUT = '1'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

INITIALIZATION.

P1 = 'Print'.

P2 = 'Clear'.

P3 = 'Close'.

5 REPLIES 5
Read only

Former Member
0 Likes
697

hi

SELECT-OPTIONS: DATE FOR G_DATE OBLIGATORY DEFAULT SY-DATUM.

hope it solves.

regards

Madhu

Read only

0 Likes
697

thank u the date option got resolved..

If it is month field, (s001-spmon) then how to do??..

Read only

0 Likes
697

hi,

check how the system accepts the DD;Mm;yy or mm:dd:yy...check and assign according to this

Read only

Former Member
0 Likes
697

hi

do like this....date field field should be default....

parameter: p_date type d default sy-datum....

because if you use two radio buttons we cant put mandatory defaults...if we want to put just by pass tat value by giving default date in sel screen...

Read only

Former Member
0 Likes
698

hi,

SELECT-OPTIONS: MONTH FOR S001-SPMON OBLIGATORY DEFAULT SY-DATUM+0(6).

Encourage peoples to answer by assigning points to useful answers.

Regards

Madhu,