I am able to add filters using OLE2 in ABAP and my excel file getting created successfully. The issue is filter is not working - I can see filters attached to field columns but I can not click.
Asked
Active
Viewed 868 times
1
1 Answers
0
DATA: go_application TYPE ole2_object,
go_column TYPE ole2_object,
CALL METHOD OF go_application 'Columns' = go_column.
CALL METHOD OF go_column 'AutoFit'.
SET PROPERTY OF go_column 'AutoFilter' = 1.
CALL METHOD OF go_sheet 'Protect'
EXPORTING
#1 = 'pass' " Password
#2 = 1 " Protect Drawing Objects
#3 = 1 " Protect Contents
#4 = 1 " Protect Scenarios
#5 = 0
#6 = 0
#7 = 0
#8 = 0
#9 = 0
#10 = 0
#11 = 0
#12 = 0
#13 = 0
#14 = 0
#15 = 1.
Where #15 put filter ON. Give me feedback if it worked for you

fixeln
- 34
- 4
I dont know how to upload Image here but what I have figured out is I have to enable "use AutoFilter" checkbox under "Review >> Protect Sheet >>" then in Popup "use AutoFilter".
Please help me how can I set this checkbox using ABAP code.
Thanks- – Abhishek Jul 09 '18 at 20:35