03-14-2007 5:34 PM
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
03-14-2007 5:45 PM
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
03-14-2007 5:41 PM
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
03-14-2007 5:45 PM
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
03-14-2007 6:08 PM