You are on page 1of 2

*&---------------------------------------------------------------------*

*& Include RSBC_SEL_ROUTINE_TPL


*&---------------------------------------------------------------------*

program conversion_routine.
* Type pools used by conversion program
type-pools: rsarc, rsarr, rssm.
tables: rssdlrange.
* Global code used by conversion rules
*$*$ begin of global - insert your declaration only below this line *-*
* TABLES: ...
* DATA: ...
*$*$ end of global - insert your declaration only before this line *-*
* -------------------------------------------------------------------
* Fieldname = FISCYEAR
* data type = NUMC
* length = 000004
* -------------------------------------------------------------------
form c_FISCYEAR
tables l_t_range structure rssdlrange
using i_r_request type ref to IF_RSBK_REQUEST_ADMINTAB_VIEW
i_fieldnm type RSFIELDNM
changing p_subrc like sy-subrc.
* Insert source code to current selection field
*$*$ begin of routine - insert your code only below this line *-*
data: l_idx like sy-tabix,
l_year type /BI0/OIFISCYEAR.
read table l_t_range with key
fieldname = 'FISCYEAR'.
l_idx = sy-tabix.
*....
l_year = SY-DATUM(4) - 1.
l_t_range-iobjnm = '0FISCYEAR'.
l_t_range-fieldname = 'FISCYEAR'.
l_t_range-option = 'EQ'.
l_t_range-sign = 'I'.
l_t_range-low = l_year.
clear l_t_range-high.
if l_idx <> 0.
modify l_t_range index l_idx.
else.
append l_t_range.
endif.
p_subrc = 0.
*$*$ end of routine - insert your code only before this line *-*
endform.

DATA: WA_SOURCE_PACKAGE_1 TYPE _TY_S_SC_1.


CLEAR : WA_SOURCE_PACKAGE_1.

LOOP AT SOURCE_PACKAGE_1 INTO WA_SOURCE_PACKAGE_1.


IF SY-SUBRC = 0.
IF WA_SOURCE_PACKAGE_1-HIENM EQ 'STAOAA1401'.
ELSE.
DELETE SOURCE_PACKAGE_1.
ENDIF.
ENDIF.
ENDLOOP.

You might also like