Application Development 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: 

Double-click in standard report

Former Member

Hi,

I'm creating a standard report (not an ALV, just write's...) and I need to control events when I double-click on certain caracters on the screen. How can I do that?

Thanks

Carles

1 ACCEPTED SOLUTION

Former Member
0 Kudos

U can use AT LINE-SELECTION.

5 REPLIES 5

jaideeps
Advisor
Advisor
0 Kudos

hi,

kindly refer to abapdocu ->lists(under it ->user actions on lists)

you can use Sy-lisel...

chk out this..

DATA: l TYPE i, t(1) TYPE c.

DO 100 TIMES.

WRITE: / 'Loop Pass:', sy-index.

ENDDO.

TOP-OF-PAGE.

WRITE: 'Basic List, Page', sy-pagno.

ULINE.

TOP-OF-PAGE DURING LINE-SELECTION.

WRITE 'Secondary List'.

ULINE.

AT LINE-SELECTION.

DESCRIBE FIELD sy-lisel LENGTH l IN CHARACTER MODE TYPE t.

WRITE: 'SY-LSIND:', sy-lsind,

/ 'SY-LISTI:', sy-listi,

/ 'SY-LILLI:', sy-lilli,

/ 'SY-CUROW:', sy-curow,

/ 'SY-CUCOL:', sy-cucol,

/ 'SY-CPAGE:', sy-cpage,

/ 'SY-STARO:', sy-staro,

/ 'SY-LISEL:', 'Length =', l, 'Type =', t,

/ sy-lisel.

example 2 : based on sy-lisel value..

ATA num TYPE i.

SKIP.

WRITE 'List of Quadratic 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.

thanks

jaideep

*reward points for useful answres..

Former Member
0 Kudos

U can use AT LINE-SELECTION.

Former Member
0 Kudos

Thanks,

and how can I recover just the character I double-click?

Former Member
0 Kudos

hi,

U need to use Get cursor for a particular field.

Get cursor field fieldname value fieldvalue.

Former Member
0 Kudos

hi,

while genarating secondary list based on uer actions( double click), we provide the logic for genarating list unsder <b>AT LINE-SELECTION</b> event.

AT LINE-SELECTION.
  <statements>.

When the user triggers the function code PICK, AT LINE-SELECTION is always triggered if the cursor is positioned on a list line. The function code PICK is, by default, always linked with function key F2 and hence with the mouse double-click.

<b>Example for AT LINE-SELECTION.</b>

REPORT demo_list_at_line_selection.

START-OF-SELECTION.
  WRITE  'Basic List'.

AT LINE-SELECTION.
  WRITE: 'Secondary List by Line-Selection',
       / 'SY-UCOMM =', sy-ucomm.

When you run the program, the basic list appears with the standard list status. The detail list shows that SY-UCOMM has the value PICK.

To pass individual output fields or additional information from a user selected line to the corresponding processing block during an interactive event, use these statements:

<b>HIDE</b>

The HIDE statement is one of the fundamental statements for interactive reporting. You use the HIDE technique when creating a basic list. It defines the information that can be passed to subsequent detail lists.

<b>READ LINE</b>

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.

<b>GET CURSOR</b>

Use the statements GET CURSOR FIELD and GET CURSOR LINE to pass the output field or output line on which the cursor was positioned during the interactive event to the ABAP program.

<b>DESCRIBE LIST</b>

The DESCRIBE LIST statement allows you to read certain list attributes, such as the number of lines or pages, into program variables.

follow this link fro more information.

http://help.sap.com/saphelp_nw04/helpdata/en/9f/dba42335c111d1829f0000e829fbfe/content.htm

follow this link for sample programs on interactive reports.

http://www.sap-img.com/abap/a-sample-hide-get-cursor-in-interactive-programming.htm

http://www.erpgenie.com/abap/drill_down_reports.htm

regards,

Ashok reddy