1:
method GET_CUSTOMER. DATA: zlt TYPE table OF ZGT_CUSTOMER, "定义内表 zlv TYPE ZGT_CUSTOMER. "定义结构体变量 IF IS_CUST_KEY IS NOT INITIAL. select * from ZMAST_CUST INTO TABLE zlt where CUSTNO = '00009'. ELSE. ENDIF. IF SY-SUBRC = 0. loop at zlt into zlv. "将内表中的数据取出,赋值给结构体。 * IF <data>-NEW EQ 'C' OR <data>-NEW EQ 'M'. MOVE-CORRESPONDING zlv TO es_cust_attr. " move-corresponding a to b. "a和b的类型必须相同。 RETURN. ENDLOOP. * ENDIF. ENDIF. endmethod.