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: 

Issue with ALV output

Former Member
0 Kudos

Hi all,

I am developing an ALV report. I have declared an internal table woth a field kunnr like kna1-kunnr. Since the fieldcat catalog takes description from standard table in ALV list the heading is displayed as Customer. I want to change the heading. I tried using this code.

********************************************************

<b>

loop at f_fieldcat into wa_fieldcat where fieldname = 'KUNNR'.

wa_fieldcat-fieldname = 'Ship-to-Party'.

modify f_fieldcat from wa_fieldcat.

endloop.

</b>

********************************************************

What is the correct way to do that ?

Thanks and Regards,

Varun.

1 ACCEPTED SOLUTION

former_member188685
Active Contributor
0 Kudos

Hi varun,

simple mistake.., not fieldname, it is seltext_m or l or s

loop at f_fieldcat into wa_fieldcat where 
                       fieldname = 'KUNNR'.
wa_fieldcat-<b>seletext_m</b> = 'Ship-to-Party'.
modify f_fieldcat from wa_fieldcat.
endloop.

regards

vijay

4 REPLIES 4

former_member188685
Active Contributor
0 Kudos

Hi varun,

simple mistake.., not fieldname, it is seltext_m or l or s

loop at f_fieldcat into wa_fieldcat where 
                       fieldname = 'KUNNR'.
wa_fieldcat-<b>seletext_m</b> = 'Ship-to-Party'.
modify f_fieldcat from wa_fieldcat.
endloop.

regards

vijay

Former Member
0 Kudos

You should not change the field name. You should change the SELTEXT_L SELTEXT_M, SELTEXT_S fields for the same.

Regards

Ravi

Former Member
0 Kudos

hi varun,

plz go thru this,

loop at f_fieldcat into wa_fieldcat where fieldname = 'KUNNR'.

wa_fieldcat-seltext_l = 'Ship-to-Party'.

wa_fieldcat-ddictxt = 'L'.

modify f_fieldcat from wa_fieldcat.

endloop.

Regards,

Kiran

0 Kudos

Hi all,

Great Guys !!!

Thank you all for your quick replies.

Thanks and Regards ,

Varun.