on 02-06-2012 9:12 AM
Hi ,
i need to copy standard texts starting with a specific pattern in the same client with a different name.
for example i want to copy all the standard texts starting with zraj* in same client to name zraj*123.
please help.
and i do not want to rename zraj* , i want to copy all the standard texts starting with zraj* and then rename them.
Edited by: rajesh nautiyal on Feb 6, 2012 10:13 AM
Hi,
You could write an ABAP program using function modules READ_TEXT, EDIT_TEXT and SAVE_TEXT.
Regards,
Aidan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Write a program to SELECT from the TTXOB table with a wild card prefix.
Loop through the names and call function module COPY_TEXTS or use the RSTXCPY program.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
which one to copied text element or table or report
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i had once the task to change ids on textes, so i implemented that code with MODFIY, the effect was, it created new textes, so ya just have no apply new text-names, haven't you?
DATA: lt_stxh TYPE TABLE OF stxh,
ls_stxh TYPE stxh,
ls_stxh_update TYPE stxh,
lt_stxl TYPE TABLE OF stxl,
ls_stxl TYPE stxl,
ls_stxl_update TYPE stxl,
lv_tdobject TYPE tdobject VALUE 'TEXT'.
TABLES stxh.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
*PARAMETERS o_tdname TYPE tdname.
SELECT-OPTIONS s_tdname FOR STXH-tdname no INTERVALS.
PARAMETERS o_tdid1 TYPE tdid DEFAULT 'ST'.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS o_tdid2 TYPE tdid.
SELECTION-SCREEN END OF BLOCK b2.
START-OF-SELECTION.
Alle Records auf Kopfebene holen
SELECT * FROM stxh INTO TABLE lt_stxh
WHERE tdobject = lv_tdobject
AND tdid = o_tdid1
AND tdname LIKE o_tdname. ">001<
AND tdname in s_tdname.
CLEAR ls_stxh.
FREE ls_stxh.
IF sy-subrc = 0.
LOOP AT lt_stxh INTO ls_stxh.
CLEAR: ls_stxh_update, ls_stxl_update.
FREE: ls_stxh_update, ls_stxl_update.
Datensatz auf Kopfebene auslesen und ändern.
STXH
SELECT SINGLE FOR UPDATE * FROM stxh INTO ls_stxh_update
WHERE tdobject = ls_stxh-tdobject
AND tdname = ls_stxh-tdname
AND tdid = ls_stxh-tdid
AND tdspras = ls_stxh-tdspras.
ls_stxh_update-tdid = o_tdid2.
MODIFY stxh FROM ls_stxh_update.
Datensatz auf Posebene auslesen und ändern.
STXL
SELECT SINGLE FOR UPDATE * FROM stxl INTO ls_stxl_update
WHERE tdobject = ls_stxh-tdobject
AND tdname = ls_stxh-tdname
AND tdid = ls_stxh-tdid
AND tdspras = ls_stxh-tdspras
AND relid = 'TX'
AND srtf2 = '0'.
ls_stxl_update-tdid = o_tdid2.
MODIFY stxl FROM ls_stxl_update.
ENDLOOP.
ENDIF.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.