on 06-04-2008 4:48 PM
Hi Guru's,
I have an assistance class where I have to write all my select queries. I have a selection screen with multiple Select options (as input fields). Now I want to pass the select options range table to assistance class.
Please let me know if you have any sample code for this which may also include building range tables for select options.
Thanks,
Pradeep
In addition to declaring the table with the TYPE RANGE OF, you can also create a special type of TABLE TYPE in the Data Dictionary.
[http://help.sap.com/saphelp_nw70/helpdata/EN/00/958fb7e42b11d295f700a0c929b3c3/frameset.htm|http://help.sap.com/saphelp_nw70/helpdata/EN/00/958fb7e42b11d295f700a0c929b3c3/frameset.htm]
You can then even use this table type as the type of the inporting parameter of your assistance class method.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pardeep,
U can use following code: for field ERDAT
data: rt_ERDAT type ref to data,
R_ERDAT TYPE RANGE OF VIQMEL-ERDAT,
R_ERDAT_line LIKE LINE OF R_ERDAT,
field-symbols: <fs_ERDAT> type table.
Retrieve the data from the select option
rt_ERDAT = wd_this->m_handler->get_range_table_of_sel_field( i_id = 'ERDAT' ).
Assign it to a field symbol
assign rt_ERDAT->* to <fs_ERDAT>.
copy field symbols to local variable
R_ERDAT = <fs_ERDAT>.
CALL METHOD WD_ASSIST->"METHOD_NAME"
R_ERDAT = R_ERDAT
where in class method:
R_ERDAT Importing Type ZU5QNM_ERDAT_T
ZU5QNM_ERDAT_T : is a table type of ZU5QNM_ERDAT_R
and ZU5QNM_ERDAT_R has following structure :
SIGN ACE_SIGN CHAR 1 0 Debit/Credit Sign (+/-)
OPTION ACE_OPTION CHAR 2 0 Option for Ranges Tables
LOW ERDAT DATS 8 0 Date on Which Record Was Created
HIGH ERDAT DATS 8 0 Date on Which Record Was Created
I hope this wiol solve ur problem.
Regards,
Vishal.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.