‎2008 Jul 18 3:57 PM
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 .
‎2008 Jul 18 4:12 PM
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
‎2008 Jul 18 4:09 PM
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.
‎2008 Jul 18 4:16 PM
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
‎2008 Jul 18 4:21 PM
Hi,
Yes while u concatenate lets say NAM is the name field
give it as NAM(6) while concatinating it..
Regards,
Sai
‎2008 Jul 18 4:12 PM
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
‎2008 Jul 18 4:20 PM
‎2008 Jul 18 4:46 PM
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
‎2008 Jul 18 4:13 PM
Hi,
Just give the type as character. with your desired length.....
eg.
OBJDES(100) type c.
Regards,
Sai