Chinaunix首页 | 论坛 | 博客
  • 博客访问: 286457
  • 博文数量: 62
  • 博客积分: 2966
  • 博客等级: 少校
  • 技术积分: 615
  • 用 户 组: 普通用户
  • 注册时间: 2007-06-07 23:16
个人简介

Be a simple man

文章分类

全部博文(62)

文章存档

2012年(6)

2011年(15)

2010年(6)

2009年(3)

2008年(5)

2007年(27)

我的朋友

分类:

2007-06-08 13:04:02

DATA: BEGIN OF it_temp OCCURS 0,
        persnumber LIKE usr21-persnumber.
        INCLUDE STRUCTURE itab.
DATA: END OF it_temp.
DATA: BEGIN OF it_adrp OCCURS 0.
        INCLUDE STRUCTURE adrp.
DATA: END OF it_adrp.
DATA: BEGIN OF it_adcp OCCURS 0.
        INCLUDE STRUCTURE adcp.
DATA: END OF it_adcp.

PERFORM getuserdata.
*&---------------------------------------------------------------------*
*&      Form  getuserdata
*&---------------------------------------------------------------------*
FORM getuserdata.
 
  SELECT *
  INTO CORRESPONDING FIELDS OF TABLE it_temp
  FROM usr02 INNER JOIN usr21
  ON usr02~bname = usr21~bname.
 
  SELECT * FROM adrp
  INTO CORRESPONDING FIELDS OF TABLE it_adrp.
 
  SELECT * FROM adcp
  INTO CORRESPONDING FIELDS OF TABLE it_adcp.
 
  LOOP AT it_temp.
    READ TABLE it_adrp  WITH KEY persnumber = it_temp-persnumber.
    IF sy-subrc = 0.
      it_temp-name_text = it_adrp-name_text.
    ENDIF.
    READ TABLE it_adcp WITH KEY persnumber = it_temp-persnumber.
    IF sy-subrc = 0.
      it_temp-department = it_adcp-department.
    ENDIF.
    MODIFY it_temp.
    MOVE-CORRESPONDING it_temp TO itab.
    APPEND itab.
  ENDLOOP.

ENDFORM.                    " getuserdata
阅读(1217) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~