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: 

Dynamic Internal table-Field Length

Former Member
0 Kudos

Hi Experts,

                 I have build a dynamic internal table and showed output as ALV Report( Using  REUSE ALV GRID DISPLAY).  In Report Filter option is not working for MATNR field. In filter option I'm getting field length as 10 char only. How to enable filter option for this scenario. Kindly guide me.

Thanks.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

pass this value to the fieldcatlog...

   wa_fieldcat-ref_tabname = '<TABLE_NAME>'.

   wa_fieldcat-ref_fieldname = 'MATNR'.

5 REPLIES 5

Former Member
0 Kudos

The ALV field length depends on the field properties.Check if the field of the table used for MATNR field is of length 18(type CHAR) as in Table MARA-MATNR

When you are creating  a dynamic internal table from a field catalog,it is advisable to use reference table/reference to avoid such differences.Also output length in ALV properties can be set as 18 (useful if the field type has minimum length 18).This will ensure that the field displayed by using the dynamic internal table to ALV will have the desirable field properties

Hope it helps

Former Member
0 Kudos

pass this value to the fieldcatlog...

   wa_fieldcat-ref_tabname = '<TABLE_NAME>'.

   wa_fieldcat-ref_fieldname = 'MATNR'.

lijisusan_mathews
Active Contributor
0 Kudos

After creating the internal table, retrive the fieldcatalog for the field MATNR. And then assign its putput length and its data type..  This should solve your problem.

Suzie

former_member184569
Active Contributor
0 Kudos

When  we are using fields like MATNR, we need to call the conversion exits to display in proper format so that filter function is enabled.  As mentioned, you just need to give the reference table name and field name in the field catalog for matnr. This would automatically call the conversion exits.

  lw_fieldcat-outputlen = '18'.

   lw_fieldcat-ref_tabname = 'MARA'.

   lw_fieldcat-ref_fieldname = 'MATNR'.


Regards,

Susmitha

0 Kudos

Hi can you please tell me how to provide output length of type p and decimal 2

thanks in advance

kishore ssk