Skip to Content

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

Jan 09 at 10:45 AM


avatar image

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

capture.png (11.1 kB)
capture2.png (10.4 kB)
capture3.png (18.4 kB)
capture4.png (11.0 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

SAPEKSH GUPTA Jan 09 at 10:56 AM

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.


Show 3 Share
10 |10000 characters needed characters left characters exceeded

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.



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 ?

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


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,