Modifying selection screen with help of radio buttons
Hi,
In my program am using three parameters to download a three different files and I have to use radiobuttons for that.
I want to download only one file at a time.
I have used MODIF ID but it is not working for 3 Parameters but it is working for only two parameters.
Please help me out!!!!!!!!!
Hi,
check with the following code
* Parameters and Selection Options
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_lifnr FOR lfm1-lifnr .
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS:
r_asn RADIOBUTTON GROUP rad1 USER-COMMAND uc1 DEFAULT 'X',
r_ers RADIOBUTTON GROUP rad1 ,
r_830 RADIOBUTTON GROUP rad1,
r_850 RADIOBUTTON GROUP rad1,
r_862 RADIOBUTTON GROUP rad1,
r_810 RADIOBUTTON GROUP rad1,
r_820 RADIOBUTTON GROUP rad1,
r_824 RADIOBUTTON GROUP rad1.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
SELECT-OPTIONS: s_bstae FOR lfm1-bstae MODIF ID sd1.
PARAMETERS:
p_ekorg TYPE lfm1-ekorg MODIF ID md1,
p_evcode TYPE edp21-evcode MODIF ID md2,
p_kappl TYPE nach-kappl MODIF ID md3,
p_parvw TYPE nach-parvw MODIF ID md4,
p_kschl TYPE nach-kschl MODIF ID md5,
p_vakey TYPE nach-vakey MODIF ID md6,
p_werks TYPE werks_d MODIF ID md7,
p_bukrs TYPE lfb1-bukrs MODIF ID md8.
SELECTION-SCREEN END OF BLOCK b3.
*eject
* Initialization
INITIALIZATION.
* PERFORM check_authorization.
*eject
* at selection screen
*AT SELECTION-SCREEN.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF r_asn EQ 'X'
AND ( screen-group1 = 'MD3' or screen-group1 = 'MD4'
or screen-group1 = 'MD5' or screen-group1 = 'MD6'
or screen-group1 = 'MD7' or screen-group1 = 'MD8').
screen-active = '0'.
screen-invisible = '1'.
screen-input = '0'.
screen-output = '0'.
ELSEIF r_ers EQ 'X'
AND ( screen-group1 = 'SD1' or screen-group1 = 'MD1'
or screen-group1 = 'MD2' or screen-group1 = 'MD3'
or screen-group1 = 'MD4' or screen-group1 = 'MD5'
or screen-group1 = 'MD6' or screen-group1 = 'MD7'
or screen-group1 = 'MD8').
screen-active = '0'.
screen-invisible = '1'.
screen-input = '0'.
screen-output = '0'.
ELSEIF r_830 EQ 'X'
AND ( screen-group1 = 'SD1' or screen-group1 = 'MD1'
or screen-group1 = 'MD2' or screen-group1 = 'MD6'
or screen-group1 = 'MD7' or screen-group1 = 'MD8').
screen-active = '0'.
screen-invisible = '1'.
screen-input = '0'.
screen-output = '0'.
ELSEIF r_850 EQ 'X'
AND ( screen-group1 = 'SD1' or screen-group1 = 'MD1'
or screen-group1 = 'MD2' or screen-group1 = 'MD6'
or screen-group1 = 'MD7' or screen-group1 = 'MD8').
screen-active = '0'.
screen-invisible = '1'.
screen-input = '0'.
screen-output = '0'.
ELSEIF r_862 EQ 'X'
AND ( screen-group1 = 'SD1' or screen-group1 = 'MD1'
or screen-group1 = 'MD2' or screen-group1 = 'MD8').
screen-active = '0'.
screen-invisible = '1'.
screen-input = '0'.
screen-output = '0'.
ELSEIF r_810 EQ 'X'
AND ( screen-group1 = 'MD3' or screen-group1 = 'MD4'
or screen-group1 = 'MD5' or screen-group1 = 'MD6'
or screen-group1 = 'MD7' or screen-group1 = 'MD8').
screen-active = '0'.
screen-invisible = '1'.
screen-input = '0'.
screen-output = '0'.
ELSEIF r_820 EQ 'X'
AND ( screen-group1 = 'SD1' or screen-group1 = 'MD1'
or screen-group1 = 'MD2' or screen-group1 = 'MD3'
or screen-group1 = 'MD4' or screen-group1 = 'MD5'
or screen-group1 = 'MD6' or screen-group1 = 'MD7' ).
screen-active = '0'.
screen-invisible = '1'.
screen-input = '0'.
screen-output = '0'.
ELSEIF r_824 EQ 'X'
AND ( screen-group1 = 'SD1' or screen-group1 = 'MD1'
or screen-group1 = 'MD2' or screen-group1 = 'MD3'
or screen-group1 = 'MD4' or screen-group1 = 'MD5'
or screen-group1 = 'MD6' or screen-group1 = 'MD7'
or screen-group1 = 'MD8').
screen-active = '0'.
screen-invisible = '1'.
screen-input = '0'.
screen-output = '0'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
*eject
* Event top of page
TOP-OF-PAGE.
*eject
* event Start of Selection
START-OF-SELECTION.
*eject
*EVENT End-of selection
END-OF-SELECTION.
*eject
*EVENT End-of page
END-OF-PAGE.
Regards,
Vikas.
plz reward if helpful..
Similar Messages
-
How to gray out certain fields on the selection screen based on the radio b
HI All,
I have an ALV report. On the selection screen I have 2 radio buttons ..for eg..A and B.
When radio button A(its on by default) is on..certain fields not relevant to this should be grayed out. Similarly when radio button B is on, certain fields should be grayed out.
I did the AT SELECTION SCREEN OUTPUT and also did the
LOOP AT SCREEN....ENDLOOP logic. The logic works but when I click the radio button B...the screen fields automatically does not gray out. I have to press ENTER and then its grays out.
I know a USER_COMMAND needs to be attached.
Can anyone give me a step by step details of how to do this. I truly appreciate it. if a screen painter thing is required..please give me the tcode and step by step detail to do this.
ThanksTry this one too:
REPORT ztest.
TABLES: mara,
bkpf.
CONSTANTS:
c_pos(3) TYPE c VALUE 'POS',
c_acc(3) TYPE c VALUE 'ACC',
c_all(3) TYPE c VALUE 'ALL',
c_x TYPE c VALUE 'X'.
The Selection Screen Definition
SELECTION-SCREEN BEGIN OF BLOCK b_0 WITH FRAME TITLE text-000.
SELECT-OPTIONS: s_mara FOR mara-matnr.
SELECTION-SCREEN END OF BLOCK b_0.
SELECTION-SCREEN BEGIN OF BLOCK b_1 WITH FRAME TITLE text-037.
PARAMETER: rb_all RADIOBUTTON GROUP rb1 USER-COMMAND rad default 'X',
rb_acc RADIOBUTTON GROUP rb1.
SELECTION-SCREEN END OF BLOCK b_1.
SELECTION-SCREEN BEGIN OF BLOCK b_2 WITH FRAME TITLE text-011. "Acct
SELECT-OPTIONS: s_blrtc1 FOR bkpf-blart MODIF ID acc,
s_blrti1 FOR bkpf-blart MODIF ID acc.
SELECTION-SCREEN END OF BLOCK b_2.
SELECTION-SCREEN BEGIN OF BLOCK b_3 WITH FRAME TITLE text-011. "Acct
SELECT-OPTIONS: s_blrtc2 FOR bkpf-blart MODIF ID all,
s_blrti2 FOR bkpf-blart MODIF ID all,
s_blrtv2 FOR bkpf-blart MODIF ID all.
SELECTION-SCREEN END OF BLOCK b_3.
AT SELECTION-SCREEN OUTPUT
AT SELECTION-SCREEN OUTPUT.
PERFORM f0200_screenfield_hide_logic.
initialization.
PERFORM f0200_screenfield_hide_logic.
FORM f0200_screenfield_hide_logic *
FORM f0200_screenfield_hide_logic.
LOOP AT SCREEN.
IF rb_acc = c_x.
IF screen-group1 = c_all.
screen-active = 0.
ELSE.
screen-active = 1.
ENDIF.
ENDIF.
MODIFY SCREEN.
IF rb_all = c_x.
IF screen-group1 = c_acc.
screen-active = 0.
ELSE.
screen-active = 1.
ENDIF.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDFORM. " F0200_SCREENFIELD_HIDE_LOGIC -
Selection screen with radio button groups
hi experts,
i have 3 frames in selection screen. in first frame i have two radio buttons. if i select 1st radio button 2nd frame should be in active and 3rd frame should be disable mode. if i select 2nd radio button then 3rd frame should be in active and other 2nd frame should be disable mode. in which event i need to write the code.
can any one help me regarding this and give some sample code.
rgds,
nag.Here is the example which will explain it completely :
*& Report Z_sscr *
* Published at ****************
*&DYNAMIC Selection screen based on user clicks on the radiobutton*
REPORT zsscr.
*TYPE POOLS DECLARATIONS FOR VALUE REQUEST MANAGER AND ICONS
TYPE-POOLS : vrm,
icon.
*SELECTION SCREEN FIELDS
TABLES : sscrfields.
*GLOBAL DECLARATIONS
DATA : flag TYPE c,
tablename(10),
mmtable LIKE dd02l-tabname,
sdtable LIKE dd02l-tabname,
hrtable LIKE dd02l-tabname.
*DECLARATIONS FOR SELECTION SCREEN STATUS
DATA it_ucomm TYPE TABLE OF sy-ucomm.
***********SELECTION-SCREENS**********************
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME.
*FOR DYNAMIC DISPLAY OF MODULES
PARAMETERS : pa RADIOBUTTON GROUP rad USER-COMMAND com MODIF ID mod,
pb RADIOBUTTON GROUP rad MODIF ID rad,
pc RADIOBUTTON GROUP rad MODIF ID cad.
SELECTION-SCREEN SKIP.
**TO INCLUDE DYNAMIC ICONS
SELECTION-SCREEN COMMENT 2(6) text_001.
*DYNAMIC LIST BOX BASED ON USER SELECTIONS
PARAMETERS one AS LISTBOX VISIBLE LENGTH 20 MODIF ID mod.
PARAMETERS two AS LISTBOX VISIBLE LENGTH 20 MODIF ID rad.
PARAMETERS three AS LISTBOX VISIBLE LENGTH 20 MODIF ID cad.
SELECTION-SCREEN END OF BLOCK blk1.
*DISPLAY DYNAMIC PUSHBUTTON ON APP TOOLBAR ON USER CLICKS
SELECTION-SCREEN: FUNCTION KEY 1,
FUNCTION KEY 2,
FUNCTION KEY 3.
**EVENT ON SELECTION SCREEN FOR OUTPUT DISPLAY
AT SELECTION-SCREEN OUTPUT.
*CLICK OF FIRST RADIO BUTTON
IF pa = 'X'.
sscrfields-functxt_01 = 'Materials Management'.
WRITE icon_plant AS ICON TO text_001.
*CODE TO GET DYNAMICS BASED ON THE SELECTED RADIO
LOOP AT SCREEN.
IF screen-group1 = 'MOD'.
screen-intensified = '1'.
screen-active = 1.
screen-display_3d = '1'.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'RAD'.
screen-intensified = '0'.
screen-active = 0.
screen-display_3d = '0'.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'CAD'.
screen-intensified = '0'.
screen-active = 0.
screen-display_3d = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
*CLICK OF SECOND RADIO
IF pb = 'X'.
sscrfields-functxt_02 = 'Sales And Distribution'.
WRITE icon_ws_ship AS ICON TO text_001.
LOOP AT SCREEN.
IF screen-group1 = 'RAD'.
screen-intensified = '1'.
screen-active = 1.
screen-display_3d = '1'.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'MOD'.
screen-intensified = '0'.
screen-active = 0.
screen-display_3d = '0'.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'CAD'.
screen-intensified = '0'.
screen-active = 0.
screen-display_3d = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
*CLICK OF THIRD RADIO
IF pc = 'X'.
sscrfields-functxt_03 = 'Human Resources'.
WRITE icon_new_employee AS ICON TO text_001.
LOOP AT SCREEN.
IF screen-group1 = 'RAD'.
screen-intensified = '0'.
screen-active = 0.
screen-display_3d = '0'.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'MOD'.
screen-intensified = '0'.
screen-active = 0.
screen-display_3d = '0'.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'CAD'.
screen-intensified = '1'.
screen-active = 1.
screen-display_3d = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
*CUSTOMISING THE TOOLBARS OF THE SELECTION SCREEN
*WITH F8 BUTTON DISABLED
APPEND : 'PRIN' TO it_ucomm,
'SPOS' TO it_ucomm,
'ONLI' TO it_ucomm.
CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
EXPORTING
p_status = sy-pfkey
TABLES
p_exclude = it_ucomm.
**EVENT ON THE SELECTION
AT SELECTION-SCREEN.
* LIST BOX ONE VALUES
CASE one.
WHEN '1'.
mmtable = 'MARC'.
WHEN '2'.
mmtable = 'MARA'.
WHEN '3'.
mmtable = 'MARD'.
WHEN '4'.
mmtable = 'MARM'.
ENDCASE.
* LIST BOX TWO VALUES
CASE two.
WHEN '1'.
sdtable = 'VBAK'.
WHEN '2'.
sdtable = 'VBAP'.
WHEN '3'.
sdtable = 'VBUK'.
WHEN '4'.
sdtable = 'VBUP'.
ENDCASE.
* LIST BOX THREE VALUES
CASE three.
WHEN '1'.
hrtable = 'PA0001'.
WHEN '2'.
hrtable = 'PA0006'.
WHEN '3'.
hrtable = 'PA0022'.
WHEN '4'.
hrtable = 'PA0008'.
ENDCASE.
*VALUES FOR CLICK OF THE PUSHBUTTON ON APP TOOLBAR
*AND ENABLING THE BUTTONS TO PERFORM F8
CASE sscrfields-ucomm.
WHEN 'FC01'.
tablename = mmtable.
sscrfields-ucomm = 'ONLI'.
WHEN 'FC02'.
tablename = sdtable.
sscrfields-ucomm = 'ONLI'.
WHEN 'FC03'.
tablename = hrtable.
sscrfields-ucomm = 'ONLI'.
ENDCASE.
*INITIALIZATION EVENT
INITIALIZATION.
*VALUES ASSIGNED TO DROPDOWNLISTS IN THE SUBROUTINES
PERFORM f4_value_request_pa.
PERFORM f4_value_request_pb.
PERFORM f4_value_request_pc.
*START OF SELECTION EVENT
START-OF-SELECTION.
*SUBROUTINE FOR OUTPUT
PERFORM output.
*& Form f4_value_request_PA
* text
*SUBROUTINE TO PROVIDE DROPDOWN VALUES TO LIST1
FORM f4_value_request_pa.
DATA: l_name TYPE vrm_id,
li_list TYPE vrm_values,
l_value LIKE LINE OF li_list.
l_value-key = '1'.
l_value-text = 'Plant Data for Material'.
APPEND l_value TO li_list.
CLEAR l_value.
l_value-key = '2'.
l_value-text = 'General Material Data'.
APPEND l_value TO li_list.
CLEAR l_value.
l_value-key = '3'.
l_value-text = 'Storage Location Data for Material'.
APPEND l_value TO li_list.
CLEAR l_value.
l_value-key = '4'.
l_value-text = 'Units of Measure for Material'.
APPEND l_value TO li_list.
CLEAR l_value.
l_name = 'ONE'.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = l_name
values = li_list
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " f4_value_request_tabname
*& Form f4_value_request_PB
* text
*SUBROUTINE TO PROVIDE DROPDOWN VALUES TO LIST2
FORM f4_value_request_pb.
DATA: l_name TYPE vrm_id,
li_list TYPE vrm_values,
l_value LIKE LINE OF li_list.
l_value-key = '1'.
l_value-text = 'Sales Document: Header Data'.
APPEND l_value TO li_list.
CLEAR l_value.
l_value-key = '2'.
l_value-text = 'Sales Document: Item Data'.
APPEND l_value TO li_list.
CLEAR l_value.
l_value-key = '3'.
l_value-text = 'Sales Document:Header Status'.
APPEND l_value TO li_list.
CLEAR l_value.
l_value-key = '4'.
l_value-text = 'Sales Document: Item Status'.
APPEND l_value TO li_list.
CLEAR l_value.
l_name = 'TWO'.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = l_name
values = li_list
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " f4_value_request_PB
*& Form f4_value_request_PC
* text
*SUBROUTINE TO PROVIDE DROPDOWN VALUES TO LIST3
FORM f4_value_request_pc.
DATA: l_name TYPE vrm_id,
li_list TYPE vrm_values,
l_value LIKE LINE OF li_list.
l_value-key = '1'.
l_value-text = 'HR Master :Infotype 0001 (Org. Assignment)'.
APPEND l_value TO li_list.
CLEAR l_value.
l_value-key = '2'.
l_value-text = 'Address Infotype 0006'.
APPEND l_value TO li_list.
CLEAR l_value.
l_value-key = '3'.
l_value-text = 'Education Infotype 0022'.
APPEND l_value TO li_list.
CLEAR l_value.
l_value-key = '4'.
l_value-text = 'Basic Pay Infotype 0008'.
APPEND l_value TO li_list.
CLEAR l_value.
l_name = 'THREE'.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = l_name
values = li_list
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " f4_value_request_PC
*& Form OUTPUT
* text
* -->P_TABLENAME text
*fINAL OUTPUT
FORM output.
DATA p_table(10).
p_table = tablename.
*popup to display teh selected table and
*Continue button is clicked
CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'
EXPORTING
titel = 'User Selections '
textline1 = p_table
textline2 = 'is the Selected table'
start_column = 25
start_row = 6.
*assigning the table value in p_table to the
* Table in SE16 transaction by explicitly calling
SET PARAMETER ID 'DTB' FIELD p_table.
CALL TRANSACTION 'SE16'.
ENDFORM. "OUTPUT
Reward If found Helpful. -
My ipod has a black screen with only the resisitive button on show. HELP
i dropped my ipod touch and the restart button doesnt work, so i got the resisitve touch and now my ipod has a black screen with only the resisitive button on show. HELP ME PLEASEE
PLEASE HELP OR IM GOING TO END UP THROWING IT AWAY
Message was edited by: Sadiiaa_Try:
- iOS: Not responding or does not turn on
Where it says place the iPod in recovery mode use this program.
RecBoot: Easy Way to Put iPhone into Recovery Mode
- If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
- Try on another computer
- If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
Apple Retail Store - Genius Bar -
Hiding selection screen fields upon clicking a button
Hi .
I have a requirement like we need to hide and bring back the selection screen fields upon clicking a button( Expand and collapse in the same button) .
in ABAP Query,we can maintain this, for the variant we created.
We need this functionality on the selection-screen presently.
How to achieve this in the selection -screen?
Valuale pointers are desparately needful.
Regards,
SSR.Hi,
SELECTION SECREEN (P_) Parameter
(S_) Select Options
SELECTION-SCREEN : BEGIN OF BLOCK BLK1 WITH FRAME TITLE TEXT-001,
BEGIN OF LINE,
COMMENT (26) C1 MODIF ID XYZ.
SELECT-OPTIONS : S_MATNR FOR MARA-MATNR MODIF ID XYZ NO-EXTENSION .
SELECTION-SCREEN : END OF LINE,
BEGIN OF LINE,
COMMENT (26) C2 MODIF ID XYZ.
SELECT-OPTIONS : S_MATKL FOR MARA-MATKL MODIF ID XYZ NO-EXTENSION .
SELECTION-SCREEN : END OF LINE.
PARAMETERS : R_MATNR RADIOBUTTON GROUP RAD1 DEFAULT 'X'
MODIF ID ABC USER-COMMAND MAT,
R_MATKL RADIOBUTTON GROUP RAD1.
SELECTION-SCREEN END OF BLOCK blk1.
INITIALIZATION.
C1 = 'Product Code'.
c2 = 'Product Group'.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-NAME0(7) = 'S_MATNR' OR SCREEN-NAME0(7) = 'S_MATKL'.
SCREEN-INPUT = '0'.
SCREEN-INVISIBLE = '1'.
ENDIF.
CASE SCREEN-NAME+0(7).
WHEN 'S_MATNR'.
IF R_MATNR = 'X'.
SCREEN-INPUT = '1'.
SCREEN-INVISIBLE = '0'.
ENDIF.
WHEN 'S_MATKL'.
IF R_MATKL = 'X'..
SCREEN-INPUT = '1'.
SCREEN-INVISIBLE = '0'.
ENDIF.
ENDCASE.
IF R_MATNR = 'X'.
IF SCREEN-NAME = 'C1'.
C1 = 'Product code'.
C2 = SPACE.
ENDIF.
ENDIF.
IF R_MATKL = 'X'.
IF SCREEN-NAME = 'C2'.
C2 = 'Product Group'.
C1 = SPACE.
ENDIF.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
Hope it helps.
best regards,
Nagaraj Kalbavi -
Hello All,
I am getting F1 help when the radio buttons are in display mode but i am not getting F1 help when the buttons are in input mode. what cud be the problem?
can anyone please help me. required urgerntly
Thanks & Regards
Amarender Reddy BHi,
use event
at selection-screen on HELP-REQUEST FOR
rb_radio
As with the addition ON VALUE-REQUEST the field psel_low_high
is either the name of a report parameter or of the form sel-LOW
or sel-HIGH, where sel is the name of a selection criterion.
When the user presses F1 on the relevant field, the subsequent
processing block is executed. You can thus implement a
self-programmed help for the input/output fields of the
selection screen. If the program contains such an event and the
user presses F1, the system processes this rather than
displaying the documentation of the Dictionary field - even if
the report parameter or the selection option with LIKE or FOR
points to a Dictionary field.
Regards
amole -
At selection-screen value- help
Hi All,
I have a requirement that based on a radio button one at selection-screen value-help is triggered and on based on a different radio button another at selection-screen value-help should be triggered.
can it be achieved.
Regards,
JeetuAT SELECTION-SCREEN - selscreen_event
Syntax
| { ON {para|selcrit} }
| { ON END OF selcrit }
| { ON BLOCK block }
| { ON RADIOBUTTON GROUP radi }
| { }
| { ON {HELP-REQUEST|VALUE-REQUEST}
| FOR {para|selcrit-low|selcrit-high} }
| { ON EXIT-COMMAND }.
Alternatives:
1. ... OUTPUT
2. ... ON {para|selcrit}
3. ... ON END OF selcrit
4. ... ON BLOCK block
5. ... ON RADIOBUTTON GROUP radi
6. ... { }
7. ... ON {HELP-REQUEST|VALUE-REQUEST} FOR
{para|selcrit-low|selcrit-high} }
8. ... ON EXIT-COMMAND
Effect
These additions allow individual evaluation of specific elements of the selection screens of the program. The information as to which selection has triggered the event is contained in the system field sy-dynnr.
Alternative 1
... OUTPUT
Effect
This event is triggered at the screen event PBO of a selection screen. In the event block, the selection screen can be prepared through assignments to the data objects of parameters and selection criteria and through dynamic screen modifications.
Note
The assignments to input fields in the event block AT SELECTION-SCREEN OUTPUT always affect the selection screen and overwrite the user inputs from previous displays of the same selection screen. Assignments in the event blocks LOAD-OF-PROGRAM oder INITIALIZATION, on the other hand, only have an effect at first program start.
Alternative 2
... ON {para|selcrit}
Effect
This event is triggered at the screen event PAI of a selection screen if the content of the input field of a parameter para or a line of a selection criterion selcrit was passed to the ABAP program. In the event block, the user input can be checked. Sending a warning or an error message in the event block makes the fields para and selcrit ready for input again.
No parameter that is defined as a radio button can be specified. For this purpose, the addition ON RADIOBUTTON GROUP is provided.
Note
If a user action takes place in the dialog box for the multiple selection of a selection criterion selcrit, the entries of the selection table are passed to the program, line by line. For each line, the event AT SELECTION-SCREEN ON selcrit is triggered.
Alternative 3
... ON END OF selcrit
Effect
This event is triggered after the selection table selcrit has been fully passed to the program after a user action in the dialog box for the multiple selection has taken place. In the event block, the entire selection table can be checked.
Alternative 4
... ON BLOCK block
Effect
This event is triggered at the screen event PAI of a selection screen if all the input fields of a block block of the selection screen were passed to the ABAP program. In the event block, the user inputs can be checked. Sending a warning or an error message in the event block makes all the fields of the block block ready for input again.
Alternative 5
... ON RADIOBUTTON GROUP radi
Effect
This event is triggered at the screen event PAI of a selection screen if all the fields of a radio button group radi of the selection screen were passed to the ABAP program. In the event block, the user input can be checked. Sending a warning or error message in the event block makes all the radion buttons of the block radi ready for input again.
Note
The individual fields of a radio button group are not passed individually and do not trigger the event AT SELECTION-SCREEN ON par.
Alternative 6
Effect
The event AT SELECTION-SCREEN itself is triggered as the last event of selection screen processing if all the input values were passed to the program. In this event block, all the user inputs can be checked. Sending a warning or an error message in the event block makes all the screen fields ready for input once again.
Alternative 7
... ON { HELP-REQUEST | VALUE-REQUEST } FOR
{para|selcrit-low|selcrit-high} }
Effect
The two events ON HELP-REQUEST and ON VALUE-REQUEST are triggered at the screen events POH and POV of a selection screen if - for the input field of a parameter para or one of the input fields of a selection criterion selcrit - the field help F1 or the input help F4 was called. Other selection events are not triggered.
In the event blocks, a self-defined field or input field can be programmed, which overrides any helps possibly defined in the ABAP Dictionary.
Notes
These event blocks can only be implemented for fields of the selection screen that are defined in the same ABAP program and not in a possibly linked logical database.
With the events for the field and input help, no data is transported between the selection screen and the ABAP program. As with general screens, suitable function modules must be used for these. The parameters and selection criteria changed for the input help are transported to the selection screen.
Alternative 8
... ON EXIT-COMMAND
Effect
This event is triggered if the user has called one of the functions Back, Exit or Cancel. In the event block, possible clean-up actions can be executed.
Example
In these executable programs, a standard selection screen and a further selection screen are defined. In the event blocks AT SELECTION-SCREEN, the inputs in the selection screens can be specially handled using the name p_carrid and the screen number in sy-dynnr.
REPORT demo_at_selection_screen.
Global data
DATA: sflight_tab TYPE TABLE OF sflight,
sflight_wa LIKE LINE OF sflight_tab.
Selection screens
PARAMETERS p_carrid TYPE spfli-carrid.
SELECTION-SCREEN BEGIN OF SCREEN 500.
SELECT-OPTIONS s_conn FOR sflight_wa-connid.
DATA s_conn_wa LIKE LINE OF s_conn.
SELECTION-SCREEN END OF SCREEN 500.
Handling selection screen events
AT SELECTION-SCREEN ON p_carrid.
IF p_carrid IS INITIAL.
MESSAGE 'Please enter a value' TYPE 'E'.
ENDIF.
AUTHORITY-CHECK OBJECT 'S_CARRID'
ID 'CARRID' FIELD p_carrid
ID 'ACTVT' FIELD '03'.
IF sy-subrc = 4.
MESSAGE 'No authorization for carrier' TYPE 'E'.
ELSEIF sy-subrc <> 0.
MESSAGE 'Error in authority check' TYPE 'A'.
ELSE.
IF sy-ucomm = 'ONLI'.
CALL SELECTION-SCREEN '0500'.
ENDIF.
ENDIF.
AT SELECTION-SCREEN.
IF sy-dynnr = '0500'.
IF s_conn IS INITIAL.
MESSAGE 'Please enter values' TYPE 'W'.
ELSE.
SELECT *
FROM sflight
INTO TABLE sflight_tab
WHERE carrid = p_carrid AND
connid IN s_conn.
IF sy-subrc <> 0.
MESSAGE 'No flights found' TYPE 'E'.
ENDIF.
ENDIF.
ENDIF.
Main program
START-OF-SELECTION. -
How to replace the existing selection screen with new selection screen
Hi,
I have first selection screen with parametre as a table name, then I have created dynamic selection screen as 2nd selection screen with different fields of that table as select options. This is done using genaration of dynamic report. Now If I click on button on this 2nd selction screen , then I want to replace this 2nd dynamic selection screen , with the other selection screen fields.
Can anybody guide me, How to do replace one slection screen with different selection screen.
and one imp thing is this selction screen is populating with dynamic fields on it.
Regards,
MrunalAs I can understand you want to make some of the screen field to disable or visible on screen depending upon the interaction of user with screen 1.
You may use this example code in PBO of screen 2.
LOOP AT SCREEN.
" action has been taken to modify the area office screen as per the option chosen at screen 99.
CASE ACTION.
" if the user has taken up the option of UPLOAD
WHEN 'UP'. " screen processing while we upload the plan
" during upload we will make dates as output fields only
IF SCREEN-NAME = 'ZSDTPLANVRSIO-DAT_TO' OR SCREEN-NAME = 'ZSDTPLANVRSIO-DAT_FRM'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
" also make 2 buttons disabled
IF SCREEN-NAME = 'AO_DO' OR SCREEN-NAME = 'AO_VE'.
SCREEN-ACTIVE = 0.
MODIFY SCREEN.
ENDIF.
WHEN 'DN'. " screen processing while we upload the approved plan
" during upload we will make dates as output fields only
IF SCREEN-NAME = 'ZSDTPLANVRSIO-DAT_TO' OR SCREEN-NAME = 'ZSDTPLANVRSIO-DAT_FRM'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
" also make 2 buttons disabled
IF SCREEN-NAME = 'AO_UP' OR SCREEN-NAME = 'AO_VE'.
SCREEN-ACTIVE = 0.
MODIFY SCREEN.
ENDIF.
WHEN 'VW'. " screen processing while we view the plan
" during upload we will make dates as output fields only
IF SCREEN-NAME = 'ZSDTPLANVRSIO-DAT_TO' OR SCREEN-NAME = 'ZSDTPLANVRSIO-DAT_FRM'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
" also make 2 buttons disabled
IF SCREEN-NAME = 'RLGRAP-FILENAME' OR SCREEN-NAME = 'FNAME'.
SCREEN-ACTIVE = 0.
MODIFY SCREEN.
ENDIF.
" and hide the file input field
IF SCREEN-NAME = 'AO_DO' OR SCREEN-NAME = 'AO_UP'.
SCREEN-ACTIVE = 0.
MODIFY SCREEN.
ENDIF.
ENDCASE.
ENDLOOP. -
NEED HELP IN RADIO BUTTON QUERY
Hi, Friends
I like to query to extract data from my table with the help of radio button but I am not able to think what I should write to query. Plz help.
The radio button select jsp page code is-
<form action="queryservice.jsp" method="post">
<h3><strong>Services Available</strong></h3>
<p>
<label>
<input type="radio" name="service" value="si" />
Institutions</label>
<br />
<label>
<input type="radio" name="service" value="sc" />
Corporate_Offices</label>
<br />
<label>
<input type="radio" name="service" value="sr" />
Restaurent_Cafe</label>
<br />
<label>
<input type="radio" name="service" value="sb" />
Bus_Stop</label>
<br />
<label>
<input type="radio" name="service" value="sa" />
Apartment</label>
<br />
<label>
<input type="radio" name="service" value="sh" />
Hotels</label>
<br />
</p>
<label>
<input type="submit" value="Submit" />
</label>
</form>And queryservice.jsp page is
<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %>
<sql:query var="xyz" scope="request">
<% String var = request.getParameter("service"); %>
if(var.equals("si")){ SELECT si FROM serviceTable}
else if(var.equals("sc")){ SELECT sc FROM serviceTable}
else if(var.equals("sr")){ SELECT sr FROM serviceTable}
else if(var.equals("sb")){ SELECT sb FROM serviceTable}
else if(var.equals("sa")){ SELECT sa FROM serviceTable}
else if(var.equals("sh")){ SELECT sh FROM serviceTable}
</sql:query>Please correct it.
Thanking youError Report-
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException:
if(var.equals("si")){ SELECT si FROM serviceTable }
else if(var.equals("sc")){ SELECT sc FROM serviceTable}
else if(var.equals("sr")){ SELECT sr FROM serviceTable}
else if(var.equals("sb")){ SELECT sb FROM serviceTable}
else if(var.equals("sa")){ SELECT sa FROM serviceTable}
else if(var.equals("sh")){ SELECT sh FROM serviceTable}
: Non supported SQL92 token at position: 57: SELECT
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:541)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:417)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
javax.servlet.ServletException: javax.servlet.jsp.JspException:
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.14 logs.
Apache Tomcat/6.0.14 -
Want to create F1 Help for radio button in my report
Hi All,
I want to create F1 Help for radio button in my report program. Which function module should i call in <b>at selection screen on help-request</b>
Also do I need to define the texts somewhere or I can pass it directly to the function module.Try DYN_FIELD_F1_HELP,
~Suresh
that is only for Dic fields..
Pl take alook at this<a href="http://help.sap.com/saphelp_erp2005vp/helpdata/en/79/34a243d9b511d1950e0000e8353423/frameset.htm">SAP Help</a>
~Suresh
Message was edited by: Suresh Datti -
Dynamic selection screen with ABAP web dynpro
Hi all.
How can I create dynamic selection screen with ABAP web dynpro? Thank you in advance.hi yinglak.....
this is possible........ all the ui elelments has the property called visible and enabled.... just assign an attribute of type wdui_visibility to the visible property....
in the wddomodify method..... check for the radio button value and pass the value true or false to this attribute and it gets changed automatically.
---regards,
alex b justin -
Dynamically calling selection screens with obligatory
TABLES :
******selection-screen: begin of block bal with frame title txt3.
******parameters: RB1 radiobutton group rd1 user-command abc default 'X'.
******parameters: RB2 radiobutton group rd1.
******selection-screen: end of block bal.
******selection-screen: begin of block B1 with frame title txt1.
******SELECT-OPTIONS : s_cust FOR KNA1-kunnr OBLIGATORY MODIF ID r1.
******SELECT-OPTIONS : s_plant FOR plko-werks OBLIGATORY MODIF ID r1 .
******selection-screen: end of block val.
******selection-screen: begin of block upd with frame title txt2.
******SELECT-OPTIONS: s_vend FOR lfa1-lifnr OBLIGATORY modif id r2.
******SELECT-OPTIONS: s_plan FOR plko-werks OBLIGATORY modif id r2.
******selection-screen: end of block upd.
Here i need to call these two selection screens dynamically depends on radio buttion selection.
But
Problem is a arising when when both are obligatory in selection screen ( with out obligatory , it is working fine)
I need to call screens dynamically, ecen though we have obligatory
Let me know procedure , the possibility of same funcationality in tabstips & selection screen.
MadhuHi Madhu,
You have to write code in AT SELECTION-SCREEN OUTPUT event.
First of all remove obligatory from select-options declaration. Do it dynamically in AT SELECTION-SCREEN OUTPUT event.
You enable or disable the block depending upon the rediobutton selected. Then in the venet AT SELECTION-SCREEN ON field, you can check whethere user has entered data into that field or not depending upon the radiobutton selected.
TABLES : kna1,
plko,
lfa1.
SELECTION-SCREEN: BEGIN OF BLOCK bal WITH FRAME TITLE txt3.
PARAMETERS: rb1 RADIOBUTTON GROUP rd1 USER-COMMAND abc DEFAULT 'X'.
PARAMETERS: rb2 RADIOBUTTON GROUP rd1.
SELECTION-SCREEN: END OF BLOCK bal.
SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE txt1.
SELECT-OPTIONS : s_cust FOR kna1-kunnr MODIF ID r1.
SELECT-OPTIONS : s_plant FOR plko-werks MODIF ID r1 .
SELECTION-SCREEN: END OF BLOCK b1.
SELECTION-SCREEN: BEGIN OF BLOCK upd WITH FRAME TITLE txt2.
SELECT-OPTIONS: s_vend FOR lfa1-lifnr MODIF ID r2.
SELECT-OPTIONS: s_plan FOR plko-werks MODIF ID r2.
SELECTION-SCREEN: END OF BLOCK upd.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF rb1 EQ 'X'.
IF ( screen-name EQ 'S_CUST-LOW'
OR screen-name EQ 'S_CUST-HIGH'
OR screen-name EQ 'S_PLANT-LOW'
OR screen-name EQ 'S_PLANT-HIGH') .
screen-active = '1' .
ENDIF.
IF ( screen-name EQ 'S_VEND-LOW'
OR screen-name EQ 'S_VEND-HIGH'
OR screen-name EQ 'S_PLAN-LOW'
OR screen-name EQ 'S_PLAN-HIGH') .
screen-active = '0' .
ENDIF.
ELSEIF rb2 EQ 'X'.
IF ( screen-name EQ 'S_VEND-LOW'
OR screen-name EQ 'S_VEND-HIGH'
OR screen-name EQ 'S_PLAN-LOW'
OR screen-name EQ 'S_PLAN-HIGH') .
screen-active = '1' .
ENDIF.
IF ( screen-name EQ 'S_CUST-LOW'
OR screen-name EQ 'S_CUST-HIGH'
OR screen-name EQ 'S_PLANT-LOW'
OR screen-name EQ 'S_PLANT-HIGH') .
screen-active = '0' .
ENDIF.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
Regards,
Anil Salekar -
Can you giv me a brief introduction regarding selection screen with one eg:
Hello
can you giv me a brief introduction regarding selection screen with one eg:Hi Ranjith,
Selection Screens
Selection screens are one of the three types of screen in the R/3 System, along with dialog screens and lists. You use them whenever you want the user to enter either a single value for a field or fields, or to enter selection criteria.
Function
ABAP programs use screens to obtain input from users. The most general type of screen is a dialog screen, which you create using the ABAP Workbench tools Screen Painter and Menu Painter These tools allow you to create screens for data input and output. However, each of these screens requires its own flow logic.
Defining and Calling Selection Screens
You often use screens purely for data input . In these cases, you can use a selection screen. Selection screens provide a standardized user interface in the R/3 System. Users can enter both single values and complex selections. Input parameters are primarily used to control the program flow, while users can enter selection criteria to restrict the amount of data read from the database. You can create and save predefined sets of input values in the ABAP Editor for any selection screen. These are called variants. Texts on the selection screen are stored as language-specific selection texts in the program text elements. If you start an executable report using the SUBMIT statement, the input fields of the selection screen also serve as a data interface.
Defining and Calling Selection Screens
You define selection screens using ABAP statements in a program. Simple statements allow you to create input fields, checkboxes, and radio buttons, and design the screen layout. If you want to create a screen exclusively for data input, you do not need to create it using the normal dialog programming tools. When you create a selection screen, the system automatically assumes the tasks of the Screen Painter and Menu Painter.
The rules for calling and defining selection screens in ABAP programs depend on the program type:
· Executable program (type 1) without logical database
You can use a single standard selection screen and as many user-defined selection screens as you wish. The standard selection screen is called automatically when you start the program. User-defined selection screens, on the other hand, are called using the CALL SELECTION-SCREEN statement in a program. The standard selection screen always has the screen number 1000. User-defined selection screens can have any screen number except 1000.
· Executable program (type 1) with logical database
The standard selection screen for an executable program linked to a logical database is made up of the logical database selections and the program selections.
· Module pools (type M) and function modules (type F)
You can only use user-defined selection screens in module pools and function modules. These can have any number apart from 1000. You can only call a selection screen from a function module using the CALL SELECTION-SCREEN statement. You can also define selection screens as Subscreens and incorporate them in screens or tabstrip controls.
Hope this is useful.
regards
Ram
Message was edited by:
Ramanujan Chitrakootam -
Tabbed selection screen with AT SELECTION-SCREEN ON events does not work
I have a selection screen with 3 tabs fields on each tab have AT SELECTION-SCREEN ON field events.
If you are on tab 1 and select a variant that populates fields on all tabs and then click the execute button ABAP does not seem to recognize that the field has changed when it executes AT SELECTION-SCREEN ON field event unless you physically go to each tab.
I can work around this by:
1) moving all of the AT SELECTION-SCREEN ON field events in a AT SELECTION-SCREEN OUTPUT event. This is not efficient and it potentially opens me up to other problems.
2) changing the selection screen to remove the tabs and have all of the fields on 1 screen. This makes for a very long screen.
Is there any way to have ABAP check all tabs?
Thanks,
JerryI finally got it to start. Let it sit and tried and it wouldn't but then I tried again and it did. How do I blow the dust out? I think it must be something with the heat since that comes up alot.
I will do it, I love my Mac. -
Modifying Selection screen dynamically
Hi guyz
herez another question
Can we modify selection-screen dynamically as we do in case of screen
What i want to do is
I want to display one parameter as checkbox and when user ticks this box I want to display another one
If we are defining two checkboxes earlier and making one invisible than can we modify selection screen to display another check box
Thanks in advanceTake a look at this example.
REPORT EVENT_DEMO.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
PARAMETERS: R1 RADIOBUTTON GROUP RAD1 DEFAULT 'X',
R2 RADIOBUTTON GROUP RAD1,
R3 RADIOBUTTON GROUP RAD1.
SELECTION-SCREEN END OF BLOCK B1.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME.
PARAMETERS: R4 RADIOBUTTON GROUP RAD2 DEFAULT 'X',
R5 RADIOBUTTON GROUP RAD2,
R6 RADIOBUTTON GROUP RAD2.
SELECTION-SCREEN END OF BLOCK B2.
AT SELECTION-SCREEN ON RADIOBUTTON GROUP RAD1.
IF R1 = 'X'.
MESSAGE W040(HB).
ENDIF.
AT SELECTION-SCREEN ON RADIOBUTTON GROUP RAD2.
IF R4 = 'X'.
MESSAGE W040(HB).
ENDIF.
Maybe you are looking for
-
Returning only searchable properties
I wanted to create an instance of the unified tree control such that I could present a collection of properties that are currently marked as being searchable. Is this possible with the unified tree control? When I try to create a "properties to be se
-
Loading multiple SWFs across many pages in a Flash interface
I have a Flash AS3 interface that lets users go tto different pages with the usualy back & next buttons. Each page they come to loads in a page-specific XML file with content, and then possibly graphic files and/or SWF files. My question is this: Whe
-
RTL & Indian Language Support for Indesign CS6 Mac
Hi, I am using Adobe Indesign CS6 Mac version and need support to using Arabic and Indian Language Support. I am not able to write this language. When I am pasting from Word or anywhere text is going cracked. I also learn to enable language support f
-
My Iphone 5 phone went black with only apple lit up. Won't restart
My Iphone 5 went black and won't restart. There is a white apple in the middle that lights up. But the phone won't restart.
-
FM for converting PDF to XSTRING - display R/3 report in Portal as PDF
Hello SDNers, Requirement: I am trying to display an R/3 report in Portal as PDF. I am trying to do it with the following logic: 1. Call a RFC enabled FM from my Webdynpro Java appln. 2. The FM then submits the Print request for the R/3 report and th