cancel
Showing results for 
Search instead for 
Did you mean: 

​Routine in the filter selection for the field to exclude a value in DTP

moha_nan
Participant
0 Kudos

Hello,

DTP does not extract from PSA (ODP Directly from Source system), DTP does the extraction instead of InfoPackage.

However, in the filter selection for the field in DTP, I do not see the "Exclude" option.

How can I write a own routine in the filter selection for the field to exclude a value in DTP. Is there an example?

I have written a code in the routine at DTP filter, but it doesn't work:

****************************************************************************************************************

load all data except for the Field ABC = 'X'. :

DATA: l_idx LIKE sy-tabix.

READ TABLE l_t_range WITH KEY

fieldname = 'ABC'.

l_idx = sy-tabix.

*....

l_t_range-fieldname = 'ABC'.

l_t_range-sign = 'E'.

l_t_range-option = 'EQ'.

l_t_range-low = 'X'.

IF l_idx <> 0.

MODIFY l_t_range INDEX l_idx.

ELSE.

APPEND l_t_range.

ENDIF.

p_subrc = 0.

***************************************************************************

Many thanks!

Accepted Solutions (0)

Answers (1)

Answers (1)

varun_sawant
Participant
0 Kudos

Not all ODP source support Exclusion. So I guess your options are to provide a range for inclusion. For example you want to exclude X then use ranges 0 to W and Y to Z. The other option is to exclude them in the start routine.