2007 Sep 19 7:49 AM
Dear All,
I have a requirement stated as follows:
I am creating an interactive report where User will be using the buttons in the menu:
ENTRY(Insertion of i/p enabled empty line in report list),
CHANGE( opening an existing record 'of the list in edit mode ) ,
DELETE( deletion of record from the list as well as from DB table),
In each case above after completion of the action AT User-command, the list o/p should get refreshed. My question is how to maintain static list header in the report, ie list header should be constant irrespective of list data modification by the User. I am not using table control method in interactive report, other than that is it possible. If yes, then please provide suggestions.
With Regards,
Pulokesh
2007 Sep 19 8:01 AM
You can put the whole code to generate the report in a sub routine and call that subroutine after each of the operations.
And for having a static header which will remain during scrolling, use the TOP_OF_PAGE event.
2007 Sep 19 8:10 AM
Hi Mithun,
Its not the problem for keeping the Top of Page while scrolling. But is it possible to display static List header while the report list get refreshed after successful complitation of User commands.
Regards,
Pulokesh.
2007 Sep 19 8:20 AM
I dont think that will be possible. And just out of curiosity, how are you letting the user edit an entry in the list?
2007 Sep 19 8:28 AM
Hi Mithun,
For this I am using At user command for the buttons i have mentioned earlier, for refreshing the list after every action, write statement is used for that, for opening a line record in edit mode I am using read line command along with writing the record in i/p enabled mode. All the buttons are working fine, ie create , change and delete buttons are working fine, but when i using top-of-page, list header is displayed for the first time, but after that its not appearing.
Regards,
Pulokesh
2007 Sep 19 8:35 AM
Hi Pulokesh,
Use the code you have used in TOP-OF-PAGE also in the event
<b>TOP-OF-PAGE DURING LINE-SELECTION.</b>
This will give you then desired output.
If that does not work the please tell how you have implemented the custom functions like Change Delete e.t.c.
Regards
Arun
2007 Sep 19 8:11 AM
Hi Pulokesh,
I you want to populate same header for all lists in the interactive report, you can
check with fallowing code.
data:it_top TYPE slis_t_listheader,
data:is_ls_line TYPE slis_listheader
IN END-OF-SELECTION EVENT YOU CAN DO FALLOWING BEFROE GRID OR LIST DISPLAY.
PERFORM SUB_COMMENT_BUILD USING IT_TOP.
FORM sub_comment_build USING p_it_top TYPE slis_t_listheader.
CLEAR is_ls_line.
REFRESH p_it_top.
is_ls_line-typ = 'H'.
is_ls_line-info = 'LIST HEADER YOU REQUIRE'
APPEND is_ls_line TO p_it_top.
CLEAR is_ls_line.
if you want few more sub headings you can repeat fallowing code as many sub heading you want.
is_ls_line-typ = 'S'.
is_ls_line-info = SUB HEADER YOU REQUIRE'
APPEND is_ls_line TO p_it_top.
CLEAR is_ls_line.
ENDFORM. " sub_comment_build
FORM top_of_page. "
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = it_top.
ENDFORM. "top_of_page
now pass this top-of-page form, in GRID or LIST display FM of all the lists.
2007 Sep 19 8:16 AM
Hi Subhani,
What ever you told is ok, but I have mentioned earlier that I want suggestions for interactive report not on ALV(neither List display nor grid display).
Regards,
Pulokesh