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: 

cl_salv_controller_metadata=>get_slis_fieldcatalog

Former Member
0 Kudos
995

Hi,

My SAP system has version SAP EHP 2 for SAPNetWeaver7.0 and  support package level 0015.

After this last upgrade of support package 0015,  I have a dump when call:

  ct_fieldcat = cl_salv_controller_metadata=>get_slis_fieldcatalog(
      r_columns      = lo_columns
      r_aggregations = lo_aggregations ).

Method GET_SLIS_FIELDCATALOG:

...

if lr_controller->r_adapter->type eq if_salv_adapter=>c_adapter_type_fullscreen.

     ls_slis_fcat-parameter0 = ls_column-r_column->leading_spaces.

endif.

Anyone knows any help to solve it?

Thanks in advance,

Anabela Moreira



8 REPLIES 8

DavidLY
Advisor
Advisor
0 Kudos
155

Hello,

Could you please paste the detailed dump into this thread so we can check the details.

Thanks.

Regards,

David

Former Member
0 Kudos
155

Hi David,

In attach file is the dump detail.

Thank you for try help me.

Best regards,

Ana

0 Kudos
155

Hi Ana,

Class CL_SALV_CONTROLLER_METADATA is an abstract class used internally by the
SALV framework.

It must not be used directly!

To retrieve and change the fieldcatalog settings please use the corresponding
methods of the SALV framework (GET_COLUMNS ...) as shown in the demo report
SALV_DEMO_TABLE_COLUMNS.

Further information is provided in the SAP help portal:

http://help.sap.com/saphelp_erp2004/helpdata/en/2d/58b5403fd63426e10000000a1550b0/frameset.htm

Regards,

David

0 Kudos
155

David, since you are a SAP employee, maybe you can answer a doubt I have since a long time: how do you infer CL_SALV_CONTROLLER_METADATA is an internal class not to be used by customers?

Being that the release concept available for function modules is not there for classes (even then, many unreleased function modules are commonly used in custom ABAP, but still...)

I suspect this class / method in particular is being used by a lot of custom programs. It allows for a simple way to build field catalogs with a single line of coding and without needing a dictionary structure to do so...just check this wiki entry: ALV fieldcatalog - create for ANY table - Code Gallery - SCN Wiki. Maybe Anabela is using it this way. I know I do.

How do you differentiate "released" from "unreleased" classes for cases like this?

Thanks!

0 Kudos
155

Hi

SE24 -> display class CL_SALV_CONTROLLER_METADATA.

Regards,

David

Former Member
0 Kudos
155

Hi David,

I'm using this method like Alejandro put : ALV fieldcatalog - create for ANY table - Code Gallery - SCN Wiki.

But with release 702 and SP-Level 15 I have a dump, In old systems with release 702 and SP-level 12 still work with no dump and also no container.

Tanks for your inputs.

Best regards,

Ana

0 Kudos
155

David, what has to do the instance generation type with the allowed usage of a class by a customer?

A class being abstract doesn't mean it can't be used by a customer, does it?

The only flag related to this information could be the "Released internally" flag but even this doesn't equate to the options for function modules, and isn't properly updated either (an example is CL_SALV_TABLE class which has this flag unmarked).

So, like the F1 documentation for that flag states, "Until a comprehensive release concept is developed", how do you infer a class is safe to be used or not?

0 Kudos
155

Anabela, did you find a solution? I'm really interested in this since I use this logic extensively, I'd like to be prepared in case this will fail in the future. Did you open a support message?

EDIT: Apparently, I found out the error is introduced by note 1834924 - ALV Grid: Leading blank characters

Thanks

Message was edited by: Alejandro Bindi