‎2008 Mar 27 10:48 AM
HI Expert,
Pls check the below code as data is not fetching due to BGMKOBJ-OBJNR(22) not equal to EQKT-EQUNR(18).
select EQUNR
EQKTX
from EQKT into corresponding fields of table IT_EQKT
from EQKT into table IT_EQKT
into table IT_EQKT
from EQKT
for all entries in IT_BGMKOBJ
for all entries in IT_ITOB
where EQUNR = IT_ITOB-OBJNR
and spras eq 'EN'.
Pls help me with code.
Thanks & Regards,
Singha
‎2008 Mar 27 10:56 AM
Hi,
The problem in your select query is your are matching OBJNR field to EQUNR
Where EQUNR is equipment number
OBJNR is object number
if you have only objnr in hand then go to EQUI table and fetch the EQUNR field and use for all entries by the the EQUNR fetched
Regards,
siva chalasani.
‎2008 Mar 27 10:59 AM
select EQUNR
EQKTX
.
.
.
.
.
*change the where condition as
where EQUNR = IT_ITOB-OBJNR+0(18).
‎2008 Mar 27 11:03 AM
Hi,
You can do inother way ,but not suggestable.
DATA : v_char(18).
LOOP AT IT_ITOB.
v_char = IT_ITOB-OBJNR.
select EQUNR
EQKTX
into APPENDING table IT_EQKT
from EQKT
where EQUNR = v_char
and spras eq 'EN'.
clear v_char.
ENDLOOP.
‎2008 Mar 27 11:19 AM
‎2008 Mar 27 11:04 AM
Hi,
Remove the FIRST TWO characters of OBJNR field and then pass that to the SELECT query.
In the table BGMKOBJ , for EQUNR present in EQKT, each EQUNR is appended with value 'IE' in the beginning.
So truncate the first two characters.
Your select query will work just fine.
Reward if helpful.
Regards.
‎2008 Mar 27 11:19 AM
Create a new internal table with the field EQUNR with BGMKOBJ-OBJNR values and do for all entries on this table.There is no alternative on this.
e.g,
types: begin of t_equnr,
equnr type EQKT-EQUNR,
end of t_equnr.
data : it_equnr type table of t_equnr,
wa_equnr type t_equnr.
loop at IT_BGMKOBJ into wa_BGMKOBJ .
wa_equnr-equnr = wa_BGMKOBJ-OBJNR.
append wa_equnr to it_equnr.
endloop.
select EQUNR
EQKTX
from EQKT into corresponding fields of table IT_EQKT
from EQKT into table IT_EQKT
into table IT_EQKT
from EQKT
for all entries in IT_BGMKOBJ
for all entries in it_equnr
where EQUNR = it_equnr-EQUNR