sapdev logo background
sapdev logo sapdev logo
Comments

Code listing for SAPTALK




The below intructions / ABAP code is part of the SAPTAlk Instant messaging program for SAP.


*..............................................................*
*: Report  ZSAPTALK                                           :*
*: Author  SAPdev.co.uk                                       :*
*:.............................................................*
*: Description :                                              :*
*:.............:                                              :*
*: This program is part of a suit of programs which implement :*
*: an instant messaging service for the SAP environment.      :*
*: Allows users to send and receive instant messages as well  :*
*: as leave messages foroffline users to pickup later         :*
*:                                                            :*
*: Please visit www.sapdev.co.uk for further info             :*
*:............................................................:*
REPORT  ZSAPMESSANGER NO STANDARD PAGE HEADING LINE-SIZE 150.

**
INCLUDE ZSAPTALKSCR.                         " Selection Screen
**
INCLUDE ZSAPTALKTOP.                         " global Data
**
INCLUDE ZSAPTALKO01.                         " PBO-Modules
**
INCLUDE ZSAPTALKI01.                         " PAI-Modules
**
INCLUDE ZSAPTALKF01.                         " FORM-Routines
**


***************************************************************
*START-OF_SELECTION.
START-OF-SELECTION.
  clear: gd_stoprfc.  "reset rfc/refresh flag

* retrieve whether user was viewing friends or all online users
  get parameter ID 'ZMESS' field p_friend.

* resett parameter ID's
  perform set_parameter_id using 'ZMESSAGE' gd_stoprfc.

* set users status as online
  perform set_status_online using 'X'.

* check if first execution of program(does not always work)
  if sy-CALLD eq 'X'.                     "First execution
    clear: gd_talkingto, gd_stoprfc.
    perform get_users_filepath.
*   Setup file path/name to store conversation files
    perform setup_global_filenames.
  else.
*   Get who user is talking to and users file path
*  (for when program calls itself to reset screen level index)
    perform get_who_user_is_talking_too.  "Called from within program
  endif.

* retrieve users friends list
  perform get_friends_list.

* retrieve all online users
  perform get_all_users_online tables it_usrtab.

* build fieldcatalog
  perform build_fieldcatalog.
* layout attributes
  PERFORM build_layout.
* build hierarchy header
  PERFORM build_hierarchy_header CHANGING gd_hierarchy_header.
* Build report title
  PERFORM build_report_title USING gd_report_title gd_logo.
* variant attributes
  PERFORM build_variant.

  CALL SCREEN 100.
*   CALL SCREEN 100 STARTING AT 10 20 ENDING AT 100 50.




comments powered by Disqus