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

printing

Former Member
0 Likes
942

hi all,

i have used a field called SOOD1-OBJDES which has length of 50.

but i want to insert the fields which will exceed 50. how to do it.

CONCATENATE text-005

ekbe-ebeln_ebeln

ekbe-ebelp_item

lfa1-name1_nom

INTO object_hd_change-objdes

SEPARATED BY space .

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
914

If you cannot increase the length of the field,

Try limiting the text and the name fields to lenght 10. Usually name will be 35 char and text will be 50 char long.

See if you can truncate any other field in the concatenate statement so that the entire thing fits in 50 char.

cheers,

Sushil Joshi

7 REPLIES 7
Read only

former_member217544
Active Contributor
0 Likes
914

Hi Murali,

When the destinationm variable lengtth is 50 character it is not possible to concatenate text of more than that length. Even if you do it will truncate all the text after 50 characters.

To resolve your issue,

Either the destination field should be more than 50 character or else declare a table with the field as SOOD1-OBJDES.

Eg:

Types: begin of x_sood1,

OBJDES type OBJDES,

end of x_sood1.

DATA: IT_sood1 type table of x_sood1,

wa_sood1 type x_sood1.

Now in the logic write:

CONCATENATE text-005

ekbe-ebeln_ebeln

INTO wa_sood1-objdes

SEPARATED BY space .

append wa_sood1 to it_sood1.

clear wa_sood1.

CONCATENATE

ekbe-ebelp_item

lfa1-name1_nom

INTO object_hd_change-objdes

SEPARATED BY space .

append wa_sood1 to it_sood1.

Now it_sood1 holds the whole data.

And you can keep loop for it_sood1 for printing the whole text.

Regards,

Swarna Munukoti.

Read only

0 Likes
914

thnk u for ur reply,

i can other idea like , that name field is alone using length 35 .so is it possible to show only the 6 characters used by that particular field .

guide me

Read only

0 Likes
914

Hi,

Yes while u concatenate lets say NAM is the name field

give it as NAM(6) while concatinating it..

Regards,

Sai

Read only

Former Member
0 Likes
915

If you cannot increase the length of the field,

Try limiting the text and the name fields to lenght 10. Usually name will be 35 char and text will be 50 char long.

See if you can truncate any other field in the concatenate statement so that the entire thing fits in 50 char.

cheers,

Sushil Joshi

Read only

0 Likes
914

gud suggestion,

how to truncate that particular name field

Read only

0 Likes
914

Hi Murali,

data: w_text(10) type c.

w_text = text-005 -


This will assign 10 characters of text field to w_text

then use your concatenate statement:

CONCATENATE w_text

ekbe-ebeln_ebeln

ekbe-ebelp_item

lfa1-name1_nom(10)

INTO object_hd_change-objdes

SEPARATED BY space .

cheers,

Sushil Joshi

Read only

Former Member
0 Likes
914

Hi,

Just give the type as character. with your desired length.....

eg.

OBJDES(100) type c.

Regards,

Sai