Chinaunix首页 | 论坛 | 博客
  • 博客访问: 688425
  • 博文数量: 194
  • 博客积分: 7067
  • 博客等级: 少将
  • 技术积分: 2008
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-09 14:48
个人简介

我很好

文章分类

全部博文(194)

文章存档

2019年(1)

2018年(1)

2017年(3)

2015年(2)

2012年(2)

2011年(1)

2010年(27)

2009年(15)

2008年(142)

分类: WINDOWS

2008-07-01 15:12:25

REPORT z_barry_select_options_bdc .
 
DATA:   bdcdata LIKE bdcdata    OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF messtab OCCURS 0.
        INCLUDE STRUCTURE bdcmsgcoll.
DATA: END OF messtab.
DATA: BEGIN OF itab OCCURS 0 ,
        lifnr LIKE lfa1-lifnr ,
      END OF itab.
 
START-OF-SELECTION.
  APPEND '1' TO itab.
  APPEND '2' TO itab.
  APPEND '3' TO itab.
  APPEND '4' TO itab.
  APPEND '5' TO itab.
  APPEND '6' TO itab.
  APPEND '7' TO itab.
  APPEND '8' TO itab.
  APPEND '9' TO itab.
  APPEND '10' TO itab.
  APPEND '11' TO itab.
  APPEND '12' TO itab.
 
  REFRESH bdcdata .
  CLEAR bdcdata .
  PERFORM bdc_dynpro  USING 'RFITEMAP'   '1000'.
  PERFORM bdc_field   USING 'BDC_OKCODE' '=%004'.
  PERFORM bdc_field   USING 'BDC_CURSOR' 'KD_LIFNR-LOW'.
  LOOP AT itab.
    PERFORM bdc_dynpro  USING 'SAPLALDB'   '3000'.
    PERFORM bdc_field   USING 'BDC_OKCODE' '=P+'.
    PERFORM bdc_field   USING 'BDC_CURSOR' 'RSCSEL-SLOW_I(02)'.
    PERFORM bdc_field   USING 'RSCSEL-SLOW_I(02)' itab-lifnr .
  ENDLOOP.
  PERFORM bdc_dynpro  USING 'SAPLALDB'   '3000'.
  PERFORM bdc_field   USING 'BDC_OKCODE' '=ACPT'.
  CALL TRANSACTION 'FBL1N' USING bdcdata MODE 'A' UPDATE 'S'
                                        MESSAGES INTO messtab.
*----------------------------------------------------------------------*
*        Start new screen                                              *
*----------------------------------------------------------------------*
FORM bdc_dynpro USING program dynpro.
  CLEAR bdcdata.
  bdcdata-program  = program.
  bdcdata-dynpro   = dynpro.
  bdcdata-dynbegin = 'X'.
  APPEND bdcdata.
ENDFORM.                    "BDC_DYNPRO
*----------------------------------------------------------------------*
*        Insert field                                                  *
*----------------------------------------------------------------------*
FORM bdc_field USING fnam fval.
  CLEAR bdcdata.
  bdcdata-fnam = fnam.
  bdcdata-fval = fval.
  CONDENSE bdcdata-fval.
  APPEND bdcdata.
ENDFORM.                    "BDC_FIELD
阅读(553) | 评论(0) | 转发(0) |
0

上一篇:图片放到DB

下一篇: 计划策略 - MTS部分

给主人留下些什么吧!~~