Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Concatenating free text into a String

Former Member
0 Likes
733

Hi All,

I am reading some text using function module and kept in an Internal Table.

Again looping that internal table and concatenating the text into a variable of data type String.

but for first time after reaching 255 characters, it is skipping 4 words and then it is continuing.

it is taking more than 1500 characters in that string and the 4 words which are missed are repeating again in later. And that time the data is captured properly. Only first time after 255 characters i'm facing this type of issue. And the function module i am using is"FDM_CCT_GET_MULTI".

Please advise me in resolving the issue.

Regards,

Chaitanya A

Hi All,

I am reading some text using function module and kept in an Internal Table.

Again looping that internal table and concatenating the text into a variable of data type String.

but for first time after reaching 255 characters, it is skipping 4 words and then it is continuing.

it is taking more than 1500 characters in that string and the 4 words which are missed are repeating again in later. And that time the data is captured properly. Only first time after 255 characters i'm facing this type of issue. And the function module i am using is"FDM_CCT_GET_MULTI".

Please advise me in resolving the issue.

Regards,

Chaitanya A

3 REPLIES 3
Read only

Former Member
0 Likes
596

You need to do this .

Declare : lv_string type string.

Clear lv_string. "Clear variable before use

Loop at internal table into workwrea..

"Concatinate field from workarea in LV_STRING.

ENDLOOP.

Check the place where you are using the concatinate statement , is there any offset used? Debug and check the values in this loop.

Hope this helps you.

Read only

former_member217544
Active Contributor
0 Likes
596

Hi Chaitanya,

If there are any issues even after trying with the above suggestion, then post your code

Regards,

Swarna Munukoti.

Read only

0 Likes
596

Hi,

already my current code is like this.

gx_wl-comment is a string declaration.

CALL FUNCTION 'FDM_CCT_GET_MULTI'

EXPORTING

i_coll_segment = lv_segmt

i_customer = gv_kunnr

i_since_date = gv_tstamp

ix_bypass_buffer = 'X'

IMPORTING

et_notes = lt_notes.

LOOP AT lt_notes INTO lx_notes.

TRANSLATE lx_notes-text_line USING '" '.

AT NEW case_guid.

lv_header = 'X'.

ENDAT.

IF lv_header = 'X'.

IF lx_notes-text_line <> ' '.

IF gx_wl-comment = ' '.

condense lx_notes-text_line.

CONCATENATE '=' '"' gx_wl-comment lx_notes-text_line '"' INTO gx_wl-comment.

ELSE.

CONCATENATE gx_wl-comment '&CHAR(10)&' '"' lx_notes-text_line '"' INTO gx_wl-comment.

ENDIF.

ENDIF.

ELSE.

CONCATENATE gx_wl-comment '&CHAR(10)&' '"' lx_notes-text_line '"' INTO gx_wl-comment.

ENDIF.

CLEAR lv_header.

ENDLOOP.