See the below select statement. It is failing. I think this is because of domain types in CDHDR and EKKO. How should trouble shoot this..
UDATE FROM CDHDR INTO TABLE GT_HDR
FOR ALL ENTRIES IN GT_EKKO WHERE
OBJECTID IN GT_EKKO-EBELN AND
USERNAME IN SO_ERNAM AND
UDATE IN SO_ERDAT.