2006 Nov 20 2:02 PM
Hi,
We have designed our program to have a switch in the selection screen to decide on the Structure for the ALV output. The first structure has 5 fileds and the second structure has 15 fileds. What happens is that when I change my switch in the selection screen I am not able to see the structure changes in the ALV. When I debug the code I find that 'REUSE_ALV_FIELDCATALOG_MERGE' Function module iteslf is not picking in the changes to the structure.
I check the SE11-Structure infortmation asn that is showing the structure exactly. Bu the 'REUSE_ALV_FIELDCATALOG_MERGE' Function module iteslf is not picking in the changes to the structure. Seems to be a memory flush problem. Any fix / notes for the same ?
Following is my code snippet:
if p_incadd = 'X'.
l_struct = 'ZMED_S002'.
else.
l_struct = 'ZMED_S029'.
endif.
call function 'REUSE_ALV_FIELDCATALOG_MERGE'
exporting
i_structure_name = l_struct
changing
ct_fieldcat = t_fcat[]
exceptions
inconsistent_interface = 1
program_error = 2
others = 3.
Any help is very much appreciated.
Thanks.
- Irudayaraj Peter
Hi,
We have designed our program to have a switch in the selection screen to decide on the Structure for the ALV output. The first structure has 5 fileds and the second structure has 15 fileds. What happens is that when I change my switch in the selection screen I am not able to see the structure changes in the ALV. When I debug the code I find that 'REUSE_ALV_FIELDCATALOG_MERGE' Function module iteslf is not picking in the changes to the structure.
I check the SE11-Structure infortmation asn that is showing the structure exactly. Bu the 'REUSE_ALV_FIELDCATALOG_MERGE' Function module iteslf is not picking in the changes to the structure. Seems to be a memory flush problem. Any fix / notes for the same ?
Following is my code snippet:
if p_incadd = 'X'.
l_struct = 'ZMED_S002'.
else.
l_struct = 'ZMED_S029'.
endif.
call function 'REUSE_ALV_FIELDCATALOG_MERGE'
exporting
i_structure_name = l_struct
changing
ct_fieldcat = t_fcat[]
exceptions
inconsistent_interface = 1
program_error = 2
others = 3.
Any help is very much appreciated.
Thanks.
- Irudayaraj Peter
2006 Nov 20 2:06 PM
2006 Nov 20 2:07 PM
Try flaggin the parameter I_BYPASSING_BUFFER = 'X'.
Regards,
ravi
2006 Nov 20 2:31 PM
Hi,
Thanks for the quick reply. I tried finding the parameter in the reuse_alv_fieldcatalog_merge function module. But the FM does not have any field liek that. We are using the 4.5B version.
Following are the details of the function module:
IMPORTING
VALUE(I_PROGRAM_NAME) LIKE SY-REPID OPTIONAL
VALUE(I_INTERNAL_TABNAME) TYPE SLIS_TABNAME OPTIONAL
VALUE(I_STRUCTURE_NAME) LIKE DD02L-TABNAME OPTIONAL
VALUE(I_CLIENT_NEVER_DISPLAY) TYPE SLIS_CHAR_1
DEFAULT 'X'
VALUE(I_INCLNAME) LIKE TRDIR-NAME OPTIONAL
CHANGING
VALUE(CT_FIELDCAT) TYPE SLIS_T_FIELDCAT_ALV
EXCEPTIONS
INCONSISTENT_INTERFACE
PROGRAM_ERROR
Thanks.
- Irudayaraj Peter
2006 Nov 20 2:36 PM
pass this parameter and checkout
VALUE(I_PROGRAM_NAME) LIKE SY-REPID OPTIONAL
I_PROGRAM_NAME = sy-repid
2006 Nov 20 2:08 PM
Hi,
The 'merge' function module wouldnt work for the internal structures declared in the program. u have to declare the str in the dictonary. the better approach for your requirement would be to maintain 'variants' rather than having radio buttons and trying to vary the catalog.
santhosh
2006 Nov 20 2:36 PM
Hi,
I have used the structure only. The structure was declared inthe SE11 transaction.
Thanks.
- Irudayaraj Peter
2006 Nov 20 2:50 PM
have u tried my last post
call function 'REUSE_ALV_FIELDCATALOG_MERGE'
exporting
<b>i_program_name = sy-repid</b>
i_structure_name = l_struct
changing
ct_fieldcat = t_fcat[]
exceptions
inconsistent_interface = 1
program_error = 2
others = 3.
2006 Nov 20 3:32 PM
Hi,
I tried doing the same. Still same issue. Is there any SAP note to address this.
Thanks in advance.
- Irudayaaraj Peter
2006 Nov 20 3:35 PM
chk this standard program which edits fieldcatalog online
BCALV_FIELDCAT_TEST
this should help u
2006 Nov 20 3:36 PM
2006 Nov 20 4:10 PM
Hi,
I think this is a program in the version > 4.5 B. This program does not exists in our version of 4.5 B.
Thanks.
-Irudayaraj Peter
2006 Nov 20 4:10 PM
Hi,
Again the same stuff that this FM does not exists in our version of 4.5 B.
Thanks.
- Irudayaraj Peter
2006 Nov 20 4:20 PM
Hi all,
Thanks for the help in replying the thread. I have found out the solution for the same. The ALV buffer is creating all these issues. For any version < 4.6 we need to use the program BALVBUFDEL to clear the buffer as per SAP note 122975.
I executed the same and it cleared all the buffers. But it is not adviced to run the same in Live as per the note.
Summary
Symptom
Adding or deleting structure or table fields in the repository is not immediately reflected in one of the ALV lists based on this structure.
Additional key words
ALV
SAPLKKBL
Field catalog
Buffering BALVBUFDEL EUINFO
Cause and prerequisites
The field catalog required for the output of an ALV list is setup based on a structure or table of the repository.
For performance reasons, this field catalog is buffered and set up again after the system is restarted.
Solution
Up to Release 4.5, the buffer is set up daily. The changes automatically take effect the following day.
As of Release 4.5, the buffer is no longer set up on a daily basis. If it is required, it must be explicitly reset using Report BALVBUFDEL.
To explicitly reset the buffer, Report BALVBUFDEL must be executed online as of Release 4.5.
Important: Report BALVBUFDEL should not be executed in the production system because all buffers are reset on the application server in question.
After this Report has been executed, the fields added for the field selection are available in the list and the deleted fields can no longer be seen in the list.
Thanks.
- Irudayaraj Peter
2006 Nov 20 4:20 PM
Hi all,
Thanks for the help in replying the thread. I have found out the solution for the same. The ALV buffer is creating all these issues. For any version < 4.6 we need to use the program BALVBUFDEL to clear the buffer as per SAP note 122975.
I executed the same and it cleared all the buffers. But it is not adviced to run the same in Live as per the note.
Summary
Symptom
Adding or deleting structure or table fields in the repository is not immediately reflected in one of the ALV lists based on this structure.
Additional key words
ALV
SAPLKKBL
Field catalog
Buffering BALVBUFDEL EUINFO
Cause and prerequisites
The field catalog required for the output of an ALV list is setup based on a structure or table of the repository.
For performance reasons, this field catalog is buffered and set up again after the system is restarted.
Solution
Up to Release 4.5, the buffer is set up daily. The changes automatically take effect the following day.
As of Release 4.5, the buffer is no longer set up on a daily basis. If it is required, it must be explicitly reset using Report BALVBUFDEL.
To explicitly reset the buffer, Report BALVBUFDEL must be executed online as of Release 4.5.
Important: Report BALVBUFDEL should not be executed in the production system because all buffers are reset on the application server in question.
After this Report has been executed, the fields added for the field selection are available in the list and the deleted fields can no longer be seen in the list.
Thanks.
- Irudayaraj Peter
2006 Nov 20 4:22 PM
Hi all,
Thanks for the help in replying the thread. The issue has been resolved now.
- Irudayaraj Peter
2006 Nov 20 2:11 PM
Your code looks Ok...
Just check few things that.. the t_fcat[] table is refreshed before u call the REUSE_ALV_FIELDCATALOG_MERGE .
and also that the l_struct contains the correct name of the structure...
2006 Nov 20 2:13 PM
Hi,
also try to refresh the fieldcatalog before the calling the Function module