Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

ALV footer

Former Member
0 Kudos

I am trying to display some message at the ALV footer . I am trying with the following code but it doesnt work. I appreciate if anyone can help me with this

start_of_selection

PERFORM EVENTS_GET.

FORM events_get .

CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

EXPORTING

i_list_type = 0

IMPORTING

et_events = e_events.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

READ TABLE e_events INTO WA_EVENTS

with KEY name = slis_ev_end_of_page.

IF sy-subrc = 0.

wa_events-form = 'END_OF_PAGE'.

APPEND wa_events TO e_events.

ENDIF.

ENDFORM. " events_get

FORM END_OF_PAGE.

WRITE:/ 'footer'.

ENDFORM.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = REPID

IT_FIELDCAT = FIELDCAT

IT_EVENTS = E_EVENTS

TABLES

T_OUTTAB = INT_USERTCD

EXCEPTIONS

OTHERS = 2.

11 REPLIES 11

Former Member
0 Kudos

Hi Deepti,

Is that a full code you are using in your program? If yes then check are you giving perform END_OF_PAGE or not.

Ashven.

0 Kudos

do we need to use perform end_of_page again?I am not using that anywhere

0 Kudos

Hi deepthi,

You are using FORM end_of_page. for this first you need to call this form from PERFORM end_of_page otherwise system will ignore this code. I this because if this you are not getting footer.

There is one more change in your program. You need to write Call function code before all form statements. System does not read the code writtern after form endform statements. System reads code written only in form & endform. So write call function code before FORM end_of_page.

Ashven

0 Kudos

FORM events_get .

CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

EXPORTING

i_list_type = 0

IMPORTING

et_events = e_events.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

READ TABLE e_events INTO WA_EVENTS

with KEY name = slis_ev_end_of_page.

IF sy-subrc = 0.

wa_events-form = 'END_OF_PAGE'.

MODIFY e_events FROM wa_events INDEX sy-tabix.

ENDIF.

ENDFORM. " events_get

FORM END_OF_PAGE.

WRITE:/ 'footer'.

ENDFORM.

F NOT int_usertcd[] IS INITIAL.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = REPID

IT_FIELDCAT = FIELDCAT

IT_EVENTS = E_EVENTS[]

TABLES

T_OUTTAB = INT_USERTCD

EXCEPTIONS

OTHERS = 2.

this is how i have changed it to .. i still dont see any footer.Is there any order in which the forms have to be defined or called ..

Former Member
0 Kudos

Hi,

I have gone through your code...

here are the few places I feel you should make changes.

1) READ TABLE e_events INTO WA_EVENTS

with KEY name = slis_ev_end_of_page.

IF sy-subrc = 0.

wa_events-form = 'END_OF_PAGE'.

APPEND wa_events TO e_events.

****change the append to a MODIFY****

MODIFY e_events FROM wa_events INDEX sy-tabix.

***We have to do this as the event is already there you just need to add which ****form to call when it is trigerred ******

ENDIF.

2) And in the

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = REPID

IT_FIELDCAT = FIELDCAT

IT_EVENTS = E_EVENTS

Try using E_EVENTS[] instead of E_EVENTS.

These two should see you through........

Thanks,

Ketan

Former Member
0 Kudos

Send in the full code...lets see why its not working.........

0 Kudos

TYPE-POOLS : SLIS.

  • ---------------------------------------------------------------------*

  • TABLES STATEMENT

----


TABLES : USR02, " Logon data

TSTCT, " Transaction code-texts

USER_ADDR, " User address data

ADR6. " SMTP numbers (central address admin.)

----


  • *

  • SELECTION SCREEN *

----


SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.

SELECT-OPTIONS : USERID FOR USR02-BNAME. " user

SELECT-OPTIONS : CLASS FOR USR02-CLASS. " user group

SELECT-OPTIONS : DATE FOR SY-DATUM. "period

PARAMETERS : FNAME1 TYPE RLGRAP-FILENAME DEFAULT

'/interfaces/virsa/X03_virsa_Sept.txt'. " application server file

SELECTION-SCREEN SKIP 1.

PARAMETERS : SUMMARY AS CHECKBOX.

SELECTION-SCREEN END OF BLOCK B1.

SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.

SELECTION-SCREEN SKIP 1.

PARAMETERS : EMAIL AS CHECKBOX. " to send email

SELECT-OPTIONS : S_EMAIL FOR ADR6-SMTP_ADDR. " Email address

SELECTION-SCREEN END OF BLOCK B2.

----


  • *

  • INTERNAL TABLES DECLARATION *

----


  • For storing the data from the file

DATA : BEGIN OF INT_USERTCD_TEMP OCCURS 0,

INPUT(200) TYPE C.

DATA : END OF INT_USERTCD_TEMP.

  • For storing the user and transaction details

DATA : BEGIN OF INT_USERTCD_CON OCCURS 0,

USERID LIKE USR02-BNAME, " user

TCODE LIKE TSTCT-TCODE, " transaction code

TTEXT LIKE TSTCT-TTEXT, " trasaction code text

DATE LIKE SY-DATUM, " date

TIME LIKE SY-UZEIT, " time

CLASS LIKE USR02-CLASS, " user group

FIRSTNAME LIKE USR03-NAME1,

LASTNAME LIKE USR03-NAME2.

DATA: END OF INT_USERTCD_CON.

  • For storing the summary of the details

DATA : BEGIN OF INT_USERTCD_COUNT OCCURS 0,

USERID LIKE USR02-BNAME, " user

TCODE LIKE TSTCT-TCODE, " transaction code

TTEXT LIKE TSTCT-TTEXT, " trasaction code text

CLASS LIKE USR02-CLASS, " user group

FIRSTNAME LIKE USR03-NAME1,

LASTNAME LIKE USR03-NAME2,

COUNT type i.

DATA: END OF INT_USERTCD_COUNT.

  • For storing the details of the selected users and in a given period

DATA : INT_USERTCD LIKE INT_USERTCD_CON OCCURS 0 WITH HEADER LINE.

  • Table for storing different email addresses

DATA : BEGIN OF I_EMAIL OCCURS 0,

ADDRNUMBER LIKE ADR6-ADDRNUMBER,

SMTP_ADDR LIKE ADR6-SMTP_ADDR,

END OF I_EMAIL.

  • For storing the receivers details

DATA : RECLIST LIKE SOMLRECI1 OCCURS 0 WITH HEADER LINE.

  • for storing information about how the data in the

  • tables OBJECT_HEADER, CONTENTS_BIN and CONTENTS_TXT are

  • to be distributed to the documents and its attachments.

DATA : OBJPACK LIKE SOPCKLSTI1 OCCURS 2 WITH HEADER LINE.

  • For storing the summarized content of the objects identified as ASCII

  • objects.

DATA : OBJTXT LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.

DATA : OBJHEAD LIKE SOLISTI1 OCCURS 1 WITH HEADER LINE.

DATA : OBJBIN TYPE STANDARD TABLE OF SOLISTI1 INITIAL SIZE 0 WITH HEADER

LINE.

DATA : DOC_CHNG LIKE SODOCCHGI1.

----


  • VARIABLES DECLARATION

----


DATA : FIELDCAT TYPE SLIS_T_FIELDCAT_ALV ,

WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV,

V_SAVE(1) TYPE C VALUE 'A',

REPID LIKE SY-REPID,

LAYOUT TYPE SLIS_LAYOUT_ALV,

T_HEADER TYPE SLIS_T_LISTHEADER,

WA_HEADER TYPE SLIS_LISTHEADER.

DATA : e_events TYPE slis_t_event.

DATA : wa_events TYPE slis_alv_event.

DATA : FLAG TYPE I VALUE 0.

DATA : TABNAME(15).

DATA: tab_lines LIKE sy-tabix.

  • ------------ ------------------------------------------------------*

  • FORM TOP-OF-PAGE *

----


TOP-OF-PAGE.

----


  • AT SELECTION-SCREEN OUTPUT *

----


AT SELECTION-SCREEN OUTPUT.

----


  • START-OF-SELECTION *

----


START-OF-SELECTION.

PERFORM READ_FILE_SERVER.

PERFORM READ_CONVERSION.

PERFORM SELECT_DATA_RANGE.

IF SUMMARY = 'X'. " if requested for summary details

PERFORM DATA_SUMMARIZE.

ENDIF.

PERFORM EVENTS_GET.

----


  • END-OF-SELECTION *

----


END-OF-SELECTION.

PERFORM DISPLAY_DATA.

  • checking if the email option is selected and sending email only

  • if there is any data in the table

IF EMAIL = 'X'.

IF SUMMARY = 'X'.

DESCRIBE TABLE INT_USERTCD_COUNT LINES TAB_LINES.

ELSE.

DESCRIBE TABLE INT_USERTCD LINES TAB_LINES.

ENDIF.

IF TAB_LINES <> 0.

PERFORM SEND_EMAIL.

ENDIF.

ENDIF.

----


  • Form READ_FILE_SERVER *

----


FORM READ_FILE_SERVER.

  • To read the data from the application server into a string

OPEN DATASET FNAME1 FOR INPUT IN TEXT MODE.

IF SY-SUBRC <> 0.

MESSAGE E006 WITH 'File cannot be opened'.

ELSE.

DO.

READ DATASET FNAME1 INTO INT_USERTCD_TEMP.

IF SY-SUBRC = 0.

APPEND INT_USERTCD_TEMP.

CLEAR INT_USERTCD_TEMP.

ELSE.

EXIT.

ENDIF.

ENDDO.

ENDIF.

CLOSE DATASET FNAME1.

ENDFORM.

----


  • FORM READ_CONVERSION *

----


FORM READ_CONVERSION.

DATA : LENGTH TYPE I.

  • To split the data in the string into individual fields

REFRESH : INT_USERTCD_CON.

CLEAR : INT_USERTCD_CON,INT_USERTCD_TEMP.

LOOP AT INT_USERTCD_TEMP.

SPLIT INT_USERTCD_TEMP-INPUT AT '|' INTO INT_USERTCD_CON-USERID

INT_USERTCD_CON-TCODE INT_USERTCD_CON-TTEXT INT_USERTCD_CON-DATE

INT_USERTCD_CON-TIME INT_USERTCD_CON-CLASS.

APPEND INT_USERTCD_CON.

CLEAR INT_USERTCD_CON.

ENDLOOP.

LOOP AT INT_USERTCD_CON.

  • To check if there is any '|' character at the end of the class field

  • and remove if any

IF INT_USERTCD_CON-CLASS CA '|'.

LENGTH = STRLEN( INT_USERTCD_CON-CLASS ).

LENGTH = LENGTH - 1.

IF LENGTH = 0.

INT_USERTCD_CON-CLASS = ''.

ELSE.

INT_USERTCD_CON-CLASS = INT_USERTCD_CON-CLASS(LENGTH).

ENDIF.

MODIFY INT_USERTCD_CON.

ENDIF.

  • To retrieve first name and last name from table USER_ADDR

  • for the user id in the file

SELECT NAME_FIRST NAME_LAST FROM USER_ADDR INTO

(INT_USERTCD_CON-FIRSTNAME,

INT_USERTCD_CON-LASTNAME) WHERE BNAME = INT_USERTCD_CON-USERID.

MODIFY INT_USERTCD_CON.

CLEAR INT_USERTCD_CON.

ENDSELECT.

ENDLOOP.

SORT INT_USERTCD_CON BY USERID TCODE DATE.

DELETE ADJACENT DUPLICATES FROM INT_USERTCD_CON COMPARING ALL FIELDS.

DELETE INT_USERTCD_CON WHERE TCODE = ''.

ENDFORM.

----


  • FORM SELECT_DATA_RANGE *

----


FORM SELECT_DATA_RANGE.

LOOP AT INT_USERTCD_CON.

  • To take the data which satisfies the selection criteria into another

  • internal table

IF INT_USERTCD_CON-USERID IN USERID AND INT_USERTCD_CON-CLASS IN

CLASS AND INT_USERTCD_CON-DATE IN DATE.

MOVE INT_USERTCD_CON TO INT_USERTCD.

APPEND INT_USERTCD.

CLEAR INT_USERTCD.

ENDIF.

ENDLOOP.

ENDFORM.

&----


*& FORM DATA_SUMMARIZE *

&----


FORM DATA_SUMMARIZE.

  • count the number of times a particular user is accessing a transaction

  • in a specified period

IF SUMMARY = 'X'.

LOOP AT INT_USERTCD.

IF INT_USERTCD_COUNT[] IS INITIAL.

INT_USERTCD_COUNT-USERID = INT_USERTCD-USERID.

INT_USERTCD_COUNT-CLASS = INT_USERTCD-CLASS.

INT_USERTCD_COUNT-FIRSTNAME = INT_USERTCD-FIRSTNAME.

INT_USERTCD_COUNT-LASTNAME = INT_USERTCD-LASTNAME.

INT_USERTCD_COUNT-TCODE = INT_USERTCD-TCODE.

INT_USERTCD_COUNT-TTEXT = INT_USERTCD-TTEXT.

INT_USERTCD_COUNT-COUNT = 1.

APPEND INT_USERTCD_COUNT.

CLEAR INT_USERTCD_COUNT.

ELSE.

LOOP AT INT_USERTCD_COUNT.

IF INT_USERTCD-USERID = INT_USERTCD_COUNT-USERID AND

INT_USERTCD-TCODE = INT_USERTCD_COUNT-TCODE.

INT_USERTCD_COUNT-COUNT = INT_USERTCD_COUNT-COUNT + 1.

MODIFY INT_USERTCD_COUNT.

CLEAR INT_USERTCD_COUNT.

FLAG = 1.

EXIT.

ENDIF.

ENDLOOP.

IF FLAG <> 1.

INT_USERTCD_COUNT-USERID = INT_USERTCD-USERID.

INT_USERTCD_COUNT-CLASS = INT_USERTCD-CLASS.

INT_USERTCD_COUNT-FIRSTNAME = INT_USERTCD-FIRSTNAME.

INT_USERTCD_COUNT-LASTNAME = INT_USERTCD-LASTNAME.

INT_USERTCD_COUNT-TCODE = INT_USERTCD-TCODE.

INT_USERTCD_COUNT-TTEXT = INT_USERTCD-TTEXT.

INT_USERTCD_COUNT-COUNT = 1.

APPEND INT_USERTCD_COUNT.

CLEAR INT_USERTCD_COUNT.

ENDIF.

ENDIF.

CLEAR INT_USERTCD.

FLAG = 0.

ENDLOOP.

ENDIF.

ENDFORM.

&----


*& FORM DISPLAY_DATA

&----


FORM DISPLAY_DATA.

  • To display the data in an ALV Grid

PERFORM POPULATE_FIELD_CATALOG. " populating field catalog

IF SUMMARY = 'X'.

PERFORM DISPLAY_SUMMARY.

ELSE.

PERFORM DISPLAY_DETAILS.

ENDIF.

ENDFORM. " DISPLAY_DATA

&----


*& FORM POPULATE_FIELD_CATALOG

&----


FORM POPULATE_FIELD_CATALOG.

REFRESH FIELDCAT.

CLEAR WA_FIELDCAT.

DATA : TABNAME(15).

IF SUMMARY = 'X'.

TABNAME = INT_USERTCD_COUNT.

WA_FIELDCAT-SELTEXT_L = text-118.

WA_FIELDCAT-TABNAME = TABNAME.

WA_FIELDCAT-FIELDNAME = 'COUNT'.

WA_FIELDCAT-OUTPUTLEN = 14.

WA_FIELDCAT-COL_POS = 7.

WA_FIELDCAT-EMPHASIZE = 'C100'.

APPEND WA_FIELDCAT TO FIELDCAT.

CLEAR WA_FIELDCAT.

ELSE.

TABNAME = INT_USERTCD.

WA_FIELDCAT-SELTEXT_L = text-113.

WA_FIELDCAT-TABNAME = TABNAME.

WA_FIELDCAT-FIELDNAME = 'DATE'.

WA_FIELDCAT-OUTPUTLEN = 10.

WA_FIELDCAT-COL_POS = 7.

WA_FIELDCAT-EMPHASIZE = 'C100'.

APPEND WA_FIELDCAT TO FIELDCAT.

CLEAR WA_FIELDCAT.

WA_FIELDCAT-SELTEXT_L = text-114.

WA_FIELDCAT-TABNAME = int_usertcd.

WA_FIELDCAT-FIELDNAME = 'TIME'.

WA_FIELDCAT-OUTPUTLEN = 8.

WA_FIELDCAT-COL_POS = 8.

WA_FIELDCAT-EMPHASIZE = 'C100'.

APPEND WA_FIELDCAT TO FIELDCAT.

CLEAR WA_FIELDCAT.

ENDIF.

WA_FIELDCAT-SELTEXT_L = text-110.

WA_FIELDCAT-TABNAME = TABNAME.

WA_FIELDCAT-FIELDNAME = 'USERID'.

WA_FIELDCAT-OUTPUTLEN = 12.

WA_FIELDCAT-COL_POS = 1.

WA_FIELDCAT-EMPHASIZE = 'C100'.

APPEND WA_FIELDCAT TO FIELDCAT.

CLEAR WA_FIELDCAT.

WA_FIELDCAT-SELTEXT_L = text-115.

WA_FIELDCAT-TABNAME = TABNAME.

WA_FIELDCAT-FIELDNAME = 'CLASS'.

WA_FIELDCAT-OUTPUTLEN = 16.

WA_FIELDCAT-COL_POS = 2.

WA_FIELDCAT-EMPHASIZE = 'C100'.

APPEND WA_FIELDCAT TO FIELDCAT.

CLEAR WA_FIELDCAT.

WA_FIELDCAT-SELTEXT_L = text-116.

WA_FIELDCAT-TABNAME = TABNAME.

WA_FIELDCAT-FIELDNAME = 'FIRSTNAME'.

WA_FIELDCAT-OUTPUTLEN = 30.

WA_FIELDCAT-COL_POS = 3.

WA_FIELDCAT-EMPHASIZE = 'C100'.

APPEND WA_FIELDCAT TO FIELDCAT.

CLEAR WA_FIELDCAT.

WA_FIELDCAT-SELTEXT_L = text-117.

WA_FIELDCAT-TABNAME = TABNAME.

WA_FIELDCAT-FIELDNAME = 'LASTNAME'.

WA_FIELDCAT-OUTPUTLEN = 30.

WA_FIELDCAT-COL_POS = 4.

WA_FIELDCAT-EMPHASIZE = 'C100'.

APPEND WA_FIELDCAT TO FIELDCAT.

CLEAR WA_FIELDCAT.

WA_FIELDCAT-SELTEXT_L = text-111.

WA_FIELDCAT-TABNAME = TABNAME.

WA_FIELDCAT-FIELDNAME = 'TCODE'.

WA_FIELDCAT-OUTPUTLEN = 20.

WA_FIELDCAT-COL_POS = 5.

WA_FIELDCAT-EMPHASIZE = 'C100'.

APPEND WA_FIELDCAT TO FIELDCAT.

CLEAR WA_FIELDCAT.

WA_FIELDCAT-SELTEXT_L = text-112.

WA_FIELDCAT-TABNAME = TABNAME.

WA_FIELDCAT-FIELDNAME = 'TTEXT'.

WA_FIELDCAT-OUTPUTLEN = 38.

WA_FIELDCAT-COL_POS = 6.

WA_FIELDCAT-EMPHASIZE = 'C100'.

APPEND WA_FIELDCAT TO FIELDCAT.

CLEAR WA_FIELDCAT.

ENDFORM.

&----


*& FORM Events_get

&----


FORM events_get .

CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

EXPORTING

i_list_type = 0

IMPORTING

et_events = e_events.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

READ TABLE e_events INTO WA_EVENTS

with KEY name = slis_ev_end_of_page.

IF sy-subrc = 0.

wa_events-form = 'END_OF_PAGE'.

MODIFY e_events FROM wa_events INDEX sy-tabix.

ENDIF.

ENDFORM. " events_get

&----


*& FORM END_OF_PAGE

&----


FORM END_OF_PAGE.

WRITE:/ 'footer'.

ENDFORM.

&----


*& FORM DISPLAY_DETAILS

&----


FORM DISPLAY_DETAILS.

  • To display the details of specified users and transaction codes

  • accessed in a given time period

DATA : count TYPE I value 0.

DATA : length TYPE I.

DATA: REPID LIKE SY-REPID.

REPID = SY-REPID.

IF NOT int_usertcd[] IS INITIAL.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = REPID

IT_FIELDCAT = FIELDCAT

IT_EVENTS = E_EVENTS[]

TABLES

T_OUTTAB = INT_USERTCD

EXCEPTIONS

OTHERS = 2.

ELSE.

SKIP 5.

WRITE:/5 'There has been no activity during this period for users '

NO-GAP.

LOOP AT userid.

READ TABLE int_usertcd WITH KEY userid = userid-low.

IF SY-SUBRC <> 0.

IF count > 0.

WRITE: ',' NO-GAP.

ENDIF.

length = STRLEN( userid-low ).

WRITE AT (length) userid-low .

count = count + 1.

ENDIF.

ENDLOOP.

ENDIF.

ENDFORM.

&----


*& FORM DISPLAY_SUMMARY

&----


FORM DISPLAY_SUMMARY .

  • To display the summary of the details

DATA: REPID LIKE SY-REPID.

DATA : count TYPE I VALUE 0.

REPID = SY-REPID.

DATA : length TYPE i.

IF NOT int_usertcd_count[] IS INITIAL.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = REPID

IT_FIELDCAT = FIELDCAT

IT_EVENTS = E_EVENTS[]

TABLES

T_OUTTAB = INT_USERTCD_COUNT

EXCEPTIONS

OTHERS = 2.

ELSE.

SKIP 5.

WRITE:/5 'There has been no activity during this period for users '.

LOOP AT userid.

READ TABLE int_usertcd WITH KEY userid = userid-low.

IF SY-SUBRC <> 0.

IF count > 0.

WRITE: ',' .

ENDIF.

length = STRLEN( userid-low ).

WRITE AT (length) userid-low .

count = count + 1.

ENDIF.

ENDLOOP.

ENDIF.

ENDFORM.

Former Member
0 Kudos

Try this....

Put this code in the form instead of the write statment....

ws_head-typ = 'H' .

ws_head-info = 'footer'.

append ws_head to i_list_commentary.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

it_list_commentary = i_list_commentary

I_END_OF_LIST_GRID = 'X'.

Hope this helps..........

Ketan

Please award points if useful...

amit_khare
Active Contributor
0 Kudos

Hi,

you may try this -

Use following syntex for footer print in alv:

  • For End of Page

form END_OF_PAGE.

data: listwidth type i,

ld_pagepos(10) type c,

ld_page(10) type c.

write: sy-uline(50).

skip.

write:/40 'Page:', sy-pagno .

endform.

  • For End of Report

form END_OF_LIST.

data: listwidth type i,

ld_pagepos(10) type c,

ld_page(10) type c.

skip.

write:/40 'Page:', sy-pagno .

endform.

Regards,

Amit

Reward all helpful replies.

Former Member
0 Kudos

Hi deepthi,

FORM EVENT_LIST .

CLEAR XS_EVENT.

XS_EVENT-NAME = SLIS_EV_TOP_OF_PAGE.

XS_EVENT-FORM = 'XTOP_OF_PAGE'.

APPEND XS_EVENT TO GT_XEVENTS.

CLEAR XS_EVENT.

XS_EVENT-NAME = SLIS_EV_END_OF_PAGE.

XS_EVENT-FORM = 'XEND_OF_PAGE'.

APPEND XS_EVENT TO GT_XEVENTS.

CLEAR XS_EVENT.

ENDFORM. " EVENT_LIST

FORM XTOP_OF_PAGE.

WRITE:/ 'TOP OF PAGE FOR MARA'.

ENDFORM.

FORM YTOP_OF_PAGE.

WRITE:/ 'TOP OF PAGE FOR MAKT'.

ENDFORM.

Now pass gt_xevents to it_events in the function module.

I hope it works,

regards,

keerthi

Clemenss
Active Contributor
0 Kudos

deepthi raj

as said:

replace APPEND with MODIFY e_events.from wa_events. otherwise you have two entries for the same event. To make it more clear: DELETE e_events where not name = slis_ev_end_of_page..

Regards,

Clemens