Skip to Content

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

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)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jan 09, 2018 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.


    Add comment
    10|10000 characters needed characters exceeded

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