Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

alv reports

Hi friends,

How can I make check box enabled/disabled in ALV report can any one give me the solution .

Thanks In advance,

sasi.

Tags:
Former Member
replied

Hi

go thru in this pgm.

report zreport.

TYPE-POOLS : slis.

DATA : BEGIN OF itab OCCURS 0.

INCLUDE STRUCTURE t001.

<b>DATA : flag tyPE c,</b>

END OF itab.

DATA : alvfc TYPE slis_t_fieldcat_alv.

DATA : alvly TYPE slis_layout_alv.

SELECT * FROM t001 INTO TABLE itab.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

i_program_name = sy-repid

i_internal_tabname = 'ITAB'

i_inclname = sy-repid

CHANGING

ct_fieldcat = alvfc

EXCEPTIONS

inconsistent_interface = 1

program_error = 2

OTHERS = 3.

<b>alvly-box_fieldname = 'FLAG'.</b>

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

it_fieldcat = alvfc

i_callback_program = sy-repid

i_callback_user_command = 'USER_COMMAND'

is_layout = alvly

TABLES

t_outtab = itab

EXCEPTIONS

program_error = 1

OTHERS = 2.

FORM user_command USING whatcomm TYPE sy-ucomm whatrow TYPE

slis_selfield.

data : msg(100) type c.

LOOP AT itab.

if itab-flag = 'X'.

msg = sy-tabix.

condense msg.

concatenate 'Row Number ' msg ' ' into msg

separated by space.

message msg type 'I'.

endif.

ENDLOOP.

ENDFORM. "user_command

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question