2011 Nov 29 1:25 PM
Hi Expert,
for the below code i am getting error for data mismatch i.e FOR OBJEK AND JTAB-MATNR As i am comparing objek with
matnr it is throwing length mismatch error
SELECT OBJEK
ATINN
FROM AUSP INTO TABLE IT_CHAR2
move line-matnr to line-objek.
FOR ALL ENTRIES IN JTAB
WHERE OBJEK EQ JTAB-MATNR.
Regards,
Am
2011 Nov 29 1:36 PM
Hi,
The length of the fields OBJEK and MATNR are different so it would give mismatch error.
Regards,
-Sandeep
Hi Expert,
for the below code i am getting error for data mismatch i.e FOR OBJEK AND JTAB-MATNR As i am comparing objek with
matnr it is throwing length mismatch error
SELECT OBJEK
ATINN
FROM AUSP INTO TABLE IT_CHAR2
move line-matnr to line-objek.
FOR ALL ENTRIES IN JTAB
WHERE OBJEK EQ JTAB-MATNR.
Regards,
Am
2011 Nov 29 1:32 PM
Hi
In the declaration of JTAB
data : begin of JTAB occurs 0,
MATNR type AUSP-OBJEK " Instead of MARA-MATNR or simply MATNR You need to add itwhenever you use FOR ALL ENTRIES the field in left side in the where condition should match length wise with that of the right side one
Ex
select objek
from AUSP
into table itab
for all entries in JTAB
where objek = jtab-matnr " here JTAB-MATNR should have equal length of AUSP-OBJECK
which is 50 char length(if i am not wrong) where as normal MATNR is of 18 char lengthHope this serves the purpose
Cheerz
Ramchander Rao.K
2011 Nov 29 1:36 PM
Hi,
The length of the fields OBJEK and MATNR are different so it would give mismatch error.
Regards,
-Sandeep