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.SAP Development 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.

Related Articles

Background to the SAPTalk application
SapTALK User Messaging service
Example SAPTalk Screens
SAPTalk create screen 0100 with the following elements (see below screen shots for layout):
Create function module Z_SEND_MESSAGE
Create function module Z_ENQUE_SLEEP
Creation of GUI Status FEEDBACK
Creation of GUI Status 'MESS'
Creation of GUI Status 'OPTIONS'
Creation GUI Status 'ULIST'
SAPTalk - MSM messenger application for SAP
Code listings for SAPTALK includes
Code listing for ZSAPTALKF01(include)
Code listing for ZSAPTALKI01(include)
Code listing for ZSAPTALKO01(include)
SAPTalk selection screen parameters
Code listing for ZSAPTALKTOP(include)



SAPTALK - table creation
Code listing for ZMESSCLEARUP
ZMESS: Function group creation details
Code listings for SAPLZMESS(fgroup)
Code listings for SAPLZMESS includes
SAPLZMESS(fgroup ZMESS) - Screen creation
SapTALK: Report creation details
SAPTALK - Include creation
SAPTALK - Screen creation
SAPTALK - GUI Status creation
SAPTALK - GUI Title creation
SapTALK - Transaction creation
Create SAPTalk SAP tables
Create table ZMESSFRIENDS
Create table ZMESSOPTIONS
Create table ZMESSTAB
SAPLZMESS(fgroup)- Function module creation
Message Class and messages
SAPTalk Parameter ID's
SAPTAlk clearup tranasction code