Radio buttons and parameters

Question:
Hello,
Does anyone have sample code to create radio buttons on the screen and for each radio button, there are other parameters or select options criteria attached to that radio? When a radio button is chosen, only the parameter and/or the select option values are to be entered and used for processing??
Thanks
Answer:
BCALV_TEST_GRID_EDITABLE
BCALV_TEST_FULLSCREEN
_________________
Sudhi Karkada
Answer:
BCALV_TEST_GRID_EDITABLE
BCALV_TEST_FULLSCREEN
BCALV_TEST_GRID_EDITABLE doesn't exist.
I am looking for
radio button 1
PARAMETER1
PARAMETER2
SELECT-OPTIONS1
SELECT-OPTIONS2
radio button 2
PARAMETER3
PARAMETER4
SELECT-OPTIONS3
SELECT-OPTIONS4
radio button 2
PARAMETER5
PARAMETER6
SELECT-OPTIONS5
SELECT-OPTIONS6
Etc.... Thanks
Answer:
Hope this helps
PARAMETERS: p_rad1 RADIOBUTTON GROUP radi,
p_rad2 RADIOBUTTON GROUP radi,
PARAMETERS p_vari LIKE disvariant-variant MODIF ID fpn,
p_cb AS CHECKBOX MODIF ID fpc.
AT SELECTION-SCREEN OUTPUT.
IF p_rad1 EQ 'X'.
LOOP AT SCREEN.
CHECK ( screen-group1 = 'FPC').
screen-input = 0. "Output (Display) only
MODIFY SCREEN.
ENDLOOP.
ENDIF.
IF p_rad2 EQ 'X'.
CLEAR: p_vari.
LOOP AT SCREEN.
CHECK screen-group1 = 'FPN'.
screen-input = 0. "Output (Display) only
MODIFY SCREEN.
ENDLOOP.
ENDIF.
Regards
Vasim
Answer:
Hi,
You have to use the addition user-command of the sentence parameters. Eg
****************************
parameters p_0001 as checkbox
user-command 0001.
parameters p_0002 as checkbox.
****************************
The addition user-command triggers the events at selection-screen.
So, in your event AT SELECTION-SCREEN OUTPUT you have to write the correct code modifying the screen. Eg
***************************
AT SELECTION-SCREEN OUTPUT.
*
if not p_0001 is initial.
loop at screen.
if screen-name = 'P_0002'.
screen-input = 0.
modify screen.
endif.
endloop.
endif.
***************************
If I'm not wrong this simple code would allow you to avoid the user could mark the checkbox p_0002
Hello,
Does anyone have sample code to create radio buttons on the screen and for each radio button, there are other parameters or select options criteria attached to that radio? When a radio button is chosen, only the parameter and/or the select option values are to be entered and used for processing??
Thanks
Answer:
I am thinking that may be I should code it so that when a radio button is click only the parameters and select-options belonging to that radio button can take values, and the others will be greyed out not allowing any entries at all from the screen.
Do you or anyone else has code for that? Would this be efficient???
Thanks
Answer:
?????????????
Answer:
?????????????
radio button 1
PARAMETER1 Greyed out, no entry possible
PARAMETER2 Greyed out, no entry possible
SELECT-OPTIONS1 Greyed out, no entry possible
SELECT-OPTIONS2 Greyed out, no entry possible
radio button 2 Click on this radio button
PARAMETER3 Entry is possible
PARAMETER4 Entry is possible
SELECT-OPTIONS3 Entry is possible
SELECT-OPTIONS4 Entry is possible
radio button 2
PARAMETER5 Greyed out, no entry possible
PARAMETER6 Greyed out, no entry possible
SELECT-OPTIONS5 Greyed out, no entry possible
SELECT-OPTIONS6 Greyed out, no entry possible
Thanks
Answer:
The suggestion by OSKAR should work. If you want something a little different, you could play around with the following sample code**  Begin of code needed to use POPUP_GET_VALUES             
DATA: BEGIN OF FIELDS OCCURS 1.                             
       INCLUDE STRUCTURE SVAL.                               
DATA: END   OF FIELDS.                                       
DATA: POPUP_TITLE(40).                                       
DATA: POPUP_RETURN_CD LIKE SY-SUBRC.                         
**  End of code needed to use POPUP_GET_VALUES               
                                                             
SELECTION-SCREEN BEGIN OF BLOCK 3 WITH FRAME TITLE TEXT-004.
*SELECTION-SCREEN SKIP 1.                                   
* Check box for list only Market Seg 1                       
SELECTION-SCREEN BEGIN OF LINE.                             
PARAMETERS: P_MKTSG1 AS CHECKBOX.                           
SELECTION-SCREEN COMMENT 5(55) TEXT-301.                     
SELECTION-SCREEN END OF LINE.                               
* Check box for list only Market Seg 2                       
SELECTION-SCREEN BEGIN OF LINE.                             
PARAMETERS: P_MKTSG2 AS CHECKBOX.                           
SELECTION-SCREEN COMMENT 5(55) TEXT-302.                     
SELECTION-SCREEN END OF LINE.                               
* Check box for list only Market Seg 3                       
SELECTION-SCREEN BEGIN OF LINE.                             
PARAMETERS: P_MKTSG3 AS CHECKBOX.                           
SELECTION-SCREEN COMMENT 5(55) TEXT-303.                     
SELECTION-SCREEN END OF LINE.                               
* Check box for list only Material               
SELECTION-SCREEN BEGIN OF LINE.                 
PARAMETERS: P_MATL AS CHECKBOX.                 
SELECTION-SCREEN COMMENT 5(55) TEXT-304.         
SELECTION-SCREEN END OF LINE.                   
* Check box for list only Contract               
SELECTION-SCREEN BEGIN OF LINE.                 
PARAMETERS: P_ZZCN01 AS CHECKBOX.               
SELECTION-SCREEN COMMENT 5(55) TEXT-305.         
SELECTION-SCREEN END OF LINE.                   
*SELECTION-SCREEN SKIP 1.                       
SELECTION-SCREEN END OF BLOCK 3.                 
                                                 
*************************************************
**---   A T   S E L E C T I O N   S C R E E N   
*************************************************
AT SELECTION-SCREEN.                             
                                                 
** Call Popup to get Optional Mkt Seg Lvl 1     
IF NOT P_MKTSG1 IS INITIAL.                     
CLEAR FIELDS.                                   
CLEAR FIELDS[].                                 
FIELDS-TABNAME = 'KOTE910'.                     
FIELDS-FIELDNAME = 'ZZMRKS1'.                   
FIELDS-VALUE = ' '.                             
APPEND FIELDS.                               
ENDIF.                                       
** Call Popup to get Optional Mkt Seg Lvl 2   
IF NOT P_MKTSG2 IS INITIAL.                   
CLEAR FIELDS.                                 
CLEAR FIELDS[].                               
FIELDS-TABNAME = 'KOTE911'.                   
FIELDS-FIELDNAME = 'ZZMRKS2'.                 
FIELDS-VALUE = ' '.                           
*fields-field_attr =                         
APPEND FIELDS.                               
ENDIF.                                       
** Call Popup to get Optional Mkt Seg Lvl 3   
IF NOT P_MKTSG3 IS INITIAL.                   
CLEAR FIELDS.                                 
CLEAR FIELDS[].                               
FIELDS-TABNAME = 'KOTE912'.                   
FIELDS-FIELDNAME = 'ZZMRKS3'.                 
FIELDS-VALUE = ' '.                           
*fields-field_attr =                         
APPEND FIELDS.                               
ENDIF.                                       
                                             
CASE 'X'.                                     
WHEN P_MKTSG1 OR P_MKTSG2 OR P_MKTSG3               
        OR P_ZZCN01.                               
                                                   
CALL FUNCTION 'POPUP_GET_VALUES'                   
     EXPORTING                                     
         NO_VALUE_CHECK  = 'X'                     
          POPUP_TITLE     = POPUP_TITLE             
          START_COLUMN    = '5'                     
          START_ROW       = '5'                     
    IMPORTING                                       
         RETURNCODE      = POPUP_RETURN_CD         
     TABLES                                         
          FIELDS          = FIELDS                 
     EXCEPTIONS                                     
          ERROR_IN_FIELDS = 1                       
          OTHERS          = 2.                     
                                                   
ENDCASE.                                           
This example used parameters, but using radio buttons should work just the same. I am not sure if you can have it produce multiple pop-ups.
Bob

More Articles:

Example Graph Programs?
How change screen field value after back from start-of-selec?
Cluster Tables?
tables?
Send mail by ABAP?
Prerequisties for SO_NEW_DOCUMENT_SEND_API1?