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: 

ALV

Former Member
0 Kudos

Hi friends, I have a ALV report.

I get the report and everything is fine.

The problem the name of the fields in the report. I am displaying quantity field thrice and all the time it shows the same Quantity in result header. I want to display as Available Quantity, Require Quantity, Difference and I need to hard code this to reflect in my prohram.

below is the code,

s_fieldcatalog-col_pos = '8'.

s_fieldcatalog-fieldname = 'DIFFERENCE'.

s_fieldcatalog-tabname = 'T_OUTPUT'.

s_fieldcatalog-rollname = <b>'DIFFERENCE'.</b>

s_fieldcatalog-hotspot = 'X'.

APPEND s_fieldcatalog TO t_fieldcatalog1.

CLEAR s_fieldcatalog.

I need to print Difference, but its comming blank.

If I use the standard SAP field GSMNG, its printing

Ord Quantity.

ANy Suggestions.

Madhu

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

If you give ROLLNAME = 'DIFFERENCE'. It will look for the data element DIFFERENCE in the data dictionary..

If you want to display Difference as the column header..Then give as mentioned below..OR use an appropriate data element..

s_fieldcatalog-col_pos = '8'.

s_fieldcatalog-fieldname = 'DIFFERENCE'.

s_fieldcatalog-tabname = 'T_OUTPUT'.

*s_fieldcatalog-rollname = 'DIFFERENCE'.

<b>s_fieldcatalog-seltext_L = 'Difference'.</b>

s_fieldcatalog-hotspot = 'X'.

Thanks,

Naren

3 REPLIES 3

Former Member
0 Kudos

hi

modify ur code in this way

<b>data: wa_fieldcat type slis_fieldcat_alv.</b>

<b>read table vt_fieldcat into WA_fieldcat with key fieldname =

'VALUE_BAL_LEFT'.

if sy-subrc = 0.

WA_fieldcat-reptext_ddic = 'VALUE_BAL_LEFT'.

modify vt_fieldcat from WA_fieldcat index sy-tabix.

endif.</b>

reward point if useful

satya

Former Member
0 Kudos

Hi,

If you give ROLLNAME = 'DIFFERENCE'. It will look for the data element DIFFERENCE in the data dictionary..

If you want to display Difference as the column header..Then give as mentioned below..OR use an appropriate data element..

s_fieldcatalog-col_pos = '8'.

s_fieldcatalog-fieldname = 'DIFFERENCE'.

s_fieldcatalog-tabname = 'T_OUTPUT'.

*s_fieldcatalog-rollname = 'DIFFERENCE'.

<b>s_fieldcatalog-seltext_L = 'Difference'.</b>

s_fieldcatalog-hotspot = 'X'.

Thanks,

Naren

Former Member
0 Kudos

Thanks Guys.

Madhu.