on 03-02-2011 10:47 AM
Hi All,
I have created a selection screen as below
lr_field = wd_this->m_handler->create_range_table( 'YFMTFLOW' ).
* ASSIGN lr_field->* TO <fs_range>.
* ls_date-sign = 'I'.
* ls_date-option = 'EQ'.
* ls_date-low = 'US'.
* APPEND ls_date TO <fs_range>.
* Add the select-option to the group
wd_this->m_handler->add_selection_field(
i_id = 'FLOW'
i_within_block = 'PROC'
i_no_intervals = abap_true
it_result = lr_field ).
If i enter some value and click a button to retireve the values as below
DATA
lt_sel_item TYPE if_wd_select_options=>tt_selection_screen_item.
types: ty_flow type range of yfmtflow.
FIELD-SYMBOLS:
<fs_sel_item> LIKE LINE OF lt_sel_item,
<fs_process> TYPE yfmtprocess,
<fs_flow> TYPE ty_flow.
* Get the selection-screen items
l_handler->get_selection_screen_items(
IMPORTING et_selection_screen_items = lt_sel_item ).
* Retrieve the values from the select-options items
LOOP AT lt_sel_item ASSIGNING <fs_sel_item>.
CASE <fs_sel_item>-m_id.
WHEN `PROCESS`.
ASSIGN <fs_sel_item>-m_value->* TO <fs_process>.
WHEN 'FLOW'.
ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_flow>.
ENDCASE.
ENDLOOP.
<fs_flow> is empty
but after I enter value and then press enter and then click the button to retrieve the values I am able to get low value <fs_flow> not the sign and option
Is it the standard functionality ,if yes how can we overcome
Thanks
Bala Duvvuri
Hi All,
I am unable to read the values from selection screen, earlier I used to retrieve all selection fields into RANGE_TABLE using method GET_SELECTION_SCREEN_ITEMS, but now it is not working.
So my question is that do I need call the following statement for each selection field as below ? what about if selection screen contains many fields, is there any other method which retrieves all at one go?
CALL METHOD wd_this->m_handler->get_range_table_of_sel_field
EXPORTING
i_id = 'BUKRS'
receiving
rt_range_table = rt_range_table.
ASSIGN rt_range_table->* to <fs_bukrs>.
I remember the following method which used to retrieve all selection fields into RANGE_TABLE
CALL METHOD wd_this->m_handler->get_selection_screen_items
IMPORTING
et_selection_screen_items = lt_screen_items.
LOOP AT lt_screen_items ASSIGNING <fs_items>.
CASE <fs_items>-m_id.
WHEN 'BUKRS'.
ASSIGN <fs_items>-mt_range_table->* TO <fs_bukrs>.
But unfortunately it is not working now, I don't understand what could be the reason, please help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
It's not possible. It will work as expected.
Once you got the lt_screen_items(type get_selection_screen_items), instead of making the loop try to read the index, as your are going to read only BUKRS.
And then assign the range table.
ASSIGN <fs_items>-mt_range_table->* TO <fs_bukrs>(Type wd_this->elements_range).
BR,
RAM.
HI Murugan,
Thanks for your reply.
Actually I have many screen items, I just shown only one item 'BUKRS' of LOOP statement.
Method 'get_selection_screen_items' is not working, interestingly the following code is working fine
CALL METHOD wd_this->m_handler->get_range_table_of_sel_field
EXPORTING
i_id = 'BUKRS'
receiving
rt_range_table = rt_range_table.
ASSIGN rt_range_table->* to <fs_bukrs>.
BR
RK
Hi,
Try the below code.Here i've created selection option field namely AGR_NAME.
DATA rt_agr_name TYPE REF TO data.+
* Retrieve the data from the select option
rt_agr_name = lv_r_helper_class->get_range_table_of_sel_field( i_id = 'AGR_NAME' ).
* Assign it to a field symbol
ASSIGN rt_agr_name->* TO <fs_agr_name>.
Thanks
KH
Am giving clear coding of select options.
nOTE: S_CARR_ID IS THE DATA ELEMENT OF CARR ID FIELD,
FOR THAT I AM APPLYING SELECT OPTIONS IN BELOW CODING.
WRITE THE BELOW CODE IN WDDOINT( ) METHOD OF
REQUIRED VIEW
Data: lt_range_table type ref to data,
read_only type abap_bool.
WD_THIS->M_WD_SELECT_OPTIONS = WD_THIS-
>WD_CPIFC_SELECT_OPTIONS( ).
WD_THIS->M_HANDLER = WD_THIS->M_WD_SELECT_OPTIONS-
>INIT_SELECT_SCREEN( ).
WD_THIS->M_HANDLER->SET_GLOBAL_OPTIONS(
I_DISPLAY_BTN_CANCEL = ABAP_FALSE
I_DISPLAY_BTN_CHECK = ABAP_FALSE
I_DISPLAY_BTN_RESET = ABAP_FALSE
I_DISPLAY_BTN_EXECUTE = ABAP_FALSE ).
LT_RANGE_TABLE = WD_THIS->M_HANDLER-
>CREATE_RANGE_TABLE( I_TYPENAME = 'S_CARR_ID' ).
WD_THIS->M_HANDLER->ADD_SELECTION_FIELD(
I_ID = 'S_CARR_ID'
IT_RESULT = LT_RANGE_TABLE
I_READ_ONLY = READ_ONLY ).
BELOW CODE IN REQUIRED ACTION( SAY IN SOME BUTTON
ACTION WHICH WILL RETRIEVE THE DATA FROM DATABASE TABLE
USING SELECTI OPTIONS VALUES)
fIRST THE GET REFERENCE TO NODE( CTRL F7--->READ
CONTEXTB---FLIGHT NODE )
***THEN BELOW CODE
DATA: RT_CARRID TYPE REF TO DATA.
DATA:IS_FLIGHT TYPE TABLE OF SFLIGHT.
FIELD_SYMBOLS: <FS_CARRID> TYPE TABLE.
RT_CARRID = WD_THIS-> M_HANDLER-
>GET_RANGE_TABLE_OF_SEL_FIELD( I_ID = 'S_CARR_ID' ).
ASSIGN RT_CARRID-> TO <FS_CARRID>.*
SELECT * INTO CORRRESPONDING FIELDS OF TABLE IS_FLIGHT
FROM SFLIGHT WHERE CARRID IN <FS_CARRID>
NODE_FLIGHT->BIND_TABLE( IS_FLIGHT ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
DATA: NODE_FLIGHTS TYPE REF TO IF_WD_CONTEXT_NODE.
DATA: RT_CARRID TYPE REF TO DATA.
DATA: ISFLIGHT TYPE TABLE OF SFLIGHT.
DATA: WSFLIGHT TYPE SFLIGHT.
FIELD-SYMBOLS: <FS_CARRID> 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' ).* Assign it to a field symbol
ASSIGN RT_CARRID->* TO <FS_CARRID>.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.