есть, есть

вот простецкий чатик... не аська, но...
при инсталляции надо экран 100 создать, статус и вроде все. не без глюков, ибо писалось 20 минут
--------------------------------------------------------------
Code:
report yge_load_tcurr line-size 100 no standard page heading.
types: begin of s_chat,
datum like sy-datum,
uzeit like sy-uzeit,
txtln(80),
end of s_chat.
data t_chat type s_chat occurs 0 with header line.
data input_text type text80.
constants max_lines type i value 29.
data lines type i.
selection-screen begin of screen 666.
parameters text like input_text.
selection-screen end of screen 666.
start-of-selection.
perform f_call_rfc_wait.
import t_chat to t_chat
from database stxl(cq)
id '666'.
describe table t_chat lines lines.
if lines = max_lines.
delete t_chat index 1.
endif.
t_chat-datum = sy-datum.
t_chat-uzeit = sy-uzeit.
concatenate '<<<' sy-uname 'снова с нами! >>>' into t_chat-txtln
separated by space.
clear input_text.
append t_chat.
export t_chat
to database stxl(cq)
id '666'.
call screen 100.
at pf21.
perform f_call_rfc_wait.
at pf22.
call method cl_gui_cfw=>set_new_ok_code
exporting new_code = 'PF21'.
leave list-processing.
at pf23.
perform f_call_rfc_wait.
import t_chat to t_chat
from database stxl(cq)
id '666'.
call screen 100.
at user-command.
perform f_call_rfc_wait.
case sy-ucomm.
when 'VOICE'.
call selection-screen 666 starting at 5 30.
if sy-subrc eq 0.
input_text = text.
import t_chat to t_chat
from database stxl(cq)
id '666'.
describe table t_chat lines lines.
if lines = max_lines.
delete t_chat index 1.
endif.
t_chat-datum = sy-datum.
t_chat-uzeit = sy-uzeit.
concatenate sy-uname ':' input_text into t_chat-txtln
separated by space.
clear input_text.
append t_chat.
export t_chat
to database stxl(cq)
id '666'.
call screen 100.
endif.
when 'EXIT'.
import t_chat to t_chat
from database stxl(cq)
id '666'.
describe table t_chat lines lines.
if lines = max_lines.
delete t_chat index 1.
endif.
t_chat-datum = sy-datum.
t_chat-uzeit = sy-uzeit.
concatenate '<<<' sy-uname 'отключился. >>>' into t_chat-txtln
separated by space.
clear input_text.
append t_chat.
export t_chat
to database stxl(cq)
id '666'.
leave program.
endcase.
*&---------------------------------------------------------------------*
*& Form show_chat
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
form show_chat.
data text_line(10).
set blank lines on..
do 29 times.
read table t_chat index sy-index.
if sy-subrc eq 0.
write t_chat-uzeit to text_line.
concatenate '<' text_line '>' into text_line.
write: / text_line,':', t_chat-txtln.
else.
write: /.
endif.
enddo.
write: sy-uline.
leave to list-processing.
endform. " show_chat
*&---------------------------------------------------------------------*
*& Module PBO_0100 OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
module pbo_0100 output.
set pf-status '0100'.
perform show_chat.
leave to list-processing and return to screen 100.
leave screen.
endmodule. " PBO_0100 OUTPUT
*&---------------------------------------------------------------------*
*& Module PAI_0100 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
module pai_0100 input.
case sy-ucomm.
when 'EXIT'.
leave program.
endcase.
endmodule. " PAI_0100 INPUT
*---------------------------------------------------------------------*
* Form F_CALL_RFC_WAIT
*---------------------------------------------------------------------*
form f_call_rfc_wait.
data lv_mssg(80). "#EC NEEDED
call function 'RFC_PING_AND_WAIT' starting new task '001'
performing f_task_end on end of task
exporting
seconds = 5 " Refresh time
busy_waiting = space
exceptions
resource_failure = 1
communication_failure = 2 message lv_mssg
system_failure = 3 message lv_mssg
others = 4.
set user-command 'PF22'.
endform. " F_CALL_RFC_WAIT
*---------------------------------------------------------------------*
* Form F_TASK_END
*---------------------------------------------------------------------*
form f_task_end using u_taskname.
data lv_mssg(80). "#EC NEEDED
receive results from function 'RFC_PING_AND_WAIT'
exceptions
resource_failure = 1
communication_failure = 2 message lv_mssg
system_failure = 3 message lv_mssg
others = 4.
check sy-subrc eq 0.
set user-command 'PF23'. " refresh
endform. " F_TASK_END