Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Problems with ALV field catalog

Former Member
0 Likes
5,774

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

17 REPLIES 17
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
3,638

Hi, please check out the parameters of the function module. There are two which deal with the buffer, try setting these flags.

*"     VALUE(I_BYPASSING_BUFFER) TYPE  CHAR01 OPTIONAL
*"     VALUE(I_BUFFER_ACTIVE) OPTIONAL

Regards,

Rich Heilman

Read only

Former Member
0 Likes
3,638

Try flaggin the parameter I_BYPASSING_BUFFER = 'X'.

Regards,

ravi

Read only

0 Likes
3,638

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

Read only

0 Likes
3,638

pass this parameter and checkout

VALUE(I_PROGRAM_NAME) LIKE SY-REPID OPTIONAL

I_PROGRAM_NAME = sy-repid

Read only

Former Member
0 Likes
3,638

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

Read only

0 Likes
3,638

Hi,

I have used the structure only. The structure was declared inthe SE11 transaction.

Thanks.

- Irudayaraj Peter

Read only

0 Likes
3,638

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.

Read only

0 Likes
3,638

Hi,

I tried doing the same. Still same issue. Is there any SAP note to address this.

Thanks in advance.

- Irudayaaraj Peter

Read only

0 Likes
3,638

chk this standard program which edits fieldcatalog online

BCALV_FIELDCAT_TEST

this should help u

Read only

0 Likes
3,638

Maybe try running this function module.

ALV_DELETE_BUFFER

Regards,

Rich Heilman

Read only

0 Likes
3,638

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

Read only

0 Likes
3,638

Hi,

Again the same stuff that this FM does not exists in our version of 4.5 B.

Thanks.

- Irudayaraj Peter

Read only

0 Likes
3,638

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

Read only

0 Likes
3,638

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

Read only

0 Likes
3,638

Hi all,

Thanks for the help in replying the thread. The issue has been resolved now.

- Irudayaraj Peter

Read only

former_member69765
Contributor
0 Likes
3,638

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...

Read only

Former Member
0 Likes
3,638

Hi,

also try to refresh the fieldcatalog before the calling the Function module