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(Page Switching)

Former Member
0 Likes
1,010

dear Experts,

I have created a interactive report having 16 Screen. How can I switch to 2nd screen from screen no. 12 directely. Is there any way without going to back and back to required one.

Thanks in Advance

Rajiv Singh.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
973

Hello.

Try this.

at line-selection
If sy-lsind = 16.
sy-lsind = 2.
endif.

If useful reward.

Vasanth

8 REPLIES 8
Read only

Former Member
0 Likes
974

Hello.

Try this.

at line-selection
If sy-lsind = 16.
sy-lsind = 2.
endif.

If useful reward.

Vasanth

Read only

Former Member
0 Likes
973

Hi,

you ca directly give index to that screen to whom you want to switch by giving

sy-lsind.

regards,

Ruchika

Reward if useful.......

Read only

0 Likes
973

Hi, Ruchika Saini,

Thanks for prompt action.

How can I give index no. It should be dynamic to move from any screen to back any one.

Thanks.

Read only

0 Likes
973

Hello,

Do like this.

data: index type i.

<b>sy-lsind = index.</b>

Vasanth

Read only

Former Member
0 Likes
973

HI

use this code.

At line-selection

If sy-lsind = 16.

sy-lsind = 2.

endif.

reward all helpfull answes.

regards.

Jay

Read only

0 Likes
973

Hi,

By giving sy-lsind = 2. it is not jumping to screen no. 2.

Please check this code.

report interactive.

data: ilikp like likp occurs 0 with header line.

DATA: ILIPS LIKE LIPS OCCURS 0 WITH HEADER LINE.

data: imakt like makt occurs 0 with header line.

data: mlevel(10),mlevel1(10).

DATA: MVAL(10).

AT LINE-SELECTION.

GET CURSOR VALUE MVAL.CONDENSE MVAL.

if strlen( mval ) = 1.

sy-lsind = mval.

clear mval.

ELSE.

mlevel = sy-lsind.

CASE mlevel.

WHEN 1.

WRITE:/01 sy-lsind .

SELECT * FROM LIPS INTO TABLE ILIPS WHERE VBELN EQ ILIKP-VBELN.

LOOP AT ILIPS.

WRITE:/01 ILIPS-VBELN, ILIPS-POSNR, ILIPS-LFIMG, ilips-matnr.

hide ilips-matnr.

ENDLOOP.

DO 4 TIMES.

WRITE:/01 SY-INDEX.

ENDDO.

WHEN 2.

WRITE:/01 sy-lsind .

SELECT * FROM makt INTO TABLE Imakt WHERE matnr EQ ILIps-matnr.

LOOP AT Imakt.

WRITE:/01 imakt.

ENDLOOP.

DO 4 TIMES.

WRITE:/01 SY-INDEX.

ENDDO.

when 3.

WRITE:/01 sy-lsind .

DO 4 TIMES.

WRITE:/01 SY-INDEX.

ENDDO.

WHEN OTHERS.

WRITE:/01 sy-lsind .

ENDCASE.

ENDIF.

START-OF-SELECTION.

select * from likp into table ilikp up to 10 rows.

loop at ilikp.

write:/01 ilikp-VBELN.

HIDE ILIKP-VBELN.

endloop.

Read only

0 Likes
973

Hi,

do like this.

data: ilikp like likp occurs 0 with header line.

DATA: ILIPS LIKE LIPS OCCURS 0 WITH HEADER LINE.

data: imakt like makt occurs 0 with header line.

data: mlevel(10),mlevel1(10).

DATA: MVAL(10).

AT LINE-SELECTION.

GET CURSOR VALUE MVAL.CONDENSE MVAL.

if strlen( mval ) = 1.

sy-lsind = mval.

clear mval.

ELSE.

mlevel = sy-lsind.

CASE mlevel.

WHEN 1.

WRITE:/01 sy-lsind .

SELECT * FROM LIPS INTO TABLE ILIPS WHERE VBELN EQ ILIKP-VBELN.

LOOP AT ILIPS.

WRITE:/01 ILIPS-VBELN, ILIPS-POSNR, ILIPS-LFIMG, ilips-matnr.

hide ilips-matnr.

ENDLOOP.

DO 4 TIMES.

WRITE:/01 SY-INDEX.

ENDDO.

WHEN 2.

WRITE:/01 sy-lsind .

SELECT * FROM makt INTO TABLE Imakt WHERE matnr EQ ILIps-matnr.

LOOP AT Imakt.

WRITE:/01 imakt.

ENDLOOP.

DO 4 TIMES.

WRITE:/01 SY-INDEX.

ENDDO.

when 3.

WRITE:/01 sy-lsind .

DO 4 TIMES.

WRITE:/01 SY-INDEX.

ENDDO.

WHEN OTHERS.

WRITE:/01 sy-lsind .

when 16.

<b> sy-lsind = 2.</b>

ENDCASE.

ENDIF.

START-OF-SELECTION.

select * from likp into table ilikp up to 10 rows.

loop at ilikp.

write:/01 ilikp-VBELN.

HIDE ILIKP-VBELN.

endloop.

rgds,

bharat.

Read only

Former Member
0 Likes
973

here is the snytax for list drilldown

Atline-selection

case sy-lsind .

when 1 .
....
when 2 .
...
when 3 .
....
when 4  .
....
when 5.
....

....
when  12 .
sy-lsind  = 2 .

when  13.
....
....
endcase .

reward points if it is usefull ...

Girish