report zsapdoi_003.
include officeintegrationinclude.
data: factory type ref to i_oi_document_factory.
data: document type ref to i_oi_document_proxy.
data: link_server type ref to i_oi_link_server.
data: retcode type t_oi_ret_string.
data: is_closed type i.
data: ok_code like sy-ucomm.
data: save_ok like ok_code.
tables: sflight.
parameters : p_carrid like sflight-carrid obligatory,
p_connid like sflight-connid obligatory,
p_fldate like sflight-fldate obligatory.
data: begin of gt_sflight occurs 0,
carrid like sflight-carrid,
connid like sflight-connid,
fldate like sflight-fldate,
price like sflight-price,
currency like sflight-currency,
planetype like sflight-planetype,
seatsvac like sflight-seatsmax,
seatsmax like sflight-seatsmax,
seatsocc like sflight-seatsocc,
end of gt_sflight.
start-of-selection.
select *
from sflight
into corresponding fields of table gt_sflight
where carrid = p_carrid
and connid = p_connid
and fldate = p_fldate.
if sy-subrc ne 0.
leave list-processing.
endif.
loop at gt_sflight.
gt_sflight-seatsvac = gt_sflight-seatsmax - gt_sflight-seatsocc.
modify gt_sflight.
endloop.
.
call screen 100.
*&---------------------------------------------------------------------*
*& Module DOI_CREATE OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
module doi_create output.
call method c_oi_factory_creator=>get_document_factory
importing
factory = factory
retcode = retcode.
if retcode ne c_oi_errors=>ret_ok.
exit.
endif.
call method factory->start_factory
exporting
r3_application_name = 'ZSAPDOI_002'
importing
retcode = retcode.
call method c_oi_errors=>show_message
exporting
type = 'E'.
call method factory->get_link_server
importing
link_server = link_server
retcode = retcode.
call method c_oi_errors=>show_message
exporting
type = 'E'.
call method link_server->start_link_server
importing
retcode = retcode.
call method c_oi_errors=>show_message
exporting
type = 'E'.
if not link_server is initial.
call method link_server->add_table_item2
exporting
item_name = 'gt_sflight'
importing
retcode = retcode
changing
data_table = gt_sflight[].
call method c_oi_errors=>show_message
exporting
type = 'E'.
endif.
call method factory->get_document_proxy
exporting
document_type = 'Word.Document'
importing
document_proxy = document
retcode = retcode.
call method c_oi_errors=>show_message
exporting
type = 'E'.
call method document->open_document
exporting
open_inplace = 'X'
document_url = 'FILE://C:DOI_002.doc'
startup_macro = 'DOI_MACRO'
document_title = '비행기 티켓 정보'
importing
retcode = retcode.
call method c_oi_errors=>show_message
exporting
type = 'E'.
endmodule. " DOI_CREATE OUTPUT
*&---------------------------------------------------------------------*
*& Module EXIT INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
module exit input.
case ok_code.
when 'EXIT'.
if not document is initial.
call method document->is_destroyed
importing
ret_value = is_closed.
if is_closed is initial.
call method document->close_document
exporting
do_save = 'X'
importing
retcode = retcode.
call method c_oi_errors=>show_message
exporting
type = 'E'.
endif.
call method document->release_document
importing
retcode = retcode.
call method c_oi_errors=>show_message
exporting
type = 'E'.
free document.
endif.
leave to screen 0.
endcase.
endmodule. " EXIT INPUT
*&---------------------------------------------------------------------*
*& Module STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
module status_0100 output.
set pf-status 'STATUS01'.
* SET TITLEBAR 'xxx'.
endmodule. " STATUS_0100 OUTPUT
댓글 0
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
530 | REPORT z12_14 | sapjoy | 2012.07.30 | 1068 |
529 | REPORT z15_16. | sapjoy | 2012.08.01 | 1070 |
528 | REPORT z16_01. | sapjoy | 2012.08.01 | 1070 |
527 | REPORT z12_01. | sapjoy | 2012.07.30 | 1073 |
526 | Z15_01_PBO | sapjoy | 2012.08.01 | 1073 |
525 | REPORT z17_01 . | sapjoy | 2012.08.01 | 1073 |
524 | REPORT z05_16. | sapjoy | 2012.07.30 | 1074 |
523 | REPORT z16_07. | sapjoy | 2012.08.01 | 1074 |
522 | REPORT z17_05 . | sapjoy | 2012.08.01 | 1075 |
521 | REPORT z17_07 . | sapjoy | 2012.08.01 | 1086 |
520 | REPORT z16_08. | sapjoy | 2012.08.01 | 1090 |
519 | REPORT z15_22. | sapjoy | 2012.08.01 | 1107 |
518 | REPORT z15_01. | sapjoy | 2012.08.01 | 1118 |
517 | REPORT z15_07. | sapjoy | 2012.08.01 | 1129 |
516 | REPORT z16_03. | sapjoy | 2012.08.01 | 1142 |
515 | REPORT z15_10. | sapjoy | 2012.08.01 | 1145 |
514 | REPORT z12_24. | sapjoy | 2012.07.30 | 1153 |
513 | PROGRAM z13_05. | sapjoy | 2012.08.01 | 1153 |
512 | REPORT z15_21. | sapjoy | 2012.08.01 | 1153 |
511 | REPORT z15_04. | sapjoy | 2012.08.01 | 1155 |