Find string in long text

Hello,
I'm looking for a way to find a specific string in all the long texts of our routing cards. Is there any FM/ TC / BAPI that can do that?
Thanks,
Eti

Hi,
Not sure what your exact need is, but you can achieve this via abap statements.
The syntax SEARCH is what you should be using for finding a string in a variable / table / internal table / long text etc.
I would suggest take help of your abaper to write a simple program for you to do the extraction which you're looking for.
Regards,
Vivek

Similar Messages

  • Finding strings in a text file?

    Hi! i'm learning to read text files. what i want to do with this program is to find word 1-3, 2-4, 3-5... and write them in a system.out.println. i found a program that opens files and count words, lines and characters and tried to adjust it do find three-word strings.
    i can compilate (hope that word exists) but when i run it, it says: Exception in thread "main" java.lang.NoSuchMethodError: main
    anyone who knows what this could depend on?
    This is what the code looks like:
    import java.io.*;
    import java.io.*;
    import java.util.*; //tillagd f�r att removeFirst4 skall funka
    import javax.swing.*; //tillagd f�r att removeFirst4 skall fungera
    import java.util.regex.Pattern;
    import java.util.regex.Matcher;
    import java.lang.*;
    import javax.swing.*;
    public class AttLaesaEnFil2 {
         private static void samla(String name, BufferedReader in) throws
         IOException {
         String a;
         WordExtractor b;
    String c = " ";
    String d;
    WordExtractor e;
    String f;
    String g;
    WordExtractor h;
    String i;
    String j;
    String k;
    String l;
    String line;
    do {
                   line = in.readLine();
                   if (line != null)
    b = new WordExtractor(line);
         c = b.getFirst();
         d = b.getRest();
         e = new WordExtractor(d);
         f = e.getFirst();
         g = e.getRest();
         h = new WordExtractor(g);
         i = h.getFirst();
         j = h.getRest();
         k = c + f + i;
         l = c + " " + f + " " + i;
         System.out.println("The first three words are: " + l);
         a = b.getRest();
    while (line != null);
              System.out.println("Klart!");
              private static void samla(String fileName) {
              BufferedReader in = null;
              try {
                   FileReader fileReader = new FileReader(fileName);
                   in = new BufferedReader(fileReader);
                   samla(fileName, in);
              } catch (IOException ioe) {
                   ioe.printStackTrace();
              } finally {
                   if (in != null) {
                        try {
                             in.close();
                        } catch (IOException ioe) {
                             ioe.printStackTrace();
         private static void samla(String streamName, InputStream input) {
              try {
                   InputStreamReader inputStreamReader = new InputStreamReader(input);
                   BufferedReader in = new BufferedReader(inputStreamReader);
                   samla(streamName, in);
                   in.close();
              } catch (IOException ioe) {
                   ioe.printStackTrace();
    Thanx in advance!

    this may be a stupid question but i'll give it a
    shot. ...do i replace my private static void with
    public static void or do a add the public?Whether you replace one of your methods or create a new one is up to you, but you have to have a method with this exact signature:
    public static void main(String[] foo) {
    }(The variable name can be different of course)

  • BAPI_ACC_DOCUMENT_POST long text field missing

    Hi,
    I will have to transfer our vendor open items from v 3.1 to ERP 2004. I
    am using <b>BAPI_ACC_DOCUMENT_POST</b> to upload these open items. However, I
    cannot find the <b>'LONG TEXT'</b> field in the said BAPI. In using <b>F-02</b>, a
    long text field/button is available. <u><b>How can i post an entry in the long text
    field of the line item in f-02 using BAPI_ACC_DOCUMENT_POST</b></u>.
    Also, i have used the extension1 table and a BTE (note 487722) in
    uploading the posting key. Since field bschl is available in table
    accit, there was no problem in doing this. However, i cannot seem to
    find the field long text in this table. Is it available? If not, what
    can I do with the above situation.
    Thanks.

    Hi
    Excuse me! you can't use RFBIBL00, use the fm SAVE_TEXT.
    After calling the BAPI you should have the number of FI document will be created and know in which item you need to insert the long text so:
    THEAD-TDOBJECT     = <Object text>.
    THEAD-TDNAME(4)    = <Company code>
    THEAD-TDNAME+4(10) = <Document number>
    THEAD-TDNAME+14(4) = <Fyscal year>
    THEAD-TDNAME+18(3) = <Item number>.
    THEAD-TDID         = <Id text>.
    THEAD-TDSPRAS      = <Language>.
    THEAD-TDLINESIZE   = 72.
    These are the header data, transfer the text in LINES parameters.
    Max

  • Long Text in Process Order

    Hi ,
    I want to add the long text in Process Order screen.
    I had seen the long text tab is in the production order screen(CO01) but i could not find the same in the process order screen(COR1).  Is there any customization or any user exit required to add the long text in the process order screen.
    Thanks & Regards,
    Jish.

    Hi
    Suzie
    U will find the (Create Long text ) in the  header of the Process order, NEAR Process order number and Header Material.
    Reg
    Madhu

  • Empty long text in notification

    Hello Everyone,
    Here is my problem.
    We create a notification via IW21following these steps :
      - Fill the mandatory fields
      - Fill the Subject LONG Text
      - Create the order
    After saving the created notification and while trying to display/modify our notification, we find that the LONG Text previously filled EMPTY.
    Can you please propose a solution to get the LONG Text once we save the notification?
    For you information, I tried the solution Import FROM MEMORY ID 'SAPLSTXD000001' but the customer isn't satisfied with it and wants something more efficient.
    Thank you for your help.
    Kima

    Hi kima,
    I feel this thread has the answer. Long text not saving data
    Jogeswara Rao K

  • BOM Header Long Text

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

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

  • Find a word in long text

    Hi,
    I need to find all the routing cards that don't contain a certain word in their long text. any suggestions???
    Eti

    Hi
    Please check in following links.....you will find some solution.
    How to search for a word in a text editor
    Search in long text
    Word Search
    search word for '.'.
    Regards
    Sujit

  • Tcode FV50: How to find long text in FI Document line item Before Saving.

    Hi,
    How to find long text in FI Document line item.
    During Parking of the FI document through Tcode FV50 i m giving the some text in the long text not in the text field.
    I would like to validate the Long Text Before Saving in user exit "U300" under  the  "Sunstitution" .
    Please anybody can be help me out where exactly this long text is going to be stored or in which internal table or memory id.
    Please give me the answer as soon as possible .
    Note:- Read_Text function module is not useful. Because Read_text useful after saving document.

    Hi Amit,
    In application area FINANCIAL ACCOUNTING , go for node LINE ITEM. Here create a step & maintain the prerequisite as per your requirement & in the check you can mention the code or you can direct it to a custom program like ZFI_RGGBR000.
    Here while maintaining the check you will get structures BKPF & BSEG in which you will get the desired field you are looking for.
    Just try to explore in your system how the other validations are maintained.
    After you are done with all your code, you have to run the regeneration program RGUGBR00.
    Here utmost care should be taken while running regeneration program, you should select all the checkboxes in the selection screen except  GENERATE SETS, GEN SUBSTN ROUTNS IN ALL CLNTS  & TRACE PROG. GENERATE CALLS .
    Hope this make your doubt clear.
    Regards
    Abhii

  • How to display  LONG TEXT STRING in Module Pool Screen ?

    Hi Experts,
    I want to display long text string, on screen designed through module pool(SE51). I tried to display through input/output field , but it displays it in SINGLE LINE and i have to scroll all through to view all string.
    I want to display it in rectangular format . It doesnt allow me to set HEIGHT of component.
    Please provide solution.
    Thanks in advance.
    Regards
    Deepak

    This is the program where u can get the WA_THEAD from other program like report and trying to display and modifying that text. U can do instead of WA_THEAD u can generate here itself and use also
    *& Module pool       ZMP_LTEXT                                         *
    PROGRAM  ZMP_LTEXT                               .
    TABLES: STXL.
    *&      Module  STATUS_9000  OUTPUT
    MODULE STATUS_9000 OUTPUT.
    CONSTANTS:line_length type i value 132.
    DATA:g_editor type ref to cl_gui_textedit,
         g_editor_container type ref to cl_gui_custom_container,
         CONT1 type scrfname value 'CONT1',
         g_repid like sy-repid,
         g_ok_code like sy-ucomm,
         g_mytable(132) type c occurs 0,
         g_mycontainer(30) type c ,
         v_result(256) type c,
         g_head like thead,
         it_line type table of tline with header line,
         wa_stxl type stxl.
    DATA : BEGIN OF IT_THEAD1,
           ICON TYPE ICON-ID.
           INCLUDE STRUCTURE STXL.
    DATA : END OF IT_THEAD1.
    DATA : IT_THEAD LIKE TABLE OF IT_THEAD1,
           WA_THEAD LIKE LINE OF IT_THEAD.
    IMPORT WA_THEAD FROM MEMORY ID 'ABCD'.
    select SINGLE * from STXL into wa_stxl
                     where tdname = '00006000156500000002'.
    SELECT SINGLE * from STXL into wa_stxl
                      where tdname = WA_THEAD-TDNAME
                      AND TDID = WA_THEAD-TDID
                      AND TDOBJECT = WA_THEAD-TDOBJECT
                      AND TDSPRAS = WA_THEAD-TDSPRAS.
    IF SY-SUBRC NE 0.
    MESSAGE 'NO RECORD EXIST' TYPE 'E'.
    ENDIF.
    MOVE-CORRESPONDING WA_STXL TO G_HEAD.
    SET PF-STATUS 'STATUS'.
    SET TITLEBAR '001'.
      if g_editor is initial.
         CREATE OBJECT G_EDITOR_CONTAINER
           EXPORTING
            PARENT                      =
             CONTAINER_NAME              = CONT1
            STYLE                       =
            LIFETIME                    = lifetime_default
            REPID                       =
            DYNNR                       =
            NO_AUTODEF_PROGID_DYNNR     =
           EXCEPTIONS
            CNTL_ERROR                  = 1
            CNTL_SYSTEM_ERROR           = 2
            CREATE_ERROR                = 3
            LIFETIME_ERROR              = 4
            LIFETIME_DYNPRO_DYNPRO_LINK = 5
             others                      = 6.
         IF SY-SUBRC <> 0.
         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
         ENDIF.
         CREATE OBJECT G_EDITOR
           EXPORTING
            MAX_NUMBER_CHARS       =
            STYLE                  = 0
       WORDWRAP_MODE          = cl_gui_textedit=>wordwrap_at_fixed_position
    for to fix number of characters in row to 132 characers
             WORDWRAP_POSITION      = line_length
             WORDWRAP_TO_LINEBREAK_MODE = cl_gui_textedit=>true
    for the word to break to next line if it don’t fit in line
            FILEDROP_MODE          = DROPFILE_EVENT_OFF
             PARENT                 = G_EDITOR_CONTAINER
            LIFETIME               =
            NAME                   =
           EXCEPTIONS
            ERROR_CNTL_CREATE      = 1
            ERROR_CNTL_INIT        = 2
            ERROR_CNTL_LINK        = 3
            ERROR_DP_CREATE        = 4
            GUI_TYPE_NOT_SUPPORTED = 5
             others                 = 6  .
         IF SY-SUBRC <> 0.
         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
         ENDIF.
      REFRESH g_mytable.
         MOVE: WA_THEAD-TDNAME TO STXL-TDNAME,
               WA_THEAD-TDID TO STXL-TDID,
               WA_THEAD-TDOBJECT TO STXL-TDOBJECT,
               WA_THEAD-TDSPRAS TO STXL-TDSPRAS.
        CALL FUNCTION 'READ_TEXT'
        EXPORTING
        CLIENT                        = SY-MANDT
          ID                            = wa_stxl-tdid
          LANGUAGE                      = wa_stxl-tdspras
          NAME                          = wa_stxl-tdname
          OBJECT                        = wa_stxl-tdobject
        ARCHIVE_HANDLE                = 0
        LOCAL_CAT                     = ' '
      IMPORTING
        HEADER                        =
        TABLES
          LINES                         = it_line
      EXCEPTIONS
        ID                            = 1
        LANGUAGE                      = 2
        NAME                          = 3
        NOT_FOUND                     = 4
        OBJECT                        = 5
        REFERENCE_CHECK               = 6
        WRONG_ACCESS_TO_ARCHIVE       = 7
        OTHERS                        = 8
      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 IT_LINE INTO V_RESULT.
       APPEND V_RESULT TO G_MYTABLE.
    ENDLOOP.
    CALL METHOD G_EDITOR->SET_TEXT_AS_R3TABLE
       EXPORTING
         TABLE           = G_MYTABLE
       EXCEPTIONS
         ERROR_DP        = 1
         ERROR_DP_CREATE = 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.
       endif.
    ENDMODULE.                 " STATUS_9000  OUTPUT
    *&      Module  USER_COMMAND_9000  INPUT
    MODULE USER_COMMAND_9000 INPUT.
    CASE SY-UCOMM.
    REFRESH G_MYTABLE[].
    REFRESH IT_LINE[].
    CLEAR V_RESULT.
      WHEN 'SAVE'.
         CALL METHOD G_EDITOR->GET_TEXT_AS_R3TABLE
          EXPORTING
            ONLY_WHEN_MODIFIED     = FALSE
            IMPORTING
              TABLE                  = G_MYTABLE
            IS_MODIFIED            =
          EXCEPTIONS
            ERROR_DP               = 1
            ERROR_CNTL_CALL_METHOD = 2
            ERROR_DP_CREATE        = 3
            POTENTIAL_DATA_LOSS    = 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.
    LOOP AT G_MYTABLE INTO V_RESULT.
       APPEND V_RESULT TO IT_LINE.
    ENDLOOP.
    CLEAR V_RESULT.
        CALL FUNCTION 'SAVE_TEXT'
          EXPORTING
            CLIENT                = SY-MANDT
            HEADER                = G_HEAD
            INSERT                = ' '
            SAVEMODE_DIRECT       = 'X'
          OWNER_SPECIFIED       = ' '
          LOCAL_CAT             = ' '
        IMPORTING
          FUNCTION              =
          NEWHEADER             =
          TABLES
            LINES                 = IT_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.
    REFRESH G_MYTABLE[].
    REFRESH IT_LINE[].
    CLEAR V_RESULT.
    WHEN 'BACK' OR 'CANCEL' OR 'EXIT'.
    LEAVE TO SCREEN '0'.
    *CALL SCREEN '0'.
    WHEN OTHERS.
    ENDCASE.
    *G_OK_CODE = SY-UCOMM.
    *CLEAR SY-UCOMM.
    ENDMODULE.                 " USER_COMMAND_9000  INPUT

  • How to find the exact word in a long text?

    Hi,
    Scenario:
    I have long text containing the system status of the equipment.
    Issue:
    I need to find the exact word from the list of the statuses. I have tried to use the FIND keyword but it does not work for all the cases.
    Example:
              FIND 'REL' IN <status_list> IGNORING CASE.
              if sy-subrc = 0.
              " do something
              endif.
    If the status list contains the word 'RELR', the sy-subrc is set to 0 (which may be because it searches the list based on a pattern) but I want to get the exact match.
    Can anybody suggest me on this.
    Regards
    s@k

    >
    siemens.a.k wrote:
    > Dear Kiran, Vasuki,
    >
    > The data type of status list is char with length 40.
    > The status list:
    >
    > Case 1: list -  REL  MANC NMAT PRC  SETC
    > FIND 'REL ' IN <status_list> IGNORING CASE
    > the sy-subrc is set to 0
    >
    > Case2: list - CRTD MSCP NMAT PRC  RELR SETC
    > FIND 'REL ' IN <status_list> IGNORING CASE
    > the sy-subrc is still set to 0 even though the list does not contain the word 'REL'
    >
    > I have also tried using
    > if <status_list> CS 'REL'
    > and
    > if <status_list> CS 'REL '
    >
    >
    > Please do let me know if I am anyway unclear about issue...:)
    >
    > Regards
    > s@k
    This is becacuse when you check
    > Case2: list - CRTD MSCP NMAT PRC  RELR SETC
    It is having RELR so that is the reason you are getting subrc = 0.
    >Ok try CS it should work perfectly.
    It seems... CS also not the correct answer
    (It will count RELR)  below thread sachin is correct ...Do that way ....
    Regards
    sas
    Regards
    Sas
    Edited by: saslove sap on Jan 25, 2010 6:58 AM

  • Need to find table/field behind "Item long text" field in Notes tab in FB70

    Hello,
    To print a custom FI invoice, I need to access the data entered in the "Item long text" field of the Notes tab in FB70. To test, I used 5000 characters in that field to make sure it stood out from the rest of the data. F1 help does nothing on that field, and even running an SQL trace (ST05) doesn't show the text in that field being entered into any table. I tried F1 on a nearby field and got a structure instead of a table, so I investigated the structure through SE11 but found no character field with such a large capacity. How else can I find where that field is stored?

    Thanks! It took a while, but with your help and a few other pages I managed to piece together an answer.
    Vinod helpfully explained that the text name is a concatenation of various fields, but didn't specify how to find the line item ID. If you go to table STXH (as hinted by Brad and confirmed [here|http://fuller.mit.edu/SAPWebDocs/LongComment.html]) and search for texts created today (or whenever you were testing), you'll see the text name ends in '001' after GJAHR, so the line item ID is '001' regardless of how many line items you enter in the invoice.
    Armed with that info, you can call READ_TEXT and loop through the results to concatenate the contents of each TDLINE field. (FB70 automatically breaks the user-entered text into different lines even if the user didn't press Enter, and each line gets its own record in the results.)
    Thanks again,
    Pedro

  • Finding all programs having particualr string in its Text symbols...

    Hello Gurus,
    If I want to search the string in ABAP code , I know I can use program RPR_ABAP_SOURCE_SCAN.
    But I want to find all SAP programs in which the text-symbols is defined by a particular string. How can I do that ?
    Please help....

    Hello Rajesh
    A function module which provides you will all text elements of a single report is RPY_PROGRAM_READ.
    Given this fm it is quite simple to write a report for your requirement:
    *& Report  ZUS_SDN_READ_TEXT_ELEMENTS
    *& Thread: Finding all programs having particualr string in its Text symbols...
    *& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="814207"></a>
    REPORT  zus_sdn_read_text_elements.
    TABLES: trdir.
    TYPES: BEGIN OF ty_s_outtab.
    TYPES: name   TYPE trdir-name.
    INCLUDE TYPE textpool     AS text.
    TYPES: END OF ty_s_outtab.
    TYPES: ty_t_outtab  TYPE STANDARD TABLE OF ty_s_outtab
                        WITH DEFAULT KEY.
    DATA: gt_outtab     TYPE ty_t_outtab,
          gs_outtab     TYPE ty_s_outtab,
          gt_fcat       TYPE lvc_t_fcat.
    DATA: gt_trdir      TYPE STANDARD TABLE OF trdir,
          gs_trdir      TYPE trdir.
    DATA: gt_textpool   TYPE STANDARD TABLE OF textpool.
    DATA: gd_count      TYPE i,
          gd_perc       TYPE i,
          gd_text(50)   TYPE c.
    SELECT-OPTIONS:
      o_report    FOR trdir-name.
    START-OF-SELECTION.
      IF ( o_report[] IS INITIAL ).
      ELSE.
        SELECT * FROM  trdir INTO TABLE gt_trdir
               WHERE  name  IN o_report.
      ENDIF.
      CHECK ( gt_trdir IS NOT INITIAL ).
      DESCRIBE TABLE gt_trdir.
      gd_count = syst-tfill.
      LOOP AT gt_trdir INTO gs_trdir.
        gd_perc = ( syst-tabix * 100 ) / gd_count.
        gd_text = gs_trdir-name.
        CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
          EXPORTING
            percentage = gd_perc
            text       = gd_text.
        REFRESH: gt_textpool.
        CALL FUNCTION 'RPY_PROGRAM_READ'
          EXPORTING
    *         LANGUAGE                  = SY-LANGU
            program_name              = gs_trdir-name
            with_includelist          = ' '
    *         ONLY_SOURCE               = ' '
            only_texts                = 'X'
    *         READ_LATEST_VERSION       = ' '
    *         WITH_LOWERCASE            = ' '
    *       IMPORTING
    *         PROG_INF                  =
          TABLES
    *         INCLUDE_TAB               =
    *         SOURCE                    =
    *         SOURCE_EXTENDED           =
            textelements              = gt_textpool
          EXCEPTIONS
            cancelled                 = 1
            not_found                 = 2
            permission_error          = 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.
        DELETE gt_textpool WHERE ( id NE 'I ' ).  " keep only text elements
        CLEAR: gs_outtab.
        gs_outtab-name = gs_trdir-name.
        LOOP AT gt_textpool INTO gs_outtab-text.
          APPEND gs_outtab TO gt_outtab.
        ENDLOOP.
      ENDLOOP.
      PERFORM build_fieldcatalog.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
        EXPORTING
    *       I_INTERFACE_CHECK                 = ' '
    *       I_BYPASSING_BUFFER                =
    *       I_BUFFER_ACTIVE                   =
    *       I_CALLBACK_PROGRAM                = ' '
    *       I_CALLBACK_PF_STATUS_SET          = ' '
    *       I_CALLBACK_USER_COMMAND           = ' '
    *       I_CALLBACK_TOP_OF_PAGE            = ' '
    *       I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
    *       I_CALLBACK_HTML_END_OF_LIST       = ' '
    *       i_structure_name                  = 
    *       I_BACKGROUND_ID                   = ' '
    *       I_GRID_TITLE                      =
    *       I_GRID_SETTINGS                   =
    *       IS_LAYOUT_LVC                     =
            it_fieldcat_lvc                   = gt_fcat
    *       IT_EXCLUDING                      =
    *       IT_SPECIAL_GROUPS_LVC             =
    *       IT_SORT_LVC                       =
    *       IT_FILTER_LVC                     =
    *       IT_HYPERLINK                      =
    *       IS_SEL_HIDE                       =
    *       I_DEFAULT                         = 'X'
    *       I_SAVE                            = ' '
    *       IS_VARIANT                        =
        TABLES
          t_outtab                          = gt_outtab
        EXCEPTIONS
          program_error                     = 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.
    *&      Form  BUILD_FIELDCATALOG
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM build_fieldcatalog .
    * define local data
      DATA: ls_fcat   TYPE lvc_s_fcat,
            lt_fcat   TYPE lvc_t_fcat.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
    *     I_BUFFER_ACTIVE              =
          i_structure_name             = 'TRDIR'
    *     I_CLIENT_NEVER_DISPLAY       = 'X'
    *     I_BYPASSING_BUFFER           =
    *     I_INTERNAL_TABNAME           =
        CHANGING
          ct_fieldcat                  = gt_fcat
        EXCEPTIONS
          inconsistent_interface       = 1
          program_error                = 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.
      DELETE gt_fcat WHERE ( fieldname NE 'NAME' ).
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
      EXPORTING
    *     I_BUFFER_ACTIVE              =
        i_structure_name             = 'TEXTPOOL'
    *     I_CLIENT_NEVER_DISPLAY       = 'X'
    *     I_BYPASSING_BUFFER           =
    *     I_INTERNAL_TABNAME           =
      CHANGING
        ct_fieldcat                  = gt_fcat
      EXCEPTIONS
        inconsistent_interface       = 1
        program_error                = 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.
      LOOP AT gt_fcat INTO ls_fcat.
        ls_fcat-col_pos = syst-tabix.
        MODIFY gt_fcat FROM ls_fcat INDEX syst-tabix.
      ENDLOOP.
    ENDFORM.                    " BUILD_FIELDCATALOG
    Regards
      Uwe

  • Where can I find the long text field to the field obj_name in table tadir?

    Hello,
    I have to create a list, which sould include the obj_name, ... and also the long text descrption of obj_name from the table tadir.
    So I looked in many tables, but I did not find the correct table.
    Does anybody know which table include this long text?
    Thank you in advance.
    Best regards

    Thank you for your answer.  This object name is in the table TADIR and the technical name is OBJ_NAME.
    The names are from our developer - that are names of programms. So I can't create or change it in the UI, because it is running in the background. It is a pity that I can't use the trace.
    It should be a list for our clients, that they know how many and which programs which we have developed. That it makes more sense, we don't want to get only the technical program name. We want include additionally the long text (the description).
    Do you have any other ideas?
    Thank you in advance.
    Best regards

  • How to use "FIND FIRST OCURRENCE...." with a very long text

    When I store a certain text in variable p_texto  -> FIND FIRST OCURRENCE is ok; sy-subrc = 0.
    When Instead of assigning a text I read a long text from an excel into p_texto variable ->
    FIND FIRST OCURRENCE is not working; sy-subrc = 4.
      DATA: p_texto(5000).
      DATA: posicion TYPE match_result.
      p_texto = 'HI THIS IS THE FIRST LINE#AND THIS ONE THE SECOND LINE'.
      FIND FIRST OCCURRENCE OF '#' IN p_texto RESULTS posicion.
      How could I manage this problem?
      Thank you very much in advance.

    As I told you before, the problem is not the length of the line.
    The problem is that you see in your variable "#", but it is not "#". It could be a carriage return, a tabulator or other character that doesn't know how to display.
    In my opinion you should search for cl_abap_char_utilities=>newline.
    Regards
    Andrea

  • Find the width of a text string inside a text box?

    Hi,
    I have a text box with a long text string in it. I would like to know what the width of the text string is so that I can scroll it inside the textbox using the text box scrollviewer.
    var sv = this.foodieItemText.GetFirstDescendantOfType<ScrollViewer>();
    sv.ScrollToHorizontalOffsetWithAnimation(this.foodieItemText.Width, 20);
    The scrolling works fine but I don't know what value to use for the width offset in the first argument to ScrollToHorizontalOffsetWithAnimation. For my purposes I want it to scroll the full length of the text string (which is longer than the actual with of
    the text box). Any ideas?

    Hi duffybr,
    Yes, there is a ScrollViewer inside TextBox template and we could scroll to the specific position as we need, however there is no direct way to get the string width in TextBox, however we could get the width in TextBlock, by measure method.
    See this discussion for more information:
    http://stackoverflow.com/questions/9126076/how-can-i-calculate-the-width-of-a-string-in-metro-without-displaying-it
    Besides, there are some third party libraries help us get the String width.
    --James
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • CO-PA Extraction into BW

    Hi all, We are looking to extracting CO-PA data into BW for use in reporting. I understand that the COPA utilises four tables namely: CE1XXXX-Actual line items CE2XXXX-Plan line items CE3XXXX-Summary table CE4XXXX-Segment table Some of our reports re

  • Bridge CS4 downloader won't browse to folder with Windows 7 64 bit

    I recently installed PS CS4 on a new PC with Windows 7.  I used the Bridge downloader as usual to download my photos to a particular folder.  Everything worked as expected as it did when I used Windows XP.  When I tried this the second time, the Brid

  • When I connect my Iphone to the computer w/ USB cable nothing happens..

    I am unable to connect my Iphone to my laptop.  After the laptop having to be restored, I am now unable to get my Iphone to sync to my laptop.  It will work with the other laptop but that is used for business purposes so the USB cable does work..  Ri

  • Percentage wise Confirmation for Multiple Service line items

    Hi, Percentage wise Confirmation for Multiple Service line items     During doing service entry sheet am able to do % wise confirmaion from Menu -> Entry Sheet -> Create -> With Planned Service -> Enter Percent. But this works only for single line it

  • Tables and Configurations

    Hi Can Anybody send me the CRM Tables & relationship and the important configurations to know in CRM. Appreciate your help in advance. [email protected] Thanks and Regards, Sarita