on 12-08-2010 4:46 PM
Hi,
I have a four column, one row value in an internal table for a select option sign, option, low and high. I need to pass this one to the select option component to display the values when the system is called. am passing the value to the class 'IF_WD_SELECT_OPTIONS' method 'SET_RANGE_TABLE_OF_SEL_FIELD' parameter 'IT_RANGE_TABLE' with the std type 'DATA'... am facing type compatible error. Give an idea to convert the internal table or workarea value to this IIT_RANGE_TABLE.
Thanks,
Sivasaravanan Nagarajan
You need to declare a data type as a Range. Use the special syntax:
DATA rtab TYPE RANGE OF type.
You can also create range table types in the data dictionary.
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/00/958fb7e42b11d295f700a0c929b3c3/frameset.htm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
As suggested already, this is the way.
Creating range table
DATA lt_range TYPE REF TO data.
CALL METHOD lo_r_helper_class->create_range_table
EXPORTING
i_typename = 'VBELN'
RECEIVING
rt_range_table = lt_range.
Check this article. In this, I am explaining how to create select option.
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/103e43d5-fdb8-2d10-90ab-b5e8532cbc04
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Please see below example code for a possible solution:
DATA:
lr_range TYPE REF TO data,
lrf_handler TYPE REF TO IF_WD_SELECT_OPTIONS.
FIELD-SYMBOLS:
<fs_table> TYPE STANDARD TABLE.
* Create range tabel
lrf_range = wd_this->lrf_handler->create_range_table(
i_typename = ih_id ).
* Assign it to a field symbol
ASSIGN lrf_range->* TO <fs_table>.
IF sy-subrc EQ 0.
* Fill it!
<fs_table> = ii_range_table.
wd_this->lrf_handler->set_range_table_of_sel_field(
i_id = ih_id
it_range_table = lrf_range ).
ENDIF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.