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

FUNCTION 'REUSE_ALV_GRID_DISPLAY' with checkbox

Former Member
0 Likes
2,529

Hello,

A short question.

I'm using the function 'REUSE_ALV_GRID_DISPLAY'. One of the columns is a character field which is displayed as a checkbox in the ALV by enabling the key "checkbox" and I also enable the "edit" key in the field catalog structure. So far so good.

But my question is the following:

When I set the key "edit" to false the ALV grid is displayed in a nice color grid. But when I enable the edit key the whole grid is showed in gray without the checkbox. Is it possible to set the checkbox to edit mode and also display the ALV grid in color?

An other question I have is the following:

Who could give me an example to use the grid in combination with special groups.

Kind regards,

Richard Meijn

Hello,

A short question.

I'm using the function 'REUSE_ALV_GRID_DISPLAY'. One of the columns is a character field which is displayed as a checkbox in the ALV by enabling the key "checkbox" and I also enable the "edit" key in the field catalog structure. So far so good.

But my question is the following:

When I set the key "edit" to false the ALV grid is displayed in a nice color grid. But when I enable the edit key the whole grid is showed in gray without the checkbox. Is it possible to set the checkbox to edit mode and also display the ALV grid in color?

An other question I have is the following:

Who could give me an example to use the grid in combination with special groups.

Kind regards,

Richard Meijn

6 REPLIES 6
Read only

Former Member
0 Likes
1,722

Hi richard,

It will work fine.can you just send across the code so that it will be more clear.

Regards

Sandeep

Read only

Former Member
0 Likes
1,722

Hi r meijn,

1. the field catalogue for this column,

in that set the EDIT field,

either to 0 or 1.

2. Due to this, only THIS COLUMN

will get affetected,

there should be no change in the colour or the grid.

regards,

amit m.

Read only

Former Member
0 Likes
1,722

I'll put the most important parts of my code here:

When I anable the line "ls_fieldcat-edit = abap_true."

for the field 'ATB_SEL' the grid is showed in gray?

REPORT YMM_ATB_LIJST_GOEDGEKEURD2 no standard page heading

message-id ycdg.

TYPE-POOLS: SLIS,

sdydo,

abap, "ABAP reporting types / constants

icon. "Possible icons

.

DATA: fieldcatalog TYPE slis_t_fieldcat_alv ,

gd_tab_group TYPE slis_t_sp_group_alv,

gd_layout TYPE slis_layout_alv,

gd_repid LIKE sy-repid.

----


  • Internal tables, needed for ALV formatting

----


DATA: ta_comment TYPE slis_t_listheader. "Top of page of the ALV

INCLUDE <icon>.

$$----


*

*-- Constants

$$----


*

CONSTANTS:

co_background_alv TYPE sdydo_key VALUE 'ALV_WALLPAPER',

co_save TYPE c VALUE 'A',

co_msgty_inf TYPE symsgty VALUE 'I'.

----


  • Constants for interactive functions of an ALV

----


CONSTANTS:

co_double_click TYPE syucomm VALUE '&IC1', "CHOOSE / F2

----


  • Customer interactive functions for the ALV

----


co_sec_list

TYPE syucomm VALUE 'SEC_LIST'.

"Secundary list

----


  • Names of the routines to be called dynamically from the ALV function

----


CONSTANTS:

co_rout_pf_stat TYPE char30 VALUE 'R0_SET_PF_STATUS',

co_rout_ucomm TYPE char30 VALUE 'R1_PROCESS_USER_COMMAND',

co_rout_top_of_page TYPE char30 VALUE 'R2_SET_TOP_OF_PAGE',

co_rout_html_top TYPE char30 VALUE 'R3_SET_HTML_TOP_OF_PAGE',

co_rout_html_end TYPE char30 VALUE 'R4_SET_HTML_END_OF_LIST',

co_rout_pf_stat_sec TYPE char30 VALUE 'R5_SET_PF_STATUS_SEC',

co_rout_ucomm_sec TYPE char30 VALUE 'R6_PROCESS_UCOMM_SEC',

co_rout_top_page_sec TYPE char30 VALUE 'R7_SET_TOP_OF_PAGE_SEC'.

CONSTANTS:

co_struc TYPE tabname VALUE '/CTAC/S_ALV_STRUCTURE',

co_struc_sec TYPE tabname VALUE '/CTAC/S_ALV_STRUC_SEC'.

CONSTANTS: line_feed(2) TYPE x VALUE '0D0A'.

FIELD-SYMBOLS <crlf> TYPE x.

DATA: w_crlf(2) TYPE c.

ASSIGN w_crlf TO <crlf> CASTING.

<crlf> = line_feed.

DATA:

BEGIN OF IT_EBAN occurs 0,

ATB_SEL(1) TYPE C, " Selectie optie om geselecteerde

" ATB's uit te printen.

ATB_FORM(4), " ATB icon om ingevoerd ATB-formulier

" te tonen.

banfn LIKE EBAN-banfn, " Aanvraag-tot-bestellen-nummer

bnfpo LIKE EBAN-bnfpo, " Positienummer van

" aanvraag tot bestellen

txz01 LIKE EBAN-txz01, " Korte tekst

matkl LIKE MARA-matkl, " Goederengroep

lifnr LIKE EBAN-lifnr, " Gewenste leverancier

name1 LIKE lfa1-name1, " Gewenste leverancier

lfdat LIKE EBAN-lfdat, " Leveringsdatum van de positie

opm(1) TYPE C,

bijlage(1) TYPE C,

controle(1) TYPE C, " Advies geselecteerd

onvolledig(1) TYPE C, "Om aan te geven dat er

" ongekeurde regels

" zijn

c_koptekst(1) TYPE C, " Om aan te geven dat er

" kopteksten zijn

badat LIKE EBAN-badat, " Aanvraagdatum

kritisch(1) TYPE C, " Om aan te geven dat de bestelling

" kritisch is

workflow(1) TYPE C, "Om aan te geven dat er nog een WF

" voor loopt

wf_old(1) TYPE C, "Er is een afgesloten WF of lopende WF

wi_id TYPE sww_wiid,

ernam LIKE eban-ernam, " Naam van de medewerker die

" het object heeft toegevoegd

preis LIKE EBAN-preis, " Prijs in de aanvraag tot bestellen

peinh LIKE EBAN-peinh, " Prijseenheid

menge LIKE EBAN-menge, " ATB-hoeveelheid

totaal TYPE GSWRT,

waers LIKE EBAN-waers, " Valutacode

koptekst TYPE string,

END OF it_eban.

*DATA: it_eban TYPE TABLE OF t_eban ,

DATA: wa_eban like it_eban.

*TYPES: BEGIN OF T_EBAN2,

DATA:

BEGIN OF IT_EBAN2 occurs 0,

BANFN LIKE EBAN-BANFN, " Aanvraag-tot-bestellen-nummer

BNFPO LIKE EBAN-BNFPO, " Positienummer van

" aanvraag tot bestellen

TXZ01 LIKE EBAN-TXZ01, " Korte tekst

MATKL LIKE MARA-MATKL, " Goederengroep

LIFNR LIKE EBAN-LIFNR, " Gewenste leverancier

NAME1 LIKE LFA1-NAME1, " Gewenste leverancier

END OF it_eban2.

*DATA: IT_EBAN2 TYPE TABLE OF T_EBAN2 with header line.

DATA: wa_eban2 like it_eban2.

*****************************************

  • DATA voor uitprinten rapporten

DATA: PARAMS LIKE PRI_PARAMS,

DAYS(1) TYPE N VALUE 2,

COUNT(3) TYPE N VALUE 1,

VALID TYPE C,

E_USR01 LIKE USR01.

DATA: BEGIN OF kopteksten OCCURS 1.

INCLUDE STRUCTURE tline.

DATA: END OF kopteksten.

DATA: BEGIN OF atb_kopteksten OCCURS 1,

banfn TYPE banfn.

INCLUDE STRUCTURE tline.

DATA: END OF atb_kopteksten.

DATA: line(256) TYPE c,

text_tab LIKE STANDARD TABLE OF line.

DATA: BEGIN OF atb_nummers OCCURS 1,

banfn type thead-tdname,

END OF atb_nummers.

DATA: BEGIN OF tlinetab OCCURS 10.

INCLUDE STRUCTURE tline.

DATA: END OF tlinetab.

DATA: BEGIN OF teksten OCCURS 10,

id(1),

veld(25),

waarde(40).

DATA: END OF teksten.

******************Workflow********************************************

DATA: worklist TYPE TABLE OF swr_wihdr,

wa_worklist TYPE swr_wihdr,

ibf_object TYPE sibflporb.

************************************************************************

DATA: prev_banfn type banfn.

DATA: theader LIKE thead,

name_atb LIKE thead-tdname,

bedrijfsnr LIKE pa0001-bukrs.

DATA: ok_code LIKE sy-ucomm,

save_ok LIKE sy-ucomm.

DATA: lpos TYPE I.

DATA: box(1) TYPE c.

DATA: lines TYPE I.

DATA: veld(20),

G_REPID LIKE SY-REPID,

init,

container TYPE REF TO cl_gui_custom_container,

editor TYPE REF TO cl_gui_textedit.

DATA: banfn_vorige TYPE banfn.

DATA: P_BANFN TYPE BANFN.

DATA: BUKRS LIKE PA0001-BUKRS.

DATA: Radio1, RADIO2, RADIO3.

  • Lijst kolomnamen

DATA: H1(6) VALUE 'ATB-nr',

H2(40) VALUE 'Omschrijving',

H3(2) VALUE 'GG',

H4(5) VALUE 'Levnr',

H5(35) VALUE 'Leverancier',

H6(10) VALUE 'Lev. Datum',

H7(6) VALUE '!BOCAT',

H8(10) VALUE 'Aanvr dat.',

H9(12) VALUE 'Invoerder',

H10(13) VALUE ' Totaal',

H11(3) VALUE 'Val'.

DATA: X TYPE I.

CALL screen 100.

INITIALIZATION.

PERFORM personeelsgegevens.

g_repid = sy-repid.

Part tor collect the data

&----


*& Form BUILD_ALV_REPORT

&----


  • text

----


FORM BUILD_ALV_REPORT.

perform build_field_cat CHANGING fieldcatalog[].

----


  • After building the field catalog (e.g., from a DDIC structure), we can

  • modify these settings in the following subroutine.

----


PERFORM modify_fieldcatalog CHANGING fieldcatalog[].

IF Not fieldcatalog is initial.

perform collect_data.

perform build_layout CHANGING gd_layout.

----


  • Table ta_comment is used to display header information in the

  • top-of-page of the ALV output.

----


PERFORM build_comment CHANGING ta_comment[].

----


  • Table gd_tab_group wordt gebruikt om een groepering op te bouwen.

----


PERFORM build_group CHANGING gd_tab_group[].

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

  • I_INTERFACE_CHECK = ' '

  • I_BYPASSING_BUFFER = ' '

  • I_BUFFER_ACTIVE = ' '

I_CALLBACK_PROGRAM = g_repid

  • I_CALLBACK_PF_STATUS_SET = ' '

I_CALLBACK_USER_COMMAND = co_rout_ucomm

I_CALLBACK_TOP_OF_PAGE = co_rout_top_of_page

  • I_CALLBACK_HTML_TOP_OF_PAGE = ' '

  • I_CALLBACK_HTML_END_OF_LIST = ' '

  • I_STRUCTURE_NAME =

I_BACKGROUND_ID = co_background_alv

I_GRID_TITLE = 'Lijst goedgekeurde ATBs'

  • I_GRID_SETTINGS =

IS_LAYOUT = gd_layout

IT_FIELDCAT = fieldcatalog

  • IT_EXCLUDING =

IT_SPECIAL_GROUPS = gd_tab_group[]

  • IT_SORT =

  • IT_FILTER =

  • IS_SEL_HIDE =

  • I_DEFAULT = 'X'

  • I_SAVE = ' '

  • IS_VARIANT =

  • IT_EVENTS =

  • IT_EVENT_EXIT =

  • IS_PRINT =

  • IS_REPREP_ID =

I_SCREEN_START_COLUMN = 0

  • I_SCREEN_START_LINE = 0

  • I_SCREEN_END_COLUMN = 0

  • I_SCREEN_END_LINE = 0

  • IT_ALV_GRAPHICS =

  • IT_HYPERLINK =

  • IT_ADD_FIELDCAT =

  • IT_EXCEPT_QINFO =

  • I_HTML_HEIGHT_TOP =

  • I_HTML_HEIGHT_END =

  • IMPORTING

  • E_EXIT_CAUSED_BY_CALLER =

  • ES_EXIT_CAUSED_BY_USER =

TABLES

T_OUTTAB = it_eban

  • EXCEPTIONS

  • PROGRAM_ERROR = 1

  • OTHERS = 2

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDIF.

  • SET PF-STATUS 'xxxxxxxx'.

  • SET TITLEBAR 'xxx'.

ENDFORM. " BUILD_ALV_REPORT

&----


*& Form build_field_cat

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM build_field_cat CHANGING cta_fcat TYPE slis_t_fieldcat_alv.

DATA: ls_fieldcat TYPE slis_fieldcat_alv.

  • DATA: ls_fieldcat type slis_t_fieldcat_alv with header line.

refresh fieldcatalog.

clear fieldcatalog.

  • ls_fieldcat-fieldname = 'BANFN'.

  • ls_fieldcat-ref_tabname = 'eban'.

  • ls_fieldcat-ref_fieldname = 'banfn'.

  • ls_fieldcat-checkbox = abap_true.

    • fieldcatalog-seltext_m = 'Aanvr nr'.

  • ls_fieldcat-col_pos = 0.

    • fieldcatalog-outputlen = 8.

  • ls_fieldcat-emphasize = abap_true.

  • ls_fieldcat-key = abap_true.

  • append ls_fieldcat to fieldcatalog.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

I_PROGRAM_NAME = g_repid

I_INTERNAL_TABNAME = 'IT_EBAN'

  • I_STRUCTURE_NAME = 'IT_EBAN2'

  • I_CLIENT_NEVER_DISPLAY = abap_true

I_INCLNAME = g_repid

  • I_BYPASSING_BUFFER =

  • I_BUFFER_ACTIVE =

CHANGING

CT_FIELDCAT = fieldcatalog

EXCEPTIONS

INCONSISTENT_INTERFACE = 1

PROGRAM_ERROR = 2

OTHERS = 3

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDFORM. " build_field_cat

&----


*& Form modify_fieldcatalog

&----


  • Modify the field catalog for the primary list, if needed!

  • You can set attributes for every column in the ALV output by

  • selecting the fieldname belonging to the column.

  • For an overview of the attributes available, see the

  • online documentation of function module REUSE_ALV_GRID_DISPLAY.

----


FORM modify_fieldcatalog CHANGING cta_fcat TYPE slis_t_fieldcat_alv.

DATA: ls_fieldcat TYPE slis_fieldcat_alv.

----


  • Modify the field catalog according to the requirements.

  • Some examples are shown below.

----


LOOP AT cta_fcat INTO ls_fieldcat.

CASE ls_fieldcat-fieldname.

WHEN 'ATB_SEL'.

ls_fieldcat-seltext_m = 'ATB check'.

ls_fieldcat-outputlen = 2.

ls_fieldcat-edit = abap_true.

ls_fieldcat-input = 'X'.

ls_fieldcat-checkbox = abap_true.

WHEN 'ATB_FORM'.

ls_fieldcat-seltext_m = 'ATB formulier'.

ls_fieldcat-hotspot = abap_true.

  • ls_fieldcat-seltext_s = icon_protocol.

ls_fieldcat-outputlen = 2.

ls_fieldcat-icon = abap_true.

WHEN 'BANFN'.

ls_fieldcat-hotspot = abap_true.

WHEN 'NAME1'.

ls_fieldcat-ddictxt = 'S'.

  • ls_fieldcat-emphasize = abap_true.

  • ls_fieldcat-key = abap_true.

WHEN 'OPM'.

ls_fieldcat-seltext_m = 'O'.

ls_fieldcat-outputlen = 1.

WHEN 'BIJLAGE'.

ls_fieldcat-seltext_m = 'B'.

ls_fieldcat-outputlen = 1.

WHEN 'CONTROLE'.

ls_fieldcat-seltext_m = 'C'.

ls_fieldcat-outputlen = 1.

WHEN 'ONVOLLEDIG'.

ls_fieldcat-seltext_m = abap_true.

ls_fieldcat-outputlen = 1.

WHEN 'C_KOPTEKST'.

ls_fieldcat-seltext_m = 'T'.

ls_fieldcat-hotspot = abap_true.

ls_fieldcat-outputlen = 1.

WHEN 'KRITISCH'.

ls_fieldcat-seltext_m = '!'.

ls_fieldcat-outputlen = 1.

WHEN 'WORKFLOW'.

ls_fieldcat-seltext_m = 'W'.

ls_fieldcat-outputlen = 1.

WHEN 'WF_OLD'.

ls_fieldcat-seltext_m = 'A'.

ls_fieldcat-hotspot = abap_true.

ls_fieldcat-sp_group = 'A'.

ls_fieldcat-outputlen = 1.

WHEN 'KOPTEKST'.

ls_fieldcat-seltext_m = 'Koptekst'.

ls_fieldcat-hotspot = abap_false.

ls_fieldcat-outputlen = 25.

ENDCASE.

MODIFY fieldcatalog from ls_fieldcat.

clear ls_fieldcat.

endloop.

ENDFORM. " modify_fieldcatalog

&----


*& Module USER_COMMAND_0500 INPUT

&----


  • text

----


MODULE USER_COMMAND_0500 INPUT.

*

IF 500 = 500.

ENDIF.

ENDMODULE. " USER_COMMAND_0500 INPUT

&----


*& Module USER_COMMAND_0510 INPUT

&----


  • text

----


MODULE USER_COMMAND_0510 INPUT.

IF 510 = 510.

ENDIF.

ENDMODULE. " USER_COMMAND_0510 INPUT

&----


*& Form r1_process_user_command

&----


  • This routine deals with the "non-standard" GUI-functions.

  • It enables you to do the following:

  • - Double-click or click on a hotspotted field

  • - Implement your own GUI-functions

  • You'll find some predefined examples in this routine.

----


FORM r1_process_user_command "#EC CALLED

USING utp_ucomm TYPE syucomm

utp_selfield TYPE slis_selfield.

  • DATA: lta_list_sec TYPE TABLE OF /ctac/s_alv_struc_sec.

DATA: ltp_repid TYPE syrepid.

  • DATA: ltp_ebeln_num(10) TYPE n.

  • DATA: ltp_ebeln TYPE ebeln.

  • DATA: ltp_matnr TYPE matnr.

  • DATA: ltp_matnr_char(18) TYPE c.

*

----


  • Handle the specific user-commands.

*

----


CASE utp_ucomm.

----


  • Handle double click or hotspot on a specific field. *

  • These are some examples *

----


WHEN co_double_click.

read table IT_EBAN index utp_selfield-tabindex.

CASE utp_selfield-fieldname.

WHEN 'ATB_FORM'.

SUBMIT ymm_atb_formulierprint AND RETURN

WITH sel_atb = it_eban-banfn. " utp_selfield-value.

WHEN 'BANFN'.

  • CHECK NOT wa_eban IS INITIAL.

SET PARAMETER ID 'BAN' FIELD it_eban-banfn.

CALL FUNCTION 'ENQUEUE_EMEBANE'

EXPORTING

banfn = it_eban-banfn

bnfpo = it_eban-bnfpo.

IF sy-subrc = 0.

CALL FUNCTION 'DEQUEUE_EMEBANE'

EXPORTING

banfn = it_eban-banfn

bnfpo = it_eban-bnfpo.

CALL TRANSACTION 'ME53N' AND SKIP FIRST SCREEN.

  • WAIT UP TO 1 SECONDS.

  • LEAVE TO TRANSACTION 'YME60_INK'.

ENDIF.

WHEN 'WF_OLD'.

ibf_object-catid = 'BO'.

ibf_object-typeid = 'ZBUS2105'.

ibf_object-instid(3) = '000'.

WRITE it_eban-banfn TO ibf_object-instid+3.

CALL FUNCTION 'SWI_WF_CONNECTIONS_DISPLAY'

EXPORTING

ibf_object = ibf_object

popup = space.

WHEN 'C_KOPTEKST'.

CALL SCREEN 510.

WHEN OTHERS.

ENDCASE.

----


  • Handle your own GUI functions here *

  • For example, handle a secondary ALV List *

----


WHEN co_sec_list.

    • PERFORM build_sec_list TABLES lta_list_sec.

  • PERFORM display_sec_list TABLES lta_list_sec

  • CHANGING utp_selfield.

----


  • Or some other GUI-functions *

----


  • WHEN 'OKCODE_01'.

  • Actions for this okcode

WHEN OTHERS.

ENDCASE.

ENDFORM. "R1_PROCESS_USER_COMMAND

&----


*& Form build_comment

&----


  • Create the internal table that is going to be the TOP-OF-PAGE

  • of the ALV grid or list.

----


FORM build_comment CHANGING cta_top_of_page TYPE slis_t_listheader.

DATA: lwa_line TYPE slis_listheader.

REFRESH cta_top_of_page.

*----


    • LIST HEADING LINE: TYPE H

*----


  • CLEAR lwa_line.

  • lwa_line-typ = 'H'.

*----


    • LLINE-KEY: NOT USED FOR THIS TYPE

*----


  • lwa_line-info = text-100.

  • APPEND lwa_line TO cta_top_of_page.

----


  • STATUS LINE: TYPE S

----


CLEAR lwa_line.

lwa_line-typ = 'S'.

lwa_line-key = text-101.

lwa_line-info = text-102.

APPEND lwa_line TO cta_top_of_page.

lwa_line-key = ' '.

  • lwa_line-key = text-103.

lwa_line-info = text-103.

APPEND lwa_line TO cta_top_of_page.

*----


    • ACTION LINE: TYPE A

*----


  • CLEAR lwa_line.

  • lwa_line-typ = 'A'.

*----


    • LLINE-KEY: NOT USED FOR THIS TYPE

*----


  • lwa_line-info = text-105.

  • APPEND lwa_line TO cta_top_of_page.

ENDFORM. " build_comment

----


  • FORM R2_SET_TOP_OF_PAGE *

----


  • Put the content of table TA_COMMENT on the top of the ALV *

----


FORM r2_set_top_of_page. "#EC CALLED

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

it_list_commentary = ta_comment

EXCEPTIONS

OTHERS = 2.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

ENDFORM. "R2_SET_TOP_OF_PAGE

&----


*& Form build_group

&----


  • text

----


  • <--P_TA_SP_GROUP[] text

----


FORM build_group CHANGING P_TA_SP_GROUP TYPE slis_t_sp_group_alv.

DATA: ls_sp_group TYPE slis_sp_group_alv.

clear ls_sp_group.

ls_sp_group-sp_group = 'A'.

ls_sp_group-text = 'ATBs ter goedkeuring bij adviseur'.

append ls_sp_group to P_TA_SP_GROUP.

ls_sp_group-sp_group = 'B'.

ls_sp_group-text = 'ATBs goedgekeurd'.

append ls_sp_group to P_TA_SP_GROUP.

ENDFORM. " build_group

&----


*& Form BUILD_LAYOUT

&----


  • Build layout for ALV grid report

----


form build_layout changing gd_layout type slis_layout_alv.

gd_layout-no_input = 'X'.

*gd_layout-colwidth_optimize = 'X'.

gd_layout-totals_only = 'X'.

gd_layout-totals_text = 'Totaal'(201).

*gd_layout-group_change_edit = 'X'.

*gd_layout-GROUP_BUTTONS = 'A'.

  • gd_layout-totals_only = 'X'.

  • gd_layout-f2code = 'DISP'. "Sets fcode for when double

  • "click(press f2)

gd_layout-zebra = 'X'.

  • gd_layout-group_change_edit = 'X'.

  • gd_layout-header_text = 'helllllo'.

endform. " BUILD_LAYOUT

I'll hope this is anough code?

Kind regards,

Richard Meijn

Read only

Former Member
0 Likes
1,722

Hi again,

1. The checkbox can come grey, (inspite of EDIT = true)

if

2. the value in that field (field for checbox)

is not 0 or 1.

(If it contains something else, like A, B etc,

then also it will be

GREYED out and TICKED

or

GREYED out and UN-TICKED

(based upon the value it contains)

3. In debugging, make sure, the field is blank/initial.

regards,

amit m.

Read only

Former Member
0 Likes
1,722

This is what I'm doing:

LOOP AT cta_fcat INTO ls_fieldcat.

CASE ls_fieldcat-fieldname.

WHEN 'ATB_SEL'.

ls_fieldcat-seltext_m = 'ATB check'.

ls_fieldcat-outputlen = 2.

ls_fieldcat-edit = 1.

ls_fieldcat-input = 'X'.

ls_fieldcat-checkbox = 'X'.

ENDCASE.

ENDLOOP.

So far as I see it does not matter if I set the initial value of the field ATB_SEL to = space or 'X' or 1 or 0.

I also put the differend values to the ls_fieldcat-edit field.

What is not correct on my code?

Kind regards,

Richard Meijn

Read only

Former Member
0 Likes
1,722

Another thing I have to say is that the problem where I'm speaking about is that when I get the checkbox editable the rest of the grid is gray. The checkbox it selves if showed in white