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

Multiple rows

Former Member
0 Likes
994

Hi,

In ALV, Can anyone let me know how to select multiple rows using the FM : REUSE_ALV_GRID_DISPLAY.

Thanks.

6 REPLIES 6
Read only

Former Member
0 Likes
828

Hi,

In IT_FIELDCAT you can pass one field with attributes of check box.

for example.

Declare:

DATA: GT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,

FIELDCAT_LN LIKE LINE OF GT_FIELDCAT.

Pass the below values.

FIELDCAT_LN-FIELDNAME = 'CHECK'.

FIELDCAT_LN-TABNAME = 'ITAB1'.

FIELDCAT_LN-KEY = ' '. "SUBTOTAL KEY

FIELDCAT_LN-NO_OUT = ' '.

FIELDCAT_LN-SELTEXT_L = 'Check Box'.

FIELDCAT_LN-CHECK-BOX = 'X'.

APPEND FIELDCAT_LN TO GT_FIELDCAT.

Read only

0 Likes
828

Declare table with a field say 'BOX'. For the Layout, set the box_fieldname = 'BOX'. Then with these, U will be able to see a checkbox as the first column. With the Control key, U will be able to select multiple rows.

Read only

Former Member
0 Likes
828

Hi

By program or keyboard?

you should insert field for checkbox in your output table and indicate the name of this field in layout structure (field box_fieldname).

By keyboard: press the checkbox using mouse and CTRL or SHIFT.

Max

Message was edited by: max bianchi

Read only

Former Member
0 Likes
828

Hi,

There is a Structure <b>LVC_S_LAVO</b>, in this there is a field name <b>NO_ROWMARK</b>, if this is X , the button at the beginning of a row is hidden is selection mode cell selection(SEL_MODE = 'D') and column/row selection(SEL_MODE = 'A')

Here select the

1) SEL_MODE = 'A', then it is possible to select multiple rows and columns

2) SEL_MODE = 'B', then it Simple selection list , you can select multiple rows and columns

3) SEL_MODE = 'C', then it a Multiple selection list Box, you can select multiple rows and columns

4) SEL_MODE = 'D', then it a Sel selection , you can select multiple rows and columns

Hope you understand

Regards

Sudheer

Read only

0 Likes
828

Hi,

I dont want a check box in my layout. I did try using LVC_S_LAVO but I am able to select only one record not multiple records.

Below is the code:

FORM PREPARE_LAYOUT CHANGING PS_LAYOUT TYPE LVC_S_LAYO.

PS_LAYOUT-ZEBRA = 'X'.

PS_LAYOUT-SEL_MODE = 'A'.

PS_LAYOUT-SMALLTITLE = 'X'.

ENDFORM. "PREPARE_LAYOUT

Read only

Former Member
0 Likes
828

Hi

Which version are you on ? On 4.7 defining box_fieldname = 'Somefieldname' for layout (slis_layout_alv) works.

- Kalpana