Skip to Content
avatar image
Former Member

problem with string concatenation

Hi all,

I have defined an internal table with line type as char65.

I have populated 10 lines of data in internal table.

when I concatenated all lines of itab into a string field some data is missing.

In debugging mode, if I check the value of the string field, there are different options.

(In New Debugger)

For Fast display: Some text is missing

For Tabular : Full text is coming.

If I print the string field with the write statement Full text is displayed.

But if I send this text to a smartform there the full text is not passed, only Fast display text is passed.

What could be the reason for this deviation.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

7 Answers

  • avatar image
    Former Member
    Sep 02, 2008 at 07:23 AM

    can you give your code?

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Narin,

      Thanks for ur time.

      But still I am not getting entire text in to the string.

      I am passing the internal table to smartform, there I have concatenated into a string field.

      I defined string field in global data of Global Definitions.

      I checked by writing the code in initialization and in program lines.

      On both occassions it is giving the same output as in the previous case. Text is limited to particular no. of chars only.

      Did u check that the different views of string field in Debugging Mode.

      Can we specify some thing for tabular view.

  • avatar image
    Former Member
    Sep 02, 2008 at 07:28 AM

    Hi ,

    The Reason could be , There is Fixed length..Maybe it is Extending that Length after concatenation of group of lines into a Single string.

    It would be clear for us, if you can provide us your code.

    Regards,

    Deepthi Dandibhotla.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 02, 2008 at 09:08 AM

    Try changing the data element like char255 or char 1000....

    Regards,

    Kunjal

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      Try doing it this way just for testing purpose....implement it if its working fine.....

      LOOP AT it_duties into work_area.
      
      CONCATENATE text2 work_area-field_name INTO text2 SEPARATED BY space.
      
      ENDLOOP.

      Regards,

      Kunjal

  • Sep 02, 2008 at 09:12 AM

    Hi Charan,

    There is once class which is used to concatenate all the values into one string.

    Correct me if i am wrong

    Thanks & Regards,

    M.Ramana Murthy

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi everybody,

      Is there no solution for this...

      Seems to be simple but not working..

      Ramana,

      you told one class is there for concatenate, can u give details of that, Will it solve the prob.

  • avatar image
    Former Member
    Sep 02, 2008 at 09:27 AM

    Hi charan,

    The maximum length that is allowed will be 255.

    Make all the 10 lines of internal table data according to that and use 'concatenate with no gaps' statement and also check whether the length of the field you are choosing for displaying this in the smart form having sufficient length.

    I think this will help you.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 02, 2008 at 10:48 AM

    Hi charan,

    you put the text upto 255 char in one line of internal table by concatenating if the lenght is more than 255 put that line into second line of internal table and do subsequently.

    I think this will be helpful to you.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Surya,

      Taking the data again in internal table, would create more probs when it is handled in a smartform.

      Why because I need to insert this text in between a static text which has boxes around it. So I can't insert a table inside a text field.

      If it is a string field I can simply include in b/w the static text which is in smartform.

  • avatar image
    Former Member
    Oct 06, 2008 at 10:17 AM

    Concatenation is possible but while displaying split the spring into 255 char.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello,

      What do u exactly mean? I didnt got you...

      Can you please explain it in detail.....??

      Please grant points if the question is answered satisfactorily.....

      Regards,

      Kunjal