SAVE_TEXT problem

Hello All,
I am copying text from sales order and inserting into the production order.
I have used read_text, save_text and commit text.
In the debuggin i can see all the data getting populated, even iam getting sy-subrc = 0 in the save_text FM. <b>However text is not copied into the production order.</b>
Also i have a entry in STXH table.
I have posted my code for your reference
FORM ADD_LONG_TEXT1.
  DATA: ID        LIKE  THEAD-TDID VALUE 'KOPF',
        LANGUAGE  LIKE  THEAD-TDSPRAS,
        NAME      LIKE  THEAD-TDNAME,
        OBJECT    LIKE  THEAD-TDOBJECT VALUE 'AUFK'.
  DATA: TLINES LIKE TLINE OCCURS 0 WITH HEADER LINE.
  DATA: IT_THEAD  LIKE THEAD OCCURS 0 WITH HEADER LINE.
*Prepare text criteria
  CONCATENATE SY-MANDT txt-aufnr INTO NAME.
  LANGUAGE = SY-LANGU.
*Begin of insert
MOVE id TO IT_THEAD-TDID.
MOVE language to IT_THEAD-TDSPRAS.
MOVE NAME to IT_THEAD-TDNAME.
MOVE OBJECT to IT_THEAD-TDOBJECT.
append it_thead.
*clear it_thead.
*End of insert
*First read text for existing data
  CALL FUNCTION 'READ_TEXT'
       EXPORTING
            ID                      = ID
            LANGUAGE                = LANGUAGE
            NAME                    = NAME
            OBJECT                  = OBJECT
       TABLES
            LINES                   = TLINES
       EXCEPTIONS
            ID                      = 1
            LANGUAGE                = 2
            NAME                    = 3
            NOT_FOUND               = 4
            OBJECT                  = 5
            REFERENCE_CHECK         = 6
            WRONG_ACCESS_TO_ARCHIVE = 7
            OTHERS                  = 8.
*Append/Insert new text data
  LOOP AT txt-tline INTO wa_bdc.
    CLEAR TLINES.
    TLINES-TDFORMAT = '*'.
    TLINES-TDLINE = wa_bdc-tdline.
    APPEND TLINES.
  ENDLOOP.
Secondly append new text data to existing data
CALL FUNCTION 'SAVE_TEXT'
  EXPORTING
   CLIENT                = SY-MANDT
    HEADER                = it_thead
   INSERT                = ' '
   SAVEMODE_DIRECT       = 'X'
  OWNER_SPECIFIED       = ' '
  LOCAL_CAT             = ' '
IMPORTING
  FUNCTION              =
  NEWHEADER             =
  TABLES
    LINES                 = TLINES
EXCEPTIONS
   ID                    = 1
   LANGUAGE              = 2
   NAME                  = 3
   OBJECT                = 4
   OTHERS                = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'COMMIT_TEXT'
EXPORTING
  OBJECT                = OBJECT
  NAME                  = NAME
  ID                    = ID
  LANGUAGE              = LANGUAGE
  SAVEMODE_DIRECT       = 'X'
  KEEP                  = ' '
  LOCAL_CAT             = ' '
IMPORTING
  COMMIT_COUNT          =
TABLES
  T_OBJECT              =
  T_NAME                =
  T_ID                  =
  T_LANGUAGE            =
ENDFORM.                     "ADD_LONG_TEXT

Hi,
This is not a user exit, iam not sure about the update task.
It is a normal report program, have to copy the sales text to prod order and mark the user status check for TXTU .
This piece of code.
SELECT SINGLE matnr INTO i_matnr FROM vbap
                      WHERE vbeln = afpo-kdauf AND posnr = afpo-kdpos.
      SELECT SINGLE mtart INTO i_mtart FROM mara
                                        WHERE matnr = i_matnr-matnr.
      IF i_mtart-mtart NE 'ZPPG'. " or i_mtart-mtart NE 'HALB'.
        IF txt-t_user CS 'TXTU'.
        ELSE.
If the status was changed write out the Order and Date.
          PERFORM ADD_LONG_TEXT1. 
          IF sy-subrc = 0.
            READ TABLE GT_STATUS WITH KEY TXT04 = 'TXTU'.
            IF SY-SUBRC = 0.
              PERFORM UPDATE_USER_STATUS
                      USING txt-aufnr GT_STATUS-ESTAT  ''. "D01K956913+
            ENDIF.
            WRITE: / txt-aufnr.
          ELSE.
            FORMAT COLOR COL_NEGATIVE.
            WRITE: /  txt-aufnr.
            FORMAT COLOR OFF.
          ENDIF.
        ENDIF.

Similar Messages

  • Save_TEXT problem in IW32

    Hi All,
                I am facing problem as specified below,
                In IW32 I am trying to Append or add new text lines to existing long text lines (read_text then append new lines then
                save_text) then it is successful,
                but if there is no text lines maintained for Long text then read text is successful & having no data its ok, then
                I am trying to append new lines then using SAVE_TEXT as well Create_text with commit_text
                it successful & once I tryed to use READ_TEXT then it showing new added text
                the main problem is it is not DISPLAYED in IW32 TEXT EDITOR.............?
               As I tryed to update AUFK table for the same order with LTEXT field = 'X'......
               is there any other tables & fields I nedd to update for LONG TEXT so that it becomes visible..............?

    Hi Vijay,
                 I had updated AUFK-LTEXT as 'E' also its not giving text output in IW32 text editor...........
                 is there any additional fields to modify or update..........

  • SAVE_TEXT problem in adding new text identifier to an existing text object

    I have an existing text object "ZEANR" which stores 9 long text data with identifiers 1 to 9. I want to add a new long text to that text object with id 10. when I use SAVE_TEXT function (with same parameters as others except the ID is set to "0010"), it throws an exception saying : "0010" text identifier is not defined for Text object "ZEANR". How can we append more long texts to an existing object ? I Have tried to change the insert parameter of the SAVE_TEXT function but it didn't work with both cases. I am getting the exception at perform chech_key --> perform check_id of the SAVE_TEXT function.
    if someone knows the answer I will be preciated. thanks in advance.

    The text ID specified in the parameter ID or text header (field TDID) should exist in table TTXID. It must be defined there with the text module object.
    Go to transaction SE75, select "Text Objects and IDs", Change. Find your text object (ZEANR) in the list and double click. Choose create. Add a new text id (0010) and description. Save.

  • SAVE_TEXT problem - it can't lock??

    Hi, ALL.
    I use the Function Module 'SAVE_TEXT' in my Zprogram.
    It update the Sales long text in MM02.
    When a user is in MM02, 'SAVE_TEXT' the Function Module doesn't return error message.
    I think it's a LOCK error, but it's not.
    Do I need to check LOCK before call function 'SAVE_TEXT' in Zprogram??
    If you know that, please let me know.
    Regards.
    Rie.

    Your program must use the same logic than the standard program to manage locks.
    - Lock same object(s) (ENQUEUE_Exxxx)
    - Use same FMs like SELECT_TEXT, READ_TEXT, INIT_TEXT, SAVE_TEXT or similar tools
    Tips: Execute transaction SE30 on MM02 and update a text, then evaluate the performance data file, look for call to FM starting with ENQUEUE or calls containing TEXT in the trace.
    Remarks:
    - A Save module is a little late to manage lock, no ?
    - "I think it's a LOCK error, but it's not", it is a LOCK error, but in your program
    - You could use BAPI_MATERIAL_SAVEDATA (table parameter MATERIALLONGTEXT) to update/create text, this one manages locks.
    Regards,
    Raymond

  • Problem in SAVE_TEXT function module

    Hi all,
    I am facing problem in updating the text to PO when using the FM SAVE_TEXT. The first line of the header text is being populated but not second line. I am putting sqnumber as 2, but still it is not populating. I am using correct object name , id and etc..
    any idea.
    Sri

    Hi,
      Try something like:
    FORM update_text  USING    fp_rec_text  TYPE ty_text
                           fp_rec_vbeln_vbeln TYPE vbeln_va.
    *Local declaration
      DATA: l_header   TYPE thead,  "Header text
            l_rec_line TYPE tline.  "Text
      DATA: l_i_line TYPE STANDARD TABLE OF tline
                   INITIAL SIZE 0. " Internal Table for l_line
      l_header-tdobject = c_object.
      l_header-tdname = fp_rec_vbeln_vbeln.
      l_header-tdid = fp_rec_text-tdid.
      l_header-tdspras = c_lang.
      l_rec_line-tdformat = c_format.
      l_rec_line-tdline = fp_rec_text-tdline.
      APPEND l_rec_line TO l_i_line.
    *Call subroutine to modify text
      CALL FUNCTION 'SAVE_TEXT'
        EXPORTING
          client          = sy-mandt
          header          = l_header
          savemode_direct = c_flag
        TABLES
          lines           = l_i_line
        EXCEPTIONS
          id              = 1
          language        = 2
          name            = 3
          object          = 4
          OTHERS          = 5.
      IF sy-subrc <> 0.
        MESSAGE i000 WITH 'Standard text not saved'(075).
        LEAVE SCREEN.  "Leave screen
      ELSE.
    *Commit the Save of the Text
        CALL FUNCTION 'COMMIT_TEXT'
          EXPORTING
            name            = l_header-tdname
            savemode_direct = c_flag.
      ENDIF.
    ENDFORM.                    " update_text

  • Problem in SAVE_TEXT  usage

    I am facing problem in displaying the Long text in Open Maintenance orders IW31 Sscreen.
    i am uploading the long text using SAVE_TEXT function module.
    i can see the data in STXL table but i am not able to see the data on the transaction screen display or change mode.
    I am using correct object name ,id and etc..in header table objectid: AUFK, TEXTID: AVOT ,tdname:clintidroutingnumber(afvc table aufpl field sequence(like 0001.. ), language: EN.
    Text line also i am passing and i am enering the direct saving mpde.
    i am getting sy-subrc eq = 0.
    and i am able to get the data by READ_TEXT table.
    my problem is why the Long text data is not diaplying on the scrreen(TEXT editor).
    same thing happening in COmponents LONG TEXT in the same TCODE
    Please Help me.

    Hi Srinivas,
    I've been facing similar problem.I followed the procedure that you've mentioned , but still couldn't display the long text on the transaction IW32.I've attaching the code as well.
    *&  Include           ZXWO1U05
    DATA:text_object_name LIKE stxh-tdname.
    DATA: BEGIN OF ltxt_lines OCCURS 0.
            INCLUDE STRUCTURE tline.
    DATA: END   OF ltxt_lines.
    DATA:p_object LIKE   thead-tdobject VALUE 'AUFK',
         p_name LIKE   thead-tdname,
         p_language LIKE   thead-tdspras VALUE 'E',
         p_type LIKE   thead-tdid VALUE 'KOPF',
         p_header LIKE   thead .
    TYPES: BEGIN OF lt_edit_line,
             line LIKE rssource-line,                           "c(72)
           END OF lt_edit_line.
    DATA lt_edit_table TYPE TABLE OF lt_edit_line.
    DATA:ls_efindpar TYPE efindpar.
    DATA:t_trace TYPE TABLE OF ewffndtrac,
         t_result TYPE TABLE OF efindres.
    TYPES:BEGIN OF ty_eablg,
          ablbelnr TYPE ablbelnr,
          anlage   TYPE anlage,
          ablesgr      TYPE ablesgr,
          ableinh  TYPE ableinh,
          adatsoll TYPE adatsoll,
          END OF ty_eablg.
    DATA:t_eablg  TYPE TABLE OF ty_eablg,
         ls_edit_table TYPE c LENGTH 132.
    FIELD-SYMBOLS:<fs_eablg> TYPE ty_eablg,
                  <fs_trace> TYPE ewffndtrac.
    CONSTANTS:lc_instln TYPE efindres-objtype VALUE 'INSTLN'.
    CONSTANTS:lc_period TYPE ablesgr VALUE '01',
              lc_moveout TYPE ablesgr VALUE '03',
              lc_movein TYPE ablesgr VALUE '06'.
    CALL FUNCTION 'CO_ZK_TEXTKEY_CAUFV'  "Gets me the thead-tdname
      EXPORTING
        aufnr = caufvd_imp-aufnr
      IMPORTING
        ltsch = text_object_name.
    p_name = text_object_name.
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
        language        = p_language
        id              = p_type
        name            = p_name
        object          = p_object
      IMPORTING
        header          = p_header
      TABLES
        lines           = ltxt_lines
      EXCEPTIONS
        id              = 01
        language        = 02
        name            = 03
        not_found       = 04
        object          = 05
        reference_check = 06.
    IF sy-subrc IS INITIAL.
      REFRESH lt_edit_table.
    ENDIF.
    ls_efindpar-l_devloc = caufvd_imp-tplnr.
    *get the installation
    CALL FUNCTION 'ISU_FINDER'
      EXPORTING
        x_objtype                   = lc_instln
        x_findpar                   = ls_efindpar
      TABLES
        yt_result                   = t_result
        yt_trace                    = t_trace
      EXCEPTIONS
        insufficient_selection      = 1
        objtype_not_supported       = 2
        additional_selection_needed = 3
        OTHERS                      = 4.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    *get the 13 meter reads.
    DATA:lv_calc_date TYPE bkpf-bldat,
         lv_tabix     TYPE sy-tabix,
         lv_text(100) TYPE c.
    CONSTANTS:lc_read TYPE bseg-dtws2 VALUE '13'.
    CALL FUNCTION '/SAPHT/DRM_CALC_DATE'
      EXPORTING
        date      = sy-datum
        days      = '00'
        months    = lc_read
        sign      = '-'
        years     = '00'
      IMPORTING
        calc_date = lv_calc_date.
    READ TABLE t_trace ASSIGNING <fs_trace> WITH KEY objtype = lc_instln.
    IF sy-subrc = 0.
      SELECT ablbelnr anlage ablesgr ableinh adatsoll
      FROM eablg
      INTO TABLE t_eablg
      WHERE anlage = <fs_trace>-objkey
      AND adatsoll BETWEEN lv_calc_date AND sy-datum
      AND ( ablesgr = lc_period OR ablesgr = lc_moveout OR ablesgr = lc_movein ).
      IF sy-subrc = 0.
        LOOP AT t_eablg ASSIGNING <fs_eablg>.
          AT FIRST .
            CONCATENATE ls_edit_table 'MR unit         ' INTO ls_edit_table SEPARATED BY space.
            CONCATENATE ls_edit_table 'Installation    ' INTO ls_edit_table SEPARATED BY space.
            CONCATENATE ls_edit_table 'MRU reason      ' INTO ls_edit_table SEPARATED BY space.
            CONCATENATE ls_edit_table 'Scheduled MR Dt ' INTO ls_edit_table SEPARATED BY space.
            APPEND ls_edit_table TO lt_edit_table.
          ENDAT.
          CLEAR: ls_edit_table.
          CLEAR lv_text.
          lv_text = <fs_eablg>-adatsoll.
          CONCATENATE lv_text '                 ' ls_edit_table INTO ls_edit_table SEPARATED BY space.
          CLEAR lv_text.
          lv_text = <fs_eablg>-ablbelnr.
          CONCATENATE lv_text '                 ' ls_edit_table INTO ls_edit_table SEPARATED BY space.
          CLEAR lv_text.
          lv_text = <fs_eablg>-anlage.
          CONCATENATE lv_text '                 ' ls_edit_table INTO ls_edit_table SEPARATED BY space.
          CLEAR lv_text.
          lv_text = <fs_eablg>-ableinh.
          CONCATENATE lv_text '                 ' ls_edit_table INTO ls_edit_table SEPARATED BY space.
          APPEND ls_edit_table TO lt_edit_table.
          CLEAR: ls_edit_table,lv_text.
        ENDLOOP.
      ENDIF.
    ENDIF.
    TYPES:BEGIN OF ty_elev,
          anlage TYPE anlage,
          vstelle TYPE vstelle,
          vbsart TYPE vbsart,
          eigent TYPE e_gpartner,
          END OF ty_elev.
    DATA:t_elev TYPE TABLE OF ty_elev.
    FIELD-SYMBOLS:<fs_elev> TYPE ty_elev.
    IF t_eablg IS NOT INITIAL.
      SELECT elanlage evvstelle evvbsart  eveigent
      FROM eanl AS el
      INNER JOIN evbs AS ev
      ON elvstelle = evvstelle
      INTO TABLE t_elev
      FOR ALL ENTRIES IN t_eablg
      WHERE el~anlage = t_eablg-anlage.
    ENDIF.
    LOOP AT t_elev ASSIGNING <fs_elev>.
      AT FIRST.
        ls_edit_table = 'Premise'.
        CONCATENATE ls_edit_table 'Premise Type' 'Owner Allc' INTO ls_edit_table SEPARATED BY space.
        APPEND ls_edit_table TO lt_edit_table.
        CLEAR ls_edit_table.
      ENDAT.
      ls_edit_table = <fs_elev>-eigent.
      CONCATENATE ls_edit_table <fs_elev>-vbsart <fs_elev>-vstelle INTO ls_edit_table SEPARATED BY space.
      APPEND ls_edit_table TO lt_edit_table.
      CLEAR ls_edit_table.
    ENDLOOP.
    LOOP AT lt_edit_table INTO ltxt_lines-tdline.
      ltxt_lines-tdformat = '*'.
      APPEND ltxt_lines.
    ENDLOOP.
    if p_header is not initial.
    CALL FUNCTION 'SAVE_TEXT'
      EXPORTING
      CLIENT                = SY-MANDT
        header                = p_header
      INSERT                = 'X'
       SAVEMODE_DIRECT       = 'X'
      OWNER_SPECIFIED       = ' '
      LOCAL_CAT             = ' '
    IMPORTING
      FUNCTION              =
      NEWHEADER             =
      tables
        lines                 = ltxt_lines
    EXCEPTIONS
       ID                    = 1
       LANGUAGE              = 2
       NAME                  = 3
       OBJECT                = 4
       OTHERS                = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    else.
    UPDATE AUFk SET ltext = 'X' where aufnr = caufvd_imp-aufnr .
    ENDIF.
    else.
       p_header-tdobject = p_object.
      p_header-tdname   = p_name.
      p_header-tdspras  = p_language.
      p_header-tdid     = p_type.
      p_header-TDFUSER  = sy-uname.
      p_header-TDFRELES = '701'.
      p_header-TDFDATE  = sy-datum.
      p_header-TDFTIME  = sy-uzeit.
    CALL FUNCTION 'SAVE_TEXT'
      EXPORTING
      CLIENT                = SY-MANDT
        header                = p_header
       INSERT                = 'X'
       SAVEMODE_DIRECT       = 'X'
      OWNER_SPECIFIED       = ' '
      LOCAL_CAT             = ' '
    IMPORTING
      FUNCTION              =
      NEWHEADER             =
      tables
        lines                 = ltxt_lines
    EXCEPTIONS
       ID                    = 1
       LANGUAGE              = 2
       NAME                  = 3
       OBJECT                = 4
       OTHERS                = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    else.
    UPDATE AUFk SET ltext = 'X' where aufnr = caufvd_imp-aufnr .
    endif.
    endif.
    CALL FUNCTION 'COMMIT_TEXT'
    EXPORTING
       OBJECT                = p_object
       NAME                  = p_name
       ID                    = p_type
       LANGUAGE              = 'E'
       SAVEMODE_DIRECT       = 'X'
      KEEP                  = ' '
      LOCAL_CAT             = ' '
    IMPORTING
      COMMIT_COUNT          =
    TABLES
      T_OBJECT              =
      T_NAME                =
      T_ID                  =
      T_LANGUAGE            =
    Kindly request you to provide a suitable solution at your earliest convenience.
    Thanks,
    Chakram Govindarajan

  • Problem with save_text

    Hi all,
    when I drop PR to PO in ME21N, the text of PR needs to be displayed in PO header text.
    Im reading the text of  PR, using READ_TEXT.
    and I  have used SAVE_TEXT to populate the header text of PO.
    The problem is the text is not displaying on the header text.
    But, when I double click the header text, it takes me to change editor,after coming back from change editor the text is displaying.
    Pls let  me know what would be the problem.
    Thankyou,
    Priya

    Hi Dzed n Vinod,
    Here is the code which im using after reading the text.
    Pls let me know where it is going wrong.
    ***populate the text for PO
      IF NOT t_potext[] IS INITIAL.
        header_po-tdobject = 'EKKO'.
        header_po-tdid  = 'F02'.
        header_po-tdspras = v_spras.
        CALL FUNCTION 'SAVE_TEXT'
          EXPORTING
           client                = sy-mandt
            header                = header_po
           insert                = 'X'
             savemode_direct       = 'X'
    *   OWNER_SPECIFIED       = ' '
    *   LOCAL_CAT             = ' '
    IMPORTING
    *   FUNCTION              =
       NEWHEADER             = header_new
          TABLES
            lines                 = t_potext[]
         EXCEPTIONS
           id                    = 1
           language              = 2
           name                  = 3
           object                = 4
           OTHERS                = 5
        IF sy-subrc = 0.
        CALL FUNCTION 'COMMIT_TEXT'
         EXPORTING
           OBJECT                = header_po-tdobject
           NAME                  = '*'
           ID                    = header_po-tdid
           LANGUAGE              = header_po-tdspras
           SAVEMODE_DIRECT       = 'X'
    *       KEEP                  = ' '
    *       LOCAL_CAT             = ' '
    *     IMPORTING
    *       COMMIT_COUNT          =
    *     TABLES
    *       T_OBJECT              =
    **       T_NAME                =
    *       T_ID                  =
    *       T_LANGUAGE            =
        ENDIF.
    Thankyou,
    Priya

  • Problem with SAVE_TEXT Usage

    Hi,
    I'm starting a new thread because this is a different issue than my original problem.
    I am using our BW system to save texts.  Calls to the function return with sy-subrc=0.  However, no data is added to STXH and STXL.
    We have never before saved texts to the TDOBJECT that I'm trying to save to now.
    I have used txn SM75 to create the TDOBJECT and IDs.
    Is there something that I need to set up before I can use the object and texts?
    Thank you.

    Fong,
    I am not sure if the transaction SM75 is the right one, I could not find that in my system. Usually you create texts using SO10 transaction.After using SAVE_TEXT if you commit the same, usually the text is saved.
    While retrieving using READ_TEXT you will have to pass the same objects used while saving.
    Regards,
    Ravi

  • Problem with SAVE_TEXT FM

    Hello,
    I am having a problem with using the SAVE_TEXT FM.
    Here is the scenario.
    I am trying to populate the Long Text on a PM work order component line for a reservation.
    Prior to populating this field, no text will exist in this field.
    I create the name key using the following:
    sy-mandt + resb-rsnum + resb-rspos + resb-rsart
    The object id AUFK and the ID is MATK.
    INSERT =  X
    SAVEMODE_DIRECT =  X
    OWNER_SPECIFIED = space            
    LOCAL_CAT  = space          
    When I call the FM I get a return code of 0 and when I do a READ_TEXT FM using this key I can see that the text exists in table STXH.
    However, when I go to view the long text for the reservation component in IW32 there is no text there.
    If I now manually add text to the long text and save, if I now run the SAVE_TEXT FM with the same key, the FM overwrites the value of the text which was manually entered with the value from the FM.
    So, does anyone know why the FM writes an entry to STXH which isn't visible in IW32 prior to manually adding text, but is visible after manually adding text?
    Has anyone experienced this problem before?
    I would appreciate any help anyone could give me.
    thanks,
    Kevin

    Sorry table was RESB, but answer is correct anyway,
    field is RESB-LTXSP.
    Look at <a href="https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/corr_instr/correction_detail.htm?_CINSTA=0120061532&_CALEID=0000356881&_CPAKID=1&_PGMID=LIMU&_OBJ=REPS&_OBJNAM=ZDELRESBLTXSP&tab=2">Example of program updating flag long text</a> or note <a href="https://service.sap.com/sap/support/notes/706261">Note 488862 - No long text for component although long text flag existing</a>
    Regards

  • After using SAVE_TEXT in VA01 getting problem

    Hi Friends ,
    As per below link i have used SAVE_TEXT with vbeln "XXXXXXXXXX"
    'SAVE_TEXT' or 'CREATE_TEXT' unable to use
    But text is copied default to other orders also in VA01 ..
    I tried using CALL FUNCTION 'FREE_TEXT_MEMORY' but it did not worked .
    Please help .
    Regards ,
    Kumar.

    hi...
    where u getting the user input text and which field......
    where u done the coding for this.....can u tell me user exit name....
    if u use the user exit no need to use save_text . just modify that field which u get input text...
    just send ur coding...

  • Problem in  SAVE_TEXT

    Hi All,
         I use SAVE_TEXT to save long text to projct,But
         I am uploading the long text using SAVE_TEXT function module
         I can see the data in STXL table and i can use READ_TEXT to get the long text
         but the Long text data is not diaplying on the scrreen.
         Who know ,Please Help me
      header-tdname = ‘D00000154'.
      header-tdobject = 'PMS'.
      header-tdid       = 'LTXT'.
      header-tdspras  = '1'.
      CALL FUNCTION 'SAVE_TEXT'
        EXPORTING
          client                    = sy-mandt
          header                 = header
          savemode_direct = 'X'
        TABLE
          lines                     = gt_tline[]
        EXCEPTIONS
          id                          = 1
          language              = 2
          name                    = 3
          object                   = 4
          OTHERS             = 5.
    Best Regards
    wangyuan

    1 execute SAVE_TEXT
    2 execute READ_TEXT
    3 See cj02 the project long text ,Long text data is not diaplying on the scrreen
    Who know the reason or tell me how i can do

  • Problem in populating PO item text using FM:SAVE_TEXT

    Hi All,
    I am having an issue with SAVE_TEXT FM,
    I need to populate the item text field:
    This FM works fine if the Item text field is blank and i am populating it with text, say "This is a test case",
    How ever if the text field is already populated say the item text field has "Testing", my requirement is i will append the new text to the previously existing, in this case it should come as "Testing This is a test case",
    For doing this i am reading the existing text using READ_TEXT FM and concatenating both the texts separated by space, and passing this to i_lines, how ever the O/P which i get in the text field is "Testing".
    Please advice.
    The cod is shown below:
    CALL FUNCTION 'SAVE_TEXT'
        EXPORTING
        CLIENT                = SY-MANDT
         header                = t_head
         insert                = 'X'
         savemode_direct       = 'X'
        OWNER_SPECIFIED       = ' '
        LOCAL_CAT             = ' '
      IMPORTING
        FUNCTION              =
        NEWHEADER             =
        TABLES
          lines                 = i_lines
       EXCEPTIONS
         id                    = 1
         language              = 2
         name                  = 3
         object                = 4
         OTHERS                = 5.

    hi,
    once u use the save_text also
    with save_text u are updating the STXH table .
    there is one field in stxh table which is once updated shows the text in the sceen.
    or u can run a bdc put the default text where u want to put and afterwards when u use create_text and commit_text,u ll be able to see the text in the screen.
    regards
    kanishak

  • SAVE_TEXT for long error Message not working.

    Hi Experts,
    I am Using SAVE_TEXT FM to Dynamically Change Long Text for  a message.
    1. i am able to run succesfully SAVE_TEXT with SY-SUBRC = 0.
    2. I can see the entry in STXH.
    3. I have also performed COMMIT_TEXT with all the parameters and COMMIT_WORK.
    4. I am able to See the changed Text using READ_TEXT FM.
    but if i go to SE91 to the message no. and see long text i am not able to see the changed text.
    also when change the long text of it in a program and call the error message we should be able to see the changed long text on click of error message in status bar but it shows the same message as in SE91.
    Earlier for this Text Object & Text ID in SE75 Save mode was SPACE so i changed the same to Update still its not working.
    Following are the details  of my code-
    REPORT  YTEST_MES message-id ZFQM.
    parameters : p_text type c.
    at selection-screen.
    if p_text <> 'C'.
    data: HEADER  LIKE  THEAD.
    data: t_lines type standard table of TLINE.
    data: ls_lines like line of t_lines.
    ls_lines-TDFORMAT = ' '.
    ls_lines-TDline   = 'TEST1 TEST2 TEST3'.
    append ls_lines to t_lines.
    Header-TDOBJECT   = 'DOKU'.
    Header-TDNAME     = 'ZFQM093'.
    Header-TDID       = 'NA'.
    Header-TDSPRAS    = 'EN'.
    Header-TDFORM     = 'S_DOCU_SHOW'.
    Header-TDSTYLE    = 'S_DOCUS1'.
    Header-TDLINESIZE = '72'.
      CALL FUNCTION 'SAVE_TEXT'
        EXPORTING
         CLIENT                = SY-MANDT
          header                = header
         INSERT                = 'X'
      tables
          lines                 = t_lines
       EXCEPTIONS
         ID                    = 1
         LANGUAGE              = 2
         NAME                  = 3
         OBJECT                = 4
         OTHERS                = 5
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    CALL FUNCTION 'COMMIT_TEXT'
    EXPORTING
       OBJECT                = 'DOKU'
       NAME                  = 'ZFQM093'
       ID                    = 'NA'
       LANGUAGE              = SY-LANGU
    COMMIT WORK AND WAIT.
    message e093 with 'C'    'XXXX'.
    endif.
    I have tried calling SAVE_TEXT will possible combination's of  INSERT  = 'X' or space  or
    SAVEMODE_DIRECT       = 'X' or Both Space or 'X'.
    I know i am missing a small thing...but was unable to figure out the same.
    Please Help.
    Regards,
    Akash

    Hi  Keshav.T ,
    Thanks for your answer, but all the above FM u provided-
    read_text
    init_text
    edit_text
    Cannot be used as-
    Read_TEXT - I want to change Text not read it.
    INIT_TEXT- this cannot be used to change texts.
    EDIT_TEXT- this function module Opens the Long text screen
                       and we have to manually save it, but i want to save the text automaticaly
                       all this is done using SAVE_TEXT.
    Only problem is I am missing something after the call of SAVE_TEXT because text is changed
    as i can see that using read_text FM but if i go to SE91 and see long text for the corresponding message no. i cannot see the
    changed text done bu SAVE_TEXT.
    Please help.
    Akash

  • Use of SAVE_TEXT in customer exits / BADI for purchase order

    Hi All,
    I am trying to save some long text by using SAVE_TEXT function module in a badi implementation for purchase order header text. The same is working fine if i try to update the PO header text via a report. But if i try using badi (the code is written in a PAI event for the BADI), then though the text transfer and save is successful during the code excution, but for the first time when i add any text its not visible in ME22N tcode. Since its an online event. But when i double click on that editor and the sap script editor gets opened. then i press back button, the text is appearing on the same small screen edtor . after this any number of time i edit or delete text, the save_text function module works fine.
    My issue is why for the first time always i have to double click on the editor to open the sap script editor. I have also included commit_text in this case after save_text FM.
    the requirement here goes like this. in one tab for PO header the user will enter some number (This is a customizing screen implemented through badi.) and the corresponsing discription should appear when user clicks on text tab in po header screen (me21n / me22n).
    Kindly help.
    Thanks
    Mamata

    Hi  mamata rath
    I have solve the problem which similar to yours.  the code which is as the following
    DATA: textline TYPE tdline,
            name TYPE c LENGTH 70,
            glines TYPE TABLE OF tline,
            gline  LIKE LINE OF glines,
            ls_header TYPE thead.
         CONCATENATE ch_eban-banfn ch_eban-bnfpo INTO name.
             ls_header-tdobject = 'EBAN'.
             ls_header-tdname = name.
             ls_header-tdid = 'B01'.
             ls_header-tdspras = sy-langu.
             CALL FUNCTION 'SAVE_TEXT'
               EXPORTING
    *           CLIENT                = SY-MANDT
                 header                = ls_header
    *           INSERT                = ' '
    *           SAVEMODE_DIRECT       = ' '
    *           OWNER_SPECIFIED       = ' '
    *           LOCAL_CAT             = ' '
    *         IMPORTING
    *           FUNCTION              =
    *           NEWHEADER             =
               tables
                 lines                 = glines
               EXCEPTIONS
                 ID                    = 1
                 LANGUAGE              = 2
                 NAME                  = 3
                 OBJECT                = 4
                 OTHERS                = 5
              IF sy-subrc = 0.
                  CALL FUNCTION 'COMMIT_TEXT'
                    EXPORTING
                      OBJECT                = 'EBAN'
                      NAME                  = name
    *                ID                    = '*'
    *                LANGUAGE              = '*'
    *                SAVEMODE_DIRECT       = ' '
    *                KEEP                  = ' '
    *                LOCAL_CAT             = ' '
    *              IMPORTING
    *                COMMIT_COUNT          =
    *              TABLES
    *                T_OBJECT              =
    *                T_NAME                =
    *                T_ID                  =
    *                T_LANGUAGE            =
              ENDIF.

  • Problem with long text

    Hi folks,
    iam uploading longtext in transaction KP06 in bdc programing using create_text.
    now my problem is if i pass selection criteria
    case 1:
    Vertion : N0
    fiscal year : 2007
    planner profile: CCPLAN4
    then the budeget plan data uploading successfully along with long text.
    case2: Vertion : N1
    in this case also everthing wrking fine
    case3: Vertion : 001
    in this case budgetplan data uploading sucessfully but longtext is not uploading,
    i debbug the proragm , create_text also returning sy-subrc = 0. but if i check in KP06  the long text is not there.
    data declaration
    vertion : VERSN type C(3)
    can u tell me the problem is in logic or with FM ?
    note : i checked with save_text also.
    regards
    neeru

    HI Naimesh,
    the FM Create_text internally contains both FMs save_text and commit_text,
    even i debug the FM in case of vertion N1, N0 and 001,
    all the cases sy-subrc = 0.
    code:
    CLEAR G_OBJNR.
    LOOP AT RECORD.
    COST = RECORD-BDC01.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          input  = COST
        IMPORTING
          output = COST.
        CONCATENATE 'KS' p_kokrs record-bdc00 INTO g_objnr.
            SELECT SINGLE * FROM COSP WHERE OBJNR = g_objnr
                              AND GJAHR = P_GJAHR
                              AND VERSN = p_ver
                              AND KSTAR = COST.
      IF SY-SUBRC = 0.
          LEDNR = COSP-LEDNR.
          OBJNR = COSP-OBJNR.
          GJAHR = COSP-GJAHR.
          WRTTP = COSP-WRTTP.
          VERSN = COSP-VERSN.
          KSTAR = COSP-KSTAR.
          HRKFT = COSP-HRKFT.
          VRGNG = COSP-VRGNG.
          VBUND = COSP-VBUND.
          PARGB = COSP-PARGB.
          BEKNZ = COSP-BEKNZ.
          TWAER = COSP-TWAER.
    CONCATENATE LEDNR OBJNR INTO OBJNR.
    CONCATENATE OBJNR GJAHR INTO TNAME1 separated BY SPACE10.
    CONCATENATE TNAME1 WRTTP VERSN INTO TNAME2.
    CONCATENATE TNAME2 KSTAR INTO TNAME3 separated BY SPACE.
    CONCATENATE TNAME3 VRGNG INTO TNAME4 separated BY SPACE4.
    CONCATENATE TNAME4 BEKNZ INTO TNAME5 separated BY SPACE10.
    CONCATENATE TNAME5 TWAER INTO TNAME.
    I_THEAD-TDOBJECT = 'CCSS'.
    I_THEAD-TDID = 'COSP'.
    I_THEAD-TDNAME = TNAME.
    I_THEAD-TDSPRAS = 'E'.
    APPEND I_THEAD.
    i_tline-tdformat = '*'.
    I_TLINE-TDLINE = RECORD-LONGTEXT.
    APPEND I_TLINE.
    loop at i_thead.
    CALL FUNCTION 'CREATE_TEXT'
      EXPORTING
        FID               = I_THEAD-TDID
        FLANGUAGE         = I_THEAD-TDSPRAS
        FNAME             = I_THEAD-TDNAME
        FOBJECT           = I_THEAD-TDOBJECT
      SAVE_DIRECT       = 'X'
      FFORMAT           = '*'
      TABLES
        FLINES            = i_tline
    EXCEPTIONS
      NO_INIT           = 1
      NO_SAVE           = 2
      OTHERS            = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDLOOP.
    CLEAR I_TLINE.
    REFRESH I_TLINE.
    CLEAR I_THEAD.
    REFRESH I_THEAD.
      SELECT SINGLE * from cokp into itab WHERE OBJNR = g_objnr
                              AND GJAHR = P_GJAHR
                              AND VERSN = p_ver
                              AND KSTAR = COST.
    if sy-subrc = 0.
       itab-TXFLG = 'X'.
       append itab.
       write:/ 'Text saved for', record-bdc00 , record-bdc01.
       else.
          write:/ 'Text saved for', record-bdc00 , record-bdc01.
          ENDIF.
    ENDIF.
    my program wrking fine but the long text is not visible for vertion 001.
    regards
    niru

Maybe you are looking for

  • List of materials inventory - using ALV

    REPORT Z_LIST_MATERIALS. TYPE-POOLS: SLIS. TABLES:MARC, MARD, VBAP, LIPS, EKPO, VBFA, EKBE, MARM, VBBE, MARA, MBEW. SELECTION-SCREEN BEGIN OF BLOCK SEL WITH FRAME TITLE TEXT-001. SELECT-OPTIONS: S_WERKS FOR MARC-WERKS, " Plant                 S_MATNR

  • HP Laser Jet Pro 200 MFP M276n. Printing problem

    I just buyed it and its used by everyone on network. Installed it on every laptop in office ( Approx 7-8 Laptop). when i install it, its working fine but after few days.. specially in few system.  it becomes really slow. like if they send printer of

  • Print Preview in RFx does not show new Adobe Interactive Form

    Hello Experts, I am trying to assign a standard Adobe Interactive form as the output form for SRM RFQ.  I have carried out the following steps in customising under "Define Actions for Document Output". - Selected bid invitation Action Profile = BBP_P

  • Authentication Thru an external LDAP

    Hi I'm using Oracle database 10g r2. We have Tivoli Access Manager and Tivoli Identity Manager. I don't want migrate to OID. I'd like to provide authentication to Oracle, Thru our existing LDAP. Is this possible ? if yes, is there a documentation som

  • Why Isn't the for loop executing?

    here's the code,the for loop isn't executing,can anyone trouble shoot? import acm.program.ConsoleProgram; public class AddIntegerList extends ConsoleProgram { public void run(){      for(int c=0;c<5;c++);{      println("This is a programe to divide 2