Using Save_Text in eCATT

Hi All,
I want to use Function Module SAVE_TEXT in eCATT.
Hence I had used command FUN.
This FM SAVE_TEXT has an interface TABLES with type "LINES".
In this I pass my values to be saved. I have defined an Import Parameter of TYPE TLINE[] against LINES in FM interface in eCATT.
Problem I'm facing is through test data container I want to pass values in form of table(with multiple rows) of type "TLINE".
How can I do this?

Hello Stephen,
you can define parameter in testdata container similar to test script. If you require a table with line structure defined in ddic, you can use []-syntax. In your case the test data parameter would be typed TLINE[].
Furthermore still in test data container you can maintain a couple of variants and values for your TLINE[]-parameter.
After that create a test configuration, where you link test script with test data container. Fill the fields "Testscript" and the box "Test data" and use that assistant for variant creation, you can find on variants tab as first button directly on top of the list of variants. That assistant will help you to create a link between particular variants of test data to the variants of test configuration.
Hope this help on your way.
Best regards
Jens

Similar Messages

  • 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...

  • Using SAVE_TEXT in VF01 for item texts

    Hi guys,
    A colleague wants to save an item text in the billing process (VF01 transaction). As you should know, there is no billing document number yet when we are creating the invoice using that transaction. He is programming at RV60AFZZ include, FORM userexit_save_document_prepare. This is his try:
    LOOP AT xvbrp.
             CONCATENATE xvbrp-vbeln xvbrp-posnr INTO lw_thead-tdname.
    *        CONCATENATE c_objectname xvbrp-posnr INTO lw_thead-tdname.
             lw_thead-tdid = 'ZZZZ'.
             lw_thead-tdobject = 'VBBP'.
             lw_thead-tdspras = 'E'.
             lw_thead-tdfuser = sy-uname.
             lw_thead-tdfdate = sy-datum.
             lw_thead-tdftime = sy-uzeit.
             CALL FUNCTION 'SAVE_TEXT'
               EXPORTING
                 client          = sy-mandt
                 header          = lw_thead
                 savemode_direct = 'X'
               TABLES
                 lines           = t_tline
               EXCEPTIONS
                 id              = 1
                 language        = 2
                 name            = 3
                 object          = 4
                 OTHERS          = 5.
             IF sy-subrc = 0.
               CALL FUNCTION 'COMMIT_TEXT'
               EXPORTING
                 OBJECT   = lw_thead-tdobject
                 NAME     = lw_thead-tdname
                 ID       = lw_thead-tdid
                 LANGUAGE = lw_thead-tdspras
               EXCEPTIONS
                 OTHERS   = 1.
               IF SY-SUBRC NE 0.
               ENDIF.
               CLEAR: lw_thead-tdname.
             ENDIF.
           ENDLOOP.
    But he is not saving the text, we dont know why. Constant c_objectname has been defined so:
    c_objectname TYPE vbeln_vf VALUE 'XXXXXXXXXX'.
    But without success... We saw XXXXXXXXXX000010 as tdname in debugger...  Do you know if the issue is the TDNAME field? What should be a correct value for LW_THEAD-TDNAME? We know the item position but not the billing document number yet, where can we get correct tdname?... or did he fail in some other point?
    Thank you!

    Hi guys,
    one of my workmates got the answer. I share that: there is a user exit call '001' in the include LV60AB07 (FORM XVBRK_KIDNO_FILL). The FM for that user exit is EXIT_SAPLV60A_001 (Billing User Exit. Processing KIDNO (Payment Reference Number)). My friend put code logic inside the include of that FM (ZXVVFU09). We used that because there the structure XVBRK already has value for the field VBELN (the number of the billing document) and we can use SAVE_TEXT and COMMIT_TEXT there without problem, concatenating billing number and item in the header. I am not sure if the billing document already was created at this point, but worked fine for us. Thanks anyway! 

  • Error when using the REF eCATT command ....

    Hi,
    When the REF command is used in an eCATT test script to execute another eCATT, only the first REF command executes successfully - all subsequent REF commands fail with these error msgs 'Error in eCATT function SAPGUI', 'Error in Control', 'Message raised at CL_APL_ECATT_LINE_INTERPRETER =CM00K  LINE   347'.
    Executed separately, the referenced eCATT test scripts are successful.   Executed from one eCATT test script via the REF command, only the first REF command is successful.  We are on SAP 6.7 6.40, GUI is 6.40 as well.
    Any suggestions would be appreciated - Thanks !

    Thanks for the reply, Jonathan.   Still having the same problem after implementing your suggestion.   Any other suggestions you have would be appreciated.  
    The ResetGUI = 'X' was done for each command interface in the REFerenced test scripts.   The ResetGUI statement was only found immediately after the 'Command Interface' statement (wasn't found after the 'Processed Screen' statement).
    The error still happens for the second and all subsequent test scripts referenced by the 'REF' command.   In the failed REF test scripts, the ConnectionID, SessionID, and SystemInfo statements are the failed statments (red lights beside them).   These three statements are immediately after the ResetGUI = 'X' statment (which has a green light).
    Different execution options have been tried, including closing, and not closing, generated GUI sessions.
    Really at a loss here to figure out how to get the REF statement to work !

  • How to Use Save_Text

    HI Friends,
              i have downloaded material code, material type and po text in one text file by using read_text function.
            now i want to upload it into new system how can i do that?
    i am using save_text function to  save it into new SAP system[ECC6.0].
    but i am not getting that which parameters i can pass to function.
    my code is given below please given me modified code for my code or sample code for saving text.
    this is me code . but it is showing error message that text object is not available
    *& Report  ZUPLOADPO
    REPORT  ZUPLOADPO.
    tables : tline , mara.
    data : begin of itpo occurs 0,
            matnr like mara-matnr,
            mtart like mara-mtart,
            tdline like tline-tdline,
            end of itpo.
    DATA : LINES LIKE TLINE OCCURS 0 WITH HEADER LINE.
    DATA : ITAB_HEAD LIKE THEAD OCCURS 0 WITH HEADER LINE.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = 'c:\purtxt.txt'
      TABLES
        DATA_TAB                      = itpo
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    loop at itpo.
    itab_head-tdobject = 'MATERIAL'.
    itab_head-tdname = itpo-matnr.
    itab_head-tdid = 'BEST'.
    itab_head-tdspras = 'EN'.
    lines-tdline  = itpo-tdline.
    append itab_head.
    append lines.
    delete itab_head where tdname = ''.
    clear itab_head.
    clear lines.
    endloop.
    CALL FUNCTION 'SAVE_TEXT'
      EXPORTING
       CLIENT                = SY-MANDT
        HEADER                = itab_head
      INSERT                = ' '
      SAVEMODE_DIRECT       = ' '
      OWNER_SPECIFIED       = ' '
      LOCAL_CAT             = ' '
    IMPORTING
      FUNCTION              =
      NEWHEADER             =
      TABLES
        LINES                 = 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.
    Message was edited by:
            vinod parhad

    Hi,
    Refer Following codes, which are exclusivly used for data upload:
    *& Form upload_file
    form upload_file using p_p_file
    p_p_file1.
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
    * CODEPAGE = ' '
    FILENAME = P_P_FILE
    FILETYPE = 'DAT'
    * HEADLEN = ' '
    * LINE_EXIT = ' '
    * TRUNCLEN = ' '
    * USER_FORM = ' '
    * USER_PROG = ' '
    * DAT_D_FORMAT = ' '
    * IMPORTING
    * FILELENGTH =
    TABLES
    data_tab = IT_VENDOR
    * EXCEPTIONS
    * CONVERSION_ERROR = 1
    * FILE_OPEN_ERROR = 2
    * FILE_READ_ERROR = 3
    * INVALID_TYPE = 4
    * NO_BATCH = 5
    * UNKNOWN_ERROR = 6
    * INVALID_TABLE_WIDTH = 7
    * GUI_REFUSE_FILETRANSFER = 8
    * CUSTOMER_ERROR = 9
    * NO_AUTHORITY = 10
    * OTHERS = 11.
    IF sy-subrc <> 0.
    MESSAGE I000(ZZ) WITH 'UNABLE TO UPLOAD'.
    STOP.
    ENDIF.
    Jogdand M B

  • Use of CATT/ECATT by UK SAP sites

    My organisation National Air Traffic Services are investigating the use of CATT/ECATT for testing during the implementation of ERP, future SAP modules, upgrades and hot packs. This may be with or without SAP Tutor or other software such as Test Director. We would like to establish contact with another SAP UK site that has done this successfully and is using these tools on an ongoing basis.

    Hi Extended Computer Aided Test Tool is for Basically "Process Testing". we can test web based applications, we can test transactions in SAP with Controls ( which was not possible with "CATT"), we can test programs and Function modules. here we can test a processing scenario which needs different sap servers are involeved.We can use this tool for Load Testing also.
    For Upgrade and Hot pach testings SAP has Provided Other Tools. 
    Thanks,
    jaffer

  • Using save_text to change long text of sales

    Hi All,
    I am trying edit the long text on sales order header using FM save_text , But it does not work ,
    the fm is returning subrc  value 0 but the long text does nnot change i have also used commit_text .
    data td1 type thead .
    data : tdlin1 type table of tline.
    data : wa_tdlin1 like line of tdlin1.
    td1-TDOBJECT = 'VBBK'.
    td1-TDname = '188238'.
    td1-tdid = '0002'.
    td1-tdspras = 'EN'.
    td1-tdtxtlines = '1'.
    wa_tdlin1-TDformat = 'U1'.
    wa_tdlin1-tdline = 'this chnaged by vinay to test'.
    append wa_tdlin1 to tdlin1.
    CALL FUNCTION 'SAVE_TEXT'
    EXPORTING
       CLIENT                = SY-MANDT
        header                = td1
      INSERT                = ' '
       SAVEMODE_DIRECT       = 'X'
      OWNER_SPECIFIED       = ' '
      LOCAL_CAT             = ' '
    IMPORTING
      FUNCTION              =
      NEWHEADER             =
      tables
        lines                 = tdlin1
    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 = 'VBBK'
    id = 'ZINT'
    language = sy-langu.

    Hi Guys ,
    I figured out the problem and its working now .
    Cheers
    vinay

  • Upload Task List Operation long Text using SAVE_TEXT-Urgent

    Hi ,
    I am trying to create Task List Operation Long text using the function module ..
    SAVE_TEXT .I am passing the following keys
    Text Name       300ATEST057 0000000900000009
    Language        EN
    Text ID            PLPO Long Text
    Text Object     ROUTING    Texts for task list types
    But the long texts are not getting updated in the Task lists operations .
    Can anyone please suggest whether SAVE_TEXT will work for Operation long Texts or not Are we missing something
    .This is pretty urgent requirement .Award points are assured.
    Regards
    Sam

    hi,
    use function module create text
    check the sample code
    DATA: BEGIN OF itab OCCURS 0,
          asnum LIKE asmd-asnum, " Service No
          text(5000)  TYPE c, " Long Text
          END OF itab.
    *DATA: itab1 LIKE itab OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF itab1 OCCURS 0,
          asnum LIKE asmd-asnum, " Service No
          sequ  type i,          " Text Sequence
          text(5000)  TYPE c, " Long Text
          END OF itab1.
    To create Long Text lines for CREATE_TEXT function module
    DATA:BEGIN OF dt_lines OCCURS 0.
            INCLUDE STRUCTURE tline. " Long Text
    DATA:END OF dt_lines.
    Variable declarations for CREATE_TEXT function module
    DATA : dl_name TYPE thead-tdname, " Object Name
           dl_lan TYPE thead-tdspras. " Language
    Constants
    Object ID for Long Text of Service Master
    CONSTANTS:c_best TYPE thead-tdid VALUE 'LTXT',
              c_material TYPE thead-tdobject VALUE 'ASMD'. " Object
    for file splitting.
    DATA: start TYPE i,
          len   TYPE i VALUE 92,
          totlen TYPE i,
          n TYPE i.
    PARAMETERS p_file LIKE rlgrap-filename."input file
    At selection-screen on Value Request for file Name
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    Get the F4 Values for the File
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          program_name  = syst-cprog
          dynpro_number = syst-dynnr
        IMPORTING
          file_name     = p_file.
    Start Of Selection
    START-OF-SELECTION.
    *To Upload Flat file
      CALL FUNCTION 'UPLOAD'
        EXPORTING
          filename                = p_file
          filetype                = 'DAT'
        TABLES
          data_tab                = itab
        EXCEPTIONS
          conversion_error        = 1
          invalid_table_width     = 2
          invalid_type            = 3
          no_batch                = 4
          unknown_error           = 5
          gui_refuse_filetransfer = 6
          OTHERS                  = 7.
      LOOP AT itab.
        itab1-asnum = itab-asnum.
        CLEAR: totlen,n, start.
        totlen = STRLEN( itab-text ).
        n = totlen / len.
        n = n + 1.
        DO n TIMES.
          itab1-text  = itab-text+start(len).
          itab1-sequ  = sy-index.
          start = start + len.
          APPEND itab1.
        ENDDO.
      ENDLOOP.
      delete itab1 where text is initial.
      SORT itab1 BY asnum sequ.
      LOOP AT itab1.
        dt_lines-tdformat = '*'.
        dt_lines-tdline = itab1-text.
        APPEND dt_lines.
    Call the Function Module to Create Text
        AT END OF asnum.
          dl_lan = sy-langu.
          WRITE : / itab-asnum.
          CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
            EXPORTING
              input  = itab1-asnum
            IMPORTING
              output = itab1-asnum.
          MOVE itab1-asnum TO dl_name.
          CALL FUNCTION 'CREATE_TEXT'
            EXPORTING
              fid         = c_best
              flanguage   = dl_lan
              fname       = dl_name
              fobject     = c_material
              save_direct = 'X'
              fformat     = '*'
            TABLES
              flines      = dt_lines
            EXCEPTIONS
              no_init     = 1
              no_save     = 2
              OTHERS      = 3.
          IF sy-subrc <> 0.
            WRITE:/ 'Long Text Creation failed for Service No'(001),
            itab1-asnum.
          ELSE.
            WRITE:/ 'Long Text Created Successfully for Service No'(002),
            itab1-asnum.
          ENDIF.
          REFRESH dt_lines.
        ENDAT.
      ENDLOOP.
    in text file give first field records in capitals
    regards
    siva

  • Unable to create text using SAVE_TEXT FM

    Dear Experts,
    I' m trying to automaticly create a text in Create measurement Document (IK11 in PM) when notification is created . For this in program IMRC0004 on exit i put FM SAVE_TEXT but its not working as it should.
    BAPI_ALM_NOTIF_CREATE & BAPI_ALM_NOTIF_SAVE is used to create notification & in order to create text SAVE_TEXT  is used.
    But when the document is saved the specific text is not created. In debug the FM returns with no error.
    Can anyone help me?

    Hi,
    try to check the FM READ_TEXT by passing the same parameters used in SAVE_TEXT and check.whether read text is working.
    if read text is workingthen save text is working.
    and also see the parameter    SAVEMODE_DIRECT import parameter in save_text if it is X it will save every tiome if it is space it will save at LUW(when Logical unit of work executes)
    Prabhudas

  • Saving the Text using save_text FM

    Hi Abap gurus,
           i have to save the text in FB03 transaction.  i found the option called in the menu bar EXTRAS - > TEXTS. i have written the code as :
    *UPDATING THE DOCUMENT NUMBER
        l_header-tdobject = c_object.
        CONCATENATE s_bukrs w_output-belnr s_gjahr INTO l_name SEPARATED BY space.
        l_header-tdname   = l_name.
        l_header-tdid     = c_id.
        l_header-tdspras  = sy-langu.
        CONCATENATE 'GR NUMBER'
                    'GR ITEM NO'
                    'GR QTY'
                    'GR ASSIGN QTY'
                    'RUN DATE'
                    'LTL DATE'
                    INTO l_notes
                    SEPARATED BY space.
        ULINE.
        CONCATENATE w_output-mblnr
                    w_output-buzei
    *               w_output-gr_qty
    *               w_output-gr_assign_qty
                    sy-datum
                    t_ltldate
                    INTO l_notes
                    SEPARATED BY space.
        t_line_save-tdformat = '*'.
        t_line_save-tdline   = l_notes.
        APPEND t_line_save.
    *    CLEAR  t_line_save.
        CALL FUNCTION 'SAVE_TEXT'
          EXPORTING
           client                 = sy-mandt
            header                = l_header
    *   INSERT                = ' '
           savemode_direct        = 'X'
    *   OWNER_SPECIFIED       = ' '
    *   LOCAL_CAT             = ' '
    * IMPORTING
    *   FUNCTION              =
    *   NEWHEADER             =
          TABLES
            lines                 = t_line_save
         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.
      ENDLOOP.
    my requirement is that
    i have to save header as  GR NUMBER',   'GR ITEM NO' ,     'GR QTY',     'GR ASSIGN QTY' ,   'RUN DATE',        LTL DATE'
                                               10                     20                       30                      15                         02..3.2012          03..03.2012
                                               20                     40                       50                      13                         02..3.2012          03..03.2012 
    how to print the header ?   i am not able to geting using the concatenate statement.

    should be done like the below, shouldn't it?
    data: lv_Gr_qty type char15,
             lv_gr_assign_qty type char15,
             lv_today type char10,
            lv_ltldate type char10.
    CONCATENATE 'GR NUMBER'
                    'GR ITEM NO'
                    'GR QTY'
                    'GR ASSIGN QTY'
                    'RUN DATE'
                    'LTL DATE'
                    INTO t_line_save-tdline
                           SEPARATED by space.
        t_line_save-tdformat = '*'.
        APPEND t_line_save.
       loop at some table into w_output.
          lv_gr_qty = w_output-gr_qty." (put it into char 15 or so).
          lv_gr_assign_qty = w_output-gr_assign_qty. "conver to char field
         write: sy-datum to lv_today mm/dd/yyyy,  "put into correct format.
                    w_output-ltldate  to lv_ltldate mm/dd/yyyy.
        CONCATENATE w_output-mblnr
                                   w_output-buzei
                                   lv_gr_qty            
                                   lv_gr_assign_qty      
                                  lv_today               
                                  lv_ltldate  
                    INTO t_line_save-tdline
                       SEPARATED BY space.
        t_line_save-tdformat = '*'.
         APPEND t_line_save.
        CLEAR  t_line_save.
       endloop.
    then call your save_text.

  • Dispaly standard text in SAP SCRIPT which content saved using SAVE_TEXT FM

    I want to display one standard text content in SAP SCRIPT and want to store content of it during run time.
    For that, first I have created one standard text using SO10.Named the standard text as Z_TEST_WRITE. Initially it was empty.
    In my SAP SCRIPT, I try to display the content of the standard text using below given SAP SCRIPT code and report program. Although I am able to store text in Standard text
    Z_TEST_WRITE but in first display of the SCRIPT it is not displaying against the include command of SAP SCRIPT. But when I see the content of Z_TEST_WRITE through SO10 transaction, I can see the content with new text which was previously empty.
    Now if I do the same transaction newly (suppose second time), then text stored in standard text Z_TEST_WRITE is displaid against includes command of SAP SCRIPT.
    My print program is a SAP STANDARD which one can be changed.
    /:   DEFINE &NAME& = ''                                      
    /:   PERFORM TEST IN PROGRAM Z_SAVE_TEXT
    /:   CHANGING &NAME&                                         
    /:   ENDPERFORM                                              
      <B>&NAME&</>                                            
    /:   INCLUDE Z_TEST_WRITE OBJECT TEXT ID ST
    REPORT  Z_SAVE_TEXT.
    FORM TEST TABLES IN_PAR STRUCTURE ITCSY
    OUT_PAR STRUCTURE ITCSY.
      DATA IT_HEADER LIKE TLINE OCCURS 0 WITH HEADER LINE.
      DATA: LS_HEADER LIKE THEAD,
            LT_LINES  TYPE STANDARD TABLE OF TLINE WITH HEADER LINE.
      OUT_PAR-NAME  = 'NAME'.
      OUT_PAR-VALUE =  'Sample text for Test'.
      APPEND OUT_PAR.
    *-Populate Header Text details
      LS_HEADER-TDOBJECT  = 'TEXT'.
      LS_HEADER-TDNAME    = 'Z_TEST_WRITE'.
      LS_HEADER-TDID      = 'ST'.
      LS_HEADER-TDSPRAS   = SY-LANGU.
    *-Populate details of Text
      CONCATENATE 'Shipment No   :' 'RM Ship No' INTO LT_LINES-TDLINE
      SEPARATED BY SPACE.
      LT_LINES-TDFORMAT = '*'.
      APPEND LT_LINES.
      CONCATENATE 'Bill of Lading:' '1234567' INTO LT_LINES-TDLINE
      SEPARATED BY SPACE.
      APPEND LT_LINES.
    *-Save Text
      CALL FUNCTION 'SAVE_TEXT'
        EXPORTING
          CLIENT          = SY-MANDT
          HEADER          = LS_HEADER
          SAVEMODE_DIRECT = 'V'
        TABLES
          LINES           = LT_LINES
        EXCEPTIONS
          OTHERS          = 1.
      IF SY-SUBRC NE 0.
        EXIT.
      ENDIF.
    COMMIT WORK and WAIT.
    ENDFORM.                    "TEST

    Hi,
      If the text is getting displayed the second time, then this should be due to delay in saving the text.
    After your COMMIT WORK AND WAIT in your report program, just put a WAIT FOR 2 SECS and check again.
    Regards,
    Suganya

  • Using Save_text for Billing Document

    Hello,
    I've created BDC program to create Billing Documents in SD. I will be required to use the function module "save_text" to upload the long text. However the long text does not get updated. I've tried calling the save_text and this time the long text gets uploaded. Does anyone know why this is happening?
    Thanks
    Gladys

    This is my code. I've used the very same codes for creating sales order, delivery note and quotation and it works. Somehow it just doens't work for Billing document.
    form save_header_text tables text_line using tdid.
      DATA : HEADER LIKE THEAD.
      data: v_function(1).
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          INPUT  = record-billdoc
        IMPORTING
          OUTPUT = record-billdoc.
      header-tdname = record-billdoc.
      header-tdobject = 'VBBK'.
      header-TDID = record2-tdid.
      header-tdspras = 'E'.
      CALL FUNCTION 'SAVE_TEXT'
        EXPORTING
      CLIENT                = SY-MANDT
          HEADER                = header
      INSERT                = 'X'
       SAVEMODE_DIRECT       = 'X'
      OWNER_SPECIFIED       = 'X'
      LOCAL_CAT             = ' '
    IMPORTING
       FUNCTION              =  v_function
      NEWHEADER             =
        TABLES
          LINES                 = text_line
    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.

  • Longtext update by using save_text F.M

    Hi All ,
    I am updating longtext using F.M save_text the problem is
    my longtext is in the form longtext type c length 1000.
    Now how do i split this longtext such that i can pass the data in save_text.
    the parameter TDLINE is only 132 character.
    i tried using F.M tr_split_text at 132 char but the input parameter of this F.M can only take data of certain
    length
    Do any bdy know hw to go about it?
    Regards
    Bhanu

    Hi,
    If  your long text is in multiple lines of an internal table use the below code and take the text into some string varaible (lv_text_string here).
    Concatenate the text into a string variable
    LOOP AT lt_lines INTO lw_lines.
            CONCATENATE lv_text_string lw_lines-tdline INTO
                        lv_text_string SEPARATED BY space.
            CLEAR : lw_lines.
          ENDLOOP.
    Split the text into 132 char lines
    CALL FUNCTION 'RSDG_WORD_WRAP'
            EXPORTING
              textline            = lv_text_string
              delimiter           = space
              outputlen           = 132
            IMPORTING
              out_line1           = lv_outline1
              out_line2           = lv_outline2
              out_line3           = lv_outline3
            TABLES
              out_lines           = lt_text_lines
            EXCEPTIONS
              outputlen_too_large = 1
              OTHERS              = 2.
    Now use lt_text_lines for calling save_text FM. (Here lt_text_lines should be delared as an internal table of char132).
    Hope this helps you !!!
    Regards,
    Ganga

  • Using 'SAVE_TEXT' to save comment for qualification

    I face a problem when I use function module 'SAVE_TEXT' to save comment for qualification for employees (IT 24).
    The scenario is like this:
    The employee has 2 same qualifications for 2 period, one from 01.01.2006 - 31.05.2006 and one 01.06.2006 - 31.12.9999.
    I need to save the comment only for period 01.06.2006. When I use FM 'SAVE_TEXT', the comment is saved for both period.
    How can I solve this problem? Is there any other FM I can use for saving comment?
    Hope someone can help me. Thanks.

    So according to what I understood do one thing.
    For this both periods of dates set a flag.
    Say for example flag is v_flag.
    if v_flag = 'X'.
    'SAVE_TEXT'
    endif.
    I think I am clear,let me know if I am wrong.
    Regards

  • Append text using SAVE_TEXT

    I'm trying to append text lines to the existing data for a given text id. And it seems to replace it each time.
    Is there a way to do it?
    This did not work....call replaces the text data.
        call function 'SAVE_TEXT'
          EXPORTING
            header   = thead
            insert   = 'I'
          TABLES
            lines    = tline
          EXCEPTIONS
            id       = 1
            language = 2
            name     = 3
            object   = 4
            others   = 5.
        if sy-subrc <> 0.
        endif.
        CALL FUNCTION 'COMMIT_TEXT'.
        COMMIT WORK.
    Thank you,
    Pam

    Hi Pam,
    You need to use FM READ_TEXT and FM EDIT_TEXT then use FM SAVE_TEXT.
    Hope this will help.
    Regards,
    Ferry Lianto

Maybe you are looking for