Code: Alles auswählen.
call function 'DSYS_SHOW_FOR_F1HELP'
exporting
DOKCLASS 'FU' "----> fuer Objekt FuBa RE waere fuer REport
DOKLANGU 'DE' "----> Sprache der Docu
DOKNAME 'POPUP_TO_CONFIRM'. "----> FuBa dessen Docu man sehen will
Code: Alles auswählen.
data: ls_DOKHL type DOKHL.
ls_DOKHL-ID = 'FU'. " fuer FuBa
ls_DOKHL-OBJECT = 'POPUP_TO_CONFIRM'.
data lt_tlines type standard table of tline.
data ls_head type thead.
data ls_opt type itcpo.
data ls_dokil type dokil.
*** Get index
CALL FUNCTION 'DOCU_EXIST_CHECK'
EXPORTING
id = ls_DOKHL-ID
langu = sy-langu
object = ls_DOKHL-OBJECT
typ = space
IMPORTING
docu_index = ls_dokil
EXCEPTIONS
others = 5.
if sy-subrc = 0.
*** Read docu lines
CALL FUNCTION 'DOCU_READ'
EXPORTING
id = ls_dokil-id
langu = ls_dokil-langu
object = ls_dokil-object
typ = ls_dokil-typ
version = ls_dokil-version
IMPORTING
head = ls_head
TABLES
line = lt_tlines.
*** Read printer options
select single spld from usr01 into ls_opt-tddest
where bname = sy-uname.
if ls_opt-tddest is initial.
ls_opt-tddest = 'LOCL'. "BEISPIEL evtl. anpassen
endif.
ls_opt-tdprinter = 'PRINTER'.
ls_opt-tdnoprint = abap_true.
ls_opt-tdpreview = abap_true.
*** Call preview
CALL FUNCTION 'PRINT_TEXT'
EXPORTING
device = ls_opt-tdprinter
dialog = abap_false
header = ls_head
options = ls_opt
TABLES
lines = lt_tlines.
endif.