cancel
Showing results for 
Search instead for 
Did you mean: 

How to set DTP filters dynamically

i033659
Advisor
Advisor
0 Kudos

Hello,

For infopackages I have the FM BAPI_IPAK_CHANGE in order to change the selections dynamically.

Question: Does there anything similiar (FM, class) exist for data transfer processes (DTP), where I can change the filter of a DTP dynamically?

Thank you and best regards,

Ingo

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

U can select the filter conditions dynamically by writing a rouitne ...

Suppose there is one object called start date its techiacl name /bic/rt_strdt then u want to load data where the start date is between 20080101 and some time limits then u can write the routien like this

data: l_idx like sy-tabix.

read table l_t_range with key

fieldname = '/BIC/RT_SRTDT'.

l_idx = sy-tabix.

*....

l_t_range-low = '20080101'.

l_t_range-high = '20080430'.

l_t_range-iobjnm = '/BIC/RT_SRTDT'.

l_t_range-Fieldname = '/BIC/RT_SRTDT'.

l_t_range-sign = 'I'.

l_t_range-option = 'BT'.

if l_idx <> 0.

modify l_t_range index l_idx.

else.

append l_t_range.

endif.

p_subrc = 0.

By this routine at run time it dynamically loads the data thats matches the filter condtion for the field start date...

Former Member
0 Kudos

Hi Peter,

U can write a routine to Filter the values in DTP.

ex- u can write routine to extract only current day records.

After clicking the filters button in DTP click on routine button which is at extreme right of the required infoobject.

REDDY