Skip to Content
0
Former Member
Aug 03, 2005 at 06:01 AM

Help me with this code

12 Views

REPORT test.

TYPE-POOLS : slis.

DATA : BEGIN OF itab1,

f1 LIKE vbak-vbeln,

f2 LIKE vbap-posnr,

f3 LIKE vbak-netwr,

END OF itab1.

DATA : rep TYPE sy-repid .

DATA : fcat TYPE slis_t_fieldcat_alv.

DATA : wa_fcat LIKE fcat WITH HEADER LINE.

rep = sy-repid.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

i_program_name = rep

i_internal_tabname = 'ITAB1'

  • I_STRUCTURE_NAME = 'ITAB1'

i_client_never_display = 'X'

i_inclname = rep

  • I_BYPASSING_BUFFER =

  • I_BUFFER_ACTIVE =

CHANGING

ct_fieldcat = fcat

  • EXCEPTIONS

  • INCONSISTENT_INTERFACE = 1

  • PROGRAM_ERROR = 2

  • OTHERS = 3

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

*THIS IS THE PART I NEED HELP WITH.

LOOP AT fcat INTO wa_fcat.

WRITE : / wa_fcat.

ENDLOOP.

*THIS IS NOT PRINTING FIELD VALUES OF THE TABLE wa_fcat.