Skip to Content
0
Sep 07, 2023 at 08:38 AM

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

132 Views Last edit Sep 07, 2023 at 08:57 AM 2 rev

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!