‎2009 Aug 10 10:49 AM
Hello Experts,
I have this piece of code
SELECT ebeln ebelp FROM ekpo
INTO it_temp
WHERE ebeln = it_temp-ebeln.
ENDSELECT.
l_ebeln1 = it_temp-ebeln.
t_ebelp = it_temp-ebelp.
CONCATENATE it_temp-ebeln it_temp-ebelp INTO l_key.
l_matnr1 = l_key.
Here the ebeln(char10) and ebelp(n5) is not getting into l_key(char70).
can anybody please guide me how to do this.
Regards,
Abhinab Mishra
‎2009 Aug 10 10:56 AM
Hi,
Try this.
SELECT ebeln ebelp FROM ekpo
INTO it_temp
WHERE ebeln = it_temp-ebeln.
ENDSELECT.
l_ebeln1 = it_temp-ebeln.
t_ebelp = it_temp-ebelp.
CONCATENATE l_ebeln1 t_ebelp INTO l_key.
l_matnr1 = l_key.
Regards,
Vijay
‎2009 Aug 10 11:01 AM
Dear Vijay,
Your solution is not working for me.
Regards,
Abhinab
‎2009 Aug 10 10:57 AM
Hi Abhinab,
I thnk concatenate is possible only for character strings .Move ur numeric field ebelp into a character field and then Concatenate.
Regards,
Lakshman.
‎2009 Aug 10 11:14 AM
Hi Abhinab,
pass ebelp the numeric field into a character field and thn concatenate..
data:
w_str1(10) type c,
w_str2(5) type c.
w_str1 = it_temp-ebeln.
w_str2 = it_temp-ebelp.
CONCATENATE w_str1 w_str2 INTO l_key.
l_matnr1 = l_key.
Regards.
‎2009 Aug 10 11:32 AM
Hi Abhinab,
i think when you are fetching data from table that syntax not correct. so data is not coming into the internal table.
Don't use select enselect statement.
follow the code like :
PARAMETERS: ebeln type ebeln.
types: begin of t_ekpo,
ebeln type ebeln,
ebelp type ebelp,
end of t_ekpo.
data: l_var type char70.
data: i_ekpo type standard table of t_ekpo with header line.
wa_ekpo type ekpo.
select ebeln ebelp
from ekpo
into table i_ekpo
where ebeln = ebeln.
loop at i_ekpo.
concatenate i_ekpo-ebeln i_ekpo-ebelp into l_var.
write:/ l_var.
endloop.
Hope you understand well.
Regards,
Tutun
‎2009 Aug 10 11:35 AM
Did Vijay's solution work ? Dont think so
This works for me ..
DATA:h TYPE ebeln.
DATA:i TYPE ebelp.
DATA:j(15) TYPE c.
select single ebeln ebelp from ekpo into (h,i).
concatenate h i into j.
write j.
‎2009 Aug 10 11:36 AM
Hi Abhinab,
change the type of t_ebelp to CHAR lenght 5 at the time of defining it.
because concatenate only works with character and string field types to for others.
Regards,
Raj Gupta
‎2009 Aug 10 11:39 AM
‎2009 Aug 10 12:56 PM
hello Abhinab,
Try This..
SELECT SINGLE ebeln ebelp
FROM ekpo INTO CORRESPONDING FIELDS OF it_temp
WHERE ebeln = '2200000693' {Wrtite Your Condictions}
l_ebeln1 = it_temp-ebeln.
t_ebelp = it_temp-ebelp.
CONCATENATE it_temp-ebeln it_temp-ebelp INTO l_key.
l_matnr1 = l_key.
Its working fine.
Vanu.