Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Infopackage ABAP Selection Routine


I have a business requirement to load data from one datasource filtering two date fields: DT1 and DT2. To filter them, user will fill a table field PARAMETER (LOW, HIGH, SIGN and OPTION) from a T-CODE. User need the following logic:

If PARAMETER-LOW or PARAMETER-HIGH is higher than 20150831, than infopackage should filter DT2. Else, it should filter DT1.

I've tried some approcaches at Infopakcage abap routine for those fields, but the result is not correct:

- Tried to simply not filling the filter for the fields DT1 and DT2. Got no records, as it understands that it should filter with NULL for that values.

- Tried to delete lines from those fields from l_t_range. Got no records, as it didn't deleted the lines and filtered with NULL for that values.

My question is: is there a way to do this dynamic filter at infopackage routine level? If not, what could be done to solve the business requirement?



Former Member replied

Hi Maurício,

* In the info package it is not possible to exclude. Only selection is possible ( mean it will select the values as per the selection criteria. and exclude those value which are not in the selection.

In the info package there is a test button to see your code filter value in run time derived from the abap routine.

In the DTP filter it should be possible to eliminate two values ( One NULL and Either DT1 or DT2 based on your parameter.

it should be like

Sign = E

Option = EQ

low = '' (for character) and 000 for number

Sign =  E

Option = EQ

low= DT1 or DT2 based on your logic.



1 View this answer in context

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question