Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ALV GRID- Remove leftmost pushbuttons

Former Member
0 Likes
1,423

Hi Experts,

I want to remove the pushbuttons in the left edge of ALV GRID Display,

Thsi has appeared as I have added Checkbox in GRID Display.

Please help me to remove these pushbuttons.

Regards,

Suruchi

Edited by: Suruchi Nandanpawar on Jan 21, 2009 11:59 AM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,362

Hi All,

Code is:

DATA: wa_fieldcat TYPE slis_fieldcat_alv.

wa_fieldcat-fieldname = 'SELECT'.

wa_fieldcat-seltext_m = 'SELECT'.

wa_fieldcat-checkbox = 'X'.

wa_fieldcat-input = 'X'.

wa_fieldcat-edit = 'X'.

APPEND wa_fieldcat TO it_fieldcat.

CLEAR wa_fieldcat.

wa_fieldcat-fieldname = 'MATNR'.

wa_fieldcat-seltext_m = 'Material No.'.

APPEND wa_fieldcat TO it_fieldcat.

CLEAR wa_fieldcat.

.

.

.

.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_grid_title = 'Demo for Checkbox in ALV GRID'

  • is_layout = it_layout

it_fieldcat = it_fieldcat

i_default = 'X'

i_save = ' '

TABLES

t_outtab = it_mara.

========================================================================

SELECT is the column name where checkbox is placed.

If I dont give these lines of code, there are no pushbuttons (which are normally used to selecting row(s)) at leftmost of ALV GRID..

However, I want checkbox, without those pushbuttons.

Please help.

Regards,

Suruchi

Edited by: Suruchi Nandanpawar on Jan 22, 2009 6:28 AM

10 REPLIES 10
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,362

Hello,

In the layout you must have populated the BOX_FIELDNAME field.

Comment that code.

BR,

Suhas

Read only

Former Member
0 Likes
1,362

Hi Suruchi,

As per my knowledge, i dont think it is possible to remove the push button that is generated automatically for ALV Grid.

Best Regards,

Ram.

Read only

Former Member
0 Likes
1,362

Hi...for ur layout

call method grid2->set_table_for_first_display

exporting

is_layout = gs_layout

changing it_fieldcatalog = gt_fieldcat[]

it_outtab = gt_sbook.

put gs_layout-SEL_MODE = 'C'.

SEL_MODE. Selection mode, determines how rows can be selected. Can have the following values:

· A Multiple columns, multiple rows with selection buttons.

· B Simple selection, listbox, Single row/column

· C Multiple rows without buttons

· D Multiple rows with buttons and select all ICON

Read only

robert_altenstraer
Active Participant
0 Likes
1,362

Hi this should help.. NO_ROWMARK = 'X'

top include



DATA: wa_layout       TYPE lvc_s_layo.     

... at pbo


wa_layout-no_rowmark = 'X'.


  call method alv_grid->set_table_for_first_display
    exporting
*    I_BUFFER_ACTIVE               =
*    I_BYPASSING_BUFFER            =
*    I_CONSISTENCY_CHECK           =
*     i_structure_name              = 'S_ATAB'
    IS_VARIANT                    = my_variant
     i_save                        = 'A'
*     I_DEFAULT                     = 'X'
*   is_layout                     = wa_layout
*    IS_PRINT                      =
*    IT_SPECIAL_GROUPS             =

Read only

Former Member
0 Likes
1,363

Hi All,

Code is:

DATA: wa_fieldcat TYPE slis_fieldcat_alv.

wa_fieldcat-fieldname = 'SELECT'.

wa_fieldcat-seltext_m = 'SELECT'.

wa_fieldcat-checkbox = 'X'.

wa_fieldcat-input = 'X'.

wa_fieldcat-edit = 'X'.

APPEND wa_fieldcat TO it_fieldcat.

CLEAR wa_fieldcat.

wa_fieldcat-fieldname = 'MATNR'.

wa_fieldcat-seltext_m = 'Material No.'.

APPEND wa_fieldcat TO it_fieldcat.

CLEAR wa_fieldcat.

.

.

.

.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_grid_title = 'Demo for Checkbox in ALV GRID'

  • is_layout = it_layout

it_fieldcat = it_fieldcat

i_default = 'X'

i_save = ' '

TABLES

t_outtab = it_mara.

========================================================================

SELECT is the column name where checkbox is placed.

If I dont give these lines of code, there are no pushbuttons (which are normally used to selecting row(s)) at leftmost of ALV GRID..

However, I want checkbox, without those pushbuttons.

Please help.

Regards,

Suruchi

Edited by: Suruchi Nandanpawar on Jan 22, 2009 6:28 AM

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,362

Hello Suruchi,

This is how ALV Grid behaves !!!

If you use ALV List(REUSE_ALV_LIST_DISPLAY) you will overcome this problem.

Upto you to decide.

BR,

Suhas

Read only

0 Likes
1,362

Hi Suruchi,

Go with this code, it will be resolved.

DATA: wa_fieldcat TYPE LVC_S_FCAT, " slis_fieldcat_alv,

it_fieldcat TYPE LVC_T_FCAT, " slis_t_fieldcat_alv,

it_layout TYPE LVC_S_LAYO, " slis_layout_alv,

it_mara TYPE TABLE OF mara WITH HEADER LINE.

wa_fieldcat-fieldname = 'SELECT'.

wa_fieldcat-seltext = 'SELECT'.

wa_fieldcat-checkbox = 'X'.

wa_fieldcat-edit = 'X'.

APPEND wa_fieldcat TO it_fieldcat.

CLEAR wa_fieldcat.

wa_fieldcat-fieldname = 'MATNR'.

wa_fieldcat-seltext = 'Material No.'.

APPEND wa_fieldcat TO it_fieldcat.

CLEAR wa_fieldcat.

SELECT * FROM mara INTO TABLE it_mara UP TO 30 ROWS.

it_layout-cwidth_opt = 'X'.

it_layout-no_rowmark = 'X'.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'

EXPORTING

I_GRID_TITLE = 'Demo for Checkbox in ALV GRID'

IS_LAYOUT_LVC = it_layout

IT_FIELDCAT_LVC = it_fieldcat

I_DEFAULT = 'X'

I_SAVE = ' '

TABLES

t_outtab = it_mara.

Regards,

CK

Read only

0 Likes
1,362

Hi Chandan,

Thanks a lot.

Now pushbuttons disaopeared.

However, now field names (colume names which is set in SELTEXT) is not coming.

1 problem solves, n other raised.

Regards,

Suruchi

Edited by: Suruchi Nandanpawar on Jan 22, 2009 10:03 AM

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,362

Hello Use,


wa_fieldcat-scrtext_m = 'SELECT'.
wa_fieldcat-scrtext_m = 'Material No.'.

It will work.

Suhas

Read only

0 Likes
1,362

Thanks Chandan & Suhas

Its working fine

Regards,

Suruchi