Inserting long text in a programmatically created table

Hi there!
I have to create, in a programmatic way, a 2dtable where some cells have to contain a long string. As it seems to be not possible to have an automatic word-wrap, I triend to insert carriage return/line feed (vbCrLf) inside my string, but the result didn't change.
Maybe I need to set some specific table property to do that?
thank you,
andrea

Hello Andrea!
You have to use a variable like TV or a text channel for every column you want to set. There is no direct way to fill a cell. In your script you only have to set the variable or channel. As you expected you have to use a vbCRLF to get multiline text. DIAdem will display multiline text but did not recognize it. That means that the program do not make a vertical alignment. The first line will be vertical centerted and all other lines will be below. Result: A white gap above the text! You have to 'play' with the cell and text height to get a half-decent text display. BTW: I made my tests with DIAdem 9.
Matthias
Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater?  

Similar Messages

  • How to insert long text data in oracle for LONG column type??

    Anybody who can tell me what is best way to store long text (more than 8k) in Oralce table.
    I am using Long datatype for column but it still doenst let me insert longer strings.
    Also I am using ODP.Net.
    Anybody with a good suggestion???
    Thanks in advance

    Hi,
    Are you getting an error? If so, what?
    This works for me..
    Greg
    create table longtab(col1 varchar2(10), col2 long );
    using System;
    using System.Data;
    using Oracle.DataAccess.Client;
    using Oracle.DataAccess.Types;
    using System.Text;
    public class longwrite
    public static void Main()
    // make a long string
    StringBuilder sb = new StringBuilder();
    for (int i=0;i<55000;i++)
    sb.Append("a");
    sb.Append("Z");
    string indata = sb.ToString();
    Console.WriteLine("string length is {0}",indata .Length);
    // insert into database
    OracleConnection con = new OracleConnection("user id=scott;password=tiger;data source=orcl");
    con.Open();
    OracleCommand cmd = new OracleCommand();
    cmd.CommandText = "insert into longtab values(1,:longparam)";
    cmd.Connection = con;
    OracleParameter longparam = new OracleParameter("longparam",OracleDbType.Long,indata .Length);
    longparam.Direction = ParameterDirection.Input;
    longparam.Value = indata ;
    cmd.Parameters.Add(longparam);
    cmd.ExecuteNonQuery();
    Console.WriteLine("insert complete");
    //now retrieve it
    cmd.CommandText = "select rowid,col2 from longtab where col1 = 1";
    OracleDataReader reader = cmd.ExecuteReader();
    reader.Read();
    string outdata = (string)reader.GetOracleString(1);
    Console.WriteLine("string length is {0}",outdata.Length);
    //Console.WriteLine("string is {0}",outdata);
    reader.Close();     
    con.Close();
    con.Close();
    }

  • Customer Specific long text object to be create

    Hi all,
    I have to create and maintain Long text in my module pool program , just like some std. transaction have it at header.
    I know new text object can be created at SE75 with textid. But don't know how to call MS-editor create, save and display
    long text , just like most of std. transaction in SAP.
    Please help me with some sample codes and steps in this regards.
    Thanks in advance,
    Vinit

    hi Vineet,
    Not sure this wud wrk or not but give it a try...
    Use some message no of a message class created in txn se91 if that message gets display where u need to show the long text. Just remove the tick from the checkbox which says self explainatory goto longtext and write the remarks over there
    I hope i am clear..

  • Let rows with long texts break between pages in tables.

    I just spent the entire day trying to figure out how to do this very simple task, and just found out in the forum that the only way to do it is to manually create new rows whenever text is too long to fit. Even Word does this routinely.
    Now I have to spend another day manually setting tables.
    Sigh.

    What do you mean? How do you share a request?

  • How can I Insert a Text field in a DATABASE TABLE???

    Hello at all,
    i have a database Table ZTEST with 2 columns.
    MANDT     TYPE     CLNT
    TEXT         TYPE     char     (255)
    In my internal table tab, i have a text content. I want insert this content in my database table ZTEST.
    DATA: tab TYPE TABLE OF ZTEST,
               lin TYPE ZTEST.
    lin-text = 'HELLO WORLD'
    APPEND lin TO tab.
    INSERT INTO ZTEST VALUES tab.
    Commit Work.
    Is this correct???? BECAUSE it doesnt work.
    Edited by: ETN_58 on Mar 31, 2010 10:27 AM

    Hi All,
    Here table ZTEST has two fields kunnr and text where kunnr is the key field.
            REPORT  ZATEST                                  .
           tables ztest.
          DATA: itab TYPE TABLE OF ZTEST with header line.
            itab-kunnr = '67890'.
            itab-text = 'HELLO WORLD'.
            APPEND itab.
           if sy-subrc eq 0.
               INSERT  ZTEST from table itab.
            Commit Work.
          endif.
           Check with this, its working fine.
                 Regards,
                Md Ziauddin.

  • How to create a long text

    Want to create a long text field in Module pool table.
    How to create object, Object id? As text description for the Object id is to be copied into report.
    Ex. Form Header text is maintained in sales documents.This text is copied when description for object idis copied into report, if selected.

    Hi ABHISHEK,
    long texts can be created using FM SAVE_TEXT. Because text handling goes through special text memory, you need additional COMMIT_TEXT to store it on database.
    Object an ID are created in customizing.
    SAVE_TEXT will take ID, OBJECT, NAME, LANGUAGE and the textlines for import.
    Regards,
    Clemens

  • Not inserting records in a newly created table

    Hi everybody,
    I have imported four tables in a source module and used the Join Operator in order to insert the rows in one newly created table.
    This table - designed in a target module - was created in the desired schema , but without the relevant rows , as I expected...
    NOTE : the where clause , i have defined in the Join Operator, is not the problem , as I removed it and the rows are not inserted...in the table
    Also , the sample PL/SQL code which was created automatically , was exactly as I expected - I mean the 'insert into ... select.....' clause was right...
    What may be the problem..?
    Thanks , a lot
    Simon

    Hi Jaap,
    thanks for your reply...
    Sorry for being a little unclear ...
    I have followed the instrunctions in the on-line help of OWB , and :
    1) have imported four code tables into a source module . The tables are in an Oracle RDBMS 10g .
    2)I have created manually a table - using the OWB client tool - which consisted of some of the columns found in the four tables .
    3)I have inserted a Join Operator in order to correlate the four table columns with the columns of the target module.
    4)I have defined the Join condition of the the four table columns. In my first post , unintenionally I have written that I removed the Join Operator. I meant the Join Condition in order to make sure that the join condition isn't the reason that the records are not inserted....
    5)I have validated and generated the mapping without any errors - not even warnings.
    6)I have selected Project->Deployment Manager and I selected the OWB_RUN user - which is the Runtime Repository owner.
    7)I have selected the objects to deploy - the mapping , the one table I created in the target module. The deployment has succedded , and the table was created but no records are found in it.
    Now , is there a possibility that this problem is caused by absence of the privileges to insert the rows...?
    How can I check that the source tables are filled on the registered location of your source module?
    Another basic question...
    I have created a Runtime Repository owner - called owb_run- using the Runtime Repository Assistant . I use this user in order to deploy the mapping and the new table. I want -and it is created- that table in another schema (user his_dw) - even another database in the same server. Should I run the Runtime Repository owner in this schema (his_dw)???
    Thanks , again a lot
    Simon

  • Text table for long text of product catalog area and product description

    Hi experts,
    I'm a new comer in CRM, what my current job is to do the translation for CRM system and its portal, e.g. webshop.  Now I met some questions as below, Could you please give me some advices?
    1. Long text for product catalog area (t-code: COMM_PCAT_ADM; Product Catalog: PCSHOP)
    I found a  table named STXL(STXD SAPscript text file lines), maybe, it is related to the long text(product catalog area), but I can not get anything from the field CLUSTD of the table STXL as  its data type is RAW. Maybe, there is a text table in CRM to store these long text information, but I dont know, Could you please give me some ideas?
    2. Long text for product description (t-code: COMM_PCAT_ADM; Product Catalog: PCSHOP)
    I found a table named COMM_CFGLNGTXT(Long Texts for Different Objects),  I can find some long texts(product description) in this table, but some others, I can not find them. I dont know why? Maybe it is not a correct text table. Could you please give me some advices?
    Thank you very much.
    Quanyin

    Hi Uwe,
    Implement the BADI DOC_PERSONALIZE_BCS and use method PERSONALIZE_DOCUMENT. In this method therz an parameter FLT_VAL, this can be used to derive the description.
    Award points if its useful....
    Regards,
    B Raju

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

  • Operation Long text creation problem in IW32

    Hi experts,
    I have a requirement of showing a checklist pop up for all the new external operations in creating a MPA work order(IW32). And when the user answers the questions on the checklist, I have to copy all the questions and answers into the long text of the corresponding operation.
    The problem here is,
    for a case when the long text is not yet created for a new line item, when the pop up is shown and answers are filled, I am creating a new standard text using SVE_TEXT(setting the insert paramter 'X'), but the standard text is getting created in the database i.e a record is getting created in STXH with the text id, text name, text object of the operation. But when I go to IW32 and see the operation line it shows the create long text icon which says that the text is not created at all.
    In a case where the long text is already created for the operation, and then the pop up is shown with the questions and answers are filled, the questions and answers are copied into the operation long text which is already created. So this works fine.
    If any pointers regarding this please let me know.
    Thanks and Regards,
    Asha

    Hi,
    Try passing SAVEMODE_DIRECT = 'X' and check..
    also check if the text exists using the function module READ_TEXT once you do the SAVE_TEXT..
    Thanks,
    Naren

  • Issue in updating the long text for Routings

    Hello,
    I am developing an onject to update Long text(which are already created but need to be overwritten).
    Can this be done using /SAPDMC/SAP_LSMW_IMPORT_TEXTS via LSMW.
    I developed an LSMW witht this, I am able to retrieve the required field for name which are needed as key from tables.But how can I dynamically update this field for the correct value relating the operation.One issue regarding this I am facing is that in conversion, I have operation number in the source field and have maintained source field according to source file but use values just to retrieve correct value for name field in mapping,it is taking only the last operation number into account from the source file itself and not earlier values.please guide.
    Regards

    yes you can use /SAPDMC/SAP_LSMW_IMPORT_TEXTS via LSMW
    In the SAP system, there is no uniform rule for the structure of the actual text key Textname. However, in order to be able to maintain the structures and fields, you have to know what the structure of text name as well as the values for text object and text ID are.
    Procedure
           1.      Display a text of the required text type.
           2.      Branch to the editor.
           3.      Choose Goto > Header.
    The Text header dialog box appears.
    Result
    In the Text header dialog box, you gather the required information.

  • Long text not appear in E-mail Notification (Smartform)

    Dear Gurus,
    Need your insight on this issue. I'm trying to insert long text (Response/Description/etc) from the message into body of e-mail notification. I use function module 'CRM_DNO_READ_ORDER_TEXT'  to get the text in the smartform and then use function module 'READ_TEXT'  to get the text lines but it returns exception 'not_found'.
    I try to debug and it seems like the smartform is executed before the long text is saved into the table (STXH), thus i can't get those text. I have set Action Processing Time to Processing when saving document.
    Anyone had this problem before? Need your help.
    Thanks and  Best Regards,
    Tresna

    I know I am late to this thread but yes you are right. Samrtform gets executed before the Logntext gets saved in Database.
    I just did the following and it's working perfectly fine
    Please go through the code below and this solution is working best for me and I just implemented that today.
    DATA iv_header_guid    TYPE crmt_object_guid.
    DATA et_textdata          TYPE comt_text_textdata_t.
    DATA ls_textdata          TYPE comt_text_textdata.
    DATA et_alltexts       TYPE comt_text_textdata_t.
    DATA et_error          TYPE comt_text_error_t.
    DATA ev_text_procedure TYPE comt_text_det_procedure.
    DATA et_text_cust      TYPE comt_text_cust_struc1_tab.
    DATA: stxh             TYPE stxh.
    DATA: lines            TYPE comt_text_lines_t.
    DATA: ls_lines         TYPE tline.
    iv_header_guid = wa_header-guid.
    CALL FUNCTION 'CRM_DNO_READ_ORDER_TEXT'
       EXPORTING
         iv_header_guid    = iv_header_guid
       IMPORTING
         et_textdata       = et_textdata
         et_alltexts       = et_alltexts
         et_error          = et_error
         ev_text_procedure = ev_text_procedure
         et_text_cust      = et_text_cust.
    LOOP AT et_alltexts INTO ls_textdata.
       stxh = ls_textdata-stxh.
       IF stxh-tdid = 'ZARD'.
         lines[] = ls_textdata-lines[].
         LOOP AT lines INTO ls_lines.
           CONCATENATE gv_comments ' ' ls_lines-tdline
                    INTO gv_comments SEPARATED BY space.
         ENDLOOP.
       ENDIF.
    ENDLOOP.
    Tresna Cahya wrote:
    Dear Gurus,
    Need your insight on this issue. I'm trying to insert long text (Response/Description/etc) from the message into body of e-mail notification. I use function module 'CRM_DNO_READ_ORDER_TEXT'  to get the text in the smartform and then use function module 'READ_TEXT'  to get the text lines but it returns exception 'not_found'.
    I try to debug and it seems like the smartform is executed before the long text is saved into the table (STXH), thus i can't get those text. I have set Action Processing Time to Processing when saving document.
    Anyone had this problem before? Need your help.
    Thanks and  Best Regards,
    Tresna
    No need for READ_TEXT.
    Message was edited by: Mansoor Ahmed

  • Long Text in BOM

    Hi,
    I have a BOM with some text items. I have some long text maitained for these text items through tab whenI go to that text item and "Status/long txt" tab.
    I need to know the table and field where tihs long text is stored as STPO stores the item text 2 line and not the long text.
    Rg,
    Vipul

    Hi Vipul,
    You can get the long texts using the following function module:
    'CSAP_MAT_BOM_READ'
    (All the tables parameters recieve values..)
    All the long texts will be available in TABLES parameter 't_ltx_line'
    Please let me know if you have further doubts...
    Regards,
    Arun B

  • How to get the long text into text area

    Hi,
    save_text is working fine .
    Now I want to display the text in text area .
    am using read_text fm for this and data is coming into the internal table of the function module.
    how shd I display that long text into text area and that text shld appear has display mode only and how shd I make all other fields in my subscreen as display mode.
    Pls guide me its urgent.
    thanks,
    krishna

    Hai.
    check this.
    Long Texts are stored in tables
    STXH - header
    STXL - details.
    if you want to read the texts you can use Fun Module  READ_TEXT
    Any Application document Header and Item Long texts are stored in STXH table with the 4 parameters OBJECT,ID,NAME and LANG
    These texts are fetched from database using READ_TEXT fun module by passing the above 4 parameters.
    Double click on the text, from the text editor menu GOTO-> HEDAER
    you will find the all above 4 parameters
    so accordingly you have to pass to the fun module READ_TEXT to fetch the texts.
    example:
    Re: upload longtext from excel file  
    REPORT  zupload_excel_to_itab.
    TYPE-POOLS: truxs.
    PARAMETERS: p_file TYPE  rlgrap-filename.
    TYPES: BEGIN OF t_datatab,
          col1(30)    TYPE c,
          col2(30)    TYPE c,
          col3(30)    TYPE c,
          END OF t_datatab.
    DATA: it_datatab type standard table of t_datatab,
          wa_datatab type t_datatab.
    DATA: it_raw TYPE truxs_t_text_data.
    At selection screen
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          field_name = 'P_FILE'
        IMPORTING
          file_name  = p_file.
    *START-OF-SELECTION.
    START-OF-SELECTION.
      CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
        EXPORTING
        I_FIELD_SEPERATOR        =
          i_line_header            =  'X'
          i_tab_raw_data           =  it_raw       " WORK TABLE
          i_filename               =  p_file
        TABLES
          i_tab_converted_data     = it_datatab[]    "ACTUAL DATA
       EXCEPTIONS
          conversion_failed        = 1
          OTHERS                   = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    END-OF-SELECTION.
    END-OF-SELECTION.
      LOOP AT it_datatab INTO wa_datatab.
        WRITE:/ wa_datatab-col1,
                wa_datatab-col2,
                wa_datatab-col3.
      ENDLOOP.
    refards.
    sowjanya.b

  • Create table of type integer

    How can we create a table of type integer in MDM. (what the code should be?)
    When I create a table, it only allows type Text.
    Thanks

    Hi R.N,
    we can create table of type Flat, Hierarachy, Taxanomy, Qualified Flat and Families.
    you are talking about field, by default whenever you create any table a field "Name" of type Text get generated, but here if you want this field to be integer, just create new field by right clickin "Add Field" by going into table in which you want that field. here you can give any name to that field and select type Integer . if you want only Integer field into your table then also make it "Display Field" only after that you can delete field "Name" of type Text.
    Note: For creating Table Click on your repository where you can see and create tables and for field just click on any table where you want to include that field into table
    Code takes important incase of Java APis and ABAP Apis. where APIs recognise table and fields with their code only.
    Remember to unload repository before creating Table and Fields and then load it.
    Hope it helps you,
    Mandeep Saini
    Edited by: Mandeep Saini on May 6, 2008 10:43 AM
    Edited by: Mandeep Saini on May 6, 2008 10:48 AM

Maybe you are looking for

  • New Macbook Pro without imovie, iphoto...

    I just got a new macbook pro but i looked everywhere and cannot find the imovie, iphoto and all the other i's! where do i download it? here is it? thank in advance

  • Swing components not displaying correctly in JApplet

    Hello everyone, I have experienced some strange problems using Swing components on JApplets. Maybe I missed some documentation somewhere and someone can help me out. The problem is that when I add components like JButtons, JCheckboxes, JRadioButtons,

  • Good documentation

    I have a subscription for Office 365 and am using Project Pro for Office365 as well as Project Online.  I know how to use project when storing project locally. I am struggling with understanding and managing projects through office365 and integrating

  • Error while using the sample My Contacts portlet

    Hi, I am trying to use sample portlet "My Contacts" in my portal's page but getting the following error: Compilation of JSP File '/portlets/collaboration/nativedb/contact/Content/index.jsp' failed: Errors found in C:\bea\weblogic81\samples\portal\por

  • Conver a string to object?

    hi, I am having problem converting string to object, then store the object into a object linklist node. I debugged it to make sure that everything the user types got stored in the string, but when the debug reaches "obj = temp;". obj doesn't have any