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
759

How do we go from 4 list to list number 2 in an interactive report using back button in standard toolbar? could anyone write the code?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
727

Hi Vishal,

the problem is not with our 'BAK' code. we have to include another FCODE .."PICK"....in the pf-status...Function keys there is a heading 'recommended function keys' right? in that F2 will be there....write PICK instead of <..>...this will surely work now ...

Regards,

Vidya.

8 REPLIES 8
Read only

Former Member
0 Likes
727

Yo have to make your own Status.

To navigate between the lists use system variable sy-lsind.

BR, Jacek

Read only

Former Member
0 Likes
727

The following code doesnt trigger user command. pls explain

REPORT zt123 .

WRITE : 'basic'.

AT LINE-SELECTION.

CASE sy-lsind.

WHEN 1.

WRITE:/ '1'.

WHEN 2.

WRITE:/ '2'.

WHEN 3.

WRITE:/ '3'.

SET PF-STATUS 'STATUS'.

ENDCASE.

AT USER-COMMAND.

IF sy-ucomm = 'BACK'.

MOVE 1 TO sy-lsind.

ENDIF.

Read only

Former Member
0 Likes
727

Hi Vishal,

Make use of system fields i.e. SY-LSIND wnen you want to go back from screen 4 to 2 set the SY-LSIND to 2 when you click on back button.

Hope this help you.

Regards,

John.

Read only

Former Member
0 Likes
727

Hi Vishal,

The system SY-LSIND holds the current list no.

When you are in 4th list . Do this Logic.


CASE sy-ucomm.

  WHEN 'BACK'.   "Function code for BACK

    IF sy-lsind = 4.  "You are in 4th List

      sy-lsind = 1. "After this second List will come then SY-LSIND = 2.

      "You List  processing

    ENDIF.


Regards,

Arun Sambargi.

Read only

Former Member
0 Likes
727

Hi Vishal,

Try changing the function code from 'BACK' to someother value say 'PRVS'. As 'BACK' is a standard fn code the default execution will occur in the sense the previous sy-lsind will only trigger..... one more thing if you want to set sy-lsind is 4 then in the if condition check for sy-lsind = 5.

AT USER-COMMAND.

case sy-ucomm.

when 'PRVS'.

if sy-lsind = 5.

sy-lsind = 1.

endif.

endcase.

this is because when we are currently in the sy-lsind 4 and if we press back button sy-lsind will become 5.

Hope this helps.

Regards,

Vidya.

Read only

Former Member
0 Likes
727

Vidya you are right changing SY-ucomm TO non standard 'BAK' makes it work. The code now is

WRITE : 'basic'.

AT LINE-SELECTION.

CASE sy-lsind.

WHEN 1.

WRITE:/ '1'.

WHEN 2.

WRITE:/ '2'.

WHEN 3.

WRITE:/ '3'.

SET PF-STATUS 'STATUS'.

WHEN 4.

WRITE:/ '4'.

ENDCASE.

AT USER-COMMAND.

IF sy-ucomm = 'BAK'.

MOVE 1 TO sy-lsind.

ENDIF.

But the problem is after setting the PF-STATUS it gives a success message of choose a valid function.

Read only

Former Member
0 Likes
727

if you execute the above code it goes from 3 interactive list to 1st interactive list, but doesnt work if we want to go to 4th interactive list

Read only

Former Member
0 Likes
728

Hi Vishal,

the problem is not with our 'BAK' code. we have to include another FCODE .."PICK"....in the pf-status...Function keys there is a heading 'recommended function keys' right? in that F2 will be there....write PICK instead of <..>...this will surely work now ...

Regards,

Vidya.