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 Field Catalog - key field not enabled but field still colorized

Former Member
0 Kudos

Hi ABAP Experts,

In my subroutine Create Field Catalog,  the column Sold-to Party is always be color-coded in display although I disabled the KEY field catalog option ( WA_FCAT-KEY = 'X' ).  I also tried to re-activate the report many times but it did not work.

Thanks in advance,

Danny

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Dear Danny,

If you want to delete the color in your Sold-to-party column.

Please remark the coding when defined in build_alv_layout:

gd_LAYOUT-coltab_fieldname = 'CELLCOLOR'.  "CTAB_FNAME

AND

remark the coding when populate data for cellcolor column.

Regards,

Yance

32 REPLIES 32

Former Member
0 Kudos

Hi,

Check your Internal Table structure. The issue might be with declarations.

Regards,

Venu

0 Kudos

Hi Venu,

Here is my internal table.  Is there anything that I need to modify ?

Regards,

Danny

0 Kudos

Hi,

I think you forgot to attachment.

Regards,

Venu

0 Kudos

Sorry Venu .  Copy and paste image does not work.  I need to save it as a file and insert it.

Regards,

Danny

0 Kudos

Dear Danny,

Please remark the coding  when defined in build_alv_layout:

gd_LAYOUT-coltab_fieldname = 'CELLCOLOR'.  "CTAB_FNAME

AND

remark the coding when populate data for colum cellcolor.

Regards,

Yance

raymond_giuseppi
Active Contributor
0 Kudos

Execute report BALVBUFDEL to reset ALV buffer, in case of doubt, perform the Consistency Check, check current field catalog.

Regards,

Raymond

0 Kudos

Hi Raymond,

I just run the report and check Consistency, still the same .

Regards,

Danny

0 Kudos

Could you display the field catalog record for this key field (I wasn't expecting the check to return an error ) Also check for some ALV default variant (try to delete/recreate).

Regards,

Raymond

0 Kudos

Can you post the actual field catalog for the "key" field from Consistency check?

vamsilakshman_pendurti
Active Participant
0 Kudos

Hi Danny,

Change  this statement WA_FCAT-TABNAME  = 'LT_alvdata'

as ...                           WA_FCAT-TABNAME = 'LT_ALVDATA' .

Note : In single quotations  you should place Capital Letters Only...

Thanks ,

Vamsi.

0 Kudos

Hi Vam,

Yes, I just followed your advice but the outcome does not change.

The weird thing is if I enable or disable KEY field for other fields, I can see them changed !!!!

Regards,

Danny

0 Kudos

This theorically should not effect it but try the following steps:

1-change declaration from TYPE VBRK-KUNAG to TYPE CHAR10

2-put WA_FCAT-KEY = space

3-activate

3-Run the BCDEL... report suggested by Raymond

4-run your report.

As i stated, things should not change but in this way you are sure the alv do not "feel" some strange external key on VBRK-KUNAG

0 Kudos

Hi Simone,

I did all your suggested steps but it seems Sold-to Party column still be treated as key field.

Regards,

Danny

former_member202957
Contributor
0 Kudos

Hi,

just see in Debug before you call the ALV if the field catalog has any key updated?  if you find so find the root cause else try to modify the internal table and check?

Thanks,

Sunil.

Ashg1402
Contributor
0 Kudos

Hi,

Can you share your code.?

Former Member
0 Kudos

Hi Ashish,

Yes, check the attachment.

Danny

0 Kudos

Hi Danny,

  I just ran your report and i didn't get any colored column for Sold-to Party. your code is correct.

Still if you want then put wa_fcat-key = '' for that KUNAG field in field catalog.

Did you ran the report which Raymond asked you to for resetting alv buffer.

Also check the variant which you are passing for layout.

Regards

Ashish

Former Member
0 Kudos

Hi Ashish,

Yeah, I thought so.  Here is the result I ran the report.  Is that correct ?

Now, I have another issue.  Suddenly, value of Sales Order type become 'TA' which is unconverted value in field VBRK-AUART.  Do you know what might happen ?!

Regards,

Danny

0 Kudos

Hi,

It's a problem of conversion exit. I also got the same value in the report.

Put a conversion routine for 'CONVERSION_EXIT_AUART_OUTPUT' for that field value .

Former Member
0 Kudos

Hi Ashish,

You are right.  I use the function and got OR value.

Thanks,

Danny

0 Kudos

Hi,

does the column color issue still exist.?

0 Kudos

Just add required information to the field catalog. After


WA_FACAT-FIELDNAME = 'AUART'.

add either some


WA_FACAT-CONVEXIT = 'AUART'.

or even a


WA_FACAT-EDIT_MASK = '==AUART'.

You could also (better) use ddic reference (ref.Generating the Field Catalog Manually)


WA_FACAT-REF_TABLE = 'VBAK'.

WA_FACAT-REF_FIELD = 'AUART'.

Regards,

Raymond

Former Member
0 Kudos

Still unsolved .  Not sure what happened to SAP DEV system and my report !!!

Danny

Former Member
0 Kudos

Dear Danny,

If you want to delete the color in your Sold-to-party column.

Please remark the coding when defined in build_alv_layout:

gd_LAYOUT-coltab_fieldname = 'CELLCOLOR'.  "CTAB_FNAME

AND

remark the coding when populate data for cellcolor column.

Regards,

Yance

0 Kudos

Hi Yance,

I also tried it but no effect.

I use   wa_layout-coltab_fieldname = 'CELLCOLOR'.  " Cell color Column Name to colorize the percentage column.

Regards,

Danny

0 Kudos

Dear Danny,

Have you tried to run this program (BCALV_BUFFER_DEL_SHARED) ?

Regards,

Yance

0 Kudos

Hi Yance,

Yup, I just tried your advice but it is still not affected.

Regards,

Danny

0 Kudos

Dear Danny,

I tried your coding in my environment, It is OK..not color in Sold-to-party column.

Do you still have that problem ?

Regards,

Yance

0 Kudos

Hi Yance,

Well, even Ashish run my code and he did not have colored column Sold-to Party.

I still have the problem.  Not sure what wrong is with ALV buffer ?!!!

Regards,

Danny

0 Kudos

Dear Danny,

Have you tried to change the field name (KUNAG) yet?

Regards,

Yance

0 Kudos

Hi Yance,

That is nice.  Well,  the issue is gone now.  I changed the field name to KUNAG1.

Thank you so much.

Danny

0 Kudos

Hi

You should correct the code where you fill the ALV catalog because you're partially setting it

Perhaps that strange bug is due to the ALV catalog not completely filled