Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

ALV Problem

HI gurus !

i m writing code for multiple ALV list in single outputlist.

alv 1

then

alv 2

so this i am writing ...

form a.

data :

lt_events TYPE slis_t_event,

ls_event TYPE slis_alv_event.

refresh w_fcat.

cnt = cnt + 1.

w_fcat-col_pos = cnt.

w_fcat-fieldname = 'MATNR'.

w_fcat-seltext_m = 'Mat Code'.

w_fcat-outputlen = 12.

append w_fcat.

clear w_fcat.

cnt = cnt + 1.

w_fcat-col_pos = cnt.

w_fcat-fieldname = 'ARKTX'.

w_fcat-seltext_m = 'Mat Desc'.

w_fcat-outputlen = 20.

append w_fcat.

clear w_fcat.

.

.

.

MOVE 'B' TO ls_event-name.

MOVE 'B' TO ls_event-form.

APPEND ls_event TO lt_events.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = SY-REPID

  • I_CALLBACK_PF_STATUS_SET = 'PF_STATUS_SET2 '

IS_LAYOUT = ls_layout

IT_FIELDCAT = W_FCAT[]

it_events = lt_events

IT_SORT = IT_SORT[]

TABLES

T_OUTTAB = IT_ITAB1

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

form B.

refresh w_fcat.

cnt = cnt + 1.

w_fcat-col_pos = cnt.

w_fcat-fieldname = 'MATNR'.

w_fcat-seltext_m = 'Mat Code'.

w_fcat-outputlen = 12.

append w_fcat.

clear w_fcat.

cnt = cnt + 1.

w_fcat-col_pos = cnt.

w_fcat-fieldname = 'ARKTX'.

w_fcat-seltext_m = 'Mat Desc'.

w_fcat-outputlen = 20.

append w_fcat.

clear w_fcat.

Ls_layout-list_append = 'X'.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = SY-REPID

I_CALLBACK_PF_STATUS_SET = 'PF_STATUS_SET2'

is_layout = ls_layout

  • it_events = lt_events

  • I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE3'

IT_FIELDCAT = W_FCAT[]

IT_SORT = IT_SORT[]

TABLES

t_outtab = IT_ITAB11

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.

but its giving error ,

callback event B does not exit..

plz help...

regards

Rahul

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question