on 06-27-2008 2:33 AM
I have fiscal period in my selection tab of infopackage. I am looking for the abap routine which would help me in achieving this selection condition. I am new to ABAP language so any help with abap code is appreciated.
Hi,
In the info package selection for FISCPER field,
select ABAP Routine type Variable and write the below code.
Note: I have not tested this code. there may be minor cahnges to this code required.
DATA: fiscper TYPE rsfiscper,
v_fiscper_cur TYPE rsfiscper, ' to determine current fiscper
v_fiscper_from TYPE rsfiscper, ' to determine from which fiscper you want to load
v_year TYPE rsfiscyear,
v_year_from TYPE rsfiscyear,
CALL FUNCTION 'RSARCH_DATE_CONVERT'
EXPORTING
i_date = sy-datlo
i_fiscvarnt = 'Z1' ' Here give your FISCVARNT
IMPORTING
e_fiscper = v_fiscper_cur
e_fiscyear = v_year.
v_fiscper_from = v_fiscper_cur - 24.
data: l_idx like sy-tabix.
read table l_t_range with key
fieldname = 'FISCPER'.
l_idx = sy-tabix.
l_t_range-low = v_fiscper_from.
l_t_range-high = v_fiscper_cur.
l_t_range-option = 'BT'.
modify l_t_range index l_idx.
p_subrc = 0.
Good luck
Cheers
Praveen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
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.