Skip to Content
author's profile photo Former Member
Former Member

copy and rename standard texts

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Feb 06, 2012 at 12:27 PM

    which one to copied text element or table or report

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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.

  • author's profile photo Former Member
    Former Member
    Posted on Feb 06, 2012 at 01:58 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 06, 2012 at 02:00 PM

    Hi,

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

    Regards,

    Aidan

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.