‎2007 Jun 26 8:14 AM
hi experts,
i am developing a report to display details of equipment number(transaction ie03).
in that to get the partner function details (parvw ' vw ' person responsible)
we have partner (PARNR I_PARNR CHAR 12 0 Partner) and name of that person. so based on parnr we get details from table pa0001 .
here we have PERNR (PERNR PERSNO NUMC 8 0 Personnel number)
(here pernr is equivalent to parnr of ihpa but data elements differ) so we get the details that is ename(employee name ).
but when i write select query i get the following error
select objnr parvw parnr
from ihpa
into table it_ihpa
for all entries in it_itab
where objnr = it_itab-objnr
and parvw = c_vw.
select pernr ename
from pa0001
into table it_pa01
for all entries in it_ihpa
where pernr = it_ihpa-parnr.
error : when using the addition "for all entries in itab",
the field pernr and it_ihpa-parnr must have same type and length.
how would i overcome that since i will get data from pa0001.
‎2007 Jun 26 8:18 AM
Hi,
Please check the data type and field length of the fields IT_PA01-PERNR and IT_IHPA-PARNR.
Hope this would solve your problem.
Reward if useful.
Nilesh.
‎2007 Jun 26 8:20 AM
Hi,
the fields you are equaitng in 2nd select statement are not havine same characterstics,
select pernr ename
from pa0001
into table it_pa01
for all entries in it_ihpa
where pernr = it_ihpa-parnr.
here
pernr is numc 8.
parnr is char 12.
Regards,
Ruchika
Reward if useful.........
‎2007 Jun 26 8:26 AM
thats what the problem is how would i overcome that since i get data from that table only.
‎2007 Jun 26 8:20 AM
Hi,
You are getting this error coz your internal table field PARNR is of type I_PARNR and PERNR is of differen type.
So you cannot compare them.
PARNR is CHAR 12 where PERNR is NUMC 10.
Regards,
Sesh
‎2007 Jun 26 8:23 AM
Hi Narshimha,
Since the technical attributes of the two fields is not same u need to transfer the contents to dummy field which will have same technical fields like 'pernr'. For that u can use the loop after the first select query.
Than u can use the for all entries variant of the select query.
If u have to use for all entries this is the only way.
Thanks and Regards,
Saurabh
‎2007 Jun 26 8:25 AM
Hi,
you can compare Ihpa and pa0001 using ihpa-aedat = pa001-aedtm.
this date of last change.
regards,
Ruchika