‎2010 Mar 05 7:01 PM
Hello,
I need to create change documents for string texts. I have no problem to implement change docs in general but i fail since days on the strings.
HOW do i have to fill the CDTXT table in my module "*-WRITE_DOCUMENT"?
Whatever I do... the system does not write any change docs to the string table.
If you have an example for what ti enter in the table key and the text type (column 2) that would be great"
‎2010 Mar 05 7:53 PM
Sometimes the solution comes when you already gave up. Furthermore it was easy, i just spend all the time because i forgot one import parameter.
For those you are interested here the test program. Its only a very draft version converted from a multiple case and should just demonstrate how text strings got change documented. The fact that i write both different records with the name ID to the change documents of course does not make sense in a production environment.
Sorry if its bad formatted, by the programming code markup I inserted seems not to work (at least in the preview).
*&---------------------------------------------------------------------*
*& Report ZPP_ZTEST_CDO
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
report ZPP_ZTEST_CDO.
include FZTEST_CDOCDT.
data: LT_ZTEST_CDO type standard table of ZTEST_CDO.
data: LS_ZTEST_CDO type ZTEST_CDO.
data: LS_DATA type line of YZTEST_CDOS.
field-symbols: <LINE> type YZTEST_CDO.
data: LS_LINETEXT type CDTXT.
LS_ZTEST_CDO-FORNAME = 'FORM'.
LS_ZTEST_CDO-DEF = 'Z'.
LS_ZTEST_CDO-ORGLEVEL = 'ZZZyy'.
LS_ZTEST_CDO-DESCR = 'ZZZZZZZZ'.
LS_ZTEST_CDO-TEXT = 'Text test Form type 5'.
append LS_ZTEST_CDO to LT_ZTEST_CDO.
LS_ZTEST_CDO-FORNAME = 'FORM1'.
LS_ZTEST_CDO-DEF = 'l'.
LS_ZTEST_CDO-ORGLEVEL = 'FINAN34'.
LS_ZTEST_CDO-DESCR = 'HALLO Hen niSskdjfatz2'.
LS_ZTEST_CDO-TEXT = 'Text test Form1 type 5'.
append LS_ZTEST_CDO to LT_ZTEST_CDO.
loop at LT_ZTEST_CDO into LS_ZTEST_CDO.
concatenate SY-MANDT LS_ZTEST_CDO-FORNAME into LS_LINETEXT-TEILOBJID.
LS_LINETEXT-TEXTART = 'FORM'.
LS_LINETEXT-TEXTSPR = 'EN'.
LS_LINETEXT-UPDKZ = 'U'.
append LS_LINETEXT to ICDTXT_ZTEST_CDO.
move-corresponding LS_ZTEST_CDO to LS_DATA.
append LS_DATA to XZTEST_CDO.
endloop.
loop at XZTEST_CDO assigning <LINE>.
<LINE>-MANDT = SY-MANDT.
<LINE>-KZ = 'U'.
endloop.
select * from ZTEST_CDO into corresponding fields of table YZTEST_CDO.
modify ZTEST_CDO from table LT_ZTEST_CDO.
call function 'ZTEST_CDO_WRITE_DOCUMENT'
exporting
OBJECTID = 'FORM'
TCODE = ''
UTIME = SY-UZEIT
UDATE = SY-CDATE
USERNAME = SY-UNAME
* PLANNED_CHANGE_NUMBER = ' '
* OBJECT_CHANGE_INDICATOR = 'U'
* PLANNED_OR_REAL_CHANGES = ' '
* NO_CHANGE_POINTERS = ' '
UPD_ICDTXT_ZTEST_CDO = 'U'
UPD_ZTEST_CDO = 'U'
XZTEST_CDO = XZTEST_CDO
YZTEST_CDO = YZTEST_CDO
tables
ICDTXT_ZTEST_CDO = ICDTXT_ZTEST_CDO.