‎2007 Jun 26 9:49 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.
‎2007 Jun 26 9:53 AM
Hi,
Check the Data type and Length of the fields " pernr and it_ihpa-parnr ".
It must be a Same data type and Length. Then Only you can compare the fields.
Thanks.
‎2007 Jun 26 9:53 AM
Hi,
Try this.
if not it_ihpa[] is initial.
select pernr ename
from pa0001
into table it_pa01
for all entries in it_ihpa
where pernr = it_ihpa-parnr+4(8).
endif.
‎2007 Jun 26 10:04 AM
Hi
You mention that the value of PARNR will be same as PERNR for PARVW vw, then while declaring it_ihpa, give parnr like pernr-pernr.
Regards
Navneet
‎2007 Jun 26 10:08 AM
HI,
TO COMPARE TWOFIELDS OF TWO DIFFERENT TABLES WE MUST HAVE DATA TYPE AND LENGTH SAME AND TRY TO USE
IF IT_HPA IS NOT INITIAL.
select pernr ename
from pa0001
into table it_pa01
for all entries in it_ihpa
where pernr = it_ihpa-parnr.
ENDIF.
‎2007 Jun 26 10:22 AM
Hi,
The field PERNR and PARNR are different.So u can't directly write in the where condition.Try like this as given jayanti
if not it_ihpa[] is initial.
select pernr ename
from pa0001
into table it_pa01
for all entries in it_ihpa
where pernr = it_ihpa-parnr+4(8).
endif.
Regards,
Nagaraj