10-09-2008 6:40 AM
Hi Gurus,
I have developed an ALV report and displaying the Output of the report by using the Standard Function module 'REUSE_ALV_GRID_DISPLAY',The report is getting displayed corectly but the problem is that i have created two Layouts(Ex:Layout1 & Layout2) in the Output of the ALV report.
Layout1 - By using this Layout1 the ALV report can be seen with 23 columns(8 feilds are Hidden).
Layout2 - By Using this, the ALV report can be seen with all the 31 columns.
By Default Layout1 will be shown in the output of the ALV report.So when ever i am selecting the Layout2 then its not overwriting the Layout1 in the output of the ALV report,so can you please let me know how to overcome this issue.
Thanks & Regards,
Sridhar.
10-09-2008 3:56 PM
it should show the layout2. what is the layout2 type , is it user specific or what type of layout..?
10-10-2008 5:31 AM
Hi Vijay,
Thanks for your reply,The Layout1 & Layout2 both are user specific,in which the users can restrict the feilds for displaying it in the Output of ALV report that is the reason i have created two Layouts,in which layout1 will have restricted feilds & the layout2 will have all the feilds to be displayed in the ALV output.But in my case bydefault the ALV output of my report will be of Layout1,once the layout1 is displayed then i will select the Layout2 in the ALV output and which overwrites the Layout1,Now if i select the Layout1 once again then its not overwriting the Layout2,Even tough i am getting the message in the Status bar saying that it was overwritten but actually its not overwriting.
So can you please help me how to overcome this issue.
Thanks & Regards,
Sridhar.
10-10-2008 5:57 AM
this may be some buffer related issue. i am not really sure of it. i am not able to create the same situation in my system.
10-10-2008 6:41 AM
Hi Vijay,
There is some wrong comunication in my earlier message,the Layouts are not user specific its "All".
Thanks & Regards ,
Sridhar
10-10-2008 6:48 AM
run this report BCALV_BUFFER_DELETE before going for next layout and see.
10-10-2008 1:23 PM
Hi Vijay,
I tried with this program for regresh the Buffer also, but still the problem is not resolved.
Thanks & Regards,
Sridhar
10-10-2008 7:32 AM
Hi,
I am sure that your are passing the Layout variable in FM Reuse_alv.....
Can you please share the FM call...
10-10-2008 1:12 PM
Hi Ajay,
Below is the FM Code which is the part of my ALV report Program
IF NOT i_alv_output[] IS INITIAL.
PERFORM f_create_field_catalogue. "ALV form that creates output screen
PERFORM f_create_events.
ls_variant-report = sy-repid.
CLEAR wa_alv_output.
IF NOT i_alv_output[] IS INITIAL.
PERFORM f_create_field_catalogue. "ALV form that creates output screen
PERFORM f_create_events.
ls_variant-report = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_callback_pf_status_set = lv_formname1
i_callback_user_command = lv_formname1
is_layout = ls_layout
it_fieldcat = lt_fieldcat
it_excluding = lt_extab[]
it_sort = lt_sort
i_callback_top_of_page = c_formname_top_of_page
i_save = c_a
is_variant = ls_variant
is_print = ls_print
it_events = it_events
TABLES
t_outtab = i_alv_output.
ELSE.
MESSAGE s999 WITH text-035.
ENDIF.
Thanks & Regards,
Sridhar.
10-10-2008 1:18 PM
Hi Ajay,
Below is the FM Code.
IF NOT i_alv_output[] IS INITIAL.
PERFORM f_create_field_catalogue. "ALV form that creates output screen
PERFORM f_create_events.
ls_variant-report = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_callback_pf_status_set = lv_formname1
i_callback_user_command = lv_formname1
is_layout = ls_layout
it_fieldcat = lt_fieldcat
it_excluding = lt_extab[]
it_sort = lt_sort
i_callback_top_of_page = c_formname_top_of_page
i_save = c_a
is_variant = ls_variant
is_print = ls_print
it_events = it_events
TABLES
t_outtab = i_alv_output.
ELSE.
MESSAGE s999 WITH text-035.
ENDIF.
Thanks & Regards,
Sridhar.
10-10-2008 2:14 PM
Hi,
One quick Catch......May not work...but still no harm to try the same...
I observed that in the FM Reuse_ALV_GRID_DISPLAY ....u r passing the report name as sy-repid.......inspite of passing sy-repid.....store its value in a Local Variable and pass that local variable as report name in the Function Module..
Current Code
i_callback_program = sy-repid
Should be modified as:
Data v_repid like sy-repid.
v_repid = sy-repid.
i_callback_program = V_repid
Let me know the result once u r done....
10-13-2008 12:06 PM
Hi Ajay,
Thanks for your reply,even this all doesnt worked for me.
I found one strange thing is that if i do the displaying of Layouts in revers order(First : Layout1 & then Second: Layout2) then the layout1 is getting overwritten by Layout2 and vice versa,In which Layout1 contains all the 31 feilds and Layout2 contains only 23 feilds and the remaining 8 feilds are hidden.
I dont what the reason behind this.
Thanks & Regards,
Sridhar.
10-13-2008 12:11 PM
Hi,
Quite strange......
The only Option left is you need to share the complete code....Then only I can help you..
10-15-2008 4:55 AM
Hey Ajay,
As i explained you its working fine with vice versa ,i think its fine with the End User,Any how thanks a lot for your help.
Thanks & Regards,
Sridhar.