02-08-2012 7:20 PM
hi all,
i have a field catalog with 10 fields,and i have added additional fields dynamically . these fields are values of an internal table field.i have data for 10 fields of fieldcatalog in one internal table,i have added my new (dynamic)field values also into it. my internal table is now with complete data to be displayed. Now i am trying to display values in the ALV, the values of 10 fields of internal table are displayed but my other values are not displayed as the field names are different in fieldcatalog and internal table.
need help on how to display these values.any help would be greatfull.
regards,
naren
Edited by: naren04 on Feb 8, 2012 8:21 PM
02-09-2012 3:12 AM
Hi Naren,
Please find the link below which may help you in solving this.
[Display field catalog values in alv|http://abap-gallery.blogspot.in/2007/07/field-catalog-in-alv.html]
[Create internal table structure dynamically in ALV|http://www.sapdev.co.uk/tips/dynamic-structure.htm]
Regards,
Karuna
02-09-2012 3:19 AM
hi Naren,
For all the fields of your internal table, that you want to display in ALV, corresponding field name should be given in Field catalog. Make sure that the field names are entered in Upper case and are eqal to your internal table column names.
Regards,
kartik
02-09-2012 3:40 AM
System itself will take its description from the which is maintained, in this case you should name it like
Example:
afield-col_pos = 1 .
afield-fieldname = 'MAKTX'.
*afield-seltext = ''.
append afield to fieldcat.
afield-col_pos = 2 .
afield-fieldname = 'MATNR'.
*afield-seltext = ''.
append afield to fieldcat.
02-09-2012 4:26 AM
Hi,
Based on the example given by gop5sap11 you can provide field position based col_pos command and provide internal table field name you can provide description based on sel_text.
This sel_text is user defined you can give your own description and append in the field catlog. with which you can display field in ouput according to your requirement.
Regards,
Goutam Kolluru.
02-09-2012 4:36 AM
Make sure that the values are appended in the internal table and then u can append them to fieldcatalog table along with the field name added additionallty.
Regards,
Vinodkumar.