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
Sachin
create 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
Similar Messages
-
SELECT-OPTIONS on custom screen problem
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 %..No matter the error message, the values are transferred correctly from the multiple selection screen to my screen. 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!
AnnaHi, this is copied from SELECT-OPTION documentation:
The LOW and HIGH fields of a selection option are displayed in a length up to 18 bytes long (scrollable up to 45 bytes). If you define a length longer than 45, fields are truncated on the selection screen after the 45th character. This affects the first line of the SELECT-OPTIONS table. You can, however, use SUBMIT to pass longer selection options to a report if they are specified with the addition NO-DISPLAY and thus do not appear on the selection screen. Without NO-DISPLAY, the fields are then truncated whenever the selection screen is processed in the background ( SUBMIT without VIA SELECTION-SCREEN).
regards, -
F4 help for PO number field with SELECT OPTIONS
Hi all,
I have a field (PO no) using SELECT OPTIONS on my selection screen.I need F4 help for this field.How shud i declare it?
I have declared it as follows:
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
select-options sel_po for ZPO_LOI-zobject_id obligatory .
SELECTION-SCREEN END OF BLOCK b1.
ZPO_LOI is a table view with a z data element ZOBJECT_ID to which i have attached a search help which displays the required values for the PO field in the selection screen.But now the problem is i cant see the F4 icon for the field on the sel screen.
Please help.Hi I have a sapmle code for this.
*& AT SELECTION SCREEN ON VALUE REQUEST
*-- F4 help for IDOC numbers
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_docnum-low.
PERFORM value_request_status USING 'S_DOCNUM-LOW'.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_docnum-high.
PERFORM value_request_status USING 'S_DOCNUM-HIGH'.
*& Form value_request_status
text
-->fp_field dynpro field that gets the return value
FORM value_request_status USING fp_field TYPE dynfnam.
STATICS tl_values TYPE STANDARD TABLE OF tp_value.
IF tl_values IS INITIAL.
SELECT docnum FROM edidc UP TO 500 ROWS INTO TABLE tl_values
WHERE credat IN s_credat
AND cretim IN s_cretim.
IF sy-subrc eq 0.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'DOCNUM'
dynpprog = syst-repid
dynpnr = syst-dynnr
dynprofield = fp_field
value_org = 'S'
TABLES
value_tab = tl_values
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc IS NOT INITIAL.
MESSAGE i999(zz) WITH 'No values found'(004).
ENDIF.
ENDIF.
ENDIF.
ENDFORM. " value_request_status
Regards,
Amit. -
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 -
Comparing field with select-option
HI
i have one slect option
s_bukrs for coas-bukrs.
and
loop..
if w_bukrs eq s_bukrs"here is the problem,w_bukrs is
"holding single value and s_bukrs a range,so in such
"case how i can do comaprison
endif.
endloopHi Sanju,
Just use IN as said..
if w_bukrs <b>IN</b> s_bukrs
in case you want to compare a single value use..
if w_bukrs <b>EQ</b> s_bukrs-low or
if w_bukrs <b>EQ</b> s_bukrs-high
regards
satesh -
How to declare and work with select-option in screen painter?
hello there,
can anybody plz suggest me ,how to declare and work with select-option in screen painter?
neonHi Blue,
Please check these threads which will help you a lot..
module pool programming " to add selection-option on screen"
Re: Select option in Dialog program screen
Re: SELECT-OPTIONS in Screen
Good luck
Narin -
Select Options in custom controller
Hi,
Any one please let me know how to put select options on custom container. I need to display select options based on the input a tree and a report should be displayed in the same screen along with input screen.
So I planned object oriented program to split screen to display tree and report. and again I split left side container to 2 containers. Now I want put the selection screen on left top container.
Please help.
ChandraWhat you can do is the following:
Define a Container Object on one side of the screen to place the ALV Tree, and a Subscreen area on the other side, so you can place your select-options right there:
You can define the select-options this way:
SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
SELECT-OPTIONS : s_ebeln FOR ekko-ebeln ,
s_ebelp FOR ekpo-ebelp .
SELECTION-SCREEN END OF SCREEN 100 .
And then in the flow logic of your dynpro, assign this selection screen to your subscreen area. (Called SUB1 in this case)
call subscreen sub1 including sy-repid '0100'.
Regards -
Mulitple selection with select option on subscreen
Hi colleagues,
I've the following issue:
I'm programming a dynpro this dynpro contains two subscreens. The lower subscreen will contain another dynpro defined as subscreen with an ALV to display results.
The top subscreen (0150) area will be filled with a generated subscreen with the command
SELECTION-SCREEN BEGIN OF SCREEN 0150 AS SUBSCREEN.
with select options I define my selection area like:
SELECT-OPTIONS: sa_6 FOR gs_rp_attrib_sel-sonr.
If I call my transaction starting up the dynpro containing the two subscreens the result looks quit how I expect it. BUT then I try to start up the multiply selection Pop-UP for the selection field by pressing the button just right behind the HIGH input field, nothing happens. The multiply selection pop-up basicly does not show up.
Any clues what I need to add that it will show up?
Does the mulitply selection not work with
SELECTION-SCREEN BEGIN OF SCREEN 0150 <b>AS SUBSCREEN</b>???
(If I do a simple test program with a selection screen not being a subscreen, the multiply select popup comes up.)Hi,
A subscreen cannot call another screen.
I guess this is the reason why u are facing this problem.
Thanks,
Rashmi. -
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. -
Issue with Select options in select statement - ABAP Question
Hi
I am facing an issue with select options. Select statement is returning sy-subrc as 4.
I wrote the program as below:
SELECT-OPTIONS:
s_kunnr FOR bsad-kunnr,
s_lifnr FOR bsak-lifnr,
s_gjahr FOR bsad-gjahr,
s_bukrs FOR bsad-bukrs,
s_saknr FOR bsad-saknr,
s_budat FOR bsak-budat.
In start of selection I have written the select statement as
SELECT * FROM bsak INTO TABLE lt_bsak
WHERE bukrs IN s_bukrs AND lifnr = s_lifnr AND gjahr IN s_gjahr AND budat IN s_budat AND saknr IN s_saknr.
In selection screen I have not entered any values and executed the program. I am not getting any result. When I debug that, sy-subrc is 4 at above select statement. But table has records.
If am removing the "lifnr = s_lifnr " condition in select then select is returning values.
I am not getting where I made the mistake. Please suggest.
Thank you
HanuHi,
The problem here with where condition select option lifnr = s_lifnr.
Use below select query.
SELECT * FROM bsak INTO TABLE lt_bsak
WHERE bukrs IN s_bukrs
AND lifnr IN s_lifnr
AND gjahr IN s_gjahr
AND budat IN s_budat
AND saknr IN s_saknr.
s_lifnr is a select option and you are passing it as parameter lifnr = s_lifnr.
if you want to pass this s_lifnr as single vale then pass in below mentioned way.
lifnr = s_lifnr-low
BR,
Vijay -
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 -
Dear Experts,
I used component wdr_select_options to achieve select options functionality, But it displaying only one field as per my requirement user expecting both low & high fields.
Can you guide for 5 select options whether i have use t times the component at my component level.
And also could please guide me how to use select options at code level.
Thanks & Regards,
Siva Mandapudi.
Edited by: SIVAMANDAPUDI on Jul 18, 2011 6:39 PMHi Saravan,
Please find below details.
The exception is:
The exception, which is assigned to class 'CX_SY_REF_IS_INITIAL', was not
caught in
procedure "ONACTIONSEARCH_SUPPLIER" "(METHOD)", nor was it propagated by a
RAISING clause.
code:
DATA FOR WORKING WITH SELECT OPTIONS
data: rt_SUPPLIERNO type ref to data.
data: rt_SUPPLIERNAME type ref to data.
field-symbols: <fs_SUPPLIERNO> type table,
<fs_SUPPLIERNAME> type table.
TYPES: BEGIN OF T_SUPPLIERNO,
SIGN(1),
OPTION(2),
LOW TYPE /SAPAPO/LOC,
HIGH TYPE /SAPAPO/LOC,
END OF T_SUPPLIERNO.
TYPES: BEGIN OF T_SUPPLIERNAME,
SIGN(1),
OPTION(2),
LOW TYPE /SAPAPO/LOC_DESCR40,
HIGH TYPE /SAPAPO/LOC_DESCR40,
END OF T_SUPPLIERNAME.
DATA: WA_SUPPLIERNO TYPE T_SUPPLIERNO, IT_SUPPLIERNO TYPE TABLE OF T_SUPPLIERNO,
WA_SUPPLIERNAME TYPE T_SUPPLIERNAME, IT_SUPPLIERNAME TYPE TABLE OF T_SUPPLIERNAME.
Retrieve the data from the select option
rt_SUPPLIERNO = wd_this->m_handler->get_range_table_of_sel_field(
i_id = 'ID_SNO' ).
dump raising when get_range_table_of_sel_field is called.
Thanks a lot.
Regards
Siva Mandapudi. -
Multiple records with select option
i have to use select option in selection screen, which wl take the multiple values but that select option wont act as a range, the select option is a session name from sm35, the table from where data is retrieved is APQI, i have used a parameter before using select option ,like:
selection-screen begin of line.
parameters: P_grpid like apqi-groupid.
select-options: s_grpid like apqi-groupid.
selection-screen end of line.
AT-SELECTION SCREEN ON VALUE REQUEST FOR p-GRPID. " previous situation
{the code starts
FM F4 selection is called}
AT-SELECTION SCREEN ON VALUE REQUEST FOR S_GRPID-low. " CURRENT situation
FM F4 selection is called}
now when i give data in slection screen for s_grpid-low then it works as a parametr, but it doesnt take multiple values at s_grpid when i have alos mentioned the same for s_grpid-high.
Please tell me how to achive multiple records with select option, or u can also send a sample code if you have..
Thanks
SwarnaliHello Swarnali,
You need to fill internal table of select-option once you got into the event AT SELECTION-SCREEN ON VALUE REQUEST FOR so_carr-LOW.
so sudo code will be:
AT SELECTION-SCREEN ON VALUE REQUEST FOR so_carr-LOW.
Select data from table.
so_carr-LOW = value
append so_carr.
You can also use NO INTERVAL to suppress the so_carr-HIGH value on selection screen.
Thanks,
Augustin.
Maybe you are looking for
-
Error while testing the Webservice created from RFC enabled function module
Our client has provided the SAP WSDL URL and We tried to generate stub using AXIS 2 tool from this SAP WSDL URL and got u201Cservice and binding tagu201D missing error. It seems that clients SAP wsdl file is having only web service interface informat
-
How to connect cuts in final cut pro
I would like to re-connect cuts that I have made in my project, how do I go about doing that? TIA D
-
Applying password to an external HardDrive - possible?
Hi I use a Lacie 250 external HardDrive to backup my files and such. Is there anyway I can apply a password to this drive so that when I plug it to a computer I have to enter a password before I can access the files? I have turned off the auto log-on
-
Source system settings to transfer data from GTS system to BI
Hi Friends, I am trying to trnasfer data from GTS system to BI through the BCT datasources 0SLL_CD_1; 0SLL_CD_2 & 0SLL_CD_3. I am getting an error ""No document type for transmitting data into BW - Message no. /SAPSLL/CORE503". Could you please tell
-
Today, wehn I switched ON my mobile, it took longer than usual but when it finally loaded it gave this: 'System Error'. The device works fine though. Firstly, somebody help me by explaining what that is and why did it occur. Secondly, how can I corre