Skip to Content

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

SAPSetFilter with Range values

Hello,

    I have a requirement to restrict Datasource to range of values for a field. It is working fine with single values, not for range. Please guide me with correct syntax.

   1. Created 2 Excel Dropdown filled with values for 0CALWEEK i.e. "Calweek from" and "Calweek to"

   2. if i select a value in "CalWeekTo" Dropdown, i want to restrict Datasource with Calweek Range

      Code:

    Dim WeekFr As String

    Dim WeekTo As String

   

    WeekFr = Sheets("Main").FromWeek.Value

    WeekTo = Sheets("Main").ToWeek.Value

     Dim lResult As Long

     lResult = Application.Run("SAPSetFilter", "DS_1", "0CALWEEK", WeekFr - WeekTo, "INPUT_STRING")

Thanks,

Benarji.

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