Select option value request depends on another field
Hi,
Sorry Wrong forum.
Thanks,
Eyal
Message was edited by: Eyal Alsheikh
Hi,
Sorry Wrong forum.
Thanks,
Eyal
Message was edited by: Eyal Alsheikh
Similar Messages
-
Problem in select-options value request
Hi All,
I have one select-option s_opt for vendor description. I want to have value request for both s_opt-low and s_opt-high. For that i have to write the functonal module
at selection-screen on value-request for s_opt-low. and at selection-screen on value-request for s_opt-high. for both or any other procedure.
In s_opt using drop down menu user can enter vendor description up to 10 Char, lower or upper case acceptable, & Wild card .
Can any one help with code for the above two problems.
Assured points.
With thanks in advance.
AshokHi , check the code .
Just populate the itab entries either with a select on lfa1 .
here im populating with sy-index values .
REPORT zforum12.
tables : lfa1.
select-options : so_lifnr FOR lfa1-lifnr.
data: begin of itab_LIFNR occurs 0,
lifnr like lfa1-lifnr,
end of itab_LIFnr.
DATA: ITAB_SELECTED_lifnr TYPE DDSHRETVAL OCCURS 0 WITH HEADER LINE.
initialization.
do 20 times.
move sy-index to itab_lifnr.
append itab_lifnr.
enddo.
at selection-screen on value-request for SO_LIFNR-LOW.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'SO_LIFNR-LOW'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = itab_LIFNR
return_tab = ITAB_SELECTED_LIFNR
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
IF SY-SUBRC eq 0.
READ TABLE ITAB_SELECTED_LIFNR INDEX 1.
MOVE ITAB_SELECTED_LIFNR-FIELDVAL TO SO_LIFNR-LOW.
ELSE.
* MESSAGE ....
ENDIF.
at selection-screen on value-request for SO_LIFNR-HIGH.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'SO_LIFNR-HIGH'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = itab_LIFNR
return_tab = ITAB_SELECTED_LIFNR
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
IF SY-SUBRC eq 0.
READ TABLE ITAB_SELECTED_LIFNR INDEX 1.
MOVE ITAB_SELECTED_LIFNR-FIELDVAL TO SO_LIFNR-HIGH.
ELSE.
* MESSAGE ....
ENDIF.
start-of-selection.
write:/ SO_LIFnr-LOW, SO_LIFNR-HIGH.
regards,
vijay -
How do you output a field column depending on another fields value?
when selecting a field in a query, how do you output it on its own column depending on another fields value?
For example
Select
a.gross_vol as Gas_vol when a.Object_code = "GAS"
a.gross_vol as Wat_Vol when a.object_code = "water"how do you output it on its own column depending on another fields value?Scalar subquery maybe?:
michaels> select (select ename from emp where empno = 7788) scott_ename,
(select ename from emp where empno = 7839) king_ename
from dual
SCOTT_ENAM KING_ENAME
SCOTT KING -
Get Selection options from one view to another view
Hi Experts,
I am using two views, first view it shows basic list of records based on selection options criteria , here I used component WDR_SELECT_OPTIONS . Then if we click on any record in first view then it opens popup window with record relevant information. Here I want to get selection option values while editing record values.
Initially I used context node for one value, for that just I created node and attribute then bind to table then I used with method get_static_attributes_table( ) in second view.
But I need all values to be used in second view.
Please could you suggest, is there another way to get values into second view?
Regards,
BBCHello BBC,
you can access the SELECT_OPTION component usage in second view and then you retrieve the selection fields and its corresponding range table. In this case the component usage instance will be shared across the application unless you explictly delete the component usage.
BR, Saravanan -
Select-option value is not getting captured in at selection-screen on value
In Selection screen , we have Select-option and a parameter.
Based on the values given in Select-option, the values of Parameter should get populate.
To achieve this functionality,
I used At selection u2013screen on value request for <parameter> EVENT and 'F4IF_INT_TABLE_VALUE_REQUEST' Function Module.
But the Select-option values are not getting captured in this event,unless u press Enter key.
Is there any other way to achieve this functionality.
Please Guide me.When you call function 'F4IF_INT_TABLE_VALUE_REQUEST'. make sure you send it the name of the screen variable - the F4IF_INT_TABLE_VALUE_REQUEST function calls DYNP_VALUES_READ itself if you tell it the name of your report, screen number, and the variable name... snippet below.
Jonathan
data:
l_repid type syrepid.
l_repid = sy-repid.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
dynpprog = l_repid
dynpnr = '1000'
dynprofield = 'S_FIELD-LOW' "Select options - low value
* etc -
Filtering internal table using select-option values
Hi,
I got an internal table with select-option values. for eg. it_perno with the values I BT 000160 000170.
Now i got another second internal table which is have the person number. Now i need to filter this second internal table based on the values from the select option table. my question is
i can collect all the values from 160 to 170 in a separate table by looping over the select option table. and then based on the values filter the second internal table person number.
But what would be the case if the select option contains both intervals and multiple options. For eg.
I BT 000160 000170.
I EQ 000185.
So can you suggest any good solution, that based on this select option table i need to filter the second internal table Person number.
Thanks in advance.
Regards,
anbu.Hi,
Can you not use the select-options in the Select query while populating the internal table.
SELECT pernr FROM pa0000 INTO it_tab WHERE pernr IN s_pernr.
If you cannot do this and you do not want to delete the unwanted entries, then you can use the WHERE clause in the LOOP statement to process the specific entries required:
LOOP AT it_tab INTO wa_tab WHERE pernr IN s_pernr.
Regards,
Aparna Alashe. -
Select options values pass to function module
Hi all,
I want to pass the values entered in the select options to the function module. How should my function module interface be declared for passing the select options
I tried declaring like
t_range type data in the tables tab. But this throws error.
Please let me know how to pass select option values back to function modules.
Thanks,Hi,
Check this code.
data: node_flights type ref to if_wd_context_node.
data: rt_carrid type ref to data.
data: rt_connid type ref to data.
data: isflight type table of sflight.
data: wsflight type sflight.
field-symbols: <fs_carrid> type table,
<fs_connid> type table.
Retrieve the data from the select option
rt_carrid = wd_this->m_handler->get_range_table_of_sel_field(
i_id = 'S_CARR_ID' ).
if rs_carrid is not initial. Here you can check that if rs_carrid is no initial then assign value of field symbol
Assign it to a field symbol
assign rt_carrid->* to <fs_carrid>.
endif.
Retrieve the data from the select option
rt_connid = wd_this->m_handler->get_range_table_of_sel_field(
i_id = 'S_CONN_ID' ).
if rt_connid is not initial. Here you can check that if rt_connid is no initial then assign value of field symbol
Assign it to a field symbol
assign rt_connid->* to <fs_connid>.
endif.
if <fs_connid> is not initial and <fs_carrid> is not initial.
Retrieve that data from the database. Normally it is suggested to
encapsulate the data retrieval in a separate class.
For simplicity, the SELECT statement has been implemented here.
clear isflight. refresh isflight.
select * into corresponding fields of table isflight from sflight
where carrid in <fs_carrid>
and connid in <fs_connid>.
endif.
Bind the data to the context
node_flights = wd_context->get_child_node( name = `FLIGHTS` ).
node_flights->bind_elements( isflight ).
Hopes this will helps you.
Regard
Manoj Kumar
Edited by: Manoj Kumar on Mar 16, 2009 10:41 AM -
Adding select-option value in selection screen of FBL5N tcode.
Hi Experts,
I have one requirement that to add a Header Text Field(BKPF-BKTXT) in section screen of standard program RFITEMAR(tcode : FBL5N), i tried to add that field but it was not displayed where i required, i mentioned below where i required.
Customer account
Company code
i required under company code select option value in same selection screen block.
Please do the needful.
thanks in advance.
gsreddy.Hi,
If you get the access key it is possible to edit the standard program,
How u tried to add the field???
regards,
Mullai -
Passing select-options values using call transaction method
Hi Experts,
I have a scenario in which i have three fields BUKRS,WERKS and MATKL in an internal table i_tab and I have MATNR as a selection-option.
After this I have to use call transaction <tcode> for all the line items in the internal table and the MATNR select-option values I have to pass directly for each line of i_tab using call transaction method.
TYPES: BEGIN OF t_tab,
bukrs TYPE bukrs,
werks TYPE werks_d,
matkl TYPE matkl,
END OF t_tab.
DATA: w_tab TYPE t_tab,
i_tab TYPE STANDARD TABLE OF t_tab.
SELECT-OPTIONS: s_matnr FOR marc-matnr.
Now I am putting a loop at i_tab and have to use CALL TRANSACTION <TCODE> for each line with the SELECT-OPTIONS for MATNR.
Please tell me whether we can pass multiple ranges for MATNR using call transcation method.
for example there can be multiple single values/multiple ranges/excluded ranges for MATNR. so please suggest me how tho achieve this sceanrio using CALL transaction method of BDC.
Thanks a lot.
Regards,
KrishanHi Krishan,
For the Call transaction TCODE there is extension ....OPTIONS from OPT. Just Check it out. I think it is possible like this.
... OPTIONS FROM opt
*Effect*
This addition gives you control using the values of the components of the structure opt, which must be of the Dictionary type CTU_PARAMS. The components have the following meaning:
DISMODE
Processing mode (comparable with the MODE addition)
UPDMODE
Update mode (comparable with the UPDATE addition)
CATTMODE
CATT mode (controlling a CATT procedure)
The CATT mode can have the following values:
' ' No CATT procedure active
'N' CATT procedure without single screen control
'A' CATT procedure with single screen control
DEFSIZE
Use standard window size
RACOMMIT
COMMIT WORK does not end CATT procedure
NOBINPT
No batch input mode, that s SY-BINPT = SPACE.
NOBIEND
No batch input mode after BDC data has been read
The components DEFSIZE , RACOMMIT, NOBINPT, NOBIEND always take the following values:
'X' Yes
' ' No
If the OPTIONS addition is omitted, the following settings are valid for the control parameters:
DISMODE from the MODE addition
UPDMODE
from the UPDATE addition
CATTMODE
No CATT procedure active
DEFSIZE
Do not use standard window size
RACOMMIT
COMMIT WORK ends procedure successfully
NOBINPT
Batch input mode, that is SY-BINPT =X.
NOBIEND
Batch input mode also active after BDC data has been read
Regards,
Swapna. -
How to assign select-option values to internal table
hi all,
how to assign select-option values to internal table
thanks in advance.Hi,
You just need to loop at your select-option field and take the values from low and high fields.
for. e.g
loop at s_werks .
move:s_werks-low to <your itab>
if not s_werks-high is initial .
move: s_werks-high to <youritab>
endif .
append <your itab>
endloop .
OR use select statement.
regards,
Omkar.
Message was edited by:
Omkaram Yanamala
Message was edited by:
Omkaram Yanamala -
Displaying Selection option values in header using alv-factory
Hi all,
I am using alv factory class 'CL_SALV_TABLE'.
I want to display selection-option values on my header.
I have creted grid using class 'CL_SALV_FORM_LAYOUT_GRID' and am displaying other values.
But am facing problem in displaying selection option values.
Any pointer on this will be GR8.
Thanks & Regards.
Yats.Hi,
Use this sample code.
form top_of_the_list_main changing lv_grids type ref to cl_salv_table.
*Creating instances of the clases
data : lv_grid type ref to cl_salv_table,
lv_header type ref to cl_salv_form_element,
lv_layout type ref to cl_salv_form_layout_grid.
move lv_grids to lv_grid.
*Creating the layout object
create object lv_layout.
*Setting the Header Text
lv_layout->create_label(
row = 1
column = 1
text = text-008 ).
lv_header = lv_layout.
lv_grid->set_top_of_list( lv_header ).
endform. " TOP_OF_THE_LIST_MAIN
Loop it and keep changing the row and colom..Pass the selection option to the text field.
Regards
Ansair -
In BI how to filter the selection options based on inputs on top field
Hi Friends,
In BI, How to filter the selection options based on inputs on top field.
The system should automatically filter the lower level drop downs based on the selection of a higher level.
For e.g. :
If a user selects a Country then the States drop down should only display the State's belongs to the Country. Similarly when a State is selected, the District drop down should display only those District's belongs to the State.
Thanks in Advance.
Regards
Jayaram MHi Anil,
Thanks for reply but I couldn't use Compounding Characteristic here. Need some other solution.
Regards
Jayaram M -
How can we pass the select-option value to modulepool program?
hi,
how can we pass the select-option value to modulepool program ?
Because if i declared select-options in executable program and i used SSCRFIELDS to define push buttons in selection screen.
My requirement if enter the values to select-options and press UPDATE pussbotton then i want call screen which contains tablecontrol.
How i get select-option values to PAI of call screen for getting the data from database table to my internal table?Oh I thought that you have selection-screen and again you are working on dialog programming.
if you want to use select-option directly in module pool then it is not possible.
but you can do other way.
create two varaiables
data : v_kun_low like kna1-kunnr,
v_kun_high like kna1-kunnr.
use these two variables in layout ,let user knows that he can not give options like gt,lt,eq ,it will be always BT.
and also when you see normal report program,you can use multiple values in either low or high,but here it is not possibel.
use can enter only low value and high value.
when you come to program point of view
declare one range
ranges r_kunnr for kna1-kunnr.
do the coding like
r_kunnr-low = v_kun_low.
r_kunnr-high = v_kun_high.
r_kunnr-options = 'BT'.
r_kunnr-sign = 'I'.
append r_kunnr.
now you can use r_kunnr in select query ,it will work like select-option.
other than this there is no option.
Thanks
Seshu -
How to pass select option value to function module while using service call
Hi,
I have select-option in my WD application. To collect data based on user input im using service call. How to pass this select option values to my RFC.
rgds
sudhanshuHi,
Thank s for your reply. In fact im doing similar with following variation:
i) collected range values using get_range* method.
ii) separate low and high values as:
read table <field2> index 1 into wa_range.
vert2_low = wa_range-low.
vert2_high = wa_range-high.
(Please note that in RFC I have taken two importing parameter as s_vert_lo and s_vert_hi)
iii) Now setting these RFC attribute as:
lo_el_importing->set_attribute(
EXPORTING
name = `S_VERT_LO`
value = vert2_low ).
and
lo_el_importing->set_attribute(
EXPORTING
name = `S_VERT_HI`
value = vert2_high ).
iv) In RFC im having my query as :
select <fld list> from BUT000 into table itab where vertical in r_vert.
Here, r_vert is a range defined as:
ranges r_vert for <fld refrence>
r_vert-sign = 'I'.
r_vert-option = 'BT'.
r_vert-low = S_VERT_LO.
r_vert-high = S_VERT_HI.
append r_vert.
Issue here is with ranges. if im passing both low and high values it is fine but if only low value being passed it is not giving me any record.
Please suggest.
Rgds
Sudhanshu -
Passing SELECT-OPTIONS value to Function Module
Hi,
I need to pass select-options value to a function module.
Code is like the following:
SELECT-OPTIONS seltab FOR object-type.
CALL FUNCTION 'Z_MY_FM'
EXPORTING
sel_tab = seltab
IMPORTING
result_tab = it_result
I have found a similar problem in the SDN forum: How to pass select-options parameter to FM?
However, that could not help me much in solving my problem.
So far I have tried to created a structure in DDIC with the following components for the select-options:
SIGN - BAPISIGN
OPTION - BAPIOPTION
LOW - ZBWOBJECTTYPE (my type)
HIGH - ZBWOBJECTTYPE (my type)
and subsequently a table type for this structure which is specified in the "Import" tab of my function module.
Unfortunately, when I ran the program a runtime exception occured (CALL_FUNCTION_CONFLICT_TYPE).
Could anyone please help me on this issue?
Thanks in advance.
Regards,
Joon MengHello Joon,
CALL FUNCTION 'Z_MY_FM'
EXPORTING
sel_tab = seltab
IMPORTING
result_tab = it_result
You have defined SELTAB as a SELECT-OPTION.
So when you pass only SELTAB, the header line is transferred to the FM. When you pass SELTAB[] the whole table(range) is passed.
It is similar to the concept of an internal table with header line.
Hope i am clear.
Anyways how have you defined result_tab and sel_tab ?
BR,
Suhas
Maybe you are looking for
-
My iPad has been erased. I am not be able to find the prevues owner to use the iCloud account to activate my iPad. If there is a way please help me.
-
Hello. I cant figure out how to sync Pages on my iPad with Pages on my MacBook Pro trough iCloud. How does it work? Regs, Michael
-
DEAR MAC USERS I OPENED MY MAC THIS MORNING AND WHEN I TURNED THE ITUNES ON I COULDN'T HEAR A THING. I COULDN'T EVEN DRAG THE SLIDER, WHICH BY THE WAY IS GRAY (MAYBE IT WAS GRAY THE WHOLE TIME). ANY IDEAS?
-
Okay, i'm looking to buy the Griffin Firewave for 5.1 Audio Output and also the Logitech X-540 as 5.1 Speakers. Now mainly, i use Mac OS X as my main OS for web browsing, work etc. But i sometimes use Windows (Vista) for games, music and what not. No
-
'permission denied' to access TM backups of previous install
I just reinstalled Mountain Lion and now I want to manually restore some files from my TM backup of the previous install. I changed my account username and password this time. Probably thats why TM wont let me access my home folder's subfolders like