*&---------------------------------------------------------------------* *& Form FRM_GET_INFO_EDH *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * <--P_LS_I08301_D01 text *----------------------------------------------------------------------* FORM frm_get_info_edh CHANGING cs_i08301_d01 TYPE ztpy_i08301_d01. **需求描述:中间表BONUS_EMP_INFO_EDH2023 取值定义 DATA: BEGIN OF ls_edh2023, emp_sap_id TYPE char50, "员工id emp_no TYPE char50, "员工工号 emp_class TYPE char50, "人员类别(取值idl,dl) bu_id TYPE char50, "所属bu hr_scope_id TYPE char50, "人事范围id salary_scope_id TYPE char50, "工资范围id position_grade_id TYPE char50, "职级id position_tier TYPE char50, "层级 END OF ls_edh2023. CLEAR: ls_edh2023. EXEC SQL.
"注意字段间隔用逗号 SELECT emp_sap_id, emp_class, bu_id, hr_scope_id, salary_scope_id, position_grade_id, position_tier FROM BONUS_EMP_INFO_EDH2023 INTO :ls_edh2023-emp_sap_id, :ls_edh2023-emp_class, :ls_edh2023-bu_id, :ls_edh2023-hr_scope_id, :ls_edh2023-salary_scope_id, :ls_edh2023-position_grade_id, :ls_edh2023-position_tier WHERE bonus_year = :'2023' AND sap_client_id = :SY-MANDT AND emp_sap_id = :cs_i08301_d01-PERNR ENDEXEC. IF ls_edh2023-emp_sap_id NE space. cs_i08301_d01-werks = ls_edh2023-hr_scope_id . cs_i08301_d01-abkrs = ls_edh2023-salary_scope_id . cs_i08301_d01-persg = ls_edh2023-emp_class(1). cs_i08301_d01-zhr900106 = ls_edh2023-bu_id ."部门编码 cs_i08301_d01-zhr000101 = ls_edh2023-position_grade_id ."职级 cs_i08301_d01-zcjwb = ls_edh2023-position_tier ."层级文本 **cs_i08301_d01-zhr910208 = ls_edh2023-perf_level."最终等级 ENDIF. ENDFORM.
标签:d01,DEMO,edh2023,ls,SQL,cs,OPEN,id,i08301 From: https://www.cnblogs.com/rainysblog/p/17958927