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

former_member530652
Participant
0 Likes
978

Hi All,

I have an alv report in which internal table has 114 entries but when i am using function module REUSE_ALV_FIELDCATALOG_MERGE , only 44 fields are copied into the fieldcatalog....can anyone tell me why this is happening?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
950

Check your internal table declaration...

when you declare the internal table fields using LIKE instead of TYPE.

data: begin of it_final occurs 0,
          vbeln like vbak-vbeln,
          matnr like vbap-matnr,  "use LIKE instead of type
                
       end of it_final.

Hi All,

I have an alv report in which internal table has 114 entries but when i am using function module REUSE_ALV_FIELDCATALOG_MERGE , only 44 fields are copied into the fieldcatalog....can anyone tell me why this is happening?

6 REPLIES 6
Read only

former_member156446
Active Contributor
0 Likes
950

the structure you are passing to REUSE_ALV_FIELDCATALOG_MERGE might be having only 44 fields in it.. check the structure you are passing to the FM REUSE_ALV_FIELDCATALOG_MERGE

114 entries are rows...

and 44 fields(columns) Is valid...

Read only

0 Likes
950

Hi Jay,

I am passing an internal table that has 114 entries but in fieldcatlog only 44 fields are appearing..

Read only

0 Likes
950

114 entries.. what are those 114 data entries.. (number of rows) or Number of fields in the internal table..

the structure should be declared using LIKE..

data: begin of itab,

vbeln LIKE VBAP-VBELN,

posnr LIKE VBAP-POSNR....

Read only

0 Likes
950

Hi,

Just read this:

Supports the creation of the field catalog for the ALV function modules based either on a structure or table defined in the ABAP Data Dictionary, or a program-internal table.

The program-internal table must either be in a TOP Include or its Include must be specified explicitly in the interface.

The variant based on a program-internal table should only be used for rapid prototyping since the following restrictions apply:

Performance is affected since the code of the table definition must always be read and interpreted at runtime.

Dictionary references are only considered if the keywords LIKE or INCLUDE STRUCTURE (not TYPE) are used.

If the field catalog contains more than 90 fields, the first 90 fields are output in the list by default whereas the remaining fields are only available in the field selection.

If the field catalog is passed with values, they are merged with the 'automatically' found information.

Regards,

Shiva Kumar

Read only

Former Member
0 Likes
951

Check your internal table declaration...

when you declare the internal table fields using LIKE instead of TYPE.

data: begin of it_final occurs 0,
          vbeln like vbak-vbeln,
          matnr like vbap-matnr,  "use LIKE instead of type
                
       end of it_final.

Read only

ankurgodre
SAP Mentor
SAP Mentor
0 Likes
950

Hi,

I would suggest to creat your own strucutr to include those fields in the output list & simply pass that structure to the FM: REUSE_ALV_FIELDCATALOG_MERGE.This ensures the complete trnasfer of all the fileds defined in your structure without a single miss on any filed... hope this helps!!

Regars

Ankur.