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

checkbox with user-command in list processing

Former Member
0 Likes
1,021

Dear all,

I'm writing a checkbox in my list-processing as follow:

WRITE:/1  check AS CHECKBOX.

Once i click the checkbox in list-processing i want to perform immediate action for the entry clicked.

I tried to use:

WRITE:/1   check AS CHECKBOX USER-COMMAND 'TICK'.

But it can't get through syntax check.

Please comment if able is achiveable?

1 ACCEPTED SOLUTION
Read only

faisalatsap
Active Contributor
0 Likes
712

Hi,

Please Test the following Sample Code hope will help you to solve out your problem use AT LINE-SELECTION

DATA: check1 TYPE c LENGTH 1 VALUE 'X'.

START-OF-SELECTION.
  WRITE: / check1 AS CHECKBOX, 'Checkbox 1'.

AT LINE-SELECTION.
  WRITE: 'Ok'.

Best Regards,

Faisal

4 REPLIES 4
Read only

Former Member
0 Likes
712

Hi,

Try...having text next to the checkbox and for the text have a HOTSPOT..So that when you click the hotspot you can check the checkbox.

Hope this helps.

Thanks

Naren

Read only

faisalatsap
Active Contributor
0 Likes
713

Hi,

Please Test the following Sample Code hope will help you to solve out your problem use AT LINE-SELECTION

DATA: check1 TYPE c LENGTH 1 VALUE 'X'.

START-OF-SELECTION.
  WRITE: / check1 AS CHECKBOX, 'Checkbox 1'.

AT LINE-SELECTION.
  WRITE: 'Ok'.

Best Regards,

Faisal

Read only

Former Member
0 Likes
712

Hi,

use the statement below.. hope it solves your issue..

WRITE  check as checkbox HOTSPOT ON.

AT LINE-SELECTION.     " In this event write code that you want to process when clicked on checkbox

Regards,

Siddarth

Read only

Former Member
0 Likes
712

Hi,

Check this example..

DATA: check.

* Display
WRITE:  check AS CHECKBOX,
       'Checkbox' HOTSPOT ON.

AT LINE-SELECTION.

* Check the checkbox.
  READ LINE 1.
  IF sy-lisel(1) IS INITIAL.
    sy-lisel(1) = 'X'.  " Check
  ELSE.
    sy-lisel(1) = ''.   " Uncheck
  ENDIF.
  MODIFY LINE 1.

Thanks

Naren