2009 Jul 08 3:27 PM
Hello Friends,
I have a report. I need to add a refresh button to the report.
Any suggestions,
Bob.
2009 Jul 08 3:35 PM
Hi
Which kind of report?
ALV? Dialog?
Anyway you need to repeat the logic where u select the data and show it:
START-OF-SELECTION.
PERFORM SHOW_DATA.
AT USER-COMMAND.
CASE SY-UCOMM.
WHEN 'REFR'. PERFORM SHOW_DATA.Max
If you are using ALV then either you can use the "REFRESH" button in ALV toolbar and you can handle the same in PAI or at user command.
2009 Jul 08 3:35 PM
Hi
Which kind of report?
ALV? Dialog?
Anyway you need to repeat the logic where u select the data and show it:
START-OF-SELECTION.
PERFORM SHOW_DATA.
AT USER-COMMAND.
CASE SY-UCOMM.
WHEN 'REFR'. PERFORM SHOW_DATA.Max
2009 Jul 08 3:42 PM
Thanks for the suggestion.
Its not an ALV. I will try the option and get back.
Bob
2009 Jul 08 3:46 PM
You can also call the same report program again using SUBMIT statement...in AT-USER COMMAND event..
This can also do the work....but not needed as said in the earlier posts.
IF using ALV...you can call refresh_table_display method...
2009 Jul 09 6:03 PM
Thanks All,
Its not an ALV report.
Do we have any standard report whaihc does this.
I have copied a GUI from a standard report but was wondering where do i call the PF status in the program. I mean where do I cwrite the code for it.
An example of this ould be helpful
Bob
2009 Jul 09 6:24 PM
Hello Bob,
At PF is a event. You can write it anywhere you want.
I found this code in abap docu, you can refer to this code as example of At PF event.
DATA NUMBER LIKE SY-INDEX.
START-OF-SELECTION.
DO 9 TIMES.
WRITE: / 'Row', (2) SY-INDEX.
NUMBER = SY-INDEX.
HIDE NUMBER.
ENDDO.
AT PF8.
CHECK NOT NUMBER IS INITIAL.
WRITE: / 'Cursor was in row', (2) NUMBER.
CLEAR NUMBER.
Regards,
Jacky.
2009 Jul 09 6:28 PM
Hi
Yo have to set the pf-status after start of selection.
START-OF-SELECTION.
SET PF-STATUS 'TEST'.
AT USER-COMMAND.
CASE sy-ucomm.
WHEN 'REFRESH'.
logic.
ENDCASE.
Hope this helps.
Regards,
Dhasarathy
2009 Jul 09 7:07 PM
Thanks All,
I have copied a standard GUI. However that made things bad. the problem is the back, exit button all dosent work.In addition Since its a classical report i dont have the user command. the code for interactive so everything is at-line selection.
Thanks,
Bob
2009 Jul 09 7:35 PM
Copy this sample code try
As per your requirements change the Change toolbar button FUN1 to REFRESH
report zars
no standard page heading line-size 255.
data: fcode type table of sy-ucomm,
wa_fcode type sy-ucomm.
start-of-selection.
wa_fcode = 'FC2 '. append wa_fcode to fcode.
wa_fcode = 'FC3 '. append wa_fcode to fcode.
wa_fcode = 'FC4 '. append wa_fcode to fcode.
wa_fcode = 'FC5 '. append wa_fcode to fcode.
wa_fcode = 'PICK'. append wa_fcode to fcode.
set pf-status 'TEST' of program 'DEMO_LIST_SET_PF_STATUS_1' excluding fcode.
perform show_list.
at user-command.
case sy-ucomm.
when 'FC1'. perform show_list.
endcase.
*&---------------------------------------------------------------------*
*& Form SHOW_LIST
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
form show_list.
sy-lsind = sy-lsind - 1.
write : sy-uzeit.
endform. "SHOW_LIST
a®
2009 Jul 09 8:24 PM
Thanks ARS.
This really helps.
However i am stuck with the submit statement.
here is my selection screen
SELECTION-SCREEN : BEGIN OF BLOCK blk1 WITH FRAME TITLE text-b01 .
SELECT-OPTIONS : s_vbeln FOR zdeldates-vbeln .
. .
PARAMETERS : p_reject AS CHECKBOX .
.
SELECTION-SCREEN : END OF BLOCK blk1
Bob
2009 Jul 09 9:19 PM
2009 Jul 08 3:36 PM
If you are using ALV then either you can use the "REFRESH" button in ALV toolbar and you can handle the same in PAI or at user command.
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |