SAP HR 复制PA30的人员
【转自http://www.512test.com/home/space.php?uid=19&do=blog&id=2381】
很多顾问测试HR的程序时都为录入人员头痛,下面的程序提供了快速复制人员的方法。
代码如下:
*&---------------------------------------------------------------------*
*& Report ZPPA_CLONE_PERNR
*&
*&---------------------------------------------------------------------*
*& CLONE
*& *
*&---------------------------------------------------------------------*
report zppa_clone_pernr line-size 255.
*
*----------------------------------------------------------------------*
* T A B L E S
*----------------------------------------------------------------------*
tables: pa0000.
*----------------------------------------------------------------------*
* C O N S T A N T S
*----------------------------------------------------------------------*
*constants: .
**----------------------------------------------------------------------*
** D A T A
**----------------------------------------------------------------------*
data: i_dd02l like dd02l occurs 0 with header line.
* Objects for variable structure assignment
data dref type ref to data.
field-symbols: <table> type any table,
<wa> type any,
<field> type any,
<field_nachn> type any,
<field_vorna> type any.
field-symbols <pnnnn> type c.
**----------------------------------------------------------------------*
** P A R A M E T E R S
**----------------------------------------------------------------------*
*### Input
selection-screen: begin of block frm1 with frame title text-010.
parameters: p_pernr like prelp-pernr default '30001' obligatory.
parameters: p_per2 like prelp-pernr default '30071' obligatory.
selection-screen: end of block frm1.
selection-screen: begin of block frm2 with frame title text-011.
select-options: pr_tnam for i_dd02l-tabname default 'PA0000' to
'PA9999' no-display.
selection-screen: end of block frm2.
selection-screen: begin of block frm3 with frame title text-012.
parameters: p_nachn like pa0002-nachn default 'Hubert'.
parameters: p_vorna like pa0002-vorna default 'Peter'.
selection-screen: end of block frm3.
parameters: p_pwd(3).
parameters: p_detail as checkbox.
parameters: p_test as checkbox default 'X'.
**----------------------------------------------------------------------*
** I N I T I A L I Z A T I O N
**----------------------------------------------------------------------*
*initialization.
*************************************************************************
** S T A R T O F P R O G R A M
*************************************************************************
**----------------------------------------------------------------------*
** S T A R T O F S E L E C T I O N
**----------------------------------------------------------------------*
start-of-selection.
if p_pwd ne '555'.
message s398(00) with '密码错误!应该为555'.
exit.
endif.
select single * from pa0000 where pernr = p_per2.
if sy-subrc = 0.
message s398(00) with '该人员号已经存在,请输入新的人员号!'.
exit.
endif.
select * from dd02l into table i_dd02l where tabname in pr_tnam.
loop at i_dd02l.
create data dref type standard table of (i_dd02l-tabname)
with non-unique default key.
assign dref->* to <table>.
select *
from (i_dd02l-tabname)
into table <table>
where pernr = p_pernr.
if sy-subrc = 0.
format color col_key intensified on.
write:/ i_dd02l.
endif.
loop at <table> assigning <wa>.
format color col_normal intensified off.
if p_detail = 'X'.
write:/3 space.
endif.
do 30 times.
assign component sy-index
of structure <wa> to <field>.
if sy-subrc = 0.
if p_detail = 'X'.
write: <field>.
endif.
endif.
enddo.
if i_dd02l-tabname = 'PA0001'.
assign component 'ENAME'
of structure <wa> to <field>.
if sy-subrc = 0.
concatenate p_vorna p_nachn into <field> separated by space.
endif.
endif.
if i_dd02l-tabname = 'PA0002'.
assign component 'NACHN'
of structure <wa> to <field>.
if sy-subrc = 0.
<field> = p_nachn.
endif.
assign component 'VORNA'
of structure <wa> to <field>.
if sy-subrc = 0.
<field> = p_vorna.
endif.
endif.
* Tab update
if p_test is initial.
assign component 'PERNR'
of structure <wa> to <field>.
<field> = p_per2.
check i_dd02l-tabname(2) = 'PA'.
modify (i_dd02l-tabname) from <wa>.
endif.
endloop.
endloop.
**----------------------------------------------------------------------*
** E N D O F S E L E C T I O N
**----------------------------------------------------------------------*
SAP HR 复制PA30的人员的更多相关文章
- SAP HR模块的基础数据表和增强配置
信息类型是SAP HR模块数据单元,用于对人员数据的记录和维护,是HR的基础.信息类型按照其创建方式的不同可以分为:人事信息类型.组织信息类型.信息类型数据的维护主要在事物码PA30.PA40.po1 ...
- 评点SAP HR功能及人力资源管理软件
评点SAP HR功能及人力资源管理软件 本文导航 第1页:my SAP 人力资源软件 第2页:my SAP HR协同功能 第3页:组织结构管理 第4页:mySAPTM HR的战略功能 第5页:集成 ...
- 【HR系列】SAP HR PA信息类型的创建与增强
公众号:SAP Technical 本文作者:matinal 原文出处:http://www.cnblogs.com/SAPmatinal/ 原文链接:[HR系列]SAP HR PA信息类型的创建与增 ...
- SAP HR工资配置项1---工资计算周期配置
对于工资计算,三个方面需要配置:工资计算期.工资类型.工资. 下面是工资期内的配置: 1.在定义参数 在参数指示工资的频率. 主题 设置期间參数 菜单路径 SAP 用户化实施指南→工资核算→工资核算: ...
- SAP HR宏 rp-provide-from-last
运行se11 Database table: 输入 TRMAC 点击display 查看其内容:第14个按钮(ctrl + shift +F10) 再Name 输入:rp-provide-from-l ...
- HR 常用事务代码
HR的键值权限查看: oosb 删除人员 : pu01 查看人员主数据:PA30 对人员进行入职.离职.调岗等基本操作:PA40 查看HR中的公式的意思:PE04 查看HR中的工资项:PE02 创建 ...
- SAP CRM 项目笔记(一) SOW(工作说明书)讨论
前记 前两天在搜索资料时,看到一个网友在博客里面记录下了自己参于项目中的所有笔记.我觉得这个想法很不错,所以决定开笔记录下SAP CRM整个项目的实施和开发过程. 之前参加集团的SAP ERP(FI/ ...
- SAP一句话入门 .
SD是Sales and Distribution的简称.在SAP系统中,销售与分销模块处在供应链下游,关注从客户订单到向客户收款的全过程. SD模块中的Sales好理解,而Distribution却 ...
- SAP ERP SD模块中维护销售人员
SAP ERP SD模块中维护销售人员信息并分配销售组织 分类: SAPHCM用户指南 在SAP ERP系统,销售和分销(SD)模块中需要创建销售人员(Sales Personnels)消息, ...
随机推荐
- 如何安装Android模拟器到VM虚拟机
1 像普通安装一样找到ISO镜像文件,该镜像文件名称为"android-x86-2.2-generic.iso",该镜像文件可以从谷歌官网得到 http://code.google ...
- JavaScript 屏蔽退格键
document.onkeydown = function(){//屏蔽Backspace键 if (event.keyCode==8){ event.keyCode=0; event.returnV ...
- 基于React的PC网站前端架构分析
代码地址如下:http://www.demodashi.com/demo/12252.html 本文适合对象 有过一定开发经验的初级前端工程师: 有过完整项目的开发经验,不论大小: 对node有所了解 ...
- 快速接入 Android BLE 开发的基础框架
代码地址如下:http://www.demodashi.com/demo/12092.html ** Android BLE基础操作框架,基于回调,操作简单.包含扫描.多连接.广播包解析.服务读写及通 ...
- <转>Windows平台下Makefile学习笔记(二)
本文转自:http://blog.csdn.net/clever101/article/details/8286066 上次我们学习了怎么用Makefile编译一个控制台工程.这次我们学习一下如何使用 ...
- C#自动切换Windows窗口程序,如何才能调出主窗口?
namespace AutoChangeWindow { partial class Form1 { /// <summary> /// 必需的设计器变量. /// </summ ...
- iOS开发 - 第05篇 - 项目 - 12 - 图文混排
1.首页微博文字处理 对于之前微博项目中首页:微博文字中的用户名.话题.链接等文字须要高亮显示.表情字符串须要显示相应表情. 思路: 1>之前微博中的文字使用NSString,要达到不同文字的高 ...
- 使用Firebug进行断点调试详解
利用Firebug我们可以非常方便地对网页上的任何JavaScript代码进行断点调试. 首先,使用快捷键F12在当前页面打开Firebug,并切换到脚本选项卡. 其次,我们需要为指定的js代码添加断 ...
- 前台freemark获取后台的值
1.后台代码: ModelAndView mv = new ModelAndView("log/logList.ftl"); String info="abc" ...
- 使用jstl标签报错:According to TLD or attribute directive in tag file, attribute value
原来jstl标签版本不一样,标签支持不一样. jstl1.0标签库不支持表达式,如: <c:if test="${query01 == null}"> <js ...