On value request in select-options in a repot URGENT
Hi all,
my requirement is to provide on value request in select-options
in selection screen Gsdpr user one select-option is there
For GSDPR User field, provide F4 help. Users list can be selected from ZWF_UPI table where WF_UPI_TYPE is HR. From the table, select UPI Number and employee full name fields
in ZWF_UPI table the key fields are UPI and WF_UPI_TYPE
non key field is emp_full_name.
please send me the code .
regards
Nagendra
Hi,
I do not have sample code , But you have to use the function module
F4IF_INT_TABLE_VALUE_REQUEST on the AT-SELECTION-SCREEN ON VALUE REUQEST FOR S_OPTION-LOW event
Select Data as per the requirement into Value table of the Function module
Return the Data fro the Return table of the function module.
The good choice will be Go to SE37-> Type this FM F4IF_INT_TABLE_VALUE_REQUEST and look for Where used list-> Programs . There u will get the list of programs used this FM
Regards
Pavan
Similar Messages
-
Clearing the displayed value for a SELECT-OPTION
How do I clear the displayed value of a SELECT-OPTION?
I have 2 SELECT-OPTIONs on my screen (standard basic report program screen). I use code like this to populate the drop-down boxes for each one.
=====
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_prgrp-low.
PERFORM fill_prgrp_values.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_prctr-low.
PERFORM fill_prctr_values.
=====
The value the user picks for the first SELECT-OPTION will affect what values I put in the drop-down list for the second SELECT-OPTION.
If a user enters a value for the second SELECT-OPTION, and then goes back and changes the value of the first SELECT-OPTION, then I want to do two things:
1. Create a new set of values for the drop-down list for the second SELECT-OPTION (no problem; working fine);
2. Clear the displayed value from the second SELECT-OPTION that the user entered previously. That value became invalid when the user picked a new value for the first SELECT-OPTION.
How do I clear that second displayed value?
I have tried CLEAR and REFRESH for the second variable using the formats s_prctr, s_prctr[], and s_prctr-low. They will erase the values of the internal table or part(s) of it, but the displayed value stays on the screen.
I need to clear out the displayed value so the user will either leave it blank or enter or select a new value.
I am using F4IF_INT_TABLE_VALUE_REQUEST to build the drop-down lists, and it works fine, but I do not see any function module to clear the displayed value off the screen.
Thanks for your help.Sorry, but calling DYNP_VALUES_UPDATE did not work. This is how I coded it.
fld_reset_rcd-fieldname = 'S_PRCTR'.
fld_reset_rcd-stepl = sy-stepl.
CLEAR fld_reset_rcd-fieldvalue. " re-initialize s_prctr
CLEAR fld_reset_rcd-fieldinp. " what goes in here?
APPEND fld_reset_rcd TO fld_reset_tbl.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = 'ZFI_GL_BALANCE_NGL'
dynumb = '1000'
TABLES
dynpfields = fld_reset_tbl
<Added code tags>
I have discovered that CLEAR and REFRESH of s_prctr will clear it somewhat. If I enter multiple values, ranges, etc., they will all be cleared, EXCEPT for the one single value that is displayed on the main screen. It is not cleared and it remains if you push the button to display the pop-up to enter ranges, etc.
To devrath.sampat -- Thanks for your example for building the drop-down list, but that is not the problem I am having. I am already able to build it just fine.
To repeat my problem, if I:
1. first enter / select a value for the first SELECT-OPTION s_prgrp
2. then enter / select a value for the second SELECT-OPTION s_prctr
3. And finally go back and select a new value of the first SELECT-OPTION s_prgrp from its drop-down list,
when I do, the program needs to clear the value displayed on the main screen for the second SELECT-OPTION s_prctr (any additional values, ranges, etc., are cleared by CLEAR and REFRESH, if I go look; but not the value shown on the main screen).
Edited by: Scott Crosby on Feb 14, 2012 4:20 PM
Edited by: Suhas Saha on Feb 15, 2012 12:03 PM -
How to get all the values in the Select-option.
Hi,
I got the select-option field so_week, for eg. If I give 200923 to 200926 (year and week) in the selection screen and then I need to pass this value (200923) to the FM 'ZWEEK_GET_FIRST_DAY' to get the first day of the week.
My question is how can i get all the values from the select option, (i.e) i need to get 200923, 200924,200925, 200926.
Regards,
Anbu.Hello,
I will prefer Max's solution. But just for the sake of this req.
i need to get 200923, 200924,200925, 200926
i am proposing my soln:
DATA: V_WEEK TYPE RSCALWEEK.
SELECT-OPTIONS: S_WEEK FOR V_WEEK NO-EXTENSION OBLIGATORY.
AT SELECTION-SCREEN.
DATA:
V_COUNT TYPE I,
V_ADD TYPE I,
RT_WEEK TYPE RANGE OF RSCALWEEK,
RS_WEEK LIKE LINE OF RT_WEEK.
V_COUNT = ( S_WEEK-HIGH - S_WEEK-LOW ) + 1.
DO V_COUNT TIMES.
RS_WEEK-SIGN = 'I'.
RS_WEEK-OPTION = 'EQ'.
RS_WEEK-LOW = S_WEEK-LOW + V_ADD.
APPEND RS_WEEK TO RT_WEEK. "RT_WEEK--> Will contain the week values
CLEAR RS_WEEK.
V_ADD = V_ADD + 1.
ENDDO.
@Max: I was stupid enough not to think of your solution. Need to leave office
Cheers,
Suhas -
Value help for select options (pass the selected values to the select opt)
Hi everyone,
I created a custom value help for my select options.
It works fine, when the user clicks on the value help, my own view is displayed, and the user can select the required values:
lt_range_table =
wd_this->m_handler->create_range_table(
i_typename = 'ORGEH' ).
* add a new field to the selection
wd_this->m_handler->add_selection_field(
i_id = 'ORGEH'
i_value_help_id = 'MYSO'
i_value_help_type = IF_WD_VALUE_HELP_HANDLER=>CO_PREFIX_APPLDEV
it_result = lt_range_table
i_read_only = read_only ).
The problem is, how can I pass the values to the select option? When the user selects the values in my view, I have them in an internal table. But how can i pass these values to the select option? I suppose there is declared method for this... but which one?
Thanks
N.Sorry for the stupid question, but it seems I can't acces my attribute:
I create it in the component controller
NODE: 'APP_DATA'
Attribute: M_HANDLER TYPE IF_WD_SELECT_OPTIONS
Cardinality 1..1
Selection 1..1
Singleton = 'X'
I pass the values int he EDOINIT method of MAIN view:
* Get compnent controller API
lo_component = wd_comp_controller->wd_get_api( ).
lo_controller ?= lo_component.
* Get the controler context node
CALL METHOD LO_CONTROLLER->GET_CONTEXT
RECEIVING
CONTEXT = lo_context.
*Get the root node
lo_node = lo_context->root_node.
*Get the child node
lo_child = lo_node->get_child_node( 'APP_DATA' ).
ls_app_data-m_handler = wd_this->m_handler.
lo_child->bind_structure( ls_app_data ).
After this code I test it if the binding is correct:
DATA: ls_test TYPE wd_comp_controller->element_app_data.
CALL METHOD LO_CHILD->GET_STATIC_ATTRIBUTES
IMPORTING
STATIC_ATTRIBUTES = ls_test.
The lstest is correct_. It has the reference for the SelectOption
Now, in the SEL_TREE View:
* Get compnent controller API
lo_component = wd_comp_controller->wd_get_api( ).
lo_controller ?= lo_component.
* Get the controler context node
CALL METHOD LO_CONTROLLER->GET_CONTEXT
RECEIVING
CONTEXT = lo_context.
*Get the root node
lo_node = lo_context->root_node.
*Get the child node
lo_child = lo_node->get_child_node( 'APP_DATA' ).
*Get the data from the node
CALL METHOD LO_CHILD->GET_STATIC_ATTRIBUTES
IMPORTING
STATIC_ATTRIBUTES = ls_app_data.
wd_this->m_handler = ls_app_data-m_handler.
The ls_app_data-m_handler is INITIAL. There is no value in it.
What did I do wrongly?
Please help
Thanks
N. -
Problem using At Selection Screen on value request for *"Select Fieldname"*
Hi All,
I Have a requirement of passing mutiple paraters value or selection option values in selection screen.
For Eg :I Have -
*--- Selection Screen
Select-options : s1 for vbak-vbeln ,
s2 for vbap-posnr.
*--- At Selection Screen
At Selection Screen on value request for s1-low.
i need to pass S1-low as well as S2-low ...
i.e first item of the Sales Document.
Value is getting passed in S1-low but not in S2-low
Can anybody help me on this ...
Thanks in Advance ..Hi,
Make use of the FM "F4IF_INT_TABLE_VALUE_REQUEST" for the value request for the first field.
Use the "FIELD_MAPPING" in the tables parameter of the above FM.
Please go through the FM documentation.
Hope this will help you.
Regards,
Smart Varghese -
Need of F4 help in single values section of select options
I need to select more than one file as input from application server.
For this i used a select option field(with multiple option) and i provided F4 help by using the function module /SAPDMC/LSM_F4_SERVER_FILE in at selection screen value request.
Here I can get the F4 help for Ranges but not for single values.Hai Albert
Check the following Code
TABLES : MARD.
DATA: BEGIN OF IT_MARD OCCURS 0,
WERKS LIKE MARD-WERKS,
END OF IT_MARD.
DATA : T_RETURN TYPE STANDARD TABLE OF DDSHRETVAL WITH HEADER LINE.
parameters : P_WERKS LIKE MARD-WERKS.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_WERKS.
SELECT WERKS FROM MARD UP TO 10 ROWS INTO table IT_MARD.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'WERKS'
DYNPPROG = SY-REPID
DYNPNR = '1000'
DYNPROFIELD = 'P_WERKS'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = IT_MARD
RETURN_TAB = T_RETURN
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
Thanks & regards
Sreenivasulu P -
Result of the query is not filtered as value given in Select Option variabl
Hello ,
A Select option Variable is created on Navigational Attribute( ZINV_PROG) of 0WBS_ELEMT.
The Compound Key for object ZINV_PROG(Investment program) is APPR_YEAR( Approval Year)
This ZINV_PROG object does not bear Master data.
The values in the field get populated as you load Master data of 0WBS_ELEMT.
The values for this objects is as shown below:
APPR_YEAR ZINVPROG
2005 ESCCCAPS
2007 ESCCCAPS
2008 FIRE
2006 CAPITAL
A select option variable is craeted on this Navigational attribute.
When you execute the query , On the selection screen of the query..
If you provide i/p for Investment programm field as 2007 ESCCCAPS, the data should ideally be filtered for this values only.
But the result of the query shows data for both values 2005 ESCCCAPS and as well as for 2007ESCCCAPS.
Let me know how to sort this issue.
Points will be assigned for the correct and helpfull answere.
Thanks,Thanks Srini for your prompt explanation.
My Question is if Approval year is a compounded key of ZINV_PROG object why data would not get filter out directly.
I mean on the screen for this particualr variable i take help - F4 to see values there you are able to see all the values of Investment programm along with the apprroval year.
If i select value as 2005 ESCCCAPS from the help F4 screen then ideally data should be fileterd out for this particular value. But it is not happening so.
Is that so in Query desgining that if you creating a variable on Nav Attribute, and that particular Nav attribute has a compound key then if you want to filter out the data for this Nav attribute correctly you would also require to create a variable for Compound key also.
Please let me know
Thanks -
Adding default value for a select-options in a selection-screen
hello gurus,
i have a report program with the following select-options in a selection-screen block:
select-options: so_site for MyTable-werks.
i want the so_site to have a default value once the program displays. can it be possible?
regards,
sidHi sid,
1. Whenever we use select-option,
an internal table of type range is
automatically created.
2. so, in fact, we have to put
record in this internal table.
3. eg. Just copy paste in new program.
4.
report abc.
tables : t001.
select-options : bukrs for t001-bukrs.
initialization.
bukrs-sign = 'I'.
bukrs-option = 'EQ'.
bukrs-low = '1000'.
append bukrs.
regards,
amit m. -
Personalised Value Help in Select-Option field WD ABAP
Hi
I would like to know how I could provide the user with generic value help. I am using the Select Options in a Web Dynpro(ABAP) Application.
Regards
FaaiezHi
The key word here is "generic value help". This means the values that I want to fill the drop down with changes all the time based on various criteria. I need to fill the help values within the ABAP code based on the values in internal tables.
Regards
Faaiez -
Value help for select-option not filling selection field
I'm having some problems with a value help on a select-option. I've managed to get the value help displaying the correct values but for some reason can't get it to populate the selection field after I've selected a record.
I have the following call:
wd_this->m_handler->add_selection_field(
i_id = 'SHORT_D'
i_description = 'Program'
it_result = lt_range_table
i_read_only = read_only
i_value_help_type = IF_WD_VALUE_HELP_HANDLER=>CO_PREFIX_SEARCHHELP
i_value_help_id = 'ZPROGSTUDY' ).
where ZPROGSTUDY is a new search help I've set up with an exit to retrieve the values.
Any ideas ? Thanks.Hi Malcolm,
The code you have is OK. I copied your code into a test program and it worked as expected.
I used a search help where the possible values are populated in the search help exit, exactly as in your case. The only time it did not work was when read_only = X, but that is obvious also from a visual point of view since the input field is greyed out in that case. The popup also tells you is in RO mode...
Does your SHLP work when you test it from SE11? Returns values?
SAP provides a lot of WD4A sample code, see for example component WDR_TEST_SELECT_OPTIONS look for
select-option fields > special cases > input helps > Non field-specific input help using search help
Regards,
George -
Passing values to a select option through submit
hi all,
i am using the following code to submit report.
SUBMIT :rko7co88 USING SELECTION-SET 'ZTEST_PS'
WITH SELECTION-TABLE seltab
WITH perio = v_month
WITH gjahr = v_year
WITH vaart = c_1.
the table seltab is being populated as shown below.
LOOP AT i_aufnr INTO i_aufnr_wa.
seltab_wa-selname = 'AUFNR'.
seltab_wa-sign = 'I'.
seltab_wa-kind = 'S'.
seltab_wa-option = 'EQ'.
seltab_wa-low = i_aufnr_wa-aufnr.
APPEND seltab_wa TO seltab.
CLEAR seltab_wa.
ENDLOOP.
but when i run this program it gives a short dump saying program has excceded the maximum time permited.
the problem seems to be with passing table seltab to select option, because when i run the program witout that statemant "WITH SELECTION-TABLE seltab" . it works fine.
in seltab i have selected only open orders which r confirmed, when i run the program without passing seltab it takes all the orders and works fine but according to my requirement i have to run the program for only open orders.
pls suggest the way out.
thanks
pankaj sharmaHi pankaj,
1. I tried the same thing, and now its working fine.
2. I also used the extension of submit
<b> via selection-screen.</b>
to temporarily check what values are going in the screen.
3. just copy paste to get a taste of it.
4. Values 11111, 2222 will come in AUFNR.
5.
report abc.
DATA : SELTAB LIKE RSPARAMS OCCURS 0 WITH HEADER LINE.
SELTAB-SELNAME = 'AUFNR'.
SELTAB-KIND = 'S'.
SELTAB-SIGN = 'I'.
SELTAB-OPTION = 'EQ'.
SELTAB-LOW = '11111'.
APPEND SELTAB.
SELTAB-SELNAME = 'AUFNR'.
SELTAB-KIND = 'S'.
SELTAB-SIGN = 'I'.
SELTAB-OPTION = 'EQ'.
SELTAB-LOW = '222222'.
APPEND SELTAB.
submit RKO7CO88
WITH perio = '001'
WITH gjahr = '2006'
WITH vaart = '1'
WITH SELECTION-TABLE SELTAB
via selection-screen.
regards,
amit m. -
Integrate Freely Programmed Value Help in Select option WDR_SELECT_OPTION
Hello All,
I have created Freely Programmed Value Help name (ZVALUE_HELP) by using IWD_VALUE_HELP.I have develop an application(ZSELECT_OPTION) which uses the resubale component WDR_SELECT_OPTION for select option.i want search help for one of my select option input field .
i wrote the following code.
*initalise the used component
data lo_cmp_usage type ref to if_wd_component_usage.
lo_cmp_usage = wd_this->wd_cpuse_ci_serach_help( ).
if lo_cmp_usage->has_active_component( ) is initial.
lo_cmp_usage->create_component( ).
endif.
* add a new field to the selection
WD_THIS->M_HANDLER->ADD_SELECTION_FIELD(
I_ID = 'ZCI_STATUS'
IT_RESULT = LT_RANGE_TABLE
I_READ_ONLY = READ_ONLY
I_OBLIGATORY = ABAP_FALSE
I_VALUE_HELP_TYPE = IF_WD_VALUE_HELP_HANDLER=>CO_PREFIX_APPLDEV
I_VALUE_HELP_ID = 'ZVALUE_HELP'
when i execute the select option application n click on search help button i got error "Component usage ZVALUE_HELP does not exist.
Edited by: Abhilasha Dahare on Aug 3, 2011 11:10 AMhi Abhsilasha,
I think your code is some thing wrong.
you have to assign free value help like below method.
in the attribute( the select option field ) properties, you will find input help mode property, in that select 'freely programmed'.
then you willl get some more fields, there you have to provide ZVALUE_HELP
of follow reema suggestion in below link
How to integrate a Search Help in a dynamically created Select-Option?
Regards
Srinivas
Edited by: sanasrinivas on Aug 3, 2011 12:06 PM
Edited by: sanasrinivas on Aug 3, 2011 12:10 PM -
F4 Value Help in select option
Hi ,
I have created one WD component as value F4 help to use into another component's select option. I am able to use this component in the Input Field UI element by selecting free programming as input help mode and name of this component used as input help component usage . I dont know how to pass this component in select option . can any one help me please to do this functionality.
Thanks ,
AashishI have not tried them out please check it -
IN IF_WD_SELECT_OTPIONS~ADD_SELECTION_FIELD parameters list
I_VALUE_HELP_TYPE Importing Like IF_WD_VALUE_HELP_HANDLER=>CO_PREFIX_NONE
I_VALUE_HELP_ID Importing Type WDY_VALUE_HELP_ID
I_VALUE_HELP_MODE Importing Type WDY_MD_VALUE_HELP_MODE_ENUM
I_VALUE_HELP_STRUCTURE Importing Type DDOBJNAME
I_VALUE_HELP_STRUCTURE_FIELD Importing Type FIELDNAME
I_HELP_REQUEST_HANDLER Importing Type Ref To OBJECT
we have to use them -
pass the FVS type to I_VALUE_HELP_TYPE = IF_WD_VALUE_HELP_HANDLER=>CO_VH_TYPE_BACKEND (check for teh other attributes in IF_WD_VALUE_HELP_HANDLER) or IF_WD_VALUE_HELP_HANDLER=>CO_PREFIX_APPLDEV
to this I_VALUE_HELP_ID i think we have to either pass the FVS comp usage name or FVS webdynpro component name
I guess this is also used I_HELP_REQUEST_HANDLER - i think we need to pass the object reference of FVS or somethihg like that..
Make sure you given them in CAPS for these parameters.
Just try them out....Hope this helps -
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 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
Maybe you are looking for
-
Hi there, I just bought a AOC 22" (22LVWk) monitor. When I try to use it's DVI port, nothing happens. The monitor displays "digital input" and it stays black, with some weird flicks on the left side. If I connect the analog in (using the apple adapte
-
Sender Cost Element Group role in Assessment Cost Element Cycle
Hello, We have an assessment cycle as below:- Assessment Cost Element - 6000000 Sender Rule - Fixed Amount Receiver Rule - Variable Portions Sender Cost Center - 1000 Sender Cost Element Group - ABCD Receiver Order Group - XYZS Sender Values - 2,00,0
-
they are not in my mail how can i get them back?
-
Timesten user defined function problem
create or replace FUNCTION FACTORIAL n IN NUMBER RETURN NUMBER IS val NUMBER :=1; tem number :=n; BEGIN while tem>1 LOOP val:=val*tem; tem:=tem-1; END LOOP; RETURN val; END FACTORIAL; I create a function like this. And I t
-
Settings required to send ROEMPROACT2 XML from ECC to SNC
Hi All, Can anyone explain the config that will be required on ECC / PI / SNC to send ROEMPROACT2 XML from ECC side and recevie the PAN XML successfully on the SNC side. I already went through this link : Using ROEMPROACT2 but couldnt understand. Als