How to update CC02 Chng Header Long Text?

  Hello everyone,
     I'm trying to better understand how to dynamically update the long text in transaction CC02 from a custom program. I have debugged through CC02 and found that it uses SAVE_TEXT and COMMIT_TEXT so I too, have tried the same.
What I've found is that as long as a Change Header Long Text was created first in CC02, the code below works successfully without issue, and is reflected when I go into CC02 - I can see my changes.
On the other hand, if the Change Header Long Text was not already created, and I create it for the first time, this text is stored and I can successfully read it using READ_TEXT Function Modules. However CC02 does not show this saved text. Therefore, any changes made in CC02 will then overwrite my changes made in my custom program.
I have explored the INSERT parameter of SAVE_TEXT, and pass an X if the Change Header Long Text does not already exist (Determined using READ_TEXT). However, this did not seem to yield any success.
Can anyone explain why this works correctly when it is already created, but does not work correctly if I am creating the long text for the first time in my program?
CALL FUNCTION 'SAVE_TEXT'
      EXPORTING
        client          = sy-mandt
        header          = lwa_thead
        savemode_direct = c_x
*        insert          = i_new_longtxt
      TABLES
        lines           = lwa_ltext_tmp
      EXCEPTIONS
        id              = 1
        language        = 2
        name            = 3
        object          = 4
        OTHERS          = 5.
    IF sy-subrc = 0.
      CALL FUNCTION 'COMMIT_TEXT'
      EXPORTING
        object          = lwa_thead-tdobject
        name            = lwa_thead-tdname
        id              = lwa_thead-tdid
        language        = s_lang
      IMPORTING
        commit_count    = iv_updated_texts.
    ENDIF.
Useful hints or tips will be rewarded! Thank you!

Hi Custodio,
Thanks for the reply. To further elaborate, the parameters I've tried passing through lwa_thead are the following:
CONSTANTS:
    w_tdid            TYPE thead-tdid       VALUE 'AENR', " Change Master Table
    w_tdobject        TYPE thead-tdobject   VALUE 'CHANGE', " Static Object
    w_linesize        TYPE thead-tdlinesize VALUE '72', " 72 characters per line
    w_tdform          TYPE thead-tdform     VALUE 'ECM_LTXT', " Form Name in CC02 Header Long Text
   * Setup header information
  lwa_thead-tdid        = w_tdid. " AENR (Change master table)
  lwa_thead-tdobject    = w_tdobject. " CHANGE
  lwa_thead-tdname      = w_tdname. " Client + ECM
  lwa_thead-tdspras     = s_lang. " Language
  lwa_thead-tdlinesize  = w_linesize. " Characters per line
  lwa_thead-tdform      = w_tdform. " Form ECM_LTXT
  lwa_thead-TDLUSER     = SY-UNAME. " Changed by User
  lwa_thead-TDLDATE     = SY-DATUM. " Date changed
  lwa_thead-TDLTIME     = SY-UZEIT. " Time changed
  lwa_thead-TDLRELES    = SY-SAPRL. " SAP Release
  lwa_thead-TDTXTLINES  = l_records. " Number of records
For testing purposes, I even mocked the following tran code and program name from CC02 in tdmacode1 to see if that triggered a different result. This did not visibly change anything as far as I could tell.
    w_tdmacode1       TYPE thead-tdmacode1  VALUE 'CC02SAPMC29C',
    lwa_thead-tdmacode1   = w_tdmacode1.

Similar Messages

  • How to use Standard Text Key in maintenance order header long text?

    Dear All,
    I have created a standard text key using transaction CA10 and I want to use this in maintenance order header long text. Is there any way to select any standard text key in maintenance order header long text?
    Regards & Thanks,
    Saif

    Hi
    To use standard texts, perform the following six steps:
    Select the maintenance order and access the operation overview screen using Goto -->Operation overview.
    You can enter standard text keys in this screen or in a detail screen for the relevant operation.
    Enter a standard text key in the appropriate field and press ENTER .
    If the text is longer that the short text line available, the field Text is selected for that operation.
    Check the long text and edit it if necessary. To do this, select the operation and choose Operation--> Long text.
    The system branches to the text editor screen. If you also entered a short text for the operation and specified that this should not be overwritten by the standard text, you will see the short text displayed in the first line of the editor. The following lines contain the standard text.
    Check the standard text and change it if necessary.
    Save the final version of the text and return to the previous screen with Goto--> Back.
    Save the maintenance order.
    Standard texts are created for your system by your system administrator using the Customizing function.
    Regards
    Makarand Gurjar

  • How to append new text line to Notification header long text

    In sevice notification , I  append new text to notification header long text . I try FMi write_text, but it will overwrite the existed text , PLS HELP!

    Hi,
    Make  use of the FM "IQS0_ADD_NOTIFICATION_LONGTEXT".
    This will append the new lines to the existing long text.
    Make sure to put "X" for the import parameter "POST".
    Hope this will help you.
    Regards,
    Smart Varghese

  • Loading Maintenance Order Header Long Text

    Hi Experts,
    I am trying load Maintenance Order Header Long Text using an LSWM Direct Input Program.
    It states the Long Text successfully transferred, but when I go to transaction IW33, the long text is not displayed.
    How do I get the long text to be displayed in transaction IW33?
    Thanks,
    MSKA

    SAP help states that some long texts may not be readable from the application after they have been imported. They provide 2 solutions in the following link.
    [Importing Texts|http://help.sap.com/saphelp_nw04s/helpdata/en/01/d944c0646cd540b3356552be080353/frameset.htm]

  • Maintenance order header long text copy into PR header text

    Dear all,
    Can anyone please let me know how I can copy the Maintenance order header long text into the PR header text of service or component PR.
    Thanks in advance.
    Regards,
    Vineet
    Edited by: vineet sharma on Oct 19, 2011 1:23 AM

    Hi
       Please check this link Re: Copy text from PM order to Purchase Requisition
    regards
    pushpa

  • How to Search document by using Long text description contents in SAPEasy DMS

    Hi,
    How to Search document by using Long text description contents in SAPEasy DMS
    Regards,
    Shrikant Shinde

    Hi Alfredo,
    Thanks for reply..Will you please explain in brief what are the  OCR program and workflow.
    Will you please send me any docs on [email protected]
    Thanks
    shiv.

  • How do I convert a very long text message into a multimedia message

    How do I convert a very long text message into a multimedia message

    Well, you didn't mention Mac, but to my knowledge, TouchCopy works on both platforms. And, my understanding of the OP was to send each one individually, whereas WiseJD was referring to selecting them all so you could copy them all and send, rather than emailing each individual piece.
    It wasn't that I thought it was rude, but that it was a complaint about something that someone said a year ago. You did not come here to ask a question, or indicate at all that you were looking for a solution to a similar question. It was just that you came on, slammed a response and left it at that. Those of us that take the time to answer people's questions as volunteers and users just like you. If you spend a great deal of time here, you will see a lot of different types of questions/comments that can get on your nerves. Here is a link for TouchCopy and it does work on both platforms. http://www.wideanglesoftware.com/touchcopy/

  • BOM Header Long Text

    Dear experts,
    Is there a way to transfer BOM header long text to production order? I see bom item long texts on production order in item details. But in production order i can not find BOM header long text anywhere.
    Best regards

    Dear,
    1. Use  function module: CO_TX_TEXT_CATALOG_IMPORT
    Function group: COTX
    Short text: Import of the order texts from the memory section of SAPScript
    You must maintain the following parameter:
    Exception: NO_CATALOG
    2. Create function module: CO_TX_TEXT_CATALOG_EXPORT
    Function group: COTX
    Short text: Export of order texts back to the SAPScript Memory
    No parameters required
    Please try and come back.
    Regards,
    R.Brahmankar

  • Please tell me how to go back to a long text I wrote and then i must have accidentally swiped the screen one way or another.  How do I go back to the screen so I don't have to re-write the whole text?

    Please tell me how to go back to a long text I wrote and then i must have accidentally swiped the screen one way or another.  How do I go back to the screen so I don't have to re-write the whole text?

    Cloud takes over https://forums.adobe.com/thread/1584746 may help

  • User Exit: Saving data in Production Order Header Long Text

    Hi PP Gurus,
    Can any one let me know which user exit can be used to save some data in the Long Text of Production Order Header.
    We try PPCO0007, it works well on ECC, but my client's system version is 4.7, it does not work.
    In 4.7 version, is there any other User Exit or BADI can be used to comply with this requirement?
    It's quite common requirement, hope someone can help me. Thanks.
    Best regards,
    Sun Qiang

    Hi All,
    Thank for your reply.
    After saving the text using 'SAVE_TEXT' function module and commiting it you need to update the 'ltext' field in AUFK table.
    SELECT SINGLE * INTO wa_aufk FROM aufk WHERE aufnr EQ '000012345678'.
    wa_aufk-ltext = 'D'.
    MODIFY aufk FROM wa_aufk.
    It works in Enhancement PPCO0007.
    This call can be closed. Thanks.
    BR
    Qiang

  • Update Time confirmation and Long text of Work Order in single FM or BAPI

    Hi,
    I would like to know, which standard FM or BAPI will update the longtext along with the confirmation text while doing the time confirmation of a work order.
    I have tried with standard BAPI BAPI_ALM_CONF_CREATE for updating the time confirmation. This is updating the time and confirmation text properly but not the long text. I would like to know how can I update the long text while doing the time confirmation. Is there any other standard FM/BAPI will update both?
    Thanks in Advance,
    Mohan.

    There is no standard SAP enhancement we can use for this purpose.
    We have developed another program to maintian the long text in production order.
    This call can be closed.
    Cheers,
    Qiang

  • How to get the medium and long text for PRODUCT HIERARCHY?

    hi experts,
    i am using data source called 0prod_hier_text. in ECC there is description for medium and long.
    but in BW it is mapped to 0TXTSH which is short text, and in the transformations medium text is mapped to short text of BW (0TXTSH) which is having length only 20.
    IF it exceeds more than 20 it is now showing.
    so how to get  add 0TXTMD which is medium text so that i can see the description for MEDIUM.
    i did try to add  to 0PROD_HIER but i cannot add.
    i need to show medium text description in the Report.
    plz provide me the input.
    regards
    venuscm

    Hi Venu,
    Check in RSD1 screen which text you have chossen .....for object 0product
    try to check for medium & long text(if not checked) ..
    so that you can add mdtxt & long txt in transformations........
    hope this will help you.
    Thanks,
    Vijay.

  • How to get the service master long text from the AC03

    Hi All,
    we are using the FM READ_TEXT  to read the long text for service master  which is maintained in AC03 ,Please can any one suggest me how to do the same.
    Get long description
    CALL FUNCTION 'READ_TEXT'
        EXPORTING
          id                            = LTXT
          language                = EN
          name                    =  '003000124'
          object                  = 'ASMD'
        TABLES
          lines                   = litab_line
        EXCEPTIONS
          id                      = 1
          language                = 2
          name                    = 3
          not_found               = 4
          object                  = 5
          reference_check         = 6
          wrong_access_to_archive = 7
          OTHERS                  = 8.
    Regards
    cb

    Hello
    Try this:
    CALL FUNCTION 'READ_TEXT'
        EXPORTING
          id                            = 'LTXT' " <- '' missed
          language                = 'EN' " <- '' missed
          name                    =  '000000000003000124' " <- 18 symbols must be here
          object                  = 'ASMD'
        TABLES
          lines                   = litab_line
        EXCEPTIONS
          id                      = 1
          language                = 2
          name                    = 3
          not_found               = 4
          object                  = 5
          reference_check         = 6
          wrong_access_to_archive = 7
          OTHERS                  = 8.

  • How to display field values in long text of messages....

    Hi,
      Currently iam doing an userexit. In that i want to display error messages. and if we click on message it will display the long text. My question is i want to display field values in the long text. Under the long text's &system_response& i want  to display a field value.
    Regards
    chinna

    Hi Chinna,
    Within short and long texts, you can use placeholders, which can be replaced with the content of data objects using the MESSAGE statement. A maximum of four character-type placeholders are permitted; they are indicated by #&i# in short texts, and by #&Vi&# in long texts, where i = [1, 4]. If #&# itself is to be displayed as part of the text, it must be specified as #&&# in short texts and as "&" in long texts.
    To add some detail on how to create variables in Long text, you have to go to 'commands' and in symbol option provide the variables like
    &V1&  &V2&  and so on.
    Hope this helps you.
    revert for further clarification.
    <b>Alwyas reward Points to useful suggestions.</b>
    Regards,
    Vikas
    Message was edited by:
            Vikas Taneja

  • How to write program for the long text in EMIGALL for the DEVICE LOCATION.

    Hi,
    I am pretty new to this ISU field and i have been asked to code for a Long Text in EMIGALL for DEVICE LOCATION,
    so i would like someone can help me with it.
    thanks in advance.
    Robert.

    Robert,
    You can find most of the answers to your questions in the Guidelines:
    Chapter 2.4.2 describes how to configure the field rule Fixed Value.
    Chapter 2.4.5 describes how to configure the field rule via KSM.
    Chapter 2.5 descibes the Key- and Status Management and the usage of the the KSM in field rules.
    The specific answer to your questions are:
    (1) ...When i was adding the fixed rule, it was asking for domain so what should be the Domain that i should add ... You may ignore the domain field when creating a fixed value object. It's more for information purposes.
    (2) ... and what should i keep the fixed value, string or filed or abap rule ... I'd suggest to use 'String' and enter the specific value in the field 'FV contents'.
    (3) ... Finally you need to adjust the RETURN-FIELD of the newly created BAPI migration object to AUTO-X_HEAD-TDNAME, where do i make this adjustment can you specify that ... The return field can only be adjusted int the migration object maintenance screen (MigObject -> Change). Please see chapter 3.1 for more details on the 'return field' and figure 3-8 in chapter 3.4.2 how to generate a BAPI migration object.  
    (4) ... Well i would also like to ask about the x_head-tdname =  via KSM (e.g. DEVLOC), where should i put the value ... You wanted to know how to migrate a long text of a device location migration object DEVLOC). According to chapter Chapter 2.4.5 you need to enter the name of the superior migration object (here DEVLOC) in the 'MigObject1'field on the 'via KSM' sub-screen on the field maintenance screen.
    (5) ... and what exactly would it be can i put DEVLOC in the ID of technical Object and where should i put this value... I am not sure I understand your question. In the end you will need to pass the number (ID) of the technical object in the TDNAME field. Either you put the id into the import file (only if you know the id) or you need to use the 'via KSM' field rule to replace the legacy system key of the device location by the SAP key by the load report and prior to passing the auto data to the application thus your new function module.
    Kind regards,
    Fritz

Maybe you are looking for

  • Path selection convention

    I would like to know why Adobe changed the "load path as selection" convention in Adobe photoshop:  In the older versions, the load selection from path would only select INSIDE the chosen path but with (possibly CS4), CS5, CS6, CC it would appear tha

  • 1099 & other related reports

    Hi Gurus We are on ECC 6.0.  We would like to generate the following reports in SAP: 1. S_ALR_87012142 - Postcard Printout of 1099 Vendor Addresses for Tax Code Request 2. S_ALR_87012143 - 1099 Listings 3. S_PL0_09000314 - 1099-Misc 4. S_ALR_87012145

  • Need help on NAT.

    Hello folks,      I still messing about with my GSN3 lab here. My topolgy is like this : (cloud)-----(router)-----(ASA FW)----(SW)------LAN. I can ping out from the router and from the ASA firewall, but I cant figure it out how to make my LAN to ping

  • Problems Exporting rpts to Excel!

    Post Author: miguelitobh CA Forum: Exporting Hello Everybody! I´m new in the forum, and i have a question that is killing me... I´ve an application that runs asp and COM+ using Visual Basic... I made another litlle module for Crystal Reports rpts imp

  • AUTHORISATION REQUIRED FOR REPORT LEVEL POP UP WINDOW

    RESPECTED ALL I HAVE CREATED ONE REPORT AND CREATED ONE CHARACTERISTIC AND DUE TO WHICH WHEN I AM EXECUTING, IT FIRST ASK THE SELECTION CRITERIA WINDOW LIKE POSTING DATE AND MATERIAL SELECTION. BUT WHEN  I AM DOING THE SAME THING THROUGH THE DIFFEREN