2017 Aug 11 10:21 AM
Error analysis The compiler returned a warning about the terminated OpenSQL command with the following text: "The database field or the result type of the aggregate function KUNNR and the component "ERDAT" of "IT_PROJ" are not compatible."
am working in ALV report (OOP) am facing this error with
the select statement:
Select VBELN BUKRS_VF KUNNR
from VBAK INTO TABLE it_proj
WHERE KUNNR IN S_KUNNR.
TOP Module:
TYPES: BEGIN OF ty_proj,
VBELN type VBAK-VBELN, "SD NO
ERNAM type vbak-ERNAM,
ERDAT type VBAK-ERDAT, "SD Date
BUKRS_VF type VBAK-BUKRS_VF, "CCoD
KUNNR type VBAK-KUNNR, "Cust No
BNAME type VBAK-BNAME, "Cust Name
BSTNK type VBAK-BSTNK, " PO No
END OF ty_proj,
DATA: wa_proj TYPE ty_proj,
wa_prps TYPE ty_prps,
it_proj TYPE STANDARD TABLE OF ty_proj,
it_prps TYPE STANDARD TABLE OF ty_prps.
2017 Aug 11 12:17 PM
Don't you see that the structure of the target table is different to the structure of the result set?
Use
INTO CORRESPONDING FIELDS OF TABLE ...
(and please take the time to remove the SPAM from the source code in your post)
2017 Aug 11 12:17 PM
Don't you see that the structure of the target table is different to the structure of the result set?
Use
INTO CORRESPONDING FIELDS OF TABLE ...
(and please take the time to remove the SPAM from the source code in your post)
2017 Aug 11 5:03 PM
"(and please take the time to remove the SPAM from the source code in your post)"
Agree, but that's most likely caused by our lovely platform. It has happened to me a few times too, especially after going back and editing code. If someone doesn't go back into their post after posting they won't notice it.
2018 Feb 25 7:32 AM
2018 Feb 25 8:27 AM
2018 Feb 25 8:52 AM
It wasn't the pasting.
Paste -> Looks OK.
Post -> Looks OK.
Edit -> looks OK.
Save -> html nonsense.
I haven't seen it happen for some time, so I guess it's fixed. But the usual rule applies: Re-read what you've just written/posted.
2018 Feb 25 1:35 PM
Good Hint.
I always copy first to Notepad and then to the lovely platform.
2020 Oct 07 11:31 AM
There are better ways to communicate, especially when we are providing assistance.