HR--一个员工的所有主数据(PA*)克隆到一个新员工的程序代码
来源:互联网 发布:hadoop1.0.0源码下载 编辑:程序博客网 时间:2024/06/10 07:48
这个程序将一个员工的所有主数据(PA*)克隆到一个新员工,具体代码
*&---------------------------------------------------------------------*
*& 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: type any table,
field-symbols
**----------------------------------------------------------------------*
** 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 'Bitte Passwort eingeben'.
exit.
endif.
select single * from pa0000 where pernr = p_per2.
if sy-subrc = 0.
message s398(00) with 'PERNR Existiert schon,bitte zuerst vollst. löschen'.
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 .
select *
from (i_dd02l-tabname)
into table
where pernr = p_pernr.
if sy-subrc = 0.
format color col_key intensified on.
write:/ i_dd02l.
endif.
loop at assigning
format color col_normal intensified off.
if p_detail = 'X'.
write:/3 space.
endif.
do 30 times.
assign component sy-index
of structure
if sy-subrc = 0.
if p_detail = 'X'.
write:
endif.
endif.
enddo.
if i_dd02l-tabname = 'PA0001'.
assign component 'ENAME'
of structure
if sy-subrc = 0.
concatenate p_vorna p_nachn into
endif.
endif.
if i_dd02l-tabname = 'PA0002'.
assign component 'NACHN'
of structure
if sy-subrc = 0.
endif.
assign component 'VORNA'
of structure
if sy-subrc = 0.
endif.
endif.
* Tab update
if p_test is initial.
assign component 'PERNR'
of structure
check i_dd02l-tabname(2) = 'PA'.
modify (i_dd02l-tabname) from
endif.
endloop.
endloop.
**----------------------------------------------------------------------*
** E N D O F S E L E C T I O N
**----------------------------------------------------------------------*
source url: https://www.sdn.sap.com/irj/sdn/wiki?path=/display/Snippets/HR+Clone+Pernr&
Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=1812309
- HR--一个员工的所有主数据(PA*)克隆到一个新员工的程序代码
- HR--一个员工的所有主数据(PA*)克隆到一个新员工的程序代码
- HR--一个员工的所有主数据(PA*)克隆到一个新员工的程序代码
- 一个HR对所有维权者的忠告(转)
- 合并所有表的数据到一个表中
- 一个截取字符串的程序代码
- 一个深沉的HR笑话
- 一个深沉的HR笑话
- 一个深沉的HR笑话
- 一个深沉的HR笑话
- 一个深沉的HR笑话
- 一个深沉的HR笑话
- 一个HR的面试建议
- 一个HR的职业感想
- 一个HR的职业感想
- 一个深沉的HR笑话
- 一个深沉的HR笑话
- 一个招聘HR的牢骚
- ABAP--SAP UI的发展路线
- ABAP--OBJECTS ABAP的类的基础知识
- ABAP--REUSE_ALV_GRID_DISPLAY的i_callback_user_command的调用跟踪摘抄
- ABAP--如何使用CL_SALV_TABLE 的代码样例(2004以后版本)
- ABAP--如何在abap中使用日志管理
- HR--一个员工的所有主数据(PA*)克隆到一个新员工的程序代码
- BDC Program to Upload Material Master Data (MM01)
- BW--一些关于DTP的一些链接
- LSMW--一个中文介绍的摘抄
- sql取汉字拼音首字母和汉字首笔划
- MM--物料重新过账的代码摘抄
- HR--一个奖金模拟试算的程序,仅供参考
- ABAP--HR的工资计算样例代码
- ABAP--如何创建和使用sap的号码范围对象