cancel
Showing results for 
Search instead for 
Did you mean: 

copy and rename standard texts

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

aidan_black
Active Contributor
0 Kudos

Hi,

You could write an ABAP program using function modules READ_TEXT, EDIT_TEXT and SAVE_TEXT.

Regards,

Aidan

Former Member
0 Kudos

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.

Former Member
0 Kudos

which one to copied text element or table or report

Former Member
0 Kudos

i want to copy text elements.....

Former Member
0 Kudos

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.