06-06-2008 7:28 PM
I am using the method CALL METHOD ALV_GRID->SET_TABLE_FOR_FIRST_DISPLAY to get a grid ALV.
I want to get the Seltab for the Grid.
How can we do that?
Someone help me with that please.Its urgent.
Thanks,
Sneha Singh.
06-06-2008 8:12 PM
For this, in the layout, set sel_mode = 'A' .
If your layout is of the type LVC_S_LAYO , there is a field called Sel_mode. Make it 'A' .
DATA : GS_LAYOUT TYPE LVC_S_LAYO.
INITIALIZATION.
PERFORM LAYOUT_BUILD.
FORM LAYOUT_BUILD .
CLEAR: GS_LAYOUT.
GS_LAYOUT-SEL_MODE = 'A'. "Allow selection of lines
GS_LAYOUT-CWIDTH_OPT = 'X'. "Optimize column width
GS_LAYOUT-ZEBRA = 'X'.
GS_LAYOUT-NO_TOOLBAR = ' '.
ENDFORM.
06-06-2008 7:59 PM
I dont thin your query is very clear...anyways refer to this SAP Standard program for reference -
BCALV_GRID_DEMO
06-06-2008 8:02 PM
Hello,
I suggest you to read this: [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907].
Regards.
06-06-2008 8:12 PM
For this, in the layout, set sel_mode = 'A' .
If your layout is of the type LVC_S_LAYO , there is a field called Sel_mode. Make it 'A' .
DATA : GS_LAYOUT TYPE LVC_S_LAYO.
INITIALIZATION.
PERFORM LAYOUT_BUILD.
FORM LAYOUT_BUILD .
CLEAR: GS_LAYOUT.
GS_LAYOUT-SEL_MODE = 'A'. "Allow selection of lines
GS_LAYOUT-CWIDTH_OPT = 'X'. "Optimize column width
GS_LAYOUT-ZEBRA = 'X'.
GS_LAYOUT-NO_TOOLBAR = ' '.
ENDFORM.