首页 > 代码库 > HR学习01——创建组织单位
HR学习01——创建组织单位
创建组织单位:
RH_OBJECT_CREATE
REPORT ZLYHR01.DATA:LS_OBJ TYPE OBJEC, LV_STU TYPE GDSTR-SVECT, LV_TIT TYPE CHAR20, LV_SUBTYP TYPE SUBTYP, LS_P1000 TYPE P1000, LT_P1000 TYPE TABLE OF P1000.LS_OBJ-OTYPE = ‘O‘."对象类型LS_OBJ-PLVAR = ‘01‘."计划版本CALL FUNCTION ‘RH_OBJECT_CREATE‘ EXPORTING* LANGU = SY-LANGU PLVAR = LS_OBJ-PLVAR OTYPE = LS_OBJ-OTYPE* EXT_NUMBER = ‘00000000‘ SHORT = ‘测试组织单元‘ STEXT = ‘测试组织单元‘* BEGDA = SY-DATUM* ENDDA = ‘99991231‘* OSTAT = ‘1‘* VTASK = ‘D‘* GUID =* KEEP_LUPD = ‘ ‘ IMPORTING OBJID = LS_OBJ-OBJID EXCEPTIONS TEXT_REQUIRED = 1 INVALID_OTYPE = 2 INVALID_DATE = 3 ERROR_DURING_INSERT = 4 ERROR_EXT_NUMBER = 5 UNDEFINED = 6.IF SY-SUBRC = 0. CALL FUNCTION ‘BAPI_TRANSACTION_COMMIT‘ EXPORTING WAIT = ‘X‘. WRITE LS_OBJ-OBJID.ELSE. CALL FUNCTION ‘BAPI_TRANSACTION_ROLLBACK‘.ENDIF.
结果:50000103
HR学习01——创建组织单位
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。