REPORT zmm000071 NO STANDARD PAGE HEADING
MESSAGE-ID zpc.
TABLES: konp.
DATA: BEGIN OF tline OCCURS 2.
INCLUDE STRUCTURE tline.
DATA: END OF tline.
DATA: bline LIKE TABLE OF tline WITH HEADER LINE.
DATA: BEGIN OF itab OCCURS 0,
knumh LIKE konp-knumh,
kopos LIKE konp-kopos,
END OF itab.
DATA: utname LIKE thead-tdname.
DATA: BEGIN OF header OCCURS 0.
INCLUDE STRUCTURE thead.
DATA: END OF header.
START-OF-SELECTION.
PERFORM read_text.
PERFORM change_text.
*&---------------------------------------------------------------------*
*& Form read_text
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM read_text.
itab-knumh = '0000059145'. "兵ン癘魁腹
itab-kopos = '01'. "兵ン癘魁腹
APPEND itab.
LOOP AT itab.
CLEAR utname.
CONCATENATE itab-knumh itab-kopos INTO utname.
CLEAR tline.
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = '1002'
language = 'M'
object = 'KONP'
name = utname
archive_handle = 0
IMPORTING
header = header
TABLES
lines = tline
EXCEPTIONS
not_found = 4.
IF sy-subrc = 0.
* LOOP AT tline.
* WRITE:/ tline-tdline.
* ENDLOOP.
bline[] = tline[].
* tline-tdline = '發祇布癘魁1'.
* APPEND tline.
* tline-tdline = '發祇布癘魁2'.
* APPEND tline.
** CALL FUNCTION 'EDIT_TEXT'
** EXPORTING
** editor_title = '絪胯ずゅ家舱'
** header = header
** save = 'X'
** TABLES
** lines = tline
** EXCEPTIONS
** id = 01
** language = 02
** linesize = 03
** name = 04
** object = 05.
** WRITE :/ 'edit_text',sy-subrc .
LOOP AT tline.
IF sy-tabix <> 1.
DELETE tline.
ENDIF.
ENDLOOP.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
client = sy-mandt
header = header
savemode_direct = 'X'
TABLES
lines = tline
EXCEPTIONS
id = 1
language = 2
name = 3
object = 4
OTHERS = 5.
IF sy-subrc = 0.
MESSAGE s999 WITH 'Θ發ずゅ癘魁'.
LOOP AT bline.
WRITE:/ bline-tdline.
ENDLOOP.
SKIP.
LOOP AT tline.
WRITE:/ tline-tdline.
ENDLOOP.
ENDIF.
ENDIF.
ENDLOOP.
ENDFORM. " read_text
*&---------------------------------------------------------------------*
*& Form change_text
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM change_text.
ENDFORM. " change_text
相关表格 ttxid ,stxh