Concatenate PO Text

Hi,
I am getting the PO text from FM Read_text. I need to set the text like about 3000 characters. Now, the text seems to be 132 characters. I found out that we can keep concatenating the text the number of times we want into one string so that all 3000 characters are in one line.
Can someone suggest how to do that?
Thanx in advance.
Regards,
Fred.

data :v_length type i,
V_text(3000) type c.
*--IT_TEXT is the internal table with records from READ_TEXT
loop at IT_TEXT.
  v_length = strlen( v_text ).
  if v_length >= 3000.
    exit.
  endif.
  concatenate v_text
              it_text-tdline
              into v_text separated by space.
endloop.
*--now V_TEXT will store max of 3000 chars.
but if you want to print it on the output,use offset functionality of V_TEXT
check this logic.
regards
srikanth
Message was edited by: Srikanth Kidambi

Similar Messages

  • ABAP Class CL_RSR_WWW_MODIFY_TABLE, Method to concatenate 2 texts

    Hi Experts.
    I  want to use Web Design API for Tables for a BW WEB report.
    I should concatenate the texts from 1. and 2. column into 3. colum.
    I created an ABAP Klass that has CL_RSR_WWW_MODIFY_TABLE as superclass.
    Which method should I use here ?
    How can I concatenate the text form different characteristics ?
    I tried to call method GET_CELL_IFO in method DATA_CELL but no success ?
    Can you provide some sample codes .
    Thanks.

    Hi,
    You can acheive this through using the CAPTION_CELL method and CHARACTERISTIC_CELL methods.
    We need to use CAPTION_CELL method to merge headers and then the other one to merge char values.
    For detail info refer these links:
    Merging the values of two columns into one column BW Report
    You can make use of the coding and methodlogy that was used in this below article.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f0aca990-0201-0010-0380-f3aac4127a57
    Hope this helps you.
    Regards,
    Rajkandula

  • Concatenate text to a number

    I have cells that are formatted as numbers to 2 decimal places which hold the result of a simple formula (e.g. =C4/D4) that divides a distance by a duration (to calculate km/h). An example value in the result cell is 28.02.
    If I change the formula (e.g. =C4/D4 & " km/h") to concatenate some text to the result of the formula then Numbers ignores the decimal place setting for the cell and displays the maximum number of decimal places. For example, I was expecting to see "28.02 km/h" but instead Numbers displays "28.0155642023346 km/h".
    Following the same process in Excel works as I'd expect and the result of the formula is displayed as "28.02 km/h".
    Any ideas? Is this is a bug in Numbers?

    It's really simple.
    When you concatenate a number to a piece of text, the number format no longer apply.
    Use a formula really asking for what you want, like
    =ROUND(C4/D4,2)&" km/h"
    and you will get what you want !
    What you got is an example of the perfect result to a wrongly defined problem.
    Yvan KOENIG (VALLAURIS, France) jeudi 8 juillet 2010 18:19:04

  • Can i concatenate or add to the existing header text with new text  logic

    Hi,
    Is it possible to concatenate additional text into an existing text type? For example, would it be possible to write new logic where if certain conditions are met, the text in theheader detailswould be added to the existing Preparation Header text?
    I have on e delivery , i want to add the header text with with  date field (concatenate header text with date (godds issue date)in a single text
    please let me know.

    Venkata
    Unfortunately I am not aware of any such standard FM, I searched for it during my first reply itself, but no benefit.
    You can develop one if no std FM is available for this with the help of your technical g uy.

  • Concatenate text at transfer structure

    Hello
    Is it possible to concatenate 2 text at transfer staruture level via routine and to keep them in one infoobject. ?
    ANd can we pull this concatenate text in Bex analyzer and would it show the same long text in report ?
    Regards

    You can do that but if you are looking at storing more than 60 characters - you cannot - the display output is automatically limited to 60 characters ... if it is less than 60 characters - you can concatenate the two objects into another infoobject in the transfer rules...
    Object 1
    Object 2
    Object 3 ( this is not in your DS but is there in your CS )
    In the rule section of Object 3 have
    concatenate TRAN_STRUCTURE-Object1 TRAN_STRUCTURE-OBJECT2 into result.

  • How to concatenate date and time after a logical file in application server

    Hi Experts ,
    I have a requirement that goes like this : I have a job that runs parallelly with 10 different variants at the same time. Each job will write the data into a file in the application server, since the jobs run parallelly there is a chance of the file being over-written and hence we have decided to concatenate time and date at the end of the file so that the file does not get over-written. Can someone please let me know how to incorporate this change.
    Thanks & Regards,
    Balaji.K

    Hi Balaji.
    Use CONCATENATE functionality.
    A sample code snippet for your reference :-
    CONCATENATE  p_path  text-202 c_9 p_name c_9  lv_fcount  c_9  lv_date
                                                 c_9 lv_time  INTO  gv_file.
    Regards
    Abhii

  • Carriage return in central text

    Hi,
    I'd like to know how to add a carriage return character in a central text of an order document.
    I use SAVE_TEXT BAPI to add central text in an order.
    Thank you for your help.

    carriage return is available in class CL_ABAP_CHAR_UTILITIES
    you just have to concatenate existing text with
    CL_ABAP_CHAR_UTILITIES=>CR_LF

  • Issue with printing Standard Text in Production Environment.

    Hi Peers,
    In my smartform,
    The Std Text  on back of page in Production System is getting truncated.But in Development system it is fully printed.
    I checked for the printers & language that are used in both the systems it is the same.
    Could you please let me know your views as to what might be the problem.
    Is it a basis issue or is there anything that  we can do on development side.
    Thanks in advance!
    Daniel

    Hi Phani,
    Thanks for your reply. In fact both me and user are doing the same. For user some times this text is not showing and some times it is. This is very strange.
    I can do this by keeping it in text element. But for some texts we need to add some other text in between dynamically.
    for example : for BE10 we need to show like,
    CONCATENATE 'This text is prepared on behalf of  (' <vendor name> ') ' some text' INTO w_title_text.
    In this case: I have tried preparing this text in the program lines node. Here the problem is I can able to mention single quote in prepare the text. In the above example it is bold.
    Basically I don't what's happening when printing report texts. But if there is a way to show single quote while prepare text that should be fine.
    Thank you
    Surya

  • Reset Text Items in For Loop

    Hi everybody,
    OS: Windows XP SP2
    Forms: 10.1.2.0.2
    Browser: FireFox 2.0.0.5
    I have in my form (100 text items) and the following code:
    DECLARE
    i NUMBER := 0;
    BEGIN
    FOR i IN 1 .. 100 LOOP
    SET_ITEM_PROPERTY( 'txt_segment_' || i , VISIBLE , PROPERTY_FALSE );
    SET_ITEM_PROPERTY( 'txt_segment_' || i , ENABLED , PROPERTY_FALSE );
    END LOOP;
    END;
    I want to reset all text items in my for loop i.e.
    txt_segment_1 = '';
    txt_segment_2 = '';
    txt_segment_100 = '';
    But I want to do it in the for loop, how ??
    Please help, and best regards ('',)

    Kevin .. you are GENIUS ;)
    It worked with NAVIGABLE set property.
    I have another question since you're around :)~
    I'm trying to concatenate all text items in a for loop into a varable x with the following code:
    FOR i IN 1 .. 100 LOOP
    COPY( x || 'txt_segment_' || i , x );
    END LOOP;
    but I end up with the following error:
    FRM-40738: Argument 2 to builtin COPY cannot be null.
    Its equivalent to the following code:
    x := x || txt_segment_1;
    x := x || txt_segment_2;
    x := x || txt_segment_100;
    OR equivalent to:
    x := txt_segment_1 || txt_segment_2 || .. || txt_segment_100;

  • Purchase Order Description Text

    Hi All,
    I am trying to display a POD text but it is cutting off, can anyone help to write the purchase order description text. Currently it can only display only 130 characters.
    gv_repid = sy-repid.
    SELECT SINGLE ebeln INTO i_tab-ebeln FROM ekpo  WHERE matnr = i_tab-matnr.
      line_id     = 'BEST'.
      line_name   = i_tab-matnr.
      line_lang   = sy-langu.
      line_object = 'MATERIAL'.
    CALL FUNCTION 'READ_TEXT'
        EXPORTING
          id                      = line_id
          language                = line_lang
          name                    = line_name
          object                  = line_object
        TABLES
          lines                   = i_tabs
        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.
      ENDIF.
      LOOP AT i_tabs.
        CONDENSE i_tabs-tdline.
        CONCATENATE i_tab-text i_tabs-tdline INTO i_tab-text SEPARATED BY space.
        MODIFY i_tab TRANSPORTING text.
      ENDLOOP.
    Regards,
    Fred

    Hi
    This is my code:
    FORM reading_text.
    Begin of i_tab occurs 0,
       text(150) type c
    end of i_tab.
      gv_repid = sy-repid.
    SELECT ebeln INTO i_tab-ebeln FROM ekpo  WHERE matnr = i_tab-matnr.
        EXIT.
      ENDSELECT.
      line_id     = 'BEST'.
      line_name   = i_tab-matnr.
      line_lang   = sy-langu.
      line_object = 'MATERIAL'.
    ALL FUNCTION 'READ_TEXT'
        EXPORTING
          id                      = line_id
          language                = line_lang
          name                    = line_name
          object                  = line_object
        TABLES
          lines                   = i_tabs
        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.
      ENDIF.
      LOOP AT i_tabs.
        CONDENSE i_tabs-tdline.
        CONCATENATE i_tab-text i_tabs-tdline INTO i_tab-text(150) SEPARATED BY space.
        MODIFY i_tab TRANSPORTING text.
      ENDLOOP.
    CALL FUNCTION 'SAVE_TEXT'
        EXPORTING
          header = i_tab-text
        TABLES
          lines  = i_tabs.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    It's giving me a dump:call_function_conflict_leng
    There are other fields in an internal table.
    Regards,
    Fred
    Edited by: Fred Mogaadile on Sep 26, 2008 6:17 AM
    Edited by: Fred Mogaadile on Sep 26, 2008 6:19 AM

  • Issue with printing report texts in Smartform

    Hi ,
    I developed a smartform and a print program. In the title of the smartform I need print a text depend on the company code. For this I prepared this text in the print program like the following.
    case rbkp-bukrs.
      when 'IT10'
        smartform_struct-title = text-010.
    endcase.
    The problem is some times these texts are not printing on the form output. User are mad at this. when they complines me and I go and look at it, it is fine. I don't think this is printer issue. Any clues please let me know.
    Thank you,
    Surya

    Hi Phani,
    Thanks for your reply. In fact both me and user are doing the same. For user some times this text is not showing and some times it is. This is very strange.
    I can do this by keeping it in text element. But for some texts we need to add some other text in between dynamically.
    for example : for BE10 we need to show like,
    CONCATENATE 'This text is prepared on behalf of  (' <vendor name> ') ' some text' INTO w_title_text.
    In this case: I have tried preparing this text in the program lines node. Here the problem is I can able to mention single quote in prepare the text. In the above example it is bold.
    Basically I don't what's happening when printing report texts. But if there is a way to show single quote while prepare text that should be fine.
    Thank you
    Surya

  • Saving report in text file...

    Can anyone tell me how can i save the includes used in my program into text file and save them in some folder as individual textfile ? Which Function module will be used??urgently required..

    Hello Mandeep,
    following is the program to download your program into text file in a particulat folder.
    REPORT  ZTNEEL_DOWNLOAD_PROG                  .
    TABLES : tadir,trdirt.
    DATA: BEGIN OF itab OCCURS 100,
    text(75),
    END OF itab.
    data:progname type itab.
    DATA: BEGIN OF repname OCCURS 10,
    obj_name LIKE tadir-obj_name,
    END OF repname.
    PARAMETERS : devclass LIKE tadir-devclass,
    dirname(50) DEFAULT 'C:\',
    author like tadir-author.
    insert progname into repname.
    modify repname.
    DATA name LIKE rlgrap-filename.
    LOOP AT repname.
      READ REPORT repname-obj_name INTO itab.
    ****Get report title
      SELECT SINGLE * FROM trdirt WHERE name EQ repname-obj_name
      AND sprsl = 'E'.
      CONCATENATE '*' trdirt-text INTO trdirt-text.
      INSERT trdirt-text INTO itab INDEX 1.
      CONCATENATE dirname '\' repname-obj_name '.txt'
      INTO name.
    *exit.
      CALL FUNCTION 'WS_DOWNLOAD'
        EXPORTING
          filename                = name
        TABLES
          data_tab                = itab
        EXCEPTIONS
          file_open_error         = 1
          file_write_error        = 2
          invalid_filesize        = 3
          invalid_table_width     = 4
          invalid_type            = 5
          no_batch                = 6
          unknown_error           = 7
          gui_refuse_filetransfer = 8
          OTHERS                  = 9.
    ENDLOOP.
    MESSAGE i002(sy) WITH 'All the reports transfered Succefully'.
    Regards,
    Neelambari

  • How to display text in addition to average group result

    Hi All,
    This is probably really simple but i need your help.
    What i have done:
    I have 4 questions which each one has 5 radio box options. For each group of questions, i have put a value of 1-5 for the radio boxes.
    What i am trying to do:
    What i want to do is calculate the total for the group results as an average and display some additional text. T
    The averaging for the group results is working, but i dont know how to add the additional text for the 1-5 values returned.
    For example, if the average for all 4 questions turns out to be 3, i want the text box to not only display 3 but state Moderate - 3; or something like 3 - Moderate.
    Any help would be greatly appreciated.
    Thank you,
    Greg

    Like in Excel you need to add some additional code but with JavaScript it is a lot more code. Unless you use a hidden field to hold the computed average, you need to provide all the code to perform the average, that is sum all the fields and divide by the number of fields. Once you have that value you can concatenate the text to the number. Or you could have one text field with the computed average and a second text field with the text. You will also have to deal with the average not always being a whole number. If you change the number of decimal places for your solution, you will see this.
    function GetField(cName) {
    // get object for field with cName;
    // return object or null if not found;
    var oField = this.getField(cName);
    if(oField == null) app.alert("Field named " +cName + " not found.", 0, 0);
    return oField;
    } // end GetField function;
    function Sum(aNames) {
    // get sum of the fields in aNamee array;
    var nSum = 0; // sum of fields;
    var nValue; // value or a single field;
    // process array of field names;
    for(i = 0; i < aNames.length; i++) {
    var nValue = GetField(aNames[i]).valueAsString;
    if(isNaN(nValue) == false) nSum += Number(nValue);
    } // get next field name;
    return nSum;
    } // end Sum function;
    function Average(aNames) {
    // compute average of the values of array of field names;
    var nAverage = "";
    var nSum = Sum(aNames); // get sum of field values;
    if(aNames.length > 0) nAverage = nSum / aNames.length;
    return nAverage;
    } // end Average function;
    // array of field names to average;
    var aFields = new Array("Value.0", "Value.1", "Value.2", "Value.3", "Value.4");
    // compute average using the function and place result in a variable;
    var nAverage = Average(aFields);
    // array of text for value of average;
    var aResult = new Array("Zero average", "Poor", "Better", "Mid point", "Better", "Best");
    // display computed average and text;
    event.value = nAverage + "  " + aResult[Math.floor(nAverage)];

  • Full Text not Displaying in table

    Hi Experts
    I am displaying Long text in Text elements in table But  It is not displaying full Text only Half of text is displaying.
    How to overcome this? Is there any length limitation for text elements in table.
    and Variable type is STRING
    i am concatenating lines from Read text FM.
    Regards
    Jagadish
    Edited by: acj_vy on Aug 17, 2010 10:23 AM

    Hi,
    You should not concatenate the text into string which you read using READ_TEXT.
    You should loop at the table and then display the text using work area of the table.
    It will be displayed line by line as it is getting displayed in your standard transaction.
    Thanks,
    Archana

  • Concatenate

    Hi!
    I need concatenate a where clause:
    STATUS = 'P' AND PROCESSDAT < '20071212'
    20071212 is from lv_time variable.
    I have 2 codes but both with a problem:
    CONCATENATE ' STATUS = ' ' ' text-000
                      ' AND PROCESSDAT <' ' ' text-002 lv_time text-002 INTO lv_where_clause.
    text-000 is equal to 'P' and text-002 is equal to '
    The problem is that between ='P' and <20071212 there are not a space.
    Result: STATUS ='P' AND PROCESSDAT <'20071212'
    Second form:
        CONCATENATE ' STATUS =' text-000
                    ' AND PROCESSDAT < ' text-002 lv_time text-002 INTO lv_where_clause SEPARATED BY space.
    Result: STATUS = 'P' AND PROCESSDAT < ' 20071212 ' (spaces between ' and 20071212.
    How i can solve this. I want exactely:
    STATUS = 'P' AND PROCESSDAT = '20071212'
    Regards!

    DATA: lv_time LIKE SY-DATUM.
    lv_time = '20071212'.
    CONCATENATE ' STATUS = ' text-000
                      ' AND PROCESSDAT < ' text-002 lv_time text-002 INTO lv_where_clause.
    text symbols
    000 'P'
    002 '
    Result: STATUS ='P' AND PROCESSDAT <'20071212'
    i want: STATUS = 'P' AND PROCESSDAT < '20071212'
    Thx very much

Maybe you are looking for

  • Unable to print barcode in xml publisher

    Hi All, I tried to print the barcode using xml publisher but i am not able to do so. Will you please guide me on this ! I follow the below steps, please correct me if i am wrong. Step1: I downloaded the IDAutomationSC128L.ttf and paste in c:\Windows\

  • Java NIO Vs Normal IO

    hi ppl...i want to know when v should prefer nio over normal io. I read somewhere that only if you have to deal with a lot of connections simultaneously you should consider using NIO. as an example it said that a web spider which needs to process a f

  • Non-***. KF are coming blank for newly created Plant/Mat in Inventory Query

    Hi, In my BEx query, Total stock quantity values for newly created Plant is not coming. BW and R3 have gone live on the same date. (1) Did Stock initialization for existing Plant. (2) Filled set up table and did INIt load for the existing plants. (3)

  • Upgrade OS on my iBook G4

    I want to upgrade the OS on my iBook G4 - I currently have OS X version 10.3.9 - I am currently not able to run the latest flash player and have other limited functionality. I know that Snow Leopard is not compatible with my hardware. What is the lat

  • Help With Ringtones

    When I put ringtones on the phone from my computer they do not show up on the blackberry.  I am using the SD card, the music and pictures work but not the ringtones...do they require a specific format??