Skip to Content
0
Former Member
Jan 09, 2008 at 09:25 AM

ALV

24 Views

HI,

REPORT Z50874_REUSE_ALV_FIELDMERGE.

TYPES : BEGIN OF st_ekko,

ebeln TYPE ekko-ebeln, "Purchasing Document Number

bstyp TYPE ekko-bstyp, "Purchasing Document Category

bsart TYPE ekko-bsart, "Purchasing Document Type

aedat TYPE ekko-aedat, "record created on

ernam TYPE ekko-ernam, "Person who Created the Object

END OF st_ekko.

TYPE-POOLS:SLIS.

DATA : it_ekKo TYPE STANDARD TABLE OF st_ekko,

wa_ekKo TYPE st_ekko,

it_fieldcat TYPE slis_t_fieldcat_alv,

wa_fieldcat TYPE slis_fieldcat_alv.

DATA : v_ebeln TYPE ekko-ebeln.

SELECT-OPTIONS: so_ebeln FOR v_ebeln OBLIGATORY.

START-OF-SELECTION.

SELECT ebeln bstyp bsart aedat ernam

FROM ekko

INTO TABLE it_ekko

WHERE ebeln IN so_ebeln.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

I_PROGRAM_NAME = sy-repid

I_INTERNAL_TABNAME = 'IT_EKKO'

*I_STRUCTURE_NAME = 'ST_EKKO'

  • I_CLIENT_NEVER_DISPLAY = 'X'

I_INCLNAME = sy-repid

  • I_BYPASSING_BUFFER = I_BYPASSING_BUFFER

  • I_BUFFER_ACTIVE = I_BUFFER_ACTIVE

CHANGING

ct_fieldcat = it_fieldcat

  • 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.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

  • I_INTERFACE_CHECK = ' '

  • I_BYPASSING_BUFFER = I_BYPASSING_BUFFER

  • I_BUFFER_ACTIVE = ' '

I_CALLBACK_PROGRAM = sy-repid

  • I_CALLBACK_PF_STATUS_SET = ' '

  • I_CALLBACK_USER_COMMAND = ' '

  • I_STRUCTURE_NAME = I_STRUCTURE_NAME

  • IS_LAYOUT = IS_LAYOUT

IT_FIELDCAT = IT_FIELDCAT

  • IT_EXCLUDING = IT_EXCLUDING

  • IT_SPECIAL_GROUPS = IT_SPECIAL_GROUPS

  • IT_SORT = IT_SORT

  • IT_FILTER = IT_FILTER

  • IS_SEL_HIDE = IS_SEL_HIDE

  • I_DEFAULT = 'X'

  • I_SAVE = ' '

  • IS_VARIANT = IS_VARIANT

  • IT_EVENTS = IT_EVENTS

  • IT_EVENT_EXIT = IT_EVENT_EXIT

  • IS_PRINT = IS_PRINT

  • IS_REPREP_ID = IS_REPREP_ID

  • I_SCREEN_START_COLUMN = 0

  • I_SCREEN_START_LINE = 0

  • I_SCREEN_END_COLUMN = 0

  • I_SCREEN_END_LINE = 0

  • IR_SALV_LIST_ADAPTER = IR_SALV_LIST_ADAPTER

  • IT_EXCEPT_QINFO = IT_EXCEPT_QINFO

  • I_SUPPRESS_EMPTY_DATA = ABAP_FALSE

  • IMPORTING

  • E_EXIT_CAUSED_BY_CALLER = E_EXIT_CAUSED_BY_CALLER

  • ES_EXIT_CAUSED_BY_USER = ES_EXIT_CAUSED_BY_USER

TABLES

t_outtab = it_ekko

  • * 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.

THIS IS MY CODE HELP ME IN FINDING THE SOLUTION FOR THIS PGM WHERE I M GETTING ERROR FIELD CATALOG NOT FOUND

I WILL REWARD POINTS IF I GET THE OUTPUT

THANXS IN ADVANCE

Edited by: Nandini P on Jan 9, 2008 10:26 AM

Edited by: Nandini P on Jan 9, 2008 10:26 AM