on 08-18-2013 2:54 AM
Hello
( I am aware of that the standard SAP is giving an option of Persenalization to the users on ALV grid/table/dashboard settings, of WDA, but in my case for some reason we don't want to opt that choice)
My requirement is to hide some coluns/fields of ALV dashboard of a Standard SAP's (WDA/WDC) app , say, the Standard SAP is displaying 10 coumns, but we need only 8, hence i need to hide the unwanted 2 columns programitically with my custom code
After debugging i realized that the complete ALV is coming/building dynamically on run time.
Pls. let me know how can i hide the stndard SAP delivering ALV's column on dashboard
Hello
You can hide a field in ALV we need to DELETE _COLUMN method of the interface IF_SALV_WD_COLUMN_SETTINGS and pass the attribute name which needs to be hidden
lo_value->if_salv_wd_column_settings~delete_column( id = 'VBELN' ).
We need to paste the above code in WDDOINIT method of the view in which ALV is present
Using this we can hide the two fields which you need to hide in your case.
Points please if helpful
Regards
Subhash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
the easiest way is to use the layout option in the ALV output.
when using the ALV grid FM or Class just pass the parameters I_SAVE and IS_VARIANT and you'll have that option enabled.
Syntax :
IS_VARIANT = <layout structure> " pass the name of the report
I_SAVE = <'X', 'U' or 'A'>
NOTE : by setting the I_DEFAULT we can enable the ability to save default layout settings . ( set in default settings ) .
Possible value for I_SAVE .
I_SAVE = SAVE ( layouts cannot be saved )
I_SAVE = 'U' ( only user-defined layouts can be saved )
I_SAVE= 'X' ( only global layouts can be saved ) .
I_SAVE = 'A' (both user defined and global layouts can be saved . )
Example :
DATA: X_SAVE, "for Parameter I_SAVE
GS_variant TYPE DISVARIANT. "for parameter IS_VARIANT
G_REPID = SY-REPID.
GS_variant-REPORT = G_REPID." minimum step
X_SAVE = 'U'.
- CALL METHOD GRID1->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING I_STRUCTURE_NAME = 'SFLIGHT'
IS_VARIANT = GS_variant
I_SAVE = X_SAVE
CHANGING IT_OUTTAB = GT_SFLIGHT.
On the output screen press the layout (CTRL + F8 ) and chose the fields that you want to show . and hide the once that you don't.
You can also pass the I_DEFAULT = 'X' if you want to let the user save the layout as default.
you can use this on a Standard SAP ALV Report without any coding .
Hope this helps
Amarpreet.
Message was edited by: Amarpreet Singh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.