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

fieldcat

Former Member
0 Likes
1,044

Dear All,

I displaying the output using alv.

In this i want to change the one of the column name(fieldname) and it has to display this in full name whatever be the output length.

For eg:

In the output there is fied LGNUM.

I changed this as

<b>LOOP AT t_fieldcat.

CASE t_fieldcat-fieldname.

  • Warehouse Number

WHEN 'LGNUM'.

t_fieldcat-seltext_l = text-t04.

t_fieldcat-seltext_m = text-t04.

t_fieldcat-seltext_s = text-t04.

t_fieldcat-reptext_ddic = text-t04.

t_fieldcat-ddictxt = c_l.

t_fieldcat-key = ' '.

MODIFY t_fieldcat TRANSPORTING seltext_l

seltext_m

seltext_s

reptext_ddic

ddictxt

key.</b>

Here text-t04 = 'warehouse number'.

But since the lgnum has only 4 characters the fieldname is displaying as Whno.

I want the full fieldname in the output.For this which field we need to cahnge in the fieldcatalog.

1 ACCEPTED SOLUTION
Read only

varma_narayana
Active Contributor
0 Likes
930

hi ,

Check the line in BOLD

LOOP AT t_fieldcat.

CASE t_fieldcat-fieldname.

  • Warehouse Number

WHEN 'LGNUM'.

t_fieldcat-seltext_l = text-t04.

t_fieldcat-seltext_m = text-t04.

t_fieldcat-seltext_s = text-t04.

t_fieldcat-reptext_ddic = text-t04.

t_fieldcat-ddictxt = c_l.

t_fieldcat-key = ' '

<b>t_fieldcat-OUTPUTLEN = 20.</b>

MODIFY t_fieldcat TRANSPORTING seltext_l

seltext_m

seltext_s

reptext_ddic

ddictxt

key.

<b>Reward if Helpful</b>

6 REPLIES 6
Read only

varma_narayana
Active Contributor
0 Likes
931

hi ,

Check the line in BOLD

LOOP AT t_fieldcat.

CASE t_fieldcat-fieldname.

  • Warehouse Number

WHEN 'LGNUM'.

t_fieldcat-seltext_l = text-t04.

t_fieldcat-seltext_m = text-t04.

t_fieldcat-seltext_s = text-t04.

t_fieldcat-reptext_ddic = text-t04.

t_fieldcat-ddictxt = c_l.

t_fieldcat-key = ' '

<b>t_fieldcat-OUTPUTLEN = 20.</b>

MODIFY t_fieldcat TRANSPORTING seltext_l

seltext_m

seltext_s

reptext_ddic

ddictxt

key.

<b>Reward if Helpful</b>

Read only

Former Member
0 Likes
930

LOOP AT t_fieldcat.

CASE t_fieldcat-fieldname.

  • Warehouse Number

WHEN 'LGNUM'.

t_fieldcat-seltext_l = text-t04.

t_fieldcat-seltext_m = text-t04.

t_fieldcat-seltext_s = text-t04.

t_fieldcat-reptext_ddic = text-t04.

t_fieldcat-ddictxt = c_l.

t_fieldcat-key = ' '.

<b>t_fieldcat-outputlen = '30'.</b>

MODIFY t_fieldcat TRANSPORTING seltext_l

seltext_m

seltext_s

reptext_ddic

ddictxt

key.

Read only

Former Member
0 Likes
930

Hi Shoban ,

You need to explecitly specify the lenght on the feild in the catalog , to get the desired output.

Regards

Arun

Read only

Former Member
0 Likes
930

Hi

WA_FLDCAT-FIELDNAME = 'REFERENCE'.

WA_FLDCAT-REPTEXT = 'Ref Euip Num'.

use REOPTEXT property for getting

reward points to all helpful answers

kiran.M

Read only

Former Member
0 Likes
930

Hi! babu

Specify the Output Lengh = value (or) don't specify the Fixed Length = 'X''.

so, while expand the column the full length of the text will be visible.

Regards,

Nagulan

Read only

Former Member
0 Likes
930

Hi! babu

Specify the Output Lengh = value (or) don't specify the Fixed Length = 'X''.

so, while expand the column size the full length of the text will be visible.

Regards,

Nagulan