hi
I want create filter data in using routine by DTP
I want dowload data in my DSO, if the material exist in my infoobject 0material.
But my code donu2019t worked:
===============================================================
&----
*& 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: ...
tables : /BIC/MATERIAL.
DATA:
l_s_ztable TYPE /BIC/MATERIAL,
l_s_range type rssdlrange.
$$ end of global - insert your declaration only before this line -
-------------------------------------------------------------------
Fieldname = ZCOSTCTR
data type = CHAR
length = 000010
-------------------------------------------------------------------
form compute_ZCOSTCTR
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.
read table l_t_range with key
fieldname = '/BIC/MATERIAL'.
l_idx = sy-tabix.
*
*
clear l_s_range.
SELECT DISTINCT /BIC/ZCOSTCTR FROM /BIC/MATERIAL INTO l_s_ztable.
*
l_s_range-iobjnm = '/BIC/MATERIAL'.
l_s_range-fieldname = '/BIC/MATERIAL'.
l_s_range-sign = 'I'.
l_s_range-option = 'EQ'.
l_s_range-low = l_s_ztable-/BIC/ZCOSTCTR.
l_t_range-HIGH = l_s_ztable-/BIC/ZCOSTCTR.
*
*....
if l_idx <> 0.
modify l_t_range index l_idx.
else.
append l_t_range.
endif.
p_subrc = 0.
ENDSELECT.
==================================
best regard
francoise