05-04-2016 3:00 AM
Dear Experts,
After executing the report, user selecting the variant.
When user select's Icon(Select All) all items present in the screen should be marked with 'X'.
In user Command not able to get the variant's data in internal table, its displaying all data's.
Kindly suggest me how to find the variant's data contents in user command.
Regards,
Venkat.
05-05-2016 1:11 AM
Hi Venkat,
Let me know if you are using the Container to create the Alv and using class CL_GUI_ALV_GRID.
If yes , then you can use the method GET_FILTER_CRITERIA to read the variant details.
CALL METHPD GRID1->GET_FILTER_CRITERIA
Importing ET_FILTER = GT_FILTER.
Field "Fieldname" of internal table GT_FILTER has the name of the field on which filter has been applied in variant and then there are filter values under fields "SIGN" "OPTION" "Low" "HIGH".
Using these details you can filter the records from the internal table that you passed to display ALV.
Or
There is another method GET_FILTERED_ENTRIES of class CL_GUI_ALV_GRID which can give you the entries that have been removed after applying the variant.
Based on that you can get the entries that are displayed.
OR
Use the FM : REUSE_ALV_GRID_LAYOUT_INFO_GET and Importing attribute ET_FILTERED_ENTRIES would give you the result.
Thanks
Deepak Sharma
05-04-2016 5:15 AM
Hi Venkat,
Can you please elaborate the issue. I could not understand the issue.
To read the variant contents you can use the FM : RS_VARIANT_CONTENTS.
Thanks
Deepak
05-04-2016 5:22 AM
Hello
Can you specify which report / T code /Program you are referring to?
Shubham
05-04-2016 8:03 AM
Hello Venkat,
If your requirement is, when the users click on select all button then all the rows should be marked as X, then refer to the below post.
What do you mean by variant which users select after executing the report? I hope they select variant before the execution of the report, not after the execution of the report.
Regards,
Thanga
05-04-2016 8:54 AM
Thanks For Replying.
Eg: My internal table contains entries ALV.
Field1 Field2
yarn 10
Cone winding 20
Knitting 30
In report output Created 3 Layout for yarn, conewinding, knitting(Created Filter ).
User selects yarn layout means only yarn entries is displayed. created a check box.
when user select Icon( Select All). While in debugging(All 3 contents(Yarn, Conewinding, Knitting) are displayed in internal table ).
Regards,
Ramesh
05-04-2016 10:18 AM
Not clear Venkat, please explain in detail with screen shots or with more information
05-04-2016 11:29 AM
Hi Prakash,
Actual ALV Output.
After selecting layout.
Only yarn is displayed.
Created icon's for select all & delete all.
In User command internal table is filled with all values as like in first screen shot(All material description)
Want to identify which layout user selected. to mark the field with 'X'(Select all ).
Hope you understand.
Regards,
Venkat.
05-05-2016 1:11 AM
Hi Venkat,
Let me know if you are using the Container to create the Alv and using class CL_GUI_ALV_GRID.
If yes , then you can use the method GET_FILTER_CRITERIA to read the variant details.
CALL METHPD GRID1->GET_FILTER_CRITERIA
Importing ET_FILTER = GT_FILTER.
Field "Fieldname" of internal table GT_FILTER has the name of the field on which filter has been applied in variant and then there are filter values under fields "SIGN" "OPTION" "Low" "HIGH".
Using these details you can filter the records from the internal table that you passed to display ALV.
Or
There is another method GET_FILTERED_ENTRIES of class CL_GUI_ALV_GRID which can give you the entries that have been removed after applying the variant.
Based on that you can get the entries that are displayed.
OR
Use the FM : REUSE_ALV_GRID_LAYOUT_INFO_GET and Importing attribute ET_FILTERED_ENTRIES would give you the result.
Thanks
Deepak Sharma