OVS Help in Select Options-Text to be Shown and Code to be captured
Hello Experts,
I am using Select options in web dynpro abap.
On a particular View container i have added a selection field using ADD_SELECTION_FIELD which has an OVS help to it.
The selection field is of type CODE.
And on click of a button i am reading the select option fields using GET_RANGE_TABLE_OF_SEL_FIELD and assigining this to a
field symbol which inturn is being set to an attribute.
My requirement is to show the TEXT to the user and send the CODE to the method which is called
when the button is clicked and a table is populated.
Normally we can keep two attributes one for TEXT and the other for CODE but for Select options i am not very sure how this can be achieved.
Because in select options we are reading the values present on the select option field and there may be multiple values.
Please guide me through this.
Thanks in Advance,
Shravan
Hello Shravan,
This can be easily achieved if you convert the selection field to dropdown.
Create a valueset containing the list of valid values and then pass this to the ADD_SELECTION_FIELD method
"Creating valueset
DATA lt_valueset TYPE wdy_key_value_table.
DATA ls_valueset LIKE LINE OF lt_valueset.
ls_valueset-key = 'EN'.
ls_valueset-value = 'English'.
APPEND ls_valueset TO lt_valueset.
"Creating selection field as Dropdown
lr_helper->add_selection_field( i_id = <ID>
it_result = lt_range
i_as_dropdown = abap_true
it_value_set = lt_valueset ).
BR, Saravanan
Similar Messages
-
Applying stadard search help to SELECT-OPTIONS
applying stadard search help to SELECT-OPTIONS
i have the below code in the selection screen:
SELECT-OPTIONS : so_stain FOR gv_stai1
MATCHCODE OBJECT ZSTA,
so_staex FOR gv_stai1
MATCHCODE OBJECT ZSTA.
where ZSTA is the search help defined in the data dictionary which is the copy on standard SAP search help..
but this is not working..:( when i run the program and click on the
F4 help for these two fields i get no out put..
can any one suggest me to search help to select-options..Hi,
u can see this example code for f4 help on the select-option,
DATA: li_ret_tab TYPE STANDARD TABLE OF ddshretval,
lws_retfield TYPE dfies-fieldname.
DATA : wa_ret_tab LIKE LINE OF li_ret_tab.
**- Get the device numbers
SELECT serge FROM equi
INTO TABLE i_help1
WHERE sparte EQ c_51.
IF sy-subrc EQ 0.
lws_retfield = text-030.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = s_device
dynpprog = sy-repid
dynpnr = c_dynpnr
dynprofield = s_device
value_org = 'S'
TABLES
value_tab = i_help1
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
ENDIF.
ENDIF.
Regards,
kk. -
How to created Freely Programmed F4 help in Select Options
hi,all
I have a probelm about how to created a Freely Programmed F4 help in Select Options,and put help value into select options field
Thanks and Best RegardsHi Haung,
You need to use FREE_HELP not the component name.
Modify you code as below:
LT_RANGE_TABLE_V = wd_this->m_handler_V->create_range_table( 'ZCYPHDATE' ).
wd_this->M_HANDLER_V->add_selection_field(
i_id = 'ZCYPHDATE'
it_result = LT_RANGE_TABLE_V
i_value_help_type = if_wd_value_help_handler=>CO_PREFIX_APPLDEV
i_value_help_id = 'FREE_HELP'
i_no_intervals = abap_false ).
Hope this helps you.
Regards,
Rama -
Can i assign a collective srch help for select option in list display
can i assign a collective srch help for select option in list display
Hi,
Yes ,u can assign a collective search help for select-option in list display.
Eg:
Define your select option like this
SELECT-OPTIONS: s_vbeln FOR likp-vbeln MATCHCODE OBJECT vmva.
Regards,
Shiva. -
How to get calender in f4 help for select options in module pool (URGENT)
Hi All,
how to get calender in f4 help for select options in module pool
Please help .
Thanx in advance,
amrutaHi Amruta,
First of all, you can not create select-options directly in module pool.
For creating <b>select-option is dialog prog</b> follow these steps:
1. create your selection screen model as subscreen by:
SELECTION-SCREEN BEGIN OF SCREEN 2000 AS SUBSCREEN.
PARAMETRS: P_MATNR LIKE MARA-MATNR.
SELECT-OPTIONS: S_BISMAT FOR MARA-BISMAT.
SELECTION-SCREEN END OF SCREEN 2000.
2. create a screen ( example 100 ) in your module-pool dedicated for selection-screen. on this screen layout sketch a sub-screen name like subscree_2000.
3. write this bit of code in PBO and PAI of the screen 100;
CALL SUBSCREEN SUBSCREEN_2000.
4. include this code in PBO:
INCLUDING SY-REPID '2000'
6. write user_command of PAI, call screen which is going to executable after selection-screen.
5. create a transcation for this dialog module pool with screen 100.
6. execute this transaction and you can see it's behaving like cool with select-options.
After that in [bprocee on value-request]</b>, use F4_DATE for both from and to option field.
Hope it will solve the problem.
Regards
Krishnendu -
F4 help for select options based on parameter value
hi all,
I need a help to create an F4 help for select options for object id based on parameter value of object type, I mean once an object type is given the f4 help should contain object id's only of that type for each option.
Regard's,
Girija
Moderator Message : Duplicate post locked. Continue with [f4 help for select options based on parameter value |f4 help for select options based on parameter value;.
Edited by: Vinod Kumar on May 17, 2011 1:36 PMhi all,
I need a help to create an F4 help for select options for object id based on parameter value of object type, I mean once an object type is given the f4 help should contain object id's only of that type for each option.
Regard's,
Girija
Moderator Message : Duplicate post locked. Continue with [f4 help for select options based on parameter value |f4 help for select options based on parameter value;.
Edited by: Vinod Kumar on May 17, 2011 1:36 PM -
Freely Programed Help for select-option field
Hi,
how can i set freely programmed help for select option field, i mean while adding selection field what are the parameters that are important for freely programmed help.
i have implemented iwd_value_help in one component comp1 and declared the usage of comp1 in comp2 where i actually defined the usage of select-option component.
i used parameter i_value_help_type = if_wd_value_help_handler=>co_prefix_appldev while adding selection field, however when i presss F4 icon, the following message is coming
View WD_VALUE_HELP does not exist within the component WDR_SELECT_OPTIONS
Please suggest where i am doing wrong??
Edited by: kranthi kumar on Dec 29, 2010 6:19 PM>
kranthi kumar wrote:
> Hi,
>
> how can i set freely programmed help for select option field, i mean while adding selection field what are the parameters that are important for freely programmed help.
>
> i have implemented iwd_value_help in one component comp1 and declared the usage of comp1 in comp2 where i actually defined the usage of select-option component.
>
> i used parameter i_value_help_type = if_wd_value_help_handler=>co_prefix_appldev while adding selection field, however when i presss F4 icon, the following message is coming
>
> View WD_VALUE_HELP does not exist within the component WDR_SELECT_OPTIONS
>
> Please suggest where i am doing wrong??
>
> Edited by: kranthi kumar on Dec 29, 2010 6:19 PM
Hi Kranthi,
Please help me to understand your design.
Why would you like to create a Freely programmed value help for select-option?. why not use wdr_select_option directly ? -
Hi All,
We have created a select option for a field of our database table. This field has a value range in its domain. For Example
Fix Val Short Description
01 INR
02 US
03 EUR
When i press the f4 help of select option, am able to see both the number and the description in the F4 help. But when i select a value, it is only displaying the fixed value (01) in the select option field.
But i want the Short Description to be displayed instead of the fixed value.
Please tell me how to proceed.
Thanks in advance.Hi,
When there are any values in the domain range it considers only the fixed values (keys)
to get the description what you can do is:
1.create a your own f4 help with the field description.
2.in the select options you can give the name of F4 help when you are populating the selection field.
wd_this->m_handle->add_selection_field(
i_description = 'Candidate Profit Center'
i_id = '/MRSS/T_RMOR_PROF_CENTER'
*i_value_help_type = if_wd_value_help_handler=>co_prefix_searchhelp*
*i_value_help_id = '/MRSS/SH_RM_PC_GROUP'*
it_result = lt_range_table
i_read_only = read_only ).
Priya -
PUT OWN HELP IN SELECT-OPTIONS ( REPORTS)
HOW CAN I USE MY OWN QUERY HELP IN SELCT-OPTIONS F4 HELP
Hi,
Check this sample code and reward points if it helps.
tables kna1.
data:
begin of t_values occurs 2,
value like kna1-begru,
end of t_values,
t_return like ddshretval occurs 0 with header line.
select-options s_begru for kna1-begru.
at selection-screen on value-request for s_begru-low.
refresh t_values.
t_values = 'PAR*'.
append t_values.
t_values = 'UGG'.
append t_values.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'BEGRU'
value_org = 'S'
tables
value_tab = t_values
return_tab = t_return
exceptions
parameter_error = 1
no_values_found = 2
others = 3.
if sy-subrc = 0.
read table t_return index 1.
s_begru-low = t_return-fieldval.
endif. -
Problem on Search Help for select-option
Hi,
Iam working on a search help for select-option,
is there a way to incorporate select-all or multiple
selection on this?
Thanks!Hi catherine,
1. Just copy paste this program.
(It will POPULATE the SELECT-OPTION,
based upon
MULTIPLE Selection,
selected by the user,
in the help provided thru F4IF_INT_TABLE_VALUE_REQUEST.)
2. Eg. is for BUKRS (company code)
3.
REPORT ABC.
TABLES : T001.
DATA : ITAB LIKE TABLE OF T001 WITH HEADER LINE.
DATA : RETURN LIKE TABLE OF DDSHRETVAL WITH HEADER LINE.
SELECT-OPTIONS : BUKRS FOR T001-BUKRS.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR BUKRS-LOW.
PERFORM MYPOPULATE.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR BUKRS-HIGH.
PERFORM MYPOPULATE.
FORM MYPOPULATE.
REFRESH ITAB.
SELECT * FROM T001 INTO TABLE ITAB.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'BUKRS'
dynprofield = 'BUKRS'
dynpprog = sy-REPID
dynpnr = sy-dynnr
multiple_choice = 'X'
value_org = 'S'
TABLES
value_tab = ITAB
return_tab = return.
IF RETURN[] IS NOT INITIAL.
REFRESH BUKRS.
CLEAR BUKRS.
LOOP AT RETURN.
BUKRS-SIGN = 'I'.
BUKRS-OPTION = 'EQ'.
BUKRS-LOW = RETURN-FIELDVAL.
BUKRS-HIGH = RETURN-FIELDVAL.
APPEND BUKRS.
ENDLOOP.
ENDIF.
ENDFORM.
regards,
amit m. -
F4 Help for select-options.
Hi Experts,
I need to use F4 help for a select - options field from a particular table.I have written the below code and it worked well.
FORM sub_show_help.
SELECT bukrs
FROM zfica_accurate
INTO TABLE gt_accurate.
delete ADJACENT DUPLICATES FROM gt_accurate.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'BUKRS'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'S_CMCODE'
window_title = 'COMPANY CODE'
value_org = 'S'
multiple_choice = 'X'
TABLES
value_tab = gt_accurate
return_tab = gt_return.
s_cmcode-sign = 'I'.
s_cmcode-option = 'EQ'.
LOOP AT gt_return INTO gw_return .
s_cmcode-low = gw_return-fieldval.
APPEND s_cmcode.
ENDLOOP.
READ TABLE s_cmcode INDEX 1.
IF sy-subrc = 0.
gw_dynpread-fieldname = text-018.
gw_dynpread-fieldvalue = s_cmcode-low.
APPEND gw_dynpread TO gt_dynpread.
UPDATE THE SCREEN FIELD VALUES
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = sy-repid
dynumb = sy-dynnr
TABLES
dynpfields = gt_dynpread
EXCEPTIONS
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
undefind_error = 7
OTHERS = 8.
ENDIF.
IF sy-subrc <> 0.
MESSAGE i003.
ENDIF.
The problem is , I need to create a new type for s_cmcode(select-option ) field with the same structure as the select-option and the code is as below. I have created an internal table gt_sfield similar to s_cmcode . I have replaced s_cmcode with gt_sfield but the below code is not working. Its the same as the above program but its not showing up the values in the field.Could anyone please help me.
fORM SUB_SHOW_HELP.
SELECT BUKRS
FROM ZFICA_ACCURATE
INTO TABLE GT_ACCURATE.
gt_sfield[] = s_cmcode[].
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'BUKRS'
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
WINDOW_TITLE = 'COMPANY CODE'
VALUE_ORG = 'S'
MULTIPLE_CHOICE = 'X'
TABLES
VALUE_TAB = GT_ACCURATE
RETURN_TAB = GT_RETURN.
LOOP AT GT_RETURN INTO gw_return.
gw_sfield-SIGN = 'I'.
gw_sfield-OPTION = 'EQ'.
MOve gw_return-fieldval to gw_sfield-low.
APPEND gw_sfield to gt_sfield.
ENDLOOP.
READ TABLE gt_sfield INDEX 1 INTO gw_sfield .
IF SY-SUBRC = 0.
gw_dynpread-fieldname = 'S_CMCODE'.
move gw_sfield-low to gw_dynpread-fieldvalue.
APPEND GW_DYNPREAD TO GT_DYNPREAD.
UPDATE THE SCREEN FIELD VALUES
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
DYNAME = SY-REPID
DYNUMB = SY-DYNNR
TABLES
DYNPFIELDS = GT_DYNPREAD
EXCEPTIONS
INVALID_ABAPWORKAREA = 1
INVALID_DYNPROFIELD = 2
INVALID_DYNPRONAME = 3
INVALID_DYNPRONUMMER = 4
INVALID_REQUEST = 5
NO_FIELDDESCRIPTION = 6
UNDEFIND_ERROR = 7
OTHERS = 8.
ENDIF.
IF SY-SUBRC <> 0.
MESSAGE I003.
ENDIF.
ENDFORM.Hi,
The fucntion module 'DYNP_VALUES_UPDATE' should be used only for updating the screen field values. In your case you are updating the internal table using this function module.
Thanks
Pavan -
Problem in filling f4 help in select option !!!!
Hi,
I have created a f4 help in the select option.... in 'AT-SELECTION-SCREEN ON VALUE REQUEST FOR <field name>.
But when i select a value in the single value of select-option and hit the F8(copy) button an extra value is duplicated !!!
I am sure that I have filled the select-option properly and also cleared work-area properly......
What can be the possible cause for this ?
Thanks & Regards
Akashname = 'p_desig1'.
value-key = '01'.
value-text = 'Vice Chairman and Managing Director'.
append value to list.
value-key = '02'.
value-text = 'Chief Financial Officer'.
append value to list.
call function 'VRM_SET_VALUES'
exporting
id = name
values = list.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(25) text-dg1.
SELECTION-SCREEN POSITION 33.
parameters: p_desig1(40) type c as listbox visible length 40.
SELECTION-SCREEN END OF LINE.
*/ End
Regards
Anbu B -
Search help for select options
Hi,
I want to give search help for a field on selection screen based on value in another field in same selection screen. I am using DYNP_VALUES_READ function module to retain the values and F4IF_INT_TABLE_VALUE_REQUEST function module to give search help and it works fine, but when i give multiple selections i am not able to read the values. Please help. Points will be rewarded.Hi,
Check the below code.
tables: t001k.
For Identification Number
DATA: BEGIN OF it_bwkey OCCURS 0,
bwkey LIKE t001k-bwkey,
END OF it_bwkey.
data: v_bukrs(4).
For Run date
DATA: BEGIN OF it_bukrs OCCURS 0,
bukrs LIKE t001k-bukrs,
END OF it_bukrs.
DATA it_ret LIKE ddshretval OCCURS 0 WITH HEADER LINE.
SELECTION-SCREEN: BEGIN OF BLOCK main WITH FRAME TITLE text-001.
SELECTION-SCREEN SKIP.
PARAMETERS: p_bukrs(4) TYPE c.
SELECT-OPTIONS s_bwkey FOR t001k-bwkey NO INTERVALS.
SELECTION-SCREEN END OF BLOCK main.
Validation Section
INITIALIZATION.
SELECT DISTINCT bukrs FROM t001k INTO TABLE it_bukrs.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_bukrs.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'BUKRS'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'P_BUKRS'
value_org = 'S'
TABLES
value_tab = it_bukrs
EXCEPTIONS
parameter_error = 1
no_values_found = 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.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_bwkey-low.
TABLES: t130r.
DATA: BEGIN OF dynpfields OCCURS 0. "Hilfsstruktur zum auslesen des
INCLUDE STRUCTURE dynpread. "Feldwertes vom Dynpro bei >F4<
DATA: END OF dynpfields.
DATA : sy_repid LIKE sy-repid,
sy_dynnr LIKE sy-dynnr.
CLEAR dynpfields.
REFRESH dynpfields.
dynpfields-fieldname = 'P_BUKRS'.
APPEND dynpfields.
Lesen des akt. Wertes von Dynpro
sy_repid = sy-repid.
sy_dynnr = sy-dynnr.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = sy_repid
dynumb = sy_dynnr
TABLES
dynpfields = dynpfields
EXCEPTIONS
OTHERS = 01.
IF sy-subrc = 0.
READ TABLE dynpfields WITH KEY fieldname = 'P_BUKRS'.
IF sy-subrc = 0.
v_bukrs = dynpfields-fieldvalue.
ENDIF.
ENDIF.
SELECT bwkey FROM t001k
INTO TABLE it_bwkey
WHERE bukrs = v_bukrs.
DELETE ADJACENT DUPLICATES FROM it_bwkey.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'BWKEY'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'S_BWKEY'
value_org = 'S'
TABLES
value_tab = it_bwkey
EXCEPTIONS
parameter_error = 1
no_values_found = 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. -
Help on select options.
Hi gurus!!
I have a report where in i am putting the values in select-options. but yj eproblem i have is when i am not putting any values i am getting the correct output.
but with the same data i am putting the values in low or high i am not getting any data..
so i think i need to put all the entrioes of the select option in an internal table or ranges i dont know and then we give some code like
ranges : ra_stotal for ztsd120-zlow.
ra_stotal-sign = 'I'.
ra_stotal-option = 'BT'.
ra_stotal-low = zlow-low.
ra_stotal-high = zlow-high.
append ra_stotal.
clear ra_stotal.
Can anyone tell me if this is what i got to do if so how?
or is there some other way out?Hi Mona,
Please check the below code in BOLD letter....
I guess you are having a problem in SELECT-OPTIONS because ...might be u r using EQ in where condition of your select query. Whenever u r using SELECT-OPTIONS, it should be "IN" in the where condition.
Eg:- SELECT <field names>
FROM MARA
INTO TABLE <it_tablename>
WHERE matnr IN s_matnr.
Reward points for helpful answers.
Regards,
HK. -
Can I change the select option text for pnp ldb ?
hi Akll,
I am using a pnp logical database in my report and I have created my own hr category because i wanted to use field ename from the ldb in the selection screen. Now the problem with ename is I cant do a case sensitive search.
So I have replaced it with sname, so now my screen has sname instead of ename, however I want to change the selection text for select option ( at present it is 'EE name can be sorted' )
Kindly advise,
thanks,
GVI guess the text cannot be changed.. anyways you can add the field as an additional field by normal coding in your report
Maybe you are looking for
-
IChat not working with Tiger user
I recently received a new Macbook with Leopard already installed on it. I have 2 friends who also own Macbooks, who I iChat with. One of my friends received her Macbook when Leopard just came out, so she had Tiger on it previously . The other friend
-
Read ONLY Permissions in Windows 2008 R2
Is it possible for users to read only but cannot save a copy to another location? Would like users to see historic photos so they can request copies but they cannot "save as" a copy to any other location on the server or on their own computer.
-
My Time Machine external hard drive is not recognised anymore under 10.9.1
Hi, I am running 10.9.1 on my MBP13" mid 2010. I plugged in my external hard drive (Western Digital Elements 500GB portable drive) and it is no longer recognised. This has been going on for a couple of weeks. TM says its not connected. Icon not on de
-
Using variable name for target dir in OdiExportMaster tool
Hi I am using OdiExportMaster tool to export master repo on daily basis as backup. But for the target directory option in the tool, I am not able to use a variable (variable fetches the directory path from a pl/sql table). Please provide a solution f
-
JTable: Custom cell renderer on T(row, col)
Sorry if this was posted before, but the whole Search function doesn't seem to work these days (hasn't been working for a week now). Anyways: I know how to create custom cell renderers. My problem lies with which cells I want to apply that cell rende