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: 

ALV Grid display - Internal table data issue

jhon_jhon
Explorer
0 Kudos

Hi

I am facing an issue with ALV Grid display , In the existing Internal table , I have added new field with type char30 to display some text in the output.

I could see in the Internal table in debug mode , the data is populating correctly to the newly added field , but in the output the field value is not showing correctly , and always the field is holding the value of preceding field.

Any idea friends.

16 REPLIES 16

Former Member
0 Kudos

Hi,

Did you check the field category. You may miss that field.

Ruks

0 Kudos

I Have added field to field catalog...still same error.

0 Kudos

Hi,

Kindly verify the position  of the field in the field catalog.

Thanks and Regards,

Sriranjani.

Former Member
0 Kudos

Hi,

Please check the fieldcatalog. In it, check the field passed for fieldname parameter. By mistake you must have given the reference for preceding field in it.

Regards,

Aashika

0 Kudos

Hi Aashika ,

I have filled fieldcat with proper values.

0 Kudos

Please share the part of code for reference so as to have better idea of what wrong might be happening.

Regards,

Aashika    

0 Kudos

Hi Sriranjani,


Field position given as 12.



CLEAR i_fieldcat.

   i_fieldcat-fieldname   = 'ZSTATUS'.

   i_fieldcat-tabname = 'ZTPM_WHYWHY'.

     i_fieldcat-outputlen   = '30'.

   i_fieldcat-seltext_m   = 'Status Notification'.

   i_fieldcat-col_pos     = '12'.

   APPEND i_fieldcat TO e01_lt_fieldcat.

0 Kudos

Hi Aashika ,


Please find the FM below and I have filled fieldcat with proper parameters.


CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

      i_callback_program       = g_repid

      i_callback_user_command  = 'USER_COMMAND'

      i_callback_pf_status_set = 'SET_PF_STATUS'

      is_layout                = gs_layout

      it_fieldcat              = gt_fieldcat[]

      i_save                   = 'X'

      is_variant               = l_repid

      it_events                = gt_events[]

    TABLES

      t_outtab                 = it_display[].

0 Kudos

Jhon,

The above code looks good. Please check once how the table for e01_lt_fieldcat is being populated with all the values before the ALV_GRID_DISPLAY function module is called.

Regards,

Aashika

0 Kudos

You are using fieldcat table gt_fieldcat or e01_lt_fieldcat. Since the value is being appended by you in e01_lt_fieldcat.


Regards,

Aashika

0 Kudos

Hi Aashika ,

All the fields are populating correctly in the filedcat Itab , In another perform I'm passing all the fieldcat values from e01_lt_fieldcat to gt_fieldcat[].

below is the list of fields for output

QMNUM

LINE

QMTXT

EQUNR

EQKTU

AUSVN

BEBER

INGRP

ARBPL

AUSZT

MAUEH

ZSTATUS

0 Kudos

Hi,

Please download the gt_fieldcat table as its being populated (it can be done while your are debugging) and share the same.

Aashika

0 Kudos

Hi Aashika ,

Please find the enclosed file.

0 Kudos

Hi,

Is the field in the internal table as well declared in the same order as your fieldcatalog?

Thanks and Regards,

Sriranjani Chimakurthy.

0 Kudos

I got it , I have done a small mistake the filed name declared in the ITAB is diff and the name maintained in the table is diff....Made changes and working fine.

0 Kudos

Glad to know that you could figure out yourself .

Regards,

Sriranjani.