‎2009 Nov 25 1:54 AM
good day experts...
please help me on this...
i have an interactive report... during at line selection it will display the details on the other screen.
my problem is everytime i trigger at line select it always display the last page so i have to scroll up
again to see the details. another problem in my report is the more i trigger the at line select when i need to go
to the main page is the number of time i have to click BACK command just to go back to the main page.
here is the sample code of my at line selection:
AT LINE-SELECTION.
CLEAR: LV_TEXT1.
READ CURRENT LINE FIELD VALUE CTRL_SUM1-TEXT INTO LV_TEXT1.
IF NOT LV_TEXT1 IS INITIAL.
PERFORM DISPLAY_PREV USING LV_TEXT1.
SCROLL LIST INDEX 1 TO: PAGE SY-CPAGE LINE SY-STARO,
COLUMN SY-STACO .
ENDIF.
*----
Form DISPLAY_PREV:
*----
SORT TAB_ABKRS BY ABKRS.
SORT CTRL_DET1 BY ABKRS STAT2 PERSG PERSK ENAME.
LOOP AT TAB_ABKRS.
CLEAR: LV_CTR1, LV_TOTAL1.
WRITE: /1 'Previous Period Mancount'.
SORT CTRL_SUM1 BY ABKRS STAT2 PERSG PERSK.
LOOP AT CTRL_SUM1 WHERE ABKRS = TAB_ABKRS-ABKRS.
IF SY-SUBRC EQ 0.
IF CTRL_SUM1-TEXT = P_LV_TEXT1.
WRITE: /3 CTRL_SUM1-TEXT COLOR COL_HEADING.
HIDE_ABKRS = TAB_ABKRS-ABKRS.
HIDE HIDE_ABKRS.
FORMAT COLOR COL_NORMAL.
PERFORM EXPAND_PREVIOUS.
FORMAT COLOR OFF.
WRITE: /71 CTRL_SUM1-CTR COLOR COL_TOTAL,
82 CTRL_SUM1-BETRG COLOR COL_TOTAL.
CLEAR: HIDE_ABKRS.
ELSE.
WRITE: /3 CTRL_SUM1-TEXT, 71 CTRL_SUM1-CTR, 82 CTRL_SUM1-BETRG.
HIDE_ABKRS = TAB_ABKRS-ABKRS.
HIDE HIDE_ABKRS.
CLEAR: HIDE_ABKRS.
ENDIF.
ENDIF.
LV_CTR1 = LV_CTR1 + CTRL_SUM1-CTR.
LV_TOTAL1 = LV_TOTAL1 + CTRL_SUM1-BETRG.
MODIFY CTRL_SUM1 TRANSPORTING TEXT.
ENDLOOP.
ULINE.
WRITE: /3 'Total:', 71 LV_CTR1, 82 LV_TOTAL1.
ENDLOOP.
ULINE.
please help...
thank you...
‎2009 Nov 25 4:17 AM
Hi,
How are you calling the other screen by Leave to screen or call screen that imp. also when you are going back what statment are u using leave to screen 0 or again set screen.
In my view to call screen and at the time of back leave screen to 0.
Atul
‎2009 Nov 25 4:32 AM
In you Form "DISPLAY_PREV" you need to reset sy-lsind = 0 to resolve your BACK problem
(Please check my reply in this thread)
and scrolling you need to use SET CURSOR syntax in the secondary list displayed
a®
‎2009 Nov 25 5:52 AM
good day!
i reset my sy-lsind to 0, but when i click the BACK command button it display my selection screen not my main page
display...
‎2009 Nov 25 5:55 AM
‎2009 Nov 25 6:13 AM
Hi,
<li>To place your cursor at the start of the secondary report. You have to write below statement under AT LINE-SELECTION.
<li>To go to main report from interactive after clicking BACK Button, you need to create your own pf-status after START-OF-SELECTION and have to try the below way.
SET CURSOR LINE 1.
Thanks
Venkat.OAT USER-COMMAND.
CASE sy-ucomm.
WHEN 'BACK'.
sy-lsind = 0.
ENDCASE.
‎2009 Dec 07 3:20 AM