Select-options/range in screen
Hi all,
I just wanted to display select-options in the screen numbered 1000,
by putting which control can i do this ??........
regards
Jose
if u want to pass values in the selection screen use
Ex:
selection-screen begin of block b1
select-options : p_matnr for mara-matnr.
selection-screen end of block b1.
else if u want to pass while execution of program
use Ranges
Ex: ranges: p_matnr for mara-matnr.
Pass variables
p_matnr-low, p_matnr-high....................
Regards,
Ajay
Similar Messages
-
Dynamic Select Options/Ranges Maintain and Display in my screen
Hi I am trying to figure out if I can create a screen which will will read various select-options I have stored in a custom table but am having trouble finding something which will allow me to display each of 'select-options' in my dynpro... has anyone ever done this?
I'd rather not reinvent the wheel or mimic - does anyone know of a way to basically use a loaded range and display it on a screen for display or maintenance using standard SAP routines/classes?
Thanks in advance!
Roc..@Adrian - I got your email regarding the code sample, here is a quick example of how to popup a dynamic selection for up to 5 tables...
*& Report ZRS_DYNAMIC
REPORT zrs_dynamic.
* START Dynamic Range Selection Definitions
* Definition of the selection_if variable, which is used to reference
* the selections obtained
DATA: gv_selid TYPE rsdynsel-selid.
* Definition of the TABLES_TAB table for use in providing the list of
* fields available for creating select options from
DATA: gt_tables TYPE STANDARD TABLE OF rsdstabs.
DATA: gs_tables TYPE rsdstabs.
PARAMETERS: p_tab1 TYPE tabname DEFAULT 'KNA1',
p_tab2 TYPE tabname DEFAULT 'KNB1',
p_tab3 TYPE tabname DEFAULT 'KNC1',
p_tab4 TYPE tabname DEFAULT 'KNVV',
p_tab5 TYPE tabname DEFAULT 'KNVP'.
START-OF-SELECTION.
gs_tables-prim_tab = p_tab1 .APPEND gs_tables TO gt_tables.
gs_tables-prim_tab = p_tab2 .APPEND gs_tables TO gt_tables.
gs_tables-prim_tab = p_tab3 .APPEND gs_tables TO gt_tables.
gs_tables-prim_tab = p_tab4 .APPEND gs_tables TO gt_tables.
gs_tables-prim_tab = p_tab5 .APPEND gs_tables TO gt_tables.
* Definition of Table which includes the select-option range for field
TYPES: ty_selopt_t TYPE rsdsselopt OCCURS 10.
* Definition of field name and select option range table
TYPES: BEGIN OF ty_frange,
fieldname TYPE rsdstabs-prim_fname,
selopt_t TYPE ty_selopt_t,
END OF ty_frange.
TYPES: ty_frange_t TYPE ty_frange OCCURS 10.
TYPES: BEGIN OF ty_range,
tablename LIKE rsdstabs-prim_tab,
frange_t TYPE ty_frange_t,
END OF ty_range.
TYPES: ty_range_t TYPE STANDARD TABLE OF ty_range.
DATA: it_ranges TYPE ty_range_t.
* work areas
DATA: gs_ranges TYPE ty_range.
DATA: gs_frange TYPE ty_frange.
DATA: gs_selopt TYPE rsdsselopt.
DATA: gt_ranges TYPE ty_range_t.
DATA: gt_frange TYPE ty_frange_t.
DATA: gt_selopt TYPE ty_selopt_t.
* Definition of the fields list avaiable
TYPES: ty_fields TYPE STANDARD TABLE OF rsdsfields.
DATA: it_fields TYPE ty_fields.
DATA: gs_fields TYPE rsdsfields.
* END Dynamic Range Selection --------------------------------------------
CALL FUNCTION 'FREE_SELECTIONS_INIT'
EXPORTING
kind = 'T'
IMPORTING
selection_id = gv_selid
TABLES
tables_tab = gt_tables.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CALL FUNCTION 'FREE_SELECTIONS_DIALOG'
EXPORTING
selection_id = gv_selid
title = 'Select WHERE criteria for Rule'(s12)
as_window = 'X'
start_row = 7
start_col = 10
IMPORTING
field_ranges = it_ranges
TABLES
fields_tab = it_fields
EXCEPTIONS
internal_error = 1
no_action = 2
selid_not_found = 3
illegal_status = 4
OTHERS = 5.
Edited by: Rocco Scocco on Jun 17, 2010 3:48 PM
Edited by: Rocco Scocco on Jun 17, 2010 3:49 PM -
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. -
Select options range table to be passed to Assistance class
Hi Guru's,
I have an assistance class where I have to write all my select queries. I have a selection screen with multiple Select options (as input fields). Now I want to pass the select options range table to assistance class.
Please let me know if you have any sample code for this which may also include building range tables for select options.
Thanks,
PradeepHi Pardeep,
U can use following code: for field ERDAT
data: rt_ERDAT type ref to data,
R_ERDAT TYPE RANGE OF VIQMEL-ERDAT,
R_ERDAT_line LIKE LINE OF R_ERDAT,
field-symbols: <fs_ERDAT> type table.
Retrieve the data from the select option
rt_ERDAT = wd_this->m_handler->get_range_table_of_sel_field( i_id = 'ERDAT' ).
Assign it to a field symbol
assign rt_ERDAT->* to <fs_ERDAT>.
copy field symbols to local variable
R_ERDAT = <fs_ERDAT>.
CALL METHOD WD_ASSIST->"METHOD_NAME"
R_ERDAT = R_ERDAT
where in class method:
R_ERDAT Importing Type ZU5QNM_ERDAT_T
ZU5QNM_ERDAT_T : is a table type of ZU5QNM_ERDAT_R
and ZU5QNM_ERDAT_R has following structure :
SIGN ACE_SIGN CHAR 1 0 Debit/Credit Sign (+/-)
OPTION ACE_OPTION CHAR 2 0 Option for Ranges Tables
LOW ERDAT DATS 8 0 Date on Which Record Was Created
HIGH ERDAT DATS 8 0 Date on Which Record Was Created
I hope this wiol solve ur problem.
Regards,
Vishal. -
How to get the values of Select-options from the screen.
The value of parameter can be obtained by function module 'DYNP_VALUES_READ' but How to get the values of Select-options from the screen? I want the F4 help values of select-options B depending on the values in Select-option A.So I want to read the Select-option A's value.
Hi,
Refer this following code..this will solve your problem...
"Following code reads value entered in s_po select options and willprovide search
"help for s_item depending upon s_po value.
REPORT TEST.
TABLES : ekpo.
DATA: BEGIN OF itab OCCURS 0,
ebelp LIKE ekpo-ebelp,
END OF itab.
SELECT-OPTIONS s_po FOR ekpo-ebeln.
SELECT-OPTIONS s_item FOR ekpo-ebelp.
INITIALIZATION.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_item-low.
DATA:
dyn_field TYPE dynpread,
temp_fields TYPE TABLE OF dynpread,
zlv_dynpro TYPE syst-repid.
zlv_dynpro = syst-repid.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = zlv_dynpro
dynumb = syst-dynnr
request = 'A'
TABLES
dynpfields = temp_fields
EXCEPTIONS
OTHERS = 0.
LOOP AT temp_fields INTO dyn_field.
IF dyn_field-fieldname EQ 'S_PO-LOW'.
SELECT * INTO CORRESPONDING fields OF TABLE itab FROM ekpo
WHERE ebeln EQ dyn_field-fieldvalue.
EXIT.
ENDIF.
ENDLOOP. -
Create a select option in a screen
Is it possible to create a select option in a screen?
I can easily create the 2 input boxes, but not with the little button on the right like when we create a select option in a report.
Is the any other simple way to create a select option without creating a report? (the reason is because I want to have everything in the same module pool)Hi,
Please refer to SAP's documentation here: http://help.sap.com/saphelp_nw70/helpdata/en/e4/2adbec449911d1949c0000e8353423/frameset.htm.
Especially Part 'Subscreens and Tabstrips for Selection Screens', there go to 'Selection Screens as Subscreens'.
HTH, Gerd Rother -
Output from tables which I mention in select options of the screen as input
Dear All,
I want to fetch the data in the form of output from tables which I will mention in select options of the screen as input.
In selection screen option if I write any table name then how can i select this table in select query of ABAP program ?.
I may select any tables in select options of screen. But In select query I should get that table name automatically.. How ?
e.g. If i put table name as an input i.e. MARA in select option .
In program how to write select query to get records from that table ?
SELECT MTART MATKL from MARA
Every time I should not go to select query of program & replace the tablename.
How to solve this problem ?Hi,
PARAMETERS p_table(30)." type string.
"This is a Tested code Just Execute and Check
START-OF-SELECTION.
DATA: lt_tmp TYPE REF TO data.
DATA : line TYPE REF TO data.
FIELD-SYMBOLS: <lt_tmp> TYPE STANDARD TABLE, <wa>, <dyn_field>.
CREATE DATA lt_tmp TYPE STANDARD TABLE OF (p_table).
ASSIGN lt_tmp->* TO <lt_tmp> .
CREATE DATA line LIKE LINE OF <lt_tmp>.
ASSIGN line->* TO <wa>.
SELECT * FROM (p_table) INTO TABLE <lt_tmp>.
IF sy-subrc = 0.
LOOP AT <lt_tmp> ASSIGNING <wa>.
DO.
ASSIGN COMPONENT sy-index
OF STRUCTURE <wa> TO <dyn_field>.
IF sy-subrc NE 0.
EXIT.
ENDIF.
IF sy-index = 1.
WRITE:/ <dyn_field>.
ELSE.
WRITE: <dyn_field>.
ENDIF.
ENDDO.
ENDLOOP.
ENDIF.
Cheerz
Ram -
Multiple select-options in a screen But no screen space
Dear Experts,
I have mutiple select options in a screen, i am finding it a problem to display them all in one screen.
it should be done with out any vertical scroll nor horizontol scroll.
Awaiting to hear from you all.
Regards,
KarthikHi,
You can include more than one selct options or parameters in a single line..that might be favourable as u do not want to have scrolls..
the syntax goes like this
SELECTION-SCREEN BEGIN OF LINE.
<declare your parameters and select options>
SELECTION-SCREEN end OF LINE.
whatever u have written between begin of line and end of line will appear in a line..in this way you can reduce the page size..Hope the information was useful.
Regards
Vasavi
Edited by: Vasavi Kotha on Jan 6, 2009 5:29 PM -
Function to append a 0 to the front of values in a Select-Options range?
Hi,
Is anyone aware of any function or class that will append a 0 (or any character) to the front of a range (or set of ranges) in an internal table of a Select-Options from a selection screen?
Hope that made sense.
Thanks,
AndyHi
Why not?
My code it's only a sample, but it can create a routine for a generic range table based on the fields of the internal table for the range have always the same names:
SIGN, OPTION, LOW and HIGH:
TABLES: BKPF.
SELECT-OPTIONS: SO_BELNR FOR BKPF-BELNR,
SO_GJAHR FOR BKPF-GJAHR,
SO_BUKRS FOR BKPF-BUKRS.
AT SELECTION-SCREEN.
PERFORM CONV_RANGE USING: SO_BELNR[],
SO_GJAHR[],
SO_BUKRS[].
*& Form CONV_RANGE
* text
* -->T_RANGE text
FORM CONV_RANGE USING T_RANGE TYPE TABLE.
FIELD-SYMBOLS: <W_RANGE> TYPE ANY,
<W_LOW> TYPE ANY,
<W_HIGH> TYPE ANY.
LOOP AT T_RANGE ASSIGNING <W_RANGE>.
ASSIGN COMPONENT 'LOW' OF STRUCTURE <W_RANGE> TO <W_LOW>.
ASSIGN COMPONENT 'HIGH' OF STRUCTURE <W_RANGE> TO <W_HIGH>.
PERFORM CONVERSION_EXIT_ALPHA_INPUT USING: <W_LOW>,
<W_HIGH>.
ENDLOOP.
ENDFORM. "CONV_RANGE
*& Form CONVERSION_EXIT_ALPHA_INPUT
* text
* -->INPUT text
FORM CONVERSION_EXIT_ALPHA_INPUT USING P_INPUT.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = P_INPUT
IMPORTING
OUTPUT = P_INPUT.
ENDFORM. "CONVERSION_EXIT_ALPHA_INPUT
Max -
How to Captured Value into Select-Options Range Table Without "Enter"
Hi,
I defined a set of Select-Options in the Web Dynpro. I found that the value for the Select-Options will not be captured whenever I manually type in the value instead of choosing it from F4 Help Drop Down.
However, this problem can be resolved if I manually type in the value for Select-Options in the Selection Field and I press "Enter". Without pressing "Enter" value will not be captured.
Any solution for this issue? Please help.Hi Kris,
My problem is only when the user key in the value themselves rather than choosing it from Select-Options drop down value. Most of the time user will know what value to key in and will skip the step to choose from the Drop Down List. Thus, if this happen, the value keyed in by the user will not be able to capture into the range table.
I am using this logic to capture the value for selection item:
wd_this->m_helper->get_selection_screen_items(
IMPORTING et_selection_screen_items = lt_sel_item ).
* Values From Selection Screen
LOOP AT lt_sel_item ASSIGNING <fs_sel_item>.
CASE <fs_sel_item>-m_id.
WHEN `PERNR`.
ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_pernr>.
WHEN `BUKRS`.
ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_bukrs>.
WHEN `STAT2`.
ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_stat2>.
WHEN `WERKS`.
ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_werks>.
WHEN `BTRTL`.
ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_btrtl>.
WHEN `PERSG`.
ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_persg>.
WHEN `PERSK`.
ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_persk>.
WHEN `ABKRS`.
ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_abkrs>.
WHEN `BEGDA`.
ASSIGN <fs_sel_item>-m_value->* TO <fs_begda>.
ENDCASE.
ENDLOOP.
E.g. User key in the BUKRS without using the Drop Down Value provided by the Select-Options. For this case, <fs_bukrs> table will be initial as no value is captured.
Edited by: Girish Nabar on Apr 21, 2011 8:55 AM -
How do I pass SELECT-OPTIONS to another screen via CALL TRANSACTION?
Good day, everyone!
I am writing a program that will be passing PARAMETERS and SELECT-OPTIONS values to another transaction via the CALL TRANSACTION statement. I'm new at this, and I've run into a problem. I have several fields that are defined as SELECT-OPTIONS, like so:
SELECT-OPTIONS so_ccode FOR fkkop-bukrs.
The user may select multiple values, enter a range, exclude certain values, etc. -- the things a SELECT-OPTIONS allows.
But how do I pass all of this to a field on another screen using CALL TRANSACTION when I only have two fields (BDCDATA-FNAM and BDCDATA-FVAL) available to me? That works fine for PARAMETERS, but I can send low/high values, different signs/options, etc. for the SELECT-OPTIONS variables.
Please help!! Points awarded for all helpful answers.
Thank you,
DaveDon't use CALL TRANSACTION. Use SUBMIT instead.
Rob -
Innput field with Select option on custom screen
Hi,
I need to create an Input field with Select Option(No interval) button on Custom dialog screen .
Is there any idea how can I create it on screen ?
Thanks
Sachincreate a normal inputfield and place an icon next to it. then in the pai on click of that button use the following code.
data: wf_tab_field like rstabfield occurs 0 with header line ,
wf_exl_opt like rsoptions .
refresh: wf_tab_field .
move: 'KOSTL' to wf_tab_field-fieldname ,
'CSKS' to wf_tab_field-tablename .
append wf_tab_field .
clear wf_tab_field .
move: 'X' to wf_exl_opt-bt ,
'X' to wf_exl_opt-cp ,
'X' to wf_exl_opt-ge ,
'X' to wf_exl_opt-gt ,
'X' to wf_exl_opt-le ,
'X' to wf_exl_opt-lt ,
'X' to wf_exl_opt-nb ,
'X' to wf_exl_opt-np .
call function 'COMPLEX_SELECTIONS_DIALOG'
exporting
title = 'Select Cost Centers'
text = 'Cost Center'
* SIGNED = 'X'
* LOWER_CASE = ' '
* NO_INTERVAL_CHECK = ' '
* JUST_DISPLAY = ' '
* JUST_INCL = ' '
excluded_options = wf_exl_opt
* DESCRIPTION =
help_field = 'CSKS-KOSTL'
* SEARCH_HELP = 'KOST'
tab_and_field = wf_tab_field
tables
range = r_kostl
exceptions
no_range_tab = 1
cancelled = 2
internal_error = 3
invalid_fieldname = 4
others = 5
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
if not r_kostl[] is initial .
read table r_kostl index 1 .
if sy-subrc eq 0 .
move: r_kostl-low to wf_t_kostl .
endif .
endif .
wf_t_kostl is the screen field name.
Raja -
Dynamical declaration of SELECT-OPTIONS / RANGE possible
Hi fellow programmers,
does anybody know whether there is a way to declare a
SELECT-OPTION respectively a RANGE dynamically during
runtime? I have both the name of the range to be created
and the DDIC-referencefield stored in variables.
Thanks in advance for your appreciated help.
AndreasHi Andreas,
DYNAMIC PROGAM SHOWS SELECTION-SCREEN.
1 Sap does not allow execution of dynamic programs from memory.
(dynamic means, only in memory, not in database)
2. However, it allows execution of dynamic FORM/ENDFORM.
3. But your requirement is of selection-screen using parameters and select-options.
4. Hence, we can use the concept of DYNAMIC PROGRAM
(build the program code in an internal table)
using command
INSERT REPORT 'ZDYN01' FROM itab.
THIS WILL SAVE / OVERWRITE THE PRGRAM IN DB.
HENCE, BE CAUTIOUS.
5. Just Copy/Paste this sample program
It will generate a dynamic program called ZDYN01.
it will also execute it and
SHOW SELECTION-SCREEN
of the DYNAMIC PROGRAM.
6. You may build up yuour own logic
of constructing selection-screen from
required data stored in tables.
7.
REPORT abc.
Data
DATA : BEGIN OF itab OCCURS 0,
l(72) TYPE c,
END OF itab.
DATA : prog(8) TYPE c.
Make Dynamic Program
CLEAR itab.
itab-l = 'REPORT ABC.'.
APPEND itab.
itab-l = 'PARAMETERS : MATNR LIKE MARA-MATNR.'.
APPEND itab.
itab-l = 'START-OF-SELECTION.'. APPEND itab.
itab-l = 'WRITE :/ MATNR.'. APPEND itab.
Generate Program
INSERT REPORT 'ZDYN01' FROM itab.
COMMIT WORK. "----- COMMIT NECESSARY FOR DB
*------ Call Report
SUBMIT zdyn01 VIA SELECTION-SCREEN.
HOPE THE ABOVE HELPS.
Regards,
Amit M. -
Error V0 104 while adding select option on customized screen
Hi all,
I have a screen added on the standard transaction IW21 (with selection screen definition and called like subscreen). On this screen I have some SELECT-OPTIONS and when I press the button of selecting multiple values, I get the following message: "Requested function & is not available here" (V0 104), where & is long number starting with %..I have added entries to the tables T185F and T185 with the transaction VFBS, but I dont know how to assign the Function codes to SELECT-OPTIONS..
Thanks in advance for feedback!
Anna
Edited by: Anna L on Jul 16, 2008 11:03 AMJust an explanation: no matter the error message I get, the values are transferred correctly from the multiple selection screen to my screen.
I hope somebody got similar case and can give me some hint...
Thank you,
Anna -
Select options in dialog screen
Hi all,
I have used this logic in my program (ZSDIC001),
selection-screen begin of screen 1010 as subscreen.
selection-screen begin of block b1 with frame title text-001.
parameters: p_rad1 radiobutton group grp1 default 'X',
p_rad2 radiobutton group grp1,
p_rad3 radiobutton group grp1.
select-options: s_matnr for mara-matnr,
s_matkl for mara-matkl,
s_mtart for mara-mtart.
selection-screen end of block b1.
selection-screen end of screen 1010.
start-of-selection.
call screen 100.
*& Module STATUS_0100 OUTPUT
module status_0100 output.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
endmodule.
*& Module USER_COMMAND_0100 INPUT
module user_command_0100 input.
endmodule.
create screen 100 and create a subscreen area called "subscreen_1010"
Screen Flow Logic follows
*process before output.
module status_0100.
call subscreen subscreen_1010 including sy-repid '1010'.
*process after input.
call subscreen subscreen_1010 .
module user_command_0100.
But i get this error,
Error when generating the selection screen "1010" of report "ZSDIC001".
Can anyone help me out to solve this problem.
Thanks,
Rajesh.I've copied your code and it generated fine without any error.
Possibly your subscreen container is to small.
Regards
Tobias
Maybe you are looking for
-
PS3 cannot recognize external hard drive connected to Time Machine
I am trying to keep my Elements 2TB external hard drive connected to my Time Machine (via USB), and also use it as an external media source for my PS3. When connecting the drive directly to the PS3 through the USB it recognizes it perfectly as an e
-
Recently, whenever I open iMovie, it never shows up. I don't know what's up. Just help me :P Edit: As we speak, I'm installing iLife all over again. I'll report later. Message was edited by: osxdude
-
How can i arrange deleted files by deletion date/time?
Ok, so i deleted a bunch of files (in an effort to get rid of some old left over files from unused apps).. Anyway, i deleted some files that need to get back. I am not sure what their exact names or types are (they were in various folder and had diff
-
Suddenly unable to save changes to shared document (10.6.4 server & client)
Hi, a client of mine has a network with a 10.6.4 server and mixed clients (10.6.4 and 10.5.8). People edit documents within shared folders (mainly using Word and Pages) and all works as expected until, sometimes, some of them suddenly can't save chan
-
Financial Reporting studion installation issue
Hi, I am not able to see the financial reporting studio tab after the installation of Hyperion suit. We have configured financial reporting as well still we cannot able to see and open financial reporting. I have tried to open studio from worksapce,