I need to select a field from knb1 where kunnr from knb1 is equal to kunnr in likp and assign it to field KART_KLIENT1. For a reason I can't warp my head around, it says that neither table knb1 nor likp have a column kunnr... Which both of them do.
I don't know where to look for a problem, both knb1 and likp are predefined database tables in SAP and kunnr column is there by default.
I am working in SQ02, adding the code to one of the fields.
Thank you for your time.
TYPES: BEGIN OF ty_knb, tlfns TYPE knb1, END OF ty_knb. DATA: wa_knb TYPE ty_knb. SELECT SINGLE TLFNS INTO wa_knb FROM knb1 WHERE knb1-kunnr = likp-kunnr. KART_KLIENT1 = wa_knb-tlfns