How to create Multiple Selection Screen in ALV
Hi,
Can anybody tell me how to create the Multiple Selection screen in ALV reports.
Plse give me code sample if possible.
Thanks in advance
KP
Hi Rich,
thanks for the reply.
I am creating a report. in that for one field, i need to create a multiple selection screen. i mean in the output screen , i need to get the multiple selection screen for that field. in that i should be able to select multiple values, or single values or range of values.
eg: if i take the field kunnr, i should be able to select the multiple kunnar values in the output screen.
Hope my problem is understood.
Thanks
KP
Similar Messages
-
How to create multiple selection screens in reports
How to create multiple selection screens in reports
Thanks,
SridharEx: hope you will find an idea from the below example :
SELECTION-SCREEN BEGIN OF BLOCK SEL1 WITH FRAME TITLE TIT1.
PARAMETERS: CITYFR LIKE SPFLI-CITYFORM,
CITYTO LIKE SPFLI-CITYFORM.
SELECTION-SCREEN end OF BLOCK SEL1
SELECTION-SCREEN BEGIN OF SCREEN 500 AS WINDOW.
SELECTION-SCREEN INCLUDE BLOCKS SEL1.
SELECTION-SCREEN BEGIN OF BLOCK SEL2 WITH FRAME TITLE TIT2 .
PARAMETERS: AIRPFFR LIKE SPFLI-AIRPFROM,
AIRPTO LIKE SPFLI-AIRPTO.
SELECTION-SCREEN END OF BLOCK SEL2
SELECTION-SCREEN END OF SCREEN 5000.
INITIALIZATION.
TIT1 = 'ITIES'.
aT SELECTION-SCREEN.
CASE SY-DYNNR.
WHEN '0500'.
MESSAGE W159(at) WITH 'SCREEN 500'.
WHEN '1000'.
MESSAGE W159(at) WITH 'SCREEN 1000'.
ENDCASE.
START-OF-SELECTION.
TIT1 = 'CITIES FOR AIRPORTS'.
TIT2 = 'AIRPORTS'.
CALL SELECTION-SCREEN 500 STARTING AT 10 10.
TIT1 = 'CITIES AGAIN'.
CALL SELECTION-SCREEN 1000 STARTING AT 10 10. -
How to create the selection screen dynamically
Hi,
I have a requirement to create the selection screen Dynamically. All the fields that should appear on the selection screen will be available in a custom table. So, based on the entries available in the Z tables, the selection screen should be built. Eg. If there are 10 records available in the Z table, the selection screen should consist of 10 fields. If there are 100 entries, the Selection screen should contain 100 fields. and the logic to build this selection screen should be carried out dynamically in the program.
Could anyone of you please share the valuable inputs on this. If anyone has the sample code to do this, please share.
Thanks in advance.
Regards,
Paddu.Hi,
Kindly go through this sample program below:
DEMO_LIST_FORMAT_INPUT *and
check this function module:
FREE_SELECTIONS_DIALOG *.
Hope it helps
Regards
Mansi -
How to create dynamic selection-screen
Hi all,
I want to create dynamic selection-screen.in that dynamic selectio-screen i want to display date fields based on table name given in the selection-screen.
Regards,
BillaHi Billa,
Look into the function group SSEL, this has some SAP standard functions to work with dynamic selection screens.
Below is sample FM, I wrote making use of standard FM from the above. This FM will take table name as input and will display a screen with all the fields within that table for selection. This can also be customized to restrict the fields for display.
Hope this helps,
Sumant.
FUNCTION y_ss_test_dynamic_selection.
""Local interface:
*" IMPORTING
*" REFERENCE(TABNAME) LIKE DD02L-TABNAME
*" EXPORTING
*" REFERENCE(DS_CLAUSES) TYPE RSDS_WHERE
*" EXCEPTIONS
*" TABLE_NOT_VALID
*" OTHER_ERROR
DATA texpr TYPE rsds_texpr.
DATA twhere TYPE rsds_twhere.
DATA trange TYPE rsds_trange.
DATA BEGIN OF qcat. "Selections View for
INCLUDE STRUCTURE rsdsqcat. "Free Selectoptions
DATA END OF qcat.
DATA BEGIN OF tabs OCCURS 10.
INCLUDE STRUCTURE rsdstabs.
DATA END OF tabs.
DATA BEGIN OF fields OCCURS 10.
INCLUDE STRUCTURE rsdsfields.
DATA END OF fields.
DATA BEGIN OF efields OCCURS 10.
INCLUDE STRUCTURE rsdsfields.
DATA END OF efields.
DATA selid LIKE rsdynsel-selid.
DATA actnum LIKE sy-tfill.
DATA title LIKE sy-title VALUE 'Selection Screen'.
DATA: maxnum LIKE sy-subrc VALUE '69'.
CLEAR tabs.
tabs-prim_tab = tabname.
COLLECT tabs.
DATA: position LIKE dd03l-position.
DATA: keyflag LIKE dd03l-keyflag.
CLEAR fields.
fields-tablename = tabname.
fields-sign = 'I'.
DATA: step LIKE sy-subrc.
SELECT fieldname keyflag position
INTO (fields-fieldname, keyflag, position)
FROM dd03l
WHERE tabname = tabname
AND fieldname NOT LIKE '.INCLU%'
AND datatype NE 'CLNT'
ORDER BY position.
ADD 1 TO step.
CHECK step LE maxnum.
IF keyflag <> 'X'.
efields = fields.
APPEND efields.
ENDIF.
APPEND fields.
ENDSELECT.
IF sy-subrc <> 0.
RAISE table_not_valid.
ENDIF.
CALL FUNCTION 'FREE_SELECTIONS_INIT'
EXPORTING
expressions = texpr
kind = 'F'
IMPORTING
selection_id = selid
expressions = texpr
where_clauses = twhere
field_ranges = trange
number_of_active_fields = actnum
TABLES
tables_tab = tabs
fields_tab = fields
fields_not_selected = efields
EXCEPTIONS
fields_incomplete = 01
fields_no_join = 02
field_not_found = 03
no_tables = 04
table_not_found = 05
expression_not_supported = 06
incorrect_expression = 07
illegal_kind = 08
area_not_found = 09
inconsistent_area = 10
kind_f_no_fields_left = 11
kind_f_no_fields = 12
too_many_fields = 13.
IF sy-subrc = 0.
CALL FUNCTION 'FREE_SELECTIONS_DIALOG'
EXPORTING
selection_id = selid
title = title
IMPORTING
where_clauses = twhere
expressions = texpr
field_ranges = trange
number_of_active_fields = actnum
TABLES
fields_tab = fields
EXCEPTIONS
internal_error = 01
no_action = 02
no_fields_selected = 03
no_tables_selected = 04
selid_not_found = 05.
IF sy-subrc = 0.
CLEAR ds_clauses.
MOVE tabname TO ds_clauses-tablename.
READ TABLE twhere WITH KEY ds_clauses-tablename INTO ds_clauses.
IF sy-subrc <> 0.
RAISE other_error.
ENDIF.
ELSE.
RAISE other_error.
ENDIF.
ELSE.
RAISE other_error.
ENDIF.
ENDFUNCTION. -
How to create a selection screen in a FM
Hello,
I have a FM. Here i have an import parameter called Selection.
So when Selection = X i need to show a selection-screen like if it would be a report. Do you know any fm or way to do this?
We have thought to create a report with the selection screen and to do a submit and return in the FM, and import/export the parameters. But maybe there are some clearer an easier way...
Thanks,
Manel
Edited by: Manel Casadesus on Oct 7, 2009 11:57 AMHi Manel,
<li>Its absolutely possible. I just tried. It works
<li>Plase the code in the TOP include of the function pool.
FUNCTION-POOL ZTEST_GRP.
SELECTION-SCREEN BEGIN OF SCREEN 1001.
PARAMETERS P_DATA TYPE CHAR2.
SELECTION-SCREEN END OF SCREEN 1001.
<li>Call the above defined selection-screen in the start of the function module.
FUNCTION ZTEST_FUNCTION_BADI.
*"*"Local Interface:
*" IMPORTING
*" REFERENCE(DAT) TYPE CHAR2
CALL SELECTION-SCREEN 1001.
ENDFUNCTION.
I hope that it solves your problem.
Thanks
Venkat.O -
How to create a selection screen with two tab strips
Hi Experts,
I need to craete a selection screen '100' with two tab strips, in the 1st tab strip i need create some select options as subscreen and in other tabstrip i need to call the subscren '4000' of the program 'SAPLCTMS' . i need to call this screen as selection screen from the zprogram. please help me out.
Thanks in advance...
Sarath...JHi,
I have developed some code.
It just displays a table control and after entering the values init, upon hitting the return button, the values will be put into table itab. Have a look and make necessary changes as you see fit.
*& Report ZMADHU_TBCNTL
REPORT zmadhu_tbcntl.
DATA: BEGIN OF itab OCCURS 0,
sel TYPE s_flag,
matnr TYPE matnr,
ersda TYPE ersda,
ernam TYPE ernam,
END OF itab.
CONTROLS: tab_cntl TYPE TABLEVIEW USING SCREEN 100.
*START-OF-SELECTION.
CALL SCREEN 100.
*END-OF-SELECTION.
*& Module STATUS_0100 OUTPUT
text
MODULE status_0100 OUTPUT.
SET PF-STATUS 'TABCNTL'. "pf status
SET TITLEBAR 'xxx'.
CASE sy-ucomm.
WHEN 'BACK' OR
'CANCEL' OR
'EXIT'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module ITAB_MODIFY INPUT
text
MODULE itab_modify INPUT.
CASE sy-ucomm .
WHEN ' '. " When pressed enter
if itab-sel = 'X'.
MODIFY itab INDEX tab_cntl-current_line.
APPEND itab. " append lines to internal table
CLEAR itab.
*endif.
ENDCASE.
ENDMODULE. " ITAB_MODIFY INPUT
*Screen 100 flow logic.
PROCESS BEFORE OUTPUT.
MODULE status_0100.
LOOP AT itab WITH CONTROL tab_cntl CURSOR
tab_cntl-current_line..
ENDLOOP.
PROCESS AFTER INPUT.
MODULE select_data.
LOOP .
CHAIN.
FIELD itab-matnr.
FIELD itab-ersda.
FIELD itab-ernam.
MODULE itab_modify ON CHAIN-REQUEST.
ENDCHAIN.
ENDLOOP.
MODULE USER_COMMAND_0100.
Hope it will helps to u.
Thanks,
Shankar -
How get window between selection screen and alv output
Hi Friends,
I am displaying ALV report now i want to display small window with one button and it should show list of fields before displaying alv output.
means i want a window showing list of fields of internal table coming from program.and when i will click on yes button it should show ALV output.
how can i achive this .
Pls. help
thanks in advance.Hi,
Try to use the following command:
<b><i>WINDOW STARTING AT <some-value> <some-value> ENDING AT <some-value> <some-value>.
</i></b>
notice that there is a space between <> <>.
This statement should be used inside the AT USER-COMMAND event.
i.e.,
AT USER-COMMAND.
CASE SY-UCOMM.
WHEN 'XXX'.
<b> <i> WINDOW STARTING AT <> <> ENDING AT <> <>.</i></b>
..............statements....................
ENDCASE.
This should help you some what.
Bye -
Multiple selection screen.
hi all,
how to create multiple selection screens,
i need 3 selection screens how to do it?
wats the maximum number selection screen can be created in a report.
regards
SuprithSELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
PARAMETERS: p1 TYPE c LENGTH 10,
p2 TYPE c LENGTH 10,
p3 TYPE c LENGTH 10.
SELECTION-SCREEN END OF SCREEN 100.
SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.
PARAMETERS: q1 TYPE c LENGTH 10,
q2 TYPE c LENGTH 10,
q3 TYPE c LENGTH 10.
SELECTION-SCREEN END OF SCREEN 200.
SELECTION-SCREEN: BEGIN OF TABBED BLOCK mytab FOR 10 LINES,
TAB (20) button1 USER-COMMAND push1,
TAB (20) button2 USER-COMMAND push2,
END OF BLOCK mytab.
INITIALIZATION.
button1 = 'Selection Screen 1'.
button2 = 'Selection Screen 2'.
mytab-prog = sy-repid.
mytab-dynnr = 100.
mytab-activetab = 'PUSH1'.
AT SELECTION-SCREEN.
CASE sy-dynnr.
WHEN 1000.
CASE sy-ucomm.
WHEN 'PUSH1'.
mytab-dynnr = 100.
WHEN 'PUSH2'.
mytab-dynnr = 200.
WHEN OTHERS.
ENDCASE.
ENDCASE. -
How to create multiple buttons in ALV Toolbar in Webdynpro ABAP
Hi all,
I am trying to create multiple buttons in Webdynpro ALV toolbar, please go through the code.
What happening is, second button is replacing the first one.
DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
lo_cmp_usage = wd_this->wd_cpuse_alv_table( ).
IF lo_cmp_usage->has_active_component( ) IS INITIAL.
lo_cmp_usage->create_component( ).
ENDIF.
DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
lo_interfacecontroller = wd_this->wd_cpifc_alv_table( ).
DATA lv_value TYPE REF TO cl_salv_wd_config_table.
lv_value = lo_interfacecontroller->get_model(
DATA lr_buttonui1 TYPE REF TO cl_salv_wd_fe_button.
DATA lr_buttonui2 TYPE REF TO cl_salv_wd_fe_button.
DATA button1 TYPE REF TO cl_salv_wd_function.
DATA button2 TYPE REF TO cl_salv_wd_function.
**First button
CREATE OBJECT lr_buttonui1.
lr_buttonui1->set_text('Button')."setting the text of the button on alv toolbar
button1 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON')."creating the function for alv button
button1->set_editor( lr_buttonui1 ).
**Second button
CREATE OBJECT lr_buttonui2.
lr_buttonui2->set_text('Button1')."setting the text of the button on alv toolbar
button2 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON' )."creating the function for alv button
button2->set_editor( lr_buttonui2 ).
How can I overcome this??
Thanks
EshwarHi Eshwar,
The button Ids are same for both the buttons in your code. You need to change it as BUTTON1, BUTTON2.
**First button
CREATE OBJECT lr_buttonui1.
lr_buttonui1->set_text('Button')."setting the text of the button on alv toolbar
button1 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON1')."creating the function for alv button
button1->set_editor( lr_buttonui1 ).
**Second button
CREATE OBJECT lr_buttonui2.
lr_buttonui2->set_text('Button1')."setting the text of the button on alv toolbar
button2 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON2' )."creating the function for alv button
button2->set_editor( lr_buttonui2 ). -
How to disable the SELECT-OPTINS multiple selection screen's Ranges options
Hi this is sekhar,
I have used the Select-options: statement with 'No-Interval' option. Now I need to restrict the user not to enter the values in the Ranges column of multiple selection screen. How can I do it....You can also refer this code as below : CHECK OUT SELECT OPTION sel_1_0.
*& Report ZTESTREP
REPORT ztestrep.
Include type pool SSCR
TYPE-POOLS sscr.
Define the object to be passed to the RESTRICTION parameter
DATA restrict TYPE sscr_restrict.
Auxiliary objects for filling RESTRICT
DATA opt_list TYPE sscr_opt_list.
DATA *** TYPE sscr_***.
Define the selection screen objects
First block: 3 SELECT-OPTIONS
SELECTION-SCREEN BEGIN OF BLOCK block_0 WITH FRAME TITLE text-bl0.
SELECT-OPTIONS sel_0_0 FOR sy-tvar0.
SELECT-OPTIONS sel_0_1 FOR sy-tvar1.
SELECT-OPTIONS sel_0_2 FOR sy-tvar2.
SELECT-OPTIONS sel_0_3 FOR sy-tvar3.
SELECTION-SCREEN END OF BLOCK block_0.
Second block: 2 SELECT-OPTIONS
SELECTION-SCREEN BEGIN OF BLOCK block_1 WITH FRAME TITLE text-bl1.
SELECT-OPTIONS sel_1_0 FOR sy-subrc.
SELECT-OPTIONS sel_1_1 FOR sy-repid.
SELECTION-SCREEN END OF BLOCK block_1.
INITIALIZATION.
Define the option list
ALL: All options allowed
MOVE 'ALL' TO opt_list-name.
MOVE 'X' TO: opt_list-options-bt,
opt_list-options-cp,
opt_list-options-eq,
opt_list-options-ge,
opt_list-options-gt,
opt_list-options-le,
opt_list-options-lt,
opt_list-options-nb,
opt_list-options-ne,
opt_list-options-np.
APPEND opt_list TO restrict-opt_list_tab.
NOPATTERN: CP and NP not allowed
CLEAR opt_list.
MOVE 'NOPATTERN' TO opt_list-name.
MOVE 'X' TO: opt_list-options-bt,
opt_list-options-eq,
opt_list-options-ge,
opt_list-options-gt,
opt_list-options-le,
opt_list-options-lt,
opt_list-options-nb,
opt_list-options-ne.
APPEND opt_list TO restrict-opt_list_tab.
NOINTERVLS: BT and NB not allowed
CLEAR opt_list.
MOVE 'NOINTERVLS' TO opt_list-name.
MOVE 'X' TO: opt_list-options-cp,
opt_list-options-eq,
opt_list-options-ge,
opt_list-options-gt,
opt_list-options-le,
opt_list-options-lt,
opt_list-options-ne,
opt_list-options-np.
APPEND opt_list TO restrict-opt_list_tab.
EQ_AND_CP: only EQ and CP allowed
CLEAR opt_list.
MOVE 'EQ_AND_CP' TO opt_list-name.
MOVE 'X' TO: opt_list-options-cp,
opt_list-options-eq.
APPEND opt_list TO restrict-opt_list_tab.
JUST_EQ: Only EQ allowed
CLEAR opt_list.
MOVE 'JUST_EQ' TO opt_list-name.
MOVE 'X' TO opt_list-options-eq.
APPEND opt_list TO restrict-opt_list_tab.
Assign selection screen objects to option list and sign
KIND = 'A': applies to all SELECT-OPTIONS
MOVE: 'A' TO ***-kind,
'*' TO ***-sg_main,
'NOPATTERN' TO ***-op_main,
'NOINTERVLS' TO ***-op_addy.
APPEND *** TO restrict-***_tab.
KIND = 'B': applies to all SELECT-OPTIONS in block BLOCK_0,
that is, SEL_0_0, SEL_0_1, SEL_0_2
CLEAR ***.
MOVE: 'B' TO ***-kind,
'BLOCK_0' TO ***-name,
'I' TO ***-sg_main,
'*' TO ***-sg_addy,
'NOINTERVLS' TO ***-op_main.
APPEND *** TO restrict-***_tab.
KIND = 'S': applies to SELECT-OPTION SEL-0-2
CLEAR ***.
MOVE: 'S' TO ***-kind,
'SEL_0_2' TO ***-name,
'I' TO ***-sg_main,
'*' TO ***-sg_addy,
'EQ_AND_CP' TO ***-op_main,
'ALL' TO ***-op_addy.
APPEND *** TO restrict-***_tab.
KIND = 'S': Applies to SELECT-OPTION SEL_0_3
CLEAR ***.
MOVE: 'S' TO ***-kind,
'SEL_0_3' TO ***-name,
'I' TO ***-sg_main,
'N' TO ***-sg_addy,
'JUST_EQ' TO ***-op_main.
APPEND *** TO restrict-***_tab.
Call function module
CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
EXPORTING
restriction = restrict
DB = ' '
EXCEPTIONS
too_late = 1
repeated = 2
not_during_submit = 3
db_call_after_report_call = 4
selopt_without_options = 5
selopt_without_signs = 6
invalid_sign = 7
report_call_after_db_error = 8
empty_option_list = 9
invalid_kind = 10
repeated_kind_a = 11
OTHERS = 12. -
How to create the select option in the screen
HI,
I am developing one module pool program and I have below requirement,
currently plant is acting like PARAMETER and the now it should be changed to select option.
how to create the select option in the screen
Thanks and regarding,
Malla
Moderator message - Please search before asking - post locked
Edited by: Rob Burbank on Dec 16, 2009 1:41 PMTry RANGES.
The RANGES has same structure as that of select-options. -
How to disable a pushbutton created in selection screen.
How to disable a pushbutton created in selection screen.
you can make it invisible during runtime.
At the event, AT SELECTION-SCREEN OUTPUT. you can turn attributes on and off for screen elements. In this case, invisible = 1, makes the element invisible, 0 makes is visible.
here is a short sample.
report zrich_0001.
parameters: p_check type c.
selection-screen pushbutton 40(20) gocfg
user-command gocfg.
at selection-screen output.
loop at screen.
if screen-name = 'GOCFG'.
screen-invisible = '1'.
modify screen.
endif.
endloop.
Regards,
Rich Heilman -
How to create the select option for the Plant in screen (Module pool)
HI,
I am developing one module pool program and I have below requirement,
currently plant is acting like PARAMETER and the now it should be changed to select option.
how to create the select option in the screen
Thanks and regarding,
Malla
Moderator message - Cross post locked
Edited by: Rob Burbank on Dec 16, 2009 1:41 PMSteps to get SELECT-OPTIONS in module pool programs.
1.Start one dialog program with SAPMZ_001.
Place the below code in the TOP include of the dialog program.
TABLES marc.
SELECTION-SCREEN BEGIN OF SCREEN 3200 AS SUBSCREEN.
SELECT-OPTIONS: werks FOR marc-werks.
SELECTION-SCREEN END OF SCREEN 3200.
2 .Create one screen 3000.
Go to Layout of the screen and Define subscreen area on the screen and Name it as l_subscreen.
Place the below code in the Flow logic of the screen.
PROCESS BEFORE OUTPUT.
CALL SUBSCREEN l_subscreen INCLUDING 'SAPMZ_001' '3200'.
PROCESS AFTER INPUT.
CALL SUBSCREEN l_subscreen.
Activate all.
Create Transaction code for the dialog program .
Execute the transaction code. You will see the select-option for werks how we see on Selection-screen. -
How to create a radio button in ALV Reports
Hi all,
Best wishes to all..
Kindly reply me to this question... that is "How to create a radio button in ALV Report"
Thanks and Regards
AnjaliHI
here is an example :
PROGRAM ZUS_SDN_BCALV_GRID_DEMO_2.
Based on: BCALV_GRID_DEMO.
TYPE-POOLS: icon.
TYPES: BEGIN OF ty_s_sflight.
INCLUDE TYPE sflight.
TYPES: button1 TYPE lvc_emphsz.
TYPES: button2 TYPE lvc_emphsz.
TYPES: button3 TYPE lvc_emphsz.
TYPES: button4 TYPE lvc_emphsz.
TYPES: END OF ty_s_sflight.
DATA:
gt_sflight TYPE STANDARD TABLE OF ty_s_sflight,
gt_fcat TYPE lvc_t_fcat.
DATA: ok_code LIKE sy-ucomm,
gt_sflight TYPE TABLE OF sflight,
g_container TYPE scrfname VALUE 'BCALV_GRID_DEMO_0100_CONT1',
grid1 TYPE REF TO cl_gui_alv_grid,
g_custom_container TYPE REF TO cl_gui_custom_container.
CLASS lcl_eventhandler DEFINITION
CLASS lcl_eventhandler DEFINITION.
PUBLIC SECTION.
CLASS-DATA:
md_cnt TYPE i.
CLASS-METHODS:
handle_hotspot_click FOR EVENT hotspot_click OF cl_gui_alv_grid
IMPORTING
e_row_id
e_column_id
es_row_no
sender.
ENDCLASS. "lcl_eventhandler DEFINITION
CLASS lcl_eventhandler IMPLEMENTATION
CLASS lcl_eventhandler IMPLEMENTATION.
METHOD handle_hotspot_click.
define local data
FIELD-SYMBOLS:
<ls_entry> TYPE ty_s_sflight,
<ld_fld> TYPE ANY.
READ TABLE gt_sflight ASSIGNING <ls_entry> INDEX es_row_no-row_id.
CHECK ( <ls_entry> IS ASSIGNED ).
Set all radio buttons "unselected"
<ls_entry>-button1 = icon_wd_radio_button_empty.
<ls_entry>-button2 = icon_wd_radio_button_empty.
<ls_entry>-button3 = icon_wd_radio_button_empty.
<ls_entry>-button4 = icon_wd_radio_button_empty.
ASSIGN COMPONENT e_column_id-fieldname OF STRUCTURE <ls_entry>
TO <ld_fld>.
IF ( <ld_fld> IS ASSIGNED ).
Set selected radio button "selected".
<ld_fld> = icon_wd_radio_button.
ENDIF.
Force PAI followed by refresh of table display in PBO
CALL METHOD cl_gui_cfw=>set_new_ok_code
EXPORTING
new_code = 'DUMMY'
IMPORTING
RC =
ENDMETHOD. "handle_hotspot_click
ENDCLASS. "lcl_eventhandler IMPLEMENTATION
START-OF-SELECTION.
MAIN *
PERFORM select_data.
CALL SCREEN 100.
MODULE PBO OUTPUT *
MODULE pbo OUTPUT.
SET PF-STATUS 'MAIN100'.
IF g_custom_container IS INITIAL.
CREATE OBJECT g_custom_container
EXPORTING container_name = g_container.
CREATE OBJECT grid1
EXPORTING i_parent = g_custom_container.
PERFORM build_fieldcatalog.
CALL METHOD grid1->set_table_for_first_display
EXPORTING
i_structure_name = 'SFLIGHT'
CHANGING
it_fieldcatalog = gt_fcat
it_outtab = gt_sflight.
Set event handler for event TOOLBAR
SET HANDLER:
lcl_eventhandler=>handle_hotspot_click FOR grid1.
else.
CALL METHOD grid1->refresh_table_display
EXPORTING
IS_STABLE =
I_SOFT_REFRESH =
EXCEPTIONS
FINISHED = 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.
ENDIF.
ENDMODULE. "PBO OUTPUT
MODULE PAI INPUT *
MODULE pai INPUT.
to react on oi_custom_events:
CALL METHOD cl_gui_cfw=>dispatch.
CASE ok_code.
WHEN 'EXIT'.
PERFORM exit_program.
WHEN OTHERS.
do nothing
ENDCASE.
CLEAR ok_code.
ENDMODULE. "PAI INPUT
FORM EXIT_PROGRAM *
FORM exit_program.
CALL METHOD G_CUSTOM_CONTAINER->FREE.
CALL METHOD CL_GUI_CFW=>FLUSH.
LEAVE PROGRAM.
ENDFORM. "EXIT_PROGRAM
*& Form BUILD_FIELDCATALOG
text
--> p1 text
<-- p2 text
FORM build_fieldcatalog .
define local data
DATA:
ls_fcat TYPE lvc_s_fcat,
ls_hype TYPE lvc_s_hype.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
I_BUFFER_ACTIVE =
i_structure_name = 'LVC_S_FCAT'
I_CLIENT_NEVER_DISPLAY = 'X'
I_BYPASSING_BUFFER =
I_INTERNAL_TABNAME =
CHANGING
ct_fieldcat = gt_fcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
DELETE gt_fcat WHERE ( fieldname <> 'EMPHASIZE' ).
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
I_BUFFER_ACTIVE =
i_structure_name = 'SFLIGHT'
I_CLIENT_NEVER_DISPLAY = 'X'
I_BYPASSING_BUFFER =
I_INTERNAL_TABNAME =
CHANGING
ct_fieldcat = gt_fcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
READ TABLE gt_fcat INTO ls_fcat
WITH KEY fieldname = 'EMPHASIZE'.
IF ( syst-subrc = 0 ).
DELETE gt_fcat INDEX syst-tabix.
ENDIF.
ls_fcat-fieldname = 'BUTTON4'.
ls_fcat-icon = 'X'.
ls_fcat-hotspot = 'X'.
INSERT ls_fcat INTO gt_fcat INDEX 4.
ls_fcat-fieldname = 'BUTTON3'.
INSERT ls_fcat INTO gt_fcat INDEX 4.
ls_fcat-fieldname = 'BUTTON2'.
INSERT ls_fcat INTO gt_fcat INDEX 4.
ls_fcat-fieldname = 'BUTTON1'.
INSERT ls_fcat INTO gt_fcat INDEX 4.
LOOP AT gt_fcat INTO ls_fcat.
ls_fcat-col_pos = syst-tabix.
MODIFY gt_fcat FROM ls_fcat INDEX syst-tabix.
ENDLOOP.
ENDFORM. " BUILD_FIELDCATALOG
*& Form SELECT_DATA
text
--> p1 text
<-- p2 text
FORM select_data .
define local data
DATA:
ls_sflight TYPE ty_s_sflight.
SELECT * FROM sflight INTO CORRESPONDING FIELDS OF TABLE gt_sflight.
ls_sflight-button1 = icon_wd_radio_button.
ls_sflight-button2 = icon_wd_radio_button_empty.
ls_sflight-button3 = icon_wd_radio_button_empty.
ls_sflight-button4 = icon_wd_radio_button_empty.
MODIFY gt_sflight FROM ls_sflight
TRANSPORTING button1 button2 button3 button4
WHERE ( carrid IS NOT INITIAL ).
ENDFORM. " SELECT_DATA
Regards,
Prasanth
Reward all helpful answers -
RAR5.3 not able to cut and paste list of users to Multiple Selection screen
CC V4.0 on ABAP system has a feature where you can cut and paste a list of many users from the clipboard to Single Values column in the Multiple Selection screen, so you can run SOD Analysis Report for all those users. The Multiply Selection screen is a standard SAP supplied pop up screen.
With RAR 5.3 the Multiply Selection screen design is different. There is no longer feature to cut and paste from clipboard. We have to input each user one at a time. So if you have many users (20, 30, etc.) it is a time consuming task. It is not acceptable to our business power users.
We can import the list of users to a Custom User Group (in the Configuration Tab). First of all, there is no mass delete on Custom User Group. You have to delete each user one at a time which is time consuming. The alternative is to create a new Custom User Group each time, then it becomes a maintenance nightmare. Secondly, it is in the Configuration Tab which is only available to Administrators (fear of users changing configuation data), so the Administrator (or whomever has access to the Configuration Tab) has to maintain the Custom User Groups which is a lot of work for him or her or them.
We talk to SAP every week. But they are looking at this as a long time project. Does any one of you (or your company) has the same requirements? How do you get around it? Did you setup some other procedures so users can cut and paste the users list and run the Risk Analysis report themselves?
Thanks,
John.This is probably a JVM issue. Are you using JInitiator or the IE native JVM?
I suggest you turn on the JVM console, set the trace level to maximum, and then watch what happens when you attempt the copy.
Also, check the key mapping (usually ctrl-k) that the forms applet is implementing. Perhaps ctrl-c means something else...
Maybe you are looking for
-
How do you get rid of App Store app update notice when there are no apps to be updated?
As you can see below, I have the notification saying 8 updates yet there are no apps to update. Anyone know how I can fix this??
-
Finishing backup taking slightly too long!
Hi; Have had no issues with backups until today. The backups started at 7am, its now 12pm and its "stuck" on finishing Backup. Not sure if its normal. I downloaded the time machine widget, and this was the output: Starting standard backup Backing up
-
Can someone help me convert a date of the following format: YYYY-MM-DDThh:mm:ss.sTZD (e.g. 1997-07-16T19:20:30.45+01:00) to MM/DD/YYYY i.e.07/16/1997 I can convert a date of this format YYYY-MM-DDTHH:MM:SSZ like this select to_char(to_date('2008-03-1
-
Need Billing doc. number based on header Output type and also billing docum
Hi I have header Output type and also billing document type. will you please help me to get the billing document no. based on above combination, any SAP table, i was aware about the same. but i forgot the table name. Thanks Vanraj
-
How Can I Clean up Imported Bitmap Images
Hi, I am using Flash 5. I have imported a sequence of .png images and they are looking pretty rough and bitmapped so I wanted to clean them up. 1. Do I have to select each frame after import and adjust the bitmap settings for each image or can I doo