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

Add column heading into internal table

Former Member
0 Likes
922

hi

i want to add heading of each column into internal table and i am using alv progarming

please help me for that

hi

i want to add heading of each column into internal table and i am using alv progarming

please help me for that

6 REPLIES 6
Read only

Former Member
0 Likes
878

HI,

below is some example

DATA ls_fcat type lvc_s_fcat .

ls_fcat-fieldname = 'CARRID' .

ls_fcat-inttype = 'C' .

ls_fcat-outputlen = '3' .

ls_fcat-coltext = 'Carrier ID' .

ls_fcat-seltext = 'Carrier ID' .

APPEND ls_fcat to pt_fieldcat .

CLEAR ls_fcat .

ls_fcat-fieldname = 'CONNID' .

ls_fcat-ref_table = 'SFLIGHT' .

ls_fcat-ref_table = 'CONNID' .

ls_fcat-outputlen = '3' .

ls_fcat-coltext = 'Connection ID' .

ls_fcat-seltext = 'Connection ID' .

APPEND ls_fcat to pt_fieldcat .

hope u get.

Amresh.

Read only

0 Likes
878

hi ,

thanks for rply ,

acttully i want these heading shuld come in my internal table because when in am exporting my internal table into excel heading is not comming................

Read only

0 Likes
878

If u r exporting ur data from ALV , the headings which u r displaying through ALV fieldcat will come in your excel sheet.

Regards

Sathar

Read only

0 Likes
878

then u can append this heading in that internal table in the very intial stage before appending other values, it will come than in excel also.

-Amresh.

Read only

Former Member
0 Likes
878

Hi,

In Alv, by using Field-catalog we can disply the headings to the columns.

Read only

Former Member
0 Likes
878

Hi

first append the headings to the internl table, then append the actual values.

regards,

Ramya