‎2006 Dec 13 9:48 AM
Hi Experts,
i need one field has hard code in ALV
Descrption of field is CITY
Hard code is Hyderabad.
i am using this logic
POS = POS + 1.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-COL_POS = POS.
LS_FIELDCAT-FIELDNAME =
LS_FIELDCAT-SELTEXT_M =
APPEND LS_FIELDCAT TO RT_FIELDCAT.
CLEAR LS_FIELDCAT.
POS = POS + 1.
Thanks & Regards,
Sreedhar.
‎2006 Dec 13 9:50 AM
Hi,
As an alternative add this field to your internal table and pass the value as Hyderabad.It will be easy to handle then.
Regards,
Amit
‎2006 Dec 13 9:51 AM
POS = POS + 1.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-COL_POS = POS.
LS_FIELDCAT-FIELDNAME =
LS_FIELDCAT-SELTEXT_M = 'CITY'
APPEND LS_FIELDCAT TO RT_FIELDCAT.
CLEAR LS_FIELDCAT.
POS = POS + 1.
Hyderabad is a value of the field , so u cannot hard code that in fieldcatalog
loop at itab.
itab-city = 'hyderabad'.
endloop.
‎2006 Dec 13 9:51 AM
I think u need to hard code the field in ur internal table which you are passing to ALV. That will serve the purpose.
‎2006 Dec 13 9:53 AM
sorry cannot under stand your proper requirement. But what i can understand you need to show Hyderabad only in the CITY column heading.
For this you have to take the values Hyderabad in your internal table for all the rows.
regards
shiba dutta