Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

error while removing endselect

hi,

i wanted to remove END SELECT instead i'm using FOR ALL ENTRIES also instead of select * i'm declearing the fields.

i have declared a headerline itab for cdhdr and kna1.

earlier no itab was used for both cdhdr and kna1.

now its showing syntax error that in for entries condition type kunnr is not matching with type OBJECTID. where as if no itab is been delared for both CDHDR and KNA1 and for all entries is not used its not showing me any error.

i have pasted code below, i wud be very thankful if any of u gud help me

regards

ram

  • SELECT * FROM cdhdr

  • WHERE tcode = gc_tcode

  • AND objectclas = gc_objcl AND

  • udate = chngdat.

SELECT objectclas objectid changenr

INTO TABLE gt_cdhdr

FROM cdhdr

WHERE tcode = gc_tcode

AND objectclas = gc_objcl AND

udate = chngdat.

IF cdhdr-objectid <> hold_cust.

MOVE cdhdr-objectid TO hold_cust.

  • SELECT * FROM kna1 WHERE kunnr = cdhdr-objectid

  • AND ktokd = gc_ktokd

  • AND loevm = gc_space.

SELECT kunnr name1 name2 name3 name4 stras ort01 regio land1 pstlz pstl2 erdat

FROM kna1

into table a1rec

for all entries in gt_cdhdr

WHERE kunnr = gt_cdhdr-objectid

AND ktokd = gc_ktokd

AND loevm = gc_space.

Tags:
Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question