2008 Jun 18 6:26 AM
Hi experts,
While debuggung my report it shows an error When using the addition "FOR ALL ENTRIES IN itab", the fields "OBJECTID" and "ITAB_EIPA-EBELN" must have the same type and length.
I m sending u some line of my codes, where it is showing an error.
data:begin of itab_cdhdr occurs 0,
OBJECTID like eipa-ebeln,
UDATE like cdhdr-UDATE,
TCODE like cdhdr-TCODE,
end of itab_cdhdr.
if itab_ekbe[] is not initial.
select ebeln ebelp werks preis
into table itab_eipa
from eipa
for all entries in itab_ekbe
where ebeln = itab_ekbe-ebeln and
ebelp = itab_ekbe-ebelp and
werks eq p_werks .
endif.
if itab_eipa[] is not initial.
select OBJECTID UDATE TCODE
into table itab_cdhdr
from cdhdr
for all entries in itab_eipa
where OBJECTID = itab_eipa-ebeln
and TCODE = 'ME29N' .
endif.
Plz tell what will b the possible solution.
definitely rwds pts,
Savita
Hi experts,
While debuggung my report it shows an error When using the addition "FOR ALL ENTRIES IN itab", the fields "OBJECTID" and "ITAB_EIPA-EBELN" must have the same type and length.
I m sending u some line of my codes, where it is showing an error.
data:begin of itab_cdhdr occurs 0,
OBJECTID like eipa-ebeln,
UDATE like cdhdr-UDATE,
TCODE like cdhdr-TCODE,
end of itab_cdhdr.
if itab_ekbe[] is not initial.
select ebeln ebelp werks preis
into table itab_eipa
from eipa
for all entries in itab_ekbe
where ebeln = itab_ekbe-ebeln and
ebelp = itab_ekbe-ebelp and
werks eq p_werks .
endif.
if itab_eipa[] is not initial.
select OBJECTID UDATE TCODE
into table itab_cdhdr
from cdhdr
for all entries in itab_eipa
where OBJECTID = itab_eipa-ebeln
and TCODE = 'ME29N' .
endif.
Plz tell what will b the possible solution.
definitely rwds pts,
Savita
2008 Jun 18 6:31 AM
inside itab_eipa declare another field as
objectid like cdhdr-OBJECTID.
after the first select stmt use the following
loop at itab_eipa.
itab_eipa-objectid = itab_eipa-ebeln.
modify itab_eipa transporting objectid.
endloop.
if itab_eipa[] is not initial.
select OBJECTID UDATE TCODE
into table itab_cdhdr
from cdhdr
for all entries in itab_eipa
where OBJECTID = itab_eipa-objectid
and TCODE = 'ME29N' .
endif.
2008 Jun 18 6:40 AM
2008 Jun 18 6:32 AM
Hi,
in the select staements what u have written
select ebeln ebelp werks preis
into table itab_eipa
from eipa
for all entries in itab_ekbe
where ebeln = itab_ekbe-ebeln and
ebelp = itab_ekbe-ebelp and
werks eq p_werks .
and the other one, when u r mentioning some fields u should use into corresonding clause.
modify the above select as
select ebeln ebelp werks preis
from eipa into corresponding fields of table itab_eipa
for all entries in itab_ekbe
where ebeln = itab_ekbe-ebeln and
ebelp = itab_ekbe-ebelp and
werks eq p_werks .
***reward if useful
regards,
Ruby.
2008 Jun 18 6:33 AM
Hi,
Lenght of both the variables should be same, try to declare of same length.
Regards
Susheel.
2008 Jun 18 6:42 AM
2008 Jun 18 7:03 AM
In the declaration part of internal table itab_ekbe, declare field 'ebeln type cdhdr-objectid'.
2008 Jun 18 7:05 AM
Hi,
define objectid in the given format in the internal table.
OBJECTID like CDHDR-OBJECTID.
Regards,
Venkat N
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |