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

check box enable

Former Member
0 Likes
976

Hi I am displaying a popup with checkbox using function module 'REUSE_ALV_POPUP_TO_SELECT'.But that check box is disable.I want to know how to make it editable.

4 REPLIES 4
Read only

Former Member
0 Likes
680

Hi,

This is the sample code.

CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'

EXPORTING

i_selection = 'X'

i_zebra = 'X'

it_fieldcat = lt_fieldcat

i_tabname = 'GT_USER'

i_checkbox_fieldname = 'CHECKBOX'

is_private = ls_private

IMPORTING

e_exit = l_exit

TABLES

t_outtab = gt_user.

Check if u have passed the correct paramter to Fm.

Reward if helpful.

Regards,

Ramya

Read only

JozsefSzikszai
Active Contributor
0 Likes
680

hi Praveen,

import parameter I_SELECTION of the FM has to be 'X'

hope this helps

ec

Read only

p291102
Active Contributor
0 Likes
680

Hi,

Following report is the sample report for checkbox alv report.

REPORT YMS_CHECKBOXALV.

TYPE-POOLS: slis.

DATA: t_fieldcatalog TYPE slis_t_fieldcat_alv.

DATA: s_fieldcatalog TYPE slis_fieldcat_alv.

DATA: s_layout TYPE slis_layout_alv.

DATA: BEGIN OF itab OCCURS 0,

icon TYPE icon-id,

vbeln TYPE vbeln,

kunnr TYPE kunnr,

erdat TYPE erdat,

box TYPE c,

END OF itab.

DATA: v_repid TYPE syrepid.

START-OF-SELECTION.

  • Get the data.

SELECT vbeln kunnr erdat UP TO 100 ROWS

FROM vbak

INTO CORRESPONDING FIELDS OF TABLE itab.

IF sy-subrc <> 0.

MESSAGE s208(00) WITH 'No data found'.

LEAVE LIST-PROCESSING.

ENDIF.

  • Modify the record with red light.

itab-icon = '@0A@'.

MODIFY itab TRANSPORTING icon WHERE NOT vbeln IS initial.

v_repid = sy-repid.

  • Get the field catalog.

CLEAR: s_fieldcatalog.

s_fieldcatalog-col_pos = '1'.

s_fieldcatalog-fieldname = 'ICON'.

s_fieldcatalog-tabname = 'ITAB'.

s_fieldcatalog-seltext_l = 'Status'.

s_fieldcatalog-icon = 'X'.

APPEND s_fieldcatalog TO t_fieldcatalog.

CLEAR: s_fieldcatalog.

s_fieldcatalog-col_pos = '2'.

s_fieldcatalog-fieldname = 'VBELN'.

s_fieldcatalog-tabname = 'ITAB'.

s_fieldcatalog-rollname = 'VBELN'.

APPEND s_fieldcatalog TO t_fieldcatalog.

CLEAR: s_fieldcatalog.

s_fieldcatalog-col_pos = '3'.

s_fieldcatalog-fieldname = 'KUNNR'.

s_fieldcatalog-tabname = 'ITAB'.

s_fieldcatalog-rollname = 'KUNNR'.

APPEND s_fieldcatalog TO t_fieldcatalog.

CLEAR: s_fieldcatalog.

s_fieldcatalog-col_pos = '4'.

s_fieldcatalog-fieldname = 'ERDAT'.

s_fieldcatalog-tabname = 'ITAB'.

s_fieldcatalog-rollname = 'ERDAT'.

APPEND s_fieldcatalog TO t_fieldcatalog.

  • Set the layout.

s_layout-box_fieldname = 'BOX'.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

i_callback_program = v_repid

is_layout = s_layout

i_callback_pf_status_set = 'SET_PF_STATUS'

i_callback_user_command = 'USER_COMMAND'

it_fieldcat = t_fieldcatalog[]

TABLES

t_outtab = itab.

----


  • FORM SET_PF_STATUS *

----


  • ........ *

----


  • --> EXTAB *

----


FORM set_pf_status USING extab TYPE slis_t_extab.

SET PF-STATUS 'TEST2'.

ENDFORM.

----


  • FORM user_command *

----


  • ........ *

----


  • --> UCOMM *

  • --> SELFIELD *

----


FORM user_command USING ucomm LIKE sy-ucomm

selfield TYPE slis_selfield.

  • Check the ucomm.

IF ucomm = 'DETAIL'.

LOOP AT itab WHERE box = 'X'.

itab-icon = '@08@'.

MODIFY itab TRANSPORTING icon.

ENDLOOP.

ENDIF.

selfield-refresh = 'X'.

ENDFORM.

Thanks,

Sankar M

Read only

Former Member
0 Likes
680

HI ,

sorry boss ..

check this ..

&----


*& Report Z_VISHVAS_ALV1

*&

&----


*&

*&

&----


report z_vishvas_alv1.

type-pools: slis.

data: begin of i_outtab occurs 0.

include structure sflight.

data: w_chk type c. "For multiple selection

data: end of i_outtab.

  • I_OUTTAB TYPE SFLIGHT OCCURS 0,

data: i_private type slis_data_caller_exit,

i_selfield type slis_selfield,

w_exit(1) type c.

parameters: p_title type sy-title.

*

start-of-selection.

select * from sflight into table i_outtab.

call function 'REUSE_ALV_POPUP_TO_SELECT'

exporting

i_title = p_title

i_selection = 'X'

i_zebra = 'X'

  • I_SCREEN_START_COLUMN = 0

  • I_SCREEN_START_LINE = 0

  • I_SCREEN_END_COLUMN = 0

  • I_SCREEN_END_LINE = 0

i_checkbox_fieldname = 'W_CHK'

  • I_LINEMARK_FIELDNAME =

  • I_SCROLL_TO_SEL_LINE = 'X'

i_tabname = 'I_OUTTAB'

i_structure_name = 'SFLIGHT'

  • IT_FIELDCAT =

  • IT_EXCLUDING =

  • I_CALLBACK_PROGRAM =

  • I_CALLBACK_USER_COMMAND =

  • IS_PRIVATE = I_PRIVATE

importing

es_selfield = i_selfield

e_exit = w_exit

tables

t_outtab = i_outtab

exceptions

program_error = 1

others = 2.

if sy-subrc <> 0.

  • MESSAGE i000(0k) WITH sy-subrc.

endif.

*****the internal table is modified with a cross sign for marking the

***rows selected

loop at i_outtab where w_chk = 'X'.

write: / i_outtab-carrid, i_outtab-price.

endloop.

regards,

venkat.

Edited by: venkat appikonda on Mar 17, 2008 9:54 AM