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

interactive report

Former Member
0 Likes
1,000

in inreractive report when we are clicking field to go to secondary list i have to get whole line instead of single field.

can any body help regarding above topic

thanks $ regards

prathap

10 REPLIES 10
Read only

Former Member
0 Likes
965

Hi Prathap,

Hide all the fields which you want to display in the Second Screen and then display this in the secondary screen when you double click.

Regards,

George

Read only

Former Member
0 Likes
965

Hi,

U can take single record in ur internal table and show while displaying the Secondary list...

otherwise u can hide those fields too...

Kindly rewa

Read only

Former Member
0 Likes
965

the whole line is copied into a system field sy-lisel.

santhosh

Read only

Former Member
0 Likes
965

hi,

use the system variable SY-LISEL.

regards,

priya.

Read only

Former Member
0 Likes
965

Hi Prathap

Below code can give you some idea on handling in interactive reports.

start-of-selection.

  write:/ 'First Line'.
  write:/ 'Second Line'.

end-of-selection.

AT LINE-SELECTION.

READ LINE sy-lilli.

break-point.

When the break point is reached, you can check the value of SY-LISEL.

Just noticed that many thread opened by you are still pending. Request your kind help in closing the threads when you queries are answered.

Kind Regards

Eswar

Read only

Former Member
0 Likes
965

Hi Pratap,

We have a option called Get Cursor. When ever we r double Cliking on a particular field then We can get only that particulat field.

Syntax is : Get Cursor Field <Fieldname> Value <Value>

Just check it out.

Bye

Murthy

Read only

Former Member
0 Likes
965

hi,

U can do thid by using the HIDE Keyword. write the particular field and in the next line u can HIDE <fieldname>, By doin this wen u double-click on the fiel the secondary list wil be listed, based on the requirement.

Read only

Former Member
0 Likes
965

hi..

i think this statement can help you.

this gives the Contents of selected line SY-LISEL .

Read only

Former Member
0 Likes
965

Hi,

The system passes data to programs automatically using the system fields that it fills for each interactive event. For an overview of the relevant system fields, see Detail Lists.

System fields provide you with information about the list index, the position of the list in the output window, and the cursor position. The only system field that contains the contents of the selected line is SY-LISEL.

The example below demonstrates how the system fills these system fields during interactive events.

SY-LISEL, the program displays length, data type, and contents. The length of SY-LISEL is always 255, regardless of the width of the list.

Using SY-LISEL

The system field SY-LISEL is a type C field with length 255. Although it contains the selected line, it is only of limited use for passing the values of single fields, since it is a character string. To process certain parts of SY-LISEL, you must specify the corresponding offsets.

To pass data therefore, it is better to use one of the methods described in Passing Data by Program Statements. SY-LISEL is, however, suitable for designing the headers of detail lists, or for checking that a selected line is not a space or an underscore.

<b>REPORT demo_list_sy_lisel NO STANDARD PAGE HEADING.</b>

DATA num TYPE i.

SKIP.

WRITE 'List of Square Numbers between One and Hundred'.

SKIP.

WRITE 'List of Cubic Numbers between One and Hundred'.

TOP-OF-PAGE.

WRITE 'Choose a line!'.

ULINE.

TOP-OF-PAGE DURING LINE-SELECTION.

WRITE sy-lisel.

ULINE.

AT LINE-SELECTION.

IF sy-lisel(4) = 'List'.

CASE sy-lilli.

WHEN 4.

DO 100 TIMES.

num = sy-index ** 2.

WRITE: / sy-index, num.

ENDDO.

WHEN 6.

DO 100 TIMES.

num = sy-index ** 3.

WRITE: / sy-index, num.

ENDDO.

ENDCASE.

ENDIF.

When you start the program, a list appears on which two lines can be selected.

If you choose the top line, a list of square numbers is displayed. If you select the lower line on the basic list, the list of cubic numbers appears.

The content of the selected line becomes the header of the detail list. The IF statement uses the first four characters of SY-LISEL to make sure that only valid lines are selected. Due to the logical conditions of the processing block following AT LINE-SELECTION, the system does not display any more information if you choose a line on the detail list.

-


<b>You can also read data using ABAP commands.</b>

READ LINE

Use the statements READ LINE and READ CURRENT LINE to read data from the lines of existing list levels. These statements are closely connected to the HIDE technique.

All of the lists generated by a single program are stored internally in the system. You can therefore access any list in a program that was created for the same screen and that has not yet been deleted by returning to a lower list level. To read lines, use the statements READ LINE and READ CURRENT LINE.

To read a line from a list after an interactive list event, use the READ LINE statement:

READ LINE <lin> [INDEX <idx>]

[FIELD VALUE <f1> [INTO <g 1>] ... <f n> [INTO <g n>]]

[OF CURRENT PAGE|OF PAGE <p>].

The statement without any options stores the contents of line <lin> from the list on which the event was triggered (index SY-LILLI) in the SY-LISEL system field and fills all HIDE information stored for this line back into the corresponding fields. As far as SY-LISEL and the HIDE area are concerned, READ LINE has the same effect as an interactive line selection.

If the selected line <lin> exists, the system sets SY-SUBRC to 0, otherwise to 4.

The options have the following effects:

INDEX <idx>

The system reads the information for line <lin> from the list of level <idx>.

FIELD VALUE <f 1 > [INTO <g 1 >] ... <f n> [INTO <g n>]

The system interprets the output values of the variables <f i > in line <lin> as character strings and places them either into the same fields <f i > or, when using INTO, into the fields <g i >.When refilling the fields, the system applies the conversion rules.

Fields that do not appear in a line do not affect the target field. If a field appears several times in a line, the system uses only the first one.

The system transports the field contents using the output format, that is, including all formatting characters. This may cause problems, such as converting editing characters to decimal characters or other incompatible cases.

You use this option mainly to process user entries in list fields that accept input, since you cannot use the HIDE technique in this case.

OF CURRENT PAGE

With this option, <lin> is not the number of the line of the entire list, but the number of the line of the currently displayed page of the addressed list. The system field SY-CPAGE stores the corresponding page number.

OF PAGE <p>

With this option, <lin> is not the number of the line of the entire list, but the number of a line on page <p> of the addressed list.

This statement reads a line twice in succession. To do this, you use the READ CURRENT LINE statement in your program:

READ CURRENT LINE [FIELD VALUE <f1> [INTO <g 1>] ...].

This statement reads a line read before by an interactive event ( F2 ) or by READ LINE. The FIELD VALUE option is the same as for READ LINE.

This allows you to fill fields in the same line using values from the program.The following program is connected to the logical database F1S.

<b>REPORT demo_list_read_line NO STANDARD PAGE HEADING.</b>

TABLES: sflight.

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

START-OF-SELECTION.

SET PF-STATUS 'CHECK'.

GET sflight.

WRITE: box AS CHECKBOX, sflight-fldate.

HIDE: sflight-fldate, sflight-carrid, sflight-connid,

sflight-seatsmax, sflight-seatsocc.

END-OF-SELECTION.

lines = sy-linno - 1.

TOP-OF-PAGE.

WRITE: 'List of flight dates'.

ULINE.

TOP-OF-PAGE DURING LINE-SELECTION.

WRITE: 'Date:', sflight-fldate.

ULINE.

AT USER-COMMAND.

CASE sy-ucomm.

WHEN 'READ'.

box = space.

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

DO lines TIMES.

READ LINE sy-index FIELD VALUE box.

IF box = 'X'.

free = sflight-seatsmax - sflight-seatsocc.

IF free > 0.

NEW-PAGE.

WRITE: 'Company:', sflight-carrid,

'Connection: ',sflight-connid,

/ 'Number of free seats:', free.

ENDIF.

ENDIF.

ENDDO.

ENDCASE.

Regards,

Vara

Message was edited by:

varaprasad bhagavatula

Read only

Former Member
0 Likes
965

U can check the 'HIDE' keyword...