Skip to Content
avatar image
Former Member

display one FIELD using ALV?

display one FIELD using ALV?

please explain.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Aug 20, 2007 at 10:51 AM

    Hi,

    Can you please be a bit more clear on the requirement. This question is very generic.....

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 20, 2007 at 10: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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 20, 2007 at 10: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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 20, 2007 at 10: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

    Add comment
    10|10000 characters needed characters exceeded