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

at line-selection

Former Member
0 Likes
519

Hi all,

i have an issue while displaying output using interactive list.

LOOP AT it_tab1 INTO wa_tab1.

WRITE:/ wa_tab1-field1,

wa_tab1-field2.

AT LINE-SELECTION.

IF SY-LSIND = 1.

WRITE 'THE DETAILS ARE:'.

-


-


using this code, when i am double-clicking the output data generated by wa_tab1, the next page appears because of the AT LINE-SELECTION.

THE ISSUE IS THAT WHEN I AM DOUBLE-CLICKING "THE DETAILS ARE:",

THE NEXT PAGE APPEARS, WHICH NOT BE.

please help me in resolving this issue.

4 REPLIES 4
Read only

Former Member
0 Likes
491

hi <b>remove the</b> at line-selection from the loop

IF SY-LSIND = 1. it is not required.

<b>at line-selection</b> it self increments the <b>SY-LSIND value by 1</b>.

and where is the <b>endloop</b>.

u r code may write like this

<b>LOOP AT it_tab1 INTO wa_tab1.

WRITE:/ wa_tab1-field1,

wa_tab1-field2.

ENDLOOP.

AT LINE-SELECTION.

IF SY-LSIND = 1.

WRITE:/ 'THE DETAILS ARE:'.

ENDIF.</b>

reward if it helps u

vijay pawar

Read only

Former Member
0 Likes
491

Can you post the total code, if yo uhave done what you have said, then it should not behave the way you have explained.

This works absoultely as expected for me:

write:/ 'Page 1'.

at line-selection.
if sy-lsind = 1.
write:/ 'Page 2'.
endif.

Regards,

Ravi

Read only

0 Likes
491

Hi ravi,

I have sent you the whole code via mail.

please help me resolving the issue.

regards

vivek

Read only

former_member632991
Active Contributor
0 Likes
491

Hi,

Don't write ai line selectioni n loop.

and also use hide to write all the details.

LOOP AT it_tab1 INTO wa_tab1.

WRITE:/ wa_tab1-field1,

wa_tab1-field2.

<b>hide wa_tab1-field1.</b><b>endloop.</b>

AT LINE-SELECTION.

IF SY-LSIND = 1.

WRITE 'THE DETAILS ARE:'.

endif.

Hope it helps.

Regards,

Sonika