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

regarding AT LINE-SELECTION (interactive list)

Former Member
0 Likes
866

When using at line-selection the case is that the system throws a dump after 20 detail list have opened(clicking on the 20th one) .My question is how can we prevent the system from throwing a dump.For e.g in this small code snippet, what coding i need to do to prevent the same from happening.

*START-OF-SELECTION.

  • WRITE 'Click me!' COLOR = 5.

*

*AT LINE-SELECTION.

  • WRITE: / 'You clicked list', sy-listi,

  • / 'You are on list', sy-lsind.

  • IF sy-lsind < 20.

  • SKIP.

  • WRITE: 'More ...' COLOR = 5.

  • ENDIF.

thank's in advance.

1 ACCEPTED SOLUTION
Read only

former_member196280
Active Contributor
0 Likes
843

REPORT abc.

START-OF-SELECTION.

WRITE 'Click me!' COLOR = 5.

AT LINE-SELECTION.

WRITE: / 'You clicked list', sy-listi,

/ 'You are on list', sy-lsind.

IF sy-lsind EQ 20.

sy-LSIND = 3. <b> "Reset list to 3 or 1...</b>

WRITE: 'More ...' COLOR = 5.

ENDIF.

Regards,

SaiRam

When using at line-selection the case is that the system throws a dump after 20 detail list have opened(clicking on the 20th one) .My question is how can we prevent the system from throwing a dump.For e.g in this small code snippet, what coding i need to do to prevent the same from happening.

*START-OF-SELECTION.

  • WRITE 'Click me!' COLOR = 5.

*

*AT LINE-SELECTION.

  • WRITE: / 'You clicked list', sy-listi,

  • / 'You are on list', sy-lsind.

  • IF sy-lsind < 20.

  • SKIP.

  • WRITE: 'More ...' COLOR = 5.

  • ENDIF.

thank's in advance.

6 REPLIES 6
Read only

former_member194669
Active Contributor
0 Likes
843

Hi,

If sy-lsind eq 20.

sy-lsind = 1.

endif.

aRs

Read only

Former Member
0 Likes
843

hi,

do this way...


if sy-lsind = '20'.
  sy-lsind = '1'.
endif.

Read only

former_member196280
Active Contributor
0 Likes
844

REPORT abc.

START-OF-SELECTION.

WRITE 'Click me!' COLOR = 5.

AT LINE-SELECTION.

WRITE: / 'You clicked list', sy-listi,

/ 'You are on list', sy-lsind.

IF sy-lsind EQ 20.

sy-LSIND = 3. <b> "Reset list to 3 or 1...</b>

WRITE: 'More ...' COLOR = 5.

ENDIF.

Regards,

SaiRam

Read only

Former Member
0 Likes
843

hi,

one way is to reset the LSIND to basic list

IF LSIND >= 20 .

LSIND = 1.

ENDIF.

OR use a variable which is incremented by 1 when u click on lsind and code like this.

DATA: INDEX TYPE I.

AT LINE-SELECTION.

................

.........

LSIND = LSIND + 1.

...............

IF LSIND >=21.

MESSAGE 'U CANT GET ANY MORE LISTS' TYPE 'E000'.

ENDIF.

IF HELPFUL REWARD SOME POINTS.

WITH REGARDS,

SURESH ALURI.

Read only

Former Member
0 Likes
843

Hi Mithun

you reset the sy-lsind to 1 once it reaches 20

if sy-lsind eq 0.

sy-lsind = 1.

endif.

Regards,

Azhar

Read only

Former Member
0 Likes
843

Hi Mithun

you reset the sy-lsind to 1 once it reaches 20

if sy-lsind eq 0.

sy-lsind = 1.

endif.

Regards,

Azhar