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

READ LINE

Former Member
0 Likes
2,309

i am in the learning of Interactive Events.. the assignment was create a classic report with checkboxes. if the user select the number of checkboxes in the basic list, the respective records should show into the secondary list with some other details.

i have done this above assignment without using checkboxes. if the user click any specific line, the secondary list will display with the respective records details. i had used with the help of <b> HIDE</b> keyword.

now i am not able to do the same program with checkboxex. i have found that it can be done through the <b>READ LINE</b> statement. can anyone help me out if u understand my prob.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,994

Hi,

You can use the READ LINE statement. The content of each line read will be in SY-LISEL. First know the position (column no.) of the checkbox in debug mode. Then read all the lines you have displayed using an index with read line. Move only those lines to another internal table which have checkbox value = 'X'. Then display their details in the subsequent screen.

15 REPLIES 15
Read only

Former Member
0 Likes
1,994

Hi ashraf,

you must be having a field relating to checkbox in your internal table used for display.When you double click a line At line selection event is triggerd.

Loop at your internal table and collect all the records having checkbox = 'X' and display those.

Thank you.

Awrd points if found useful.

Read only

0 Likes
1,994

hi.

thax for helping me . i understood the concept u r trying to say. but my assignment is to do that same program with usign READ LINE. can u give me the coding of READ LINE how to catch up the respective lines which is selected (checkbox) by the user.

thanx.

Ashraf

Read only

Former Member
0 Likes
1,995

Hi,

You can use the READ LINE statement. The content of each line read will be in SY-LISEL. First know the position (column no.) of the checkbox in debug mode. Then read all the lines you have displayed using an index with read line. Move only those lines to another internal table which have checkbox value = 'X'. Then display their details in the subsequent screen.

Read only

0 Likes
1,994

hi.

thax for helping me . i understood the concept u r trying to say. but my assignment is to do that same program with usign READ LINE. can u give me the coding of READ LINE how to catch up the respective lines which is selected (checkbox) by the user.

thanx.

Ashraf

Read only

0 Likes
1,994

Hi again,

Pleas check the code:

Report zsri_try.

DATA: date TYPE d,

flag(1) TYPE c,

wa(10) TYPE c.

START-OF-SELECTION.

date = sy-datum.

DO 10 TIMES.

date = date + sy-index.

WRITE: / flag AS CHECKBOX, (10) date.

ENDDO.

AT LINE-SELECTION.

DO.

READ LINE sy-index FIELD VALUE flag

date INTO wa.

IF sy-subrc <> 0.

EXIT.

ELSEIF flag = 'X'.

WRITE / wa.

ENDIF.

ENDDO.

Thank you.

Read only

0 Likes
1,994

te get check box against each line use

data: box(1) .

data: my_lisel type slist_max_listline .

write:/ sy-vline no-gap ,

box as checkbox

to read the selected line.

do .

clear my_lisel .

read line sy-index field value sy-lisel into my_lisel.

if my_lisel+1(1) eq 'X' .

*move it to another itab

endif .

enddo .

raja

Read only

0 Likes
1,994

Hi Ashraf,

Close the thread if your query is answered.

Read only

0 Likes
1,994

no mr.srinivas.

i m trying with that coding which u hav passed. should i disconnect the thread now....? if yes.. y..? i m very new to this site.. i dont no the rules of this forum too..

Read only

0 Likes
1,994

HI ..

system triggers error in that line.

data: my_lisel type slist_max_listline .

<b>slist_max_listline is unknown.</b>

what to do.. what is this data type..? is it system data type..?

Read only

0 Likes
1,994

sorry i missed that. declare like below.

constants: slist_max_linesize type i value 1023.

types: slist_max_listline(slist_max_linesize) type c.

data: my_lisel type slist_max_listline .

Read only

0 Likes
1,994

hi ..

thanx for the correction. i m trying with that new codes. it does not show any error... it is syntactically correct.. i wil run the program and let u no..

thanx.

Ashraf.

Read only

0 Likes
1,994

hi .

sorry to repeat the same question often. my prog is not run properly.. i could not able to find the prob.. u just refer my first question again and try to help me to my prog..

thanx.

Ashraf

Read only

0 Likes
1,994

hi ashraf...

I guess this would solve your problem....

REPORT demo_list_modify_field_format NO STANDARD PAGE HEADING.

DATA: box(1) TYPE c, lines TYPE i, num(1) TYPE c.

SET PF-STATUS 'CHECK'.

DO 5 TIMES.

num = sy-index.

WRITE: / box AS CHECKBOX, 'Line', num.

HIDE: box, num.

ENDDO.

lines = sy-linno.

TOP-OF-PAGE.

WRITE 'Select some checkboxes'.

ULINE.

AT USER-COMMAND.

CASE sy-ucomm.

WHEN 'READ'.

SET PF-STATUS 'CHECK' EXCLUDING 'READ'.

box = space.

DO lines TIMES.

READ LINE sy-index FIELD VALUE box.

IF box = 'X'.

WRITE: / 'Line', num, 'was selected'.

box = space.

MODIFY LINE sy-index

FIELD VALUE box

FIELD FORMAT box INPUT OFF

num COLOR 6 INVERSE ON.

ENDIF.

ENDDO.

ENDCASE.

This program creates a basic list with the status CHECK. In the status CHECK, function code READ (text Read Lines) is assigned to function key F5 and to a pushbutton. The user can mark checkboxes and then choose Read Lines.

In the AT USER-COMMAND event, the system reads the lines of the list using READ LINE. It continues processing the selected lines on a secondary list. When returning to the basic list, the system deletes the marks in the checkboxes of the selected lines using MODIFY LINE and sets the format INPUT OFF to the checkboxes. In addition, it changes the format of field num.

The user can now mark only those lines that have not yet been changed.

-

Santosh

Read only

0 Likes
1,994

hi.

thanx the berief explanation. i got overall idea. i wil try to implement in my program.. and i need some definition which can be understand in easy manner.. they are mentioned below...

1. diff b/w cluster and pooled table...?

2. diff b/w break and watch point...?

3. what is SAP dispatcher...?

4. what is work process..?

plz send the definition which everyone can understand..

thanx.

Ashraf.

Read only

0 Likes
1,994

hi ashraf.. u can post these set of new questions in the new thread....

award points to the replies which were useful and stop/close this thread.

any new quesstions should be asked in the new thread as it would be easy for all the members here....

-

Santosh

<b>award points to useful replies</b>