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

problem in data element

Former Member
0 Likes
894

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.

5 REPLIES 5
Read only

Former Member
0 Likes
758

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.

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
758

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.

Read only

Former Member
0 Likes
758

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

Read only

Former Member
0 Likes
758

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.

Read only

former_member404244
Active Contributor
0 Likes
758

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