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: 

fieldcat

Former Member
0 Kudos
257

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

varma_narayana
Active Contributor
0 Kudos
143

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

varma_narayana
Active Contributor
0 Kudos
144

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>

former_member223537
Active Contributor
0 Kudos
143

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.

Former Member
0 Kudos
143

Hi Shoban ,

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

Regards

Arun

Former Member
0 Kudos
143

Hi

WA_FLDCAT-FIELDNAME = 'REFERENCE'.

WA_FLDCAT-REPTEXT = 'Ref Euip Num'.

use REOPTEXT property for getting

reward points to all helpful answers

kiran.M

Former Member
0 Kudos
143

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

Former Member
0 Kudos
143

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