‎2006 Jul 13 6:52 AM
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?
‎2006 Jul 13 8:05 AM
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.
‎2006 Jul 13 7:03 AM
Yo have to make your own Status.
To navigate between the lists use system variable sy-lsind.
BR, Jacek
‎2006 Jul 13 7:08 AM
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.
‎2006 Jul 13 7:08 AM
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.
‎2006 Jul 13 7:15 AM
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.
‎2006 Jul 13 7:33 AM
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.
‎2006 Jul 13 7:52 AM
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.
‎2006 Jul 13 7:54 AM
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
‎2006 Jul 13 8:05 AM
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.