Skip to Content

Infopackage ABAP Selection Routine

Hi,

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?

Regards,

Maurício.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Oct 22, 2015 at 08:17 AM

    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.

    Thanks.

    -J

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 21, 2015 at 04:16 PM

    Hi Maurício,

    Your requirement is still a bit abstract for me. Please share more information on the custom table and the coding you wrote in the InfoPackage. A real-life example will also contribute to understanding your requirement better.

    Best regards,

    Sander

    Add comment
    10|10000 characters needed characters exceeded