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: 

Field in ALV not getting populated

Former Member
0 Kudos

Hi all,

I need some help. I am displaying an ALV with fields.

GROUP G/L ACCOUNT Local currency USD Period

100 10 5 5 12

100 11 6 4 12

now i have added an extra field TXT20 in the as last field of structure

GROUP G/L ACCOUNT Local currency USD Period TXT

100 10 5 5 12 aa

100 11 6 4 12 ab

TXT should come as 3rd coloumn in the output.

EXAMPLE:

GROUP G/L ACCOUNT TXT Local currency USD Period

100 10 aa 5 5 12

100 11 ab 6 4 12

I have changed the coloumn positions in the field catalog accordingly and I have not written or changed any select queries from earlier output.

now my problem is PERIOD field is not getting populated in the ALv,the data is visible in the IT_FINAL which I am passing to Reuse_alv_grid_display. the field catalog is also getting build properly.

so plz suggest some changes so that I can move ahead.

6 REPLIES 6

Former Member
0 Kudos

Hi

What's your output? Have put the value of extra field in IT_FINAL?

0 Kudos

Hi,

I have not yet populated the new field TXT value in the it_final...but i have added that in the structure of it_final...so it is showing blank coloumn the output,but period field is already populated in the it_final still it is showing blank.

GROUP G/L ACCOUNT TXT Local currency USD Period

TXT--field will be showing empty as i hav not selected data into that, but period field is also showing empty even though I have data for that in it_final

0 Kudos

Hi

I don't know what's the reason and now I have no environment to test it, but you can try other way:

1. define your fieldcate one by one as the sequence of your output like

GROUP G/L ACCOUNT TXT Local currency USD Period

In this situation, you needn't use component -- position of fieldcate structure. Pay attention to

fieldname in upper case.

2. If only doing step1 has no effect, then adjust your structure of internal table. Sequence your

component of IT_FINAL as the output field like step1.

If still no effect, please let me know.

0 Kudos

Hi,

Actually if i change the structure of it_final then the fetching logic need to be changed,I am doing a change request on existing logic, if i have a it_final with fields filled with data.

example:

GROUP G/L ACCOUNT Local currency USD Period

now I create a new IT_FINALIZE with structure that includes TXT field.

example:

GROUP G/L ACCOUNT TXT Local currency USD Period

how can i copy the contents of corresponding fields from it_final to it_finalize....I guess after copying contents if I pass it_finalize to the FM it will work..what do u say.

0 Kudos

Hi

Do you have large data in your IT_FINAL? If not, you can do loop, like

loop at it_final into w_final.
       w_finalize-group = w_final-group.
       ...
       ... 
       append w_finalize to it_finalize.
       clear: w_final, w_finalize.
  endloop.

If data is large I think you should cosider about your performance. Maybe you should find another way.

Former Member
0 Kudos

Hi,

Can you put your field catalog in detail? I think the problem occurs there.

Regards,

Chris Gu