Application Development 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: 

How to get the correct value of NO_OUT in my FIELDCATALOG after refresh ?

Former Member
0 Kudos

Hi experts,

I use OOALV to display my data. I need to check values of my fieldcatalog after the refresh. So when i hide a column using the alv interface, the field : fieldcatalog-no_out must be updated but this append only one time, then the values of fieldcatalog are never updated.

Exemple in pictures :
First part : I have just lunch the program, all seems good :

Second part : I have hide the MATNR column :

Now, my fields are like this in the alv :


Third operation : I want to display again the 'Article' field so i put my field into the left side in 'Colonnes affichées' and i check the values of my catalog's table 'IT_FIELDCAT' after having validate changes :

But as u can see, the 'MATNR' field is always mark as NO_OUT.

I only use the method :

call method g_grid->get_fontend_fieldcatalog 	
IMPORTING	
et_fieldcatalog = it_fieldcat.

and then a refresh using

call method g_grid->refresh_table_display.

So how to fix this please ?

Here is an other table where alv's data are stored/updated ?

Can it be a bug from the method ?

I just want to get changes from the alv's display. So after the third picture, the result must be the same as the first picture.

Have a nice day,
Alexandre HOLZHAMMER

4 REPLIES 4

former_member208149
Participant

Hi Alex,

To display the column back on your ALV, you have to move the column Article back into the list of displayed columns (to the left side).

Method g_grid->get_fontend_fieldcatalog simply returns the current field catalog which has the NO_OUT as marked for MATNR (Column Article is in the list of available columns in right side), refreshing ALV won't display it unless you move it back into the list of displayed columns.

You can also manipulate the code to unmark this column but I won't recommend it.

Hope this clarifies your query.

Regards.

0 Kudos

Thanks for your answer, my bad, i haven't specified that between the third and the fourth picture, i put the column article back in the left side.

Regards.

0 Kudos

Do you set the it_fieldcat-no_out = ' ' in ABAP code or do you move the field "Article" in pop-up from right to left ?

If you modify the it_fieldcat, you have to update ALV with method set_frontend_catalog.

If you change layout in popup, it will change immediately, no need for method refresh_table_display.

The idea is still to have a button to switch between two layouts with a 'normal' and a 'compressed' data source ?

0 Kudos
CLEAR TEST. "Pour éviter le redondance de l'événement after refresh
CLEAR it_aff. "La table devant etre affichée
CALL METHOD g_grid->get_frontend_fieldcatalog
IMPORTING
et_fieldcatalog = it_fieldcat[].
--------------------------------------------------------------------------------------------
*/////HERE is the code to check no-out value and then fill correctly the table it_aff./////*
--------------------------------------------------------------------------------------------

CALL METHOD g_grid->set_frontend_fieldcatalog

EXPORTING it_fieldcatalog = it_fieldcat.
 SORT it_aff ASCENDING. "On trie toutes les données

 DELETE ADJACENT DUPLICATES FROM it_aff COMPARING ALL FIELDS. "On supprime les duplicatas

CALL METHOD g_grid->refresh_table_display."Reaffichage

 TEST = 'X'.

The idea is to have less lines by deleting duplicates lines when i hide a column. This work, i have less line but when i want to do the opposite, this display an empty column of the field previously hidden.

When i debbug, i see that the field is empty because the field no-out from it_fieldcat isn't updated when i set the field manually for the second time using the alv button made for this "modify the display".

Thanks for your reply,

Alexandre HOLZHAMMER