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

ALV Grid display - Internal table data issue

jhon_jhon
Explorer
0 Likes
2,782

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

Former Member
0 Likes
2,398

Hi,

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

Ruks

Read only

0 Likes
2,398

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

Read only

0 Likes
2,398

Hi,

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

Thanks and Regards,

Sriranjani.

Read only

Former Member
0 Likes
2,398

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

Read only

0 Likes
2,398

Hi Aashika ,

I have filled fieldcat with proper values.

Read only

0 Likes
2,398

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

Regards,

Aashika    

Read only

0 Likes
2,398

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.

Read only

0 Likes
2,398

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

Read only

0 Likes
2,398

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

Read only

0 Likes
2,398

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

Read only

0 Likes
2,398

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

Read only

0 Likes
2,398

Hi,

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

Aashika

Read only

0 Likes
2,397

Hi Aashika ,

Please find the enclosed file.

Read only

0 Likes
2,397

Hi,

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

Thanks and Regards,

Sriranjani Chimakurthy.

Read only

0 Likes
2,397

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.

Read only

0 Likes
2,397

Glad to know that you could figure out yourself .

Regards,

Sriranjani.