BAPI--使用HR_INFOTYPE_OPERATION函数批量导入HR信息纪录代码样例(0759信息类型)

此报告展示了如何使用BAPI函数HR_INFOTYPE_OPERATION批量导入人力资源的0759信息类型记录。通过示例代码,解释了如何处理数据并进行批量操作,包括获取组织信息、薪酬计划详情等,最终创建或更新0759信息类型的记录。
摘要由CSDN通过智能技术生成

report  zp_pa_ecm_conv_0759
        no standard page heading.
 
* tables
tables:
       pernr.  "Standard Selections for HR Master Data
 
* infotypes
infotypes:
    0001,    "Org Assignment
    0008,    "Basic Pay  "SD1K911053
    0758,    "Compensation Program
    0759.    "Compensation Process
 
* data declarations
* Types
type-pools : slis.   "Global data for ALV
 
* alv field catalog
data: t_fieldcat type slis_t_fieldcat_alv with header line.
 
*constants
constants:
      c_usd   type waers             value 'USD',     "Currency  "SD1K913769
      c_pernr(5)                     value 'PERNR',   "Pers no
      c_sname(5)                     value 'SNAME',   "Emp Name
      c_werks(5)                     value 'WERKS',   "Pers Area
      c_btrtl(5)                     value 'BTRTL',   "Pers Subarea
      c_persg(5)                     value 'PERSG',   "Emp Grp
      c_persk(5)                     value 'PERSK',   "Emp Subgrp
      c_orgeh(5)                     value 'ORGEH',   "Org Unit
      c_citem(5)                     value 'CITEM',   "Comp Review Item
      c_effdt(5)                     value 'EFFDT',   "Effective date
      c_0759  type infty             value '0759',    "Comp Process
      c_tclas type pspar-tclas       value 'A',       "Transaction class for data storage
      c_actio type pspar-actio       value 'INS',     "Infotype operation
      c_10    type ecm_carea         value '10',      "Comp Area
      c_background_id type bds_typeid value 'PMMN_BACKGROUND'.  "ALV background
 
 
* work fields
data:
       w_title type lvc_title,                      "#EC NEEDED  "Title
       w_count type i.      "no of recs
 
* field strings
* return structure
data: rec_return type bapiret1.   "return code
 
* internal tables
data:
     begin of t_out occurs 0,
      pernr   type pernr_d,         "Pers. No
      sname   type smnam,           "Employee name
      werks   type persa,           "Pers Area
      btrtl   type btrtl,           "Pers Subarea
      persg   type persg,           "Emp Group
      persk   type persk,           "Emp Subgrp
      orgeh   type orgeh,           "Org. Unit
      citem   type ecm_citem,       "Compensation Review Item
      effdt   type ecm_effdt,       "Effective date
      bssal   type ecm_bssal,       "Caluclation Base  "SD1K913769
      curre   type waers,           "Currency          "SD1K913769
end of t_out.
 
* error table
data:
      begin of t_error occurs 0,
       pernr type pernr_d,   "Pers no
       sname type sname,     "Emp Name
  

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
引用\[2\]:前几天用到HR模块的一个函数HR_INFOTYPE_OPERATION。这个函数是用来操作HR信息类型的。在调用这个函数之前,需要先加锁,然后调用HR_INFOTYPE_OPERATION函数进行操作,最后再解锁。\[2\]根据参数OPERATION的不同取值,可以实现不同的操作,比如创建、修改、删除等。其中,主要的取值有INS、INSS和MOD。\[2\]INS表示创建一个新的记录,即使系统中已经存在相同类型的记录。INSS表示创建一个新的记录,如果系统中已经存在相同类型的记录,则将其转换为修改操作。MOD表示修改已存在的记录。\[3\]根据你的需求,你可以查找类似的BAPI函数来实现相同的功能。 #### 引用[.reference_title] - *1* [SAP 函数HR_INFOTYPE_OPERATION报错](https://blog.csdn.net/ptpassword/article/details/131400421)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* *3* [HR_INFOTYPE_OPERATION_SAP刘梦_新浪博客](https://blog.csdn.net/senlinmu110/article/details/109652316)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值