Code: Alles auswählen.
report zlogin_screen_info.
* externe Tabellen
* ----------------
tables: rfcdes, thead.
* Selektionsauswahl
*------------------
parameters: p_dest like rfcdes-rfcdest default 'E00',
p_name like thead-tdname
default 'ZLOGIN_SCREEN_INFO_E00'.
* interne Tabellen
* ----------------
data: gs_textline type tline,
gt_textline type standard table of tline,
gt_doculine type standard table of tline,
gs_thead type thead.
* Constants
* ---------
constants: gc_name like thead-tdname value 'ZLOGIN_SCREEN_INFO'.
* Workbereich
* -----------
data: gv_dokstate type dokstate,
gv_doku_typ type doku_typ,
gv_dokvers type dokvers.
* S T E U E R L E I S T E
* -----------------------
start-of-selection.
perform check.
perform read_text.
perform write_doku_rfc.
* P R O G R A M M E N D E
* -----------------------
end-of-selection.
message i000(zs) with
'SE61 ZLOGIN_SCREEN_INFO wurde in '
p_dest
'upgedatet. Bitte prüfen!'.
*&------------------------------------------------*
*& Form check
*&------------------------------------------------*
* text
*-------------------------------------------------*
form check.
case p_dest.
when 'E00'.
when 'T00'.
when 'P00'.
when others.
message e000(zs) with
'Ungültige RFC-Verbindung (E00/T00/P00.'.
endcase.
case p_name.
when 'ZLOGIN_SCREEN_INFO_E00'.
when 'ZLOGIN_SCREEN_INFO_T00'.
when 'ZLOGIN_SCREEN_INFO_P00'.
when others.
message e000(zs) with
'Ungültiger Standardtext.'.
endcase.
endform. "check
*&------------------------------------------------*
*& Form read_text
*&------------------------------------------------*
* Lesen Standardtext
*-------------------------------------------------*
form read_text.
clear: gs_textline, gt_textline[].
clear gs_thead.
call function 'READ_TEXT'
exporting
client = sy-mandt
id = 'ST'
language = sy-langu
name = p_name
object = 'TEXT'
archive_handle = 0
local_cat = ' '
importing
header = gs_thead
tables
lines = gt_textline
exceptions
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
others = 8.
if sy-subrc <> 0.
message e000(zs) with 'text nicht gefunden'.
endif.
endform. "read_text
*&-------------------------------------------------*
*& Form write_doku_rfc
*&-------------------------------------------------*
* text
*--------------------------------------------------*
form write_doku_rfc.
* muss für fuba mitgegeben werde, wird hier aber nicht gebraucht
clear: gt_doculine[].
clear: gv_dokstate, gv_doku_typ.
* Ermitteln Kopfdaten des Dokutextes
call function 'DOCU_GET'
exporting
* EXTEND_EXCEPT = ' '
id = 'TX'
langu = sy-langu
object = 'ZLOGIN_SCREEN_INFO'
* TYP = 'E'
* VERSION = 0
version_active_or_last = 'L'
* PRINT_PARAM_GET = 'X'
importing
dokstate = gv_dokstate
* DOKTITLE =
head = gs_thead
doktyp = gv_doku_typ
tables
line = gt_doculine
exceptions
no_docu_on_screen = 1
no_docu_self_def = 2
no_docu_temp = 3
ret_code = 4
others = 5.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
* Update Dokutext
gv_dokvers = gs_thead-tdversion.
call function 'Z_S_DOKU_UPDATE_RFC'
destination p_dest
exporting
* ACTCLASS = ' '
head = gs_thead
* NO_MASTERLANG = ' '
state = gv_dokstate
typ = gv_doku_typ
version = gv_dokvers
tables
line = gt_textline.
endform. "write_doku_rfc
hallo,ABAP_84 hat geschrieben:Hallo,
nachwie vor habe ich Probleme mit den Eigenschaften und den Parametern des Funktionsbausteins.
Eigenschaft = Remote fähiger Baustein
Import = ??
Export = ??
Tabellen = ??
Wenn ich in Import LANGU TYPE SPRAS eingebe kommt die Meldung
" Beim RFC sind keine Referenzparameter zugelassen "
Gruss
Folgende Benutzer bedankten sich beim Autor Bitfummler für den Beitrag:
ABAP_84