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 boxes in ALV

Former Member
0 Likes
662

Hi folks,

i searched for the threads in forum for chekboxes in ALV display thread.

didnt undstd the things clearly.

my requirement is i have 5 checkboxes

PARAMETERS : Prog as CHECKBOX Default '',

Userid as CHECKBOX Default '',

Clntid as CHECKBOX Default '',

HotPack as CHECKBOX Default '',

LockObj as CHECKBOX DEFAULT '',

Kernel as CHECKBOX DEFAULT ''.

now on checking one of them i have to display their relevant data.

i am getting ALV display after checking one of them.

MY REQUIREMENT IS I WANT ALV DISPLAY FOR these checkboxes.

can someone let me know how can do this please....

waiting for valuable inputs....

5 REPLIES 5
Read only

Former Member
0 Likes
634

hi

good

check the below link, hope this would help you to solve your problem.

http://abapreports.blogspot.com/2008/06/handling-check-box-in-alv-report-in-sap.html

Thanks

mrutyun^

Read only

Former Member
0 Likes
634

If my understanding is correct then if u check a check box then u want to display the same check box in ur ALV report. If that's true then refer this sample program.

&----


*& Report ZTEST_HL7

*&

&----


*&

*&

&----


REPORT zdemo LINE-SIZE 180 LINE-COUNT 60(10) NO STANDARD PAGE

HEADING.

type-pools: slis.

types: begin of ty_struc,

matnr type matnr,

Prog(1) type c,

Userid(1) type c,

Clntid(1) type c,

HotPack(1) type c,

LockObj(1) type c,

Kernel(1) type c,

end of ty_struc.

data: i_final type standard table of ty_struc.

data: i_fieldcat type SLIS_T_FIELDCAT_ALV.

data: w_fieldcat type SLIS_FIELDCAT_ALV.

PARAMETERS : Prog as CHECKBOX Default '',

Userid as CHECKBOX Default '',

Clntid as CHECKBOX Default '',

HotPack as CHECKBOX Default '',

LockObj as CHECKBOX DEFAULT '',

Kernel as CHECKBOX DEFAULT ''.

select matnr from mara

into CORRESPONDING FIELDS OF table i_final

up to 100 rows.

check sy-subrc = 0.

w_fieldcat-tabname = 'I_FINAL'.

w_fieldcat-FIELDname = 'MATNR'.

w_fieldcat-seltext_m = 'Material'.

w_fieldcat-ddictxt = 'M'.

append w_fieldcat to i_fieldcat.

if Prog = 'X'.

w_fieldcat-tabname = 'I_FINAL'.

w_fieldcat-FIELDname = 'PROG'.

w_fieldcat-seltext_m = 'Program'.

w_fieldcat-ddictxt = 'M'.

w_fieldcat-checkbox = 'X'.

append w_fieldcat to i_fieldcat.

endif.

if Userid = 'X'.

w_fieldcat-tabname = 'I_FINAL'.

w_fieldcat-FIELDname = 'USERID'.

w_fieldcat-seltext_m = 'Userid'.

w_fieldcat-ddictxt = 'M'.

w_fieldcat-checkbox = 'X'.

append w_fieldcat to i_fieldcat.

endif.

if Clntid = 'X'.

w_fieldcat-tabname = 'I_FINAL'.

w_fieldcat-FIELDname = 'CLNTID'.

w_fieldcat-seltext_m = 'Client id'.

w_fieldcat-ddictxt = 'M'.

w_fieldcat-checkbox = 'X'.

append w_fieldcat to i_fieldcat.

endif.

if HotPack = 'X'.

w_fieldcat-tabname = 'I_FINAL'.

w_fieldcat-FIELDname = 'HOTPACK'.

w_fieldcat-seltext_m = 'HotPack'.

w_fieldcat-ddictxt = 'M'.

w_fieldcat-checkbox = 'X'.

append w_fieldcat to i_fieldcat.

endif.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

  • I_INTERFACE_CHECK = ' '

  • I_BYPASSING_BUFFER =

  • I_BUFFER_ACTIVE = ' '

I_CALLBACK_PROGRAM = sy-repid

  • I_CALLBACK_PF_STATUS_SET = ' '

  • I_CALLBACK_USER_COMMAND = ' '

  • I_STRUCTURE_NAME =

  • IS_LAYOUT =

IT_FIELDCAT = i_fieldcat

  • IT_EXCLUDING =

  • IT_SPECIAL_GROUPS =

  • 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

  • IR_SALV_LIST_ADAPTER =

  • IT_EXCEPT_QINFO =

  • I_SUPPRESS_EMPTY_DATA = ABAP_FALSE

  • IMPORTING

  • E_EXIT_CAUSED_BY_CALLER =

  • ES_EXIT_CAUSED_BY_USER =

TABLES

t_outtab = i_final

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.

Regards,

Joy.

Read only

Former Member
0 Likes
634

Hi

Are those parameters ur selection screen parameters and u want ALV display after checkin each of those.??

Be a little more clear...

Regards

Abaper