2010 Jun 29 3:51 PM
Hi,
i declare this:
SELECTION-SCREEN: BEGIN OF TABBED BLOCK MYTAB FOR 17 LINES,
TAB (20) T_ETI_MA USER-COMMAND PUSH_200
DEFAULT SCREEN 200,
TAB (20) T_ETI_SD USER-COMMAND PUSH_300
DEFAULT SCREEN 300,
TAB (20) T_ETI_KO USER-COMMAND PUSH_400
DEFAULT SCREEN 400,
END OF BLOCK MYTAB.
and have defined the subscreens 200 300 and 400.
All is what i want, but if i execute on screnn 400 i will, that subscreen 400 is default, but after executing,
allways 200 is default? Same when i execute on screen 300.
How can i manage that the screen on which i execute stays as default.
Thanks.
regards, Dieter
Hi,
i declare this:
SELECTION-SCREEN: BEGIN OF TABBED BLOCK MYTAB FOR 17 LINES,
TAB (20) T_ETI_MA USER-COMMAND PUSH_200
DEFAULT SCREEN 200,
TAB (20) T_ETI_SD USER-COMMAND PUSH_300
DEFAULT SCREEN 300,
TAB (20) T_ETI_KO USER-COMMAND PUSH_400
DEFAULT SCREEN 400,
END OF BLOCK MYTAB.
and have defined the subscreens 200 300 and 400.
All is what i want, but if i execute on screnn 400 i will, that subscreen 400 is default, but after executing,
allways 200 is default? Same when i execute on screen 300.
How can i manage that the screen on which i execute stays as default.
Thanks.
regards, Dieter
2010 Jun 29 4:09 PM
the only reason I can imagine is that you changed mytab-dynnr = 200 during the PBO
2010 Jun 29 4:35 PM
Hi,
thanks for answer.
i have deguged and see, after executen (F8), the mytab-dynnr has changed from 0400 to 0200,
but i don't change structure mytab.
Any idea what happens or how can i avoid that changing?
Regards, Dieter.
2010 Jun 29 4:49 PM
ah okay, I think I understand now what you mean.
In fact, there is no error. You are just wondering why the program loses its last screen.
That's what happens after the end-of-selection event: the program is restarted (as if it was SUBMIT without AND RETURN). The global variables are also refreshed, except the selection screen fields.
So, you can put your processing inside AT SELECTION-SCREEN, and trigger a MESSAGE e... DISPLAY LIKE 'S' (any information message you want) so that to not trigger next events (especially start-of-selection).
Edited by: Sandra Rossi on Jun 29, 2010 5:52 PM
2010 Jun 29 4:37 PM
YOu're correct in that SAP does initialize the screen number value when returning to the selection screen...you always end up on the first tabstrip.
I was able to overcome this in a report program I did back in 4.6c. As I recall, I set a memory id to the sy-dynnr the user was on upon execute choice (exported), and read (imported) that memory id back to return to the same screen when going back to selection (in "INITIALIZATION" event?? I remember something about needing to clear that memory id after it was read).
Unfortunately, I don't have a copy of that code...but perhaps you can figure out how to do the same by looking at the values of structure SYST or mytab after execute press and as SAP is returning to the selection screen (initialization or load-of-program events).
2010 Jun 29 5:14 PM
Hi Breakpoint,
thanks for your answer, you gave me the correct idea.
i solve it like this:
INITIALIZATION.
*
IMPORT MYTAB FROM MEMORY ID 'MYTAB'.
*
START-OF-SELECTION.
*
EXPORT MYTAB FROM MYTAB TO MEMORY ID 'MYTAB'.
Regards, Dieter
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |