08-20-2007 11:48 AM
08-20-2007 11:51 AM
Hi,
Can you please be a bit more clear on the requirement. This question is very generic.....
08-20-2007 11:53 AM
Ramana,
Create a fieldcatalog for only that field.
FORM build_fieldcat .
define m_fieldcat.
itfieldcat-fieldname = &1.
itfieldcat-col_pos = &2.
itfieldcat-seltext_l = &3.
append itfieldcat to itfieldcat.
end-of-definition.
m_fieldcat 'WERKS' '' 'Plant'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = sy-repid
I_GRID_TITLE = 'List'
IS_LAYOUT = gd_layout
IT_SORT = itsort[]
IT_FIELDCAT = itfieldcat[]
TABLES
T_OUTTAB = itab[]
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endform.
K.Kiran.
08-20-2007 11:57 AM
hi ,
if the requirement is to display only one field using ALV, then you have to make the field(no_out = x) for all the fields expect the field you want to display while building the field catalog .Pass this field catalog to the ALV FM .
reward if helpful.
08-20-2007 11:59 AM
Hello,
For only one field u ca create a fieldcatalog for only that field and use the FM u can display the ALV.
Otherwise u can display the ALV as usual and can set the Layout variant. Then u can set a particular layout variant for your need.
Reward if helpful,
regards,
LIJO JOHN