Chinaunix首页 | 论坛 | 博客
  • 博客访问: 710347
  • 博文数量: 145
  • 博客积分: 3446
  • 博客等级: 中校
  • 技术积分: 1567
  • 用 户 组: 普通用户
  • 注册时间: 2006-08-30 13:58
文章分类

全部博文(145)

文章存档

2021年(1)

2020年(1)

2019年(1)

2018年(6)

2017年(1)

2016年(10)

2015年(12)

2014年(10)

2013年(15)

2012年(33)

2011年(21)

2010年(9)

2009年(18)

2008年(2)

2006年(5)

我的朋友

分类: 嵌入式

2011-08-25 07:39:37

REPORT  zhymu001.

TABLES: likp,zhymu001_t,tsege.
TYPE-POOLS: slis.
DATA: g_repid     LIKE sy-repid.
DATA: gt_fieldcat TYPE slis_t_fieldcat_alv .
DATA: gs_fieldcat TYPE slis_fieldcat_alv .
DATA: gs_layout   TYPE slis_layout_alv.
DATA: gs_variant  LIKE disvariant.
DATA: t_cat TYPE TABLE OF lvc_s_fcat,
      w_cat LIKE LINE OF t_cat.
FIELD-SYMBOLS: TYPE table,
              ,
              .
DATA: t_ref TYPE REF TO data.
DATA: w_ref TYPE REF TO data.
DATA vbelv TYPE vbeln_von.
DATA line TYPE i.
DATA t_nei LIKE zhymu001_t OCCURS 0 WITH HEADER LINE.
DATA t_tsege LIKE tsege OCCURS 0 WITH HEADER LINE.
DATA BEGIN OF t_order OCCURS 0.
        INCLUDE STRUCTURE zhymu001_s.
DATA wadat_ist LIKE likp-wadat_ist.
DATA END OF t_order.
DATA dateb TYPE d.
DATA datee TYPE d.
DATA timeb TYPE t.
DATA timee TYPE t.
SELECTION-SCREEN BEGIN OF BLOCK bk1 WITH FRAME TITLE text-001.
SELECT-OPTIONS vbeln FOR likp-vbeln obligatory.
SELECT-OPTIONS erdat FOR likp-erdat .
SELECT-OPTIONS kunnr FOR likp-kunnr .
SELECTION-SCREEN END OF BLOCK bk1.
START-OF-SELECTION.
***************获取数据
  REFRESH: t_order,t_tsege,t_nei.
  SELECT * INTO TABLE t_nei
    FROM zhymu001_t .
  SORT t_nei BY date_bn.
  SELECT vbeln kunnr handle wadat_ist
    INTO CORRESPONDING FIELDS OF TABLE t_order
    FROM likp
    WHERE vbeln IN vbeln AND erdat IN erdat
      AND kunnr IN kunnr.
  LOOP AT t_order.
    SELECT SINGLE vbelv INTO t_order-vbelv
      FROM vbfa
      WHERE vbeln = t_order-vbeln.
    SELECT SINGLE name1 INTO t_order-kunnr_n
      FROM kna1
      WHERE kunnr = t_order-kunnr .
    SELECT SINGLE lifnr INTO t_order-sp_no
      FROM vbpa
      WHERE vbeln = t_order-vbeln AND parvw = 'SP'.
    SELECT SINGLE name1 INTO t_order-sp_name
      FROM lfa1
      WHERE lifnr = t_order-sp_no .
    MODIFY t_order. CLEAR t_order.
  ENDLOOP.
  SELECT * INTO TABLE t_tsege
    FROM tsege
    FOR ALL ENTRIES IN t_order
    WHERE head_hdl = t_order-handle.
  LOOP AT t_nei.
    LOOP AT t_tsege WHERE even = t_nei-even
                      AND even_verty = t_nei-even_verty .
    ENDLOOP.
    IF sy-subrc <> 0 .
      DELETE t_nei. CLEAR t_nei.
    ENDIF.
  ENDLOOP.
*****************创建内表
  REFRESH t_cat .
  UNASSIGN: ,.
  CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
    EXPORTING
      i_structure_name = 'ZHYMU001_S'
    CHANGING
      ct_fieldcat      = t_cat.
  DESCRIBE TABLE t_cat LINES line .
  SORT t_nei BY date_bn.
  LOOP AT t_nei.
    IF t_nei-date_bn IS NOT INITIAL.
      line = line + 1.
      w_cat-fieldname = t_nei-date_bn.
      w_cat-scrtext_m = t_nei-date_bt.
      w_cat-col_pos = line.
      w_cat-inttype = 'D'.
      w_cat-intlen  = 10.
      APPEND w_cat TO t_cat. CLEAR w_cat.
    ENDIF.
    IF t_nei-time_bn IS NOT INITIAL.
      line = line + 1.
      w_cat-fieldname = t_nei-time_bn.
      w_cat-scrtext_m = t_nei-time_bt.
      w_cat-col_pos = line.
      w_cat-inttype = 'T'.
      w_cat-intlen  = 8.
      APPEND w_cat TO t_cat. CLEAR w_cat.
    ENDIF.
    IF t_nei-date_en IS NOT INITIAL.
      line = line + 1.
      w_cat-fieldname = t_nei-date_en.
      w_cat-scrtext_m = t_nei-date_et.
      w_cat-col_pos = line.
      w_cat-inttype = 'D'.
      w_cat-intlen  = 10.
      APPEND w_cat TO t_cat. CLEAR w_cat.
    ENDIF.
    IF t_nei-time_en IS NOT INITIAL.
      line = line + 1.
      w_cat-fieldname = t_nei-time_en.
      w_cat-scrtext_m = t_nei-time_et.
      w_cat-col_pos = line.
      w_cat-inttype = 'T'.
      w_cat-intlen  = 8.
      APPEND w_cat TO t_cat. CLEAR w_cat.
    ENDIF.
  ENDLOOP.
  line = line + 1.
  w_cat-fieldname = 'WADAT_IST'.
  w_cat-scrtext_m = 'Act. gds mvmt'.
  w_cat-col_pos = line.
  w_cat-inttype = 'D'.
  w_cat-intlen  = 10.
  APPEND w_cat TO t_cat. CLEAR w_cat.
 
  CALL METHOD cl_alv_table_create=>create_dynamic_table
    EXPORTING
      it_fieldcatalog = t_cat
    IMPORTING
      ep_table        = t_ref.
  ASSIGN t_ref->* TO .
  CREATE DATA w_ref LIKE LINE OF .
  ASSIGN w_ref->* TO .
*************填充动态内表
  LOOP AT t_order.
    ASSIGN COMPONENT 'VBELV' OF STRUCTURE TO .
    = t_order-vbelv.
    ASSIGN COMPONENT 'VBELN' OF STRUCTURE TO .
    = t_order-vbeln.
    ASSIGN COMPONENT 'HANDLE' OF STRUCTURE TO .
    = t_order-handle.
    ASSIGN COMPONENT 'KUNNR' OF STRUCTURE TO .
    = t_order-kunnr.
    ASSIGN COMPONENT 'KUNNR_N' OF STRUCTURE TO .
    = t_order-kunnr_n.
    ASSIGN COMPONENT 'SP_NO' OF STRUCTURE TO .
    = t_order-sp_no.
    ASSIGN COMPONENT 'SP_NAME' OF STRUCTURE TO .
    = t_order-sp_name.
    ASSIGN COMPONENT 'WADAT_IST' OF STRUCTURE TO .
    = t_order-wadat_ist.
    LOOP AT t_nei .
      LOOP AT t_tsege WHERE even = t_nei-even
                        AND even_verty = t_nei-even_verty .
        CLEAR: dateb,timeb,datee,timee.
        CONVERT TIME STAMP t_tsege-even_tstfr
          TIME ZONE t_tsege-even_zonfr
          INTO DATE dateb TIME timeb.
        IF t_nei-date_bn IS NOT INITIAL.
          ASSIGN COMPONENT t_nei-date_bn OF STRUCTURE TO .
          = dateb.
        ENDIF.
        IF t_nei-time_bn IS NOT INITIAL.
          ASSIGN COMPONENT t_nei-time_bn OF STRUCTURE TO .
          = timeb.
        ENDIF.
        CONVERT TIME STAMP t_tsege-even_tstto
          TIME ZONE t_tsege-even_zonto
          INTO DATE datee TIME timee.
        IF t_nei-date_en IS NOT INITIAL.
          ASSIGN COMPONENT t_nei-date_en OF STRUCTURE TO .
          = datee.
        ENDIF.
        IF t_nei-time_en IS NOT INITIAL.
          ASSIGN COMPONENT t_nei-time_en OF STRUCTURE TO .
          = timee.
        ENDIF.
      ENDLOOP.
    ENDLOOP.
    APPEND TO .
  ENDLOOP.
 
END-OF-SELECTION.
***************输出
  REFRESH gt_fieldcat. CLEAR gs_fieldcat.
  LOOP AT t_cat INTO w_cat .
    MOVE-CORRESPONDING w_cat TO gs_fieldcat.
    gs_fieldcat-seltext_m = w_cat-scrtext_m.
    IF w_cat-fieldname = 'VBELN'.
      gs_fieldcat-hotspot = 'X'.
    ENDIF.
    IF w_cat-fieldname = 'HANDLE'.
      gs_fieldcat-no_out = 'X'.
    ENDIF.
    APPEND gs_fieldcat TO gt_fieldcat .
    CLEAR: w_cat,gs_fieldcat .
  ENDLOOP .
  gs_layout-zebra             = 'X'.
  gs_layout-cell_merge        = 'X'.
  gs_layout-colwidth_optimize = 'X'.
*  gs_layout-info_fieldname = 'LINE_COLOR'.
  g_repid = sy-repid.
  gs_variant-report = sy-repid.
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
*      i_background_id    = 'ALV_BACKGROUND'
      i_callback_pf_status_set = 'MENU_SET'
      i_callback_user_command  = 'USER_COMMAND'
      i_callback_program = g_repid
      is_layout          = gs_layout
*      i_save             = 'A'
*      is_variant         = gs_variant
    it_fieldcat        = gt_fieldcat[]
    TABLES
      t_outtab           = .
*&--------------------------------------------------------------------*
*&      Form  menu_set
*&--------------------------------------------------------------------*
*       text
*---------------------------------------------------------------------*
*      -->RT_EXTAB   text
*---------------------------------------------------------------------*
FORM menu_set USING lt_extab TYPE slis_t_extab.
  DATA: ls_extab TYPE slis_extab.
  SET PF-STATUS '101'.   "定义屏幕状态,然后在里面定义自己的按钮
ENDFORM.                    "menu_set
*&--------------------------------------------------------------------*
*&      Form  execute_command
*&--------------------------------------------------------------------*
*       text
*---------------------------------------------------------------------*
*      -->R_UCOMM    text
*      -->RS_SELFIELDtext
*---------------------------------------------------------------------*
FORM user_command USING ucomm LIKE sy-ucomm
                  rs_selfield TYPE slis_selfield.
  DATA: bdcdata_wa  TYPE bdcdata,
        bdcdata_tab TYPE TABLE OF bdcdata.
  DATA opt TYPE ctu_params.
  CASE ucomm.
    WHEN '&IC1'.
      READ TABLE INTO
        INDEX rs_selfield-tabindex .
      ASSIGN COMPONENT 'VBELN' OF STRUCTURE
        TO .
      CLEAR bdcdata_wa.
      bdcdata_wa-program  = 'SAPMV50A'.
      bdcdata_wa-dynpro   = '4004'.
      bdcdata_wa-dynbegin = 'X'.
      APPEND bdcdata_wa TO bdcdata_tab. CLEAR bdcdata_wa.
      bdcdata_wa-fnam = 'LIKP-VBELN'. "输入框名称
      bdcdata_wa-fval = . "传过去的值
      APPEND bdcdata_wa TO bdcdata_tab. CLEAR bdcdata_wa.
      bdcdata_wa-program  = 'SAPMV50A'.
      bdcdata_wa-dynpro   = '1000'.
      bdcdata_wa-dynbegin = 'X'.
      APPEND bdcdata_wa TO bdcdata_tab. CLEAR bdcdata_wa.
      bdcdata_wa-fnam = 'BDC_OKCODE'. "输入框名称
      bdcdata_wa-fval = '=HTER_T'. "传过去的值
      APPEND bdcdata_wa TO bdcdata_tab. CLEAR bdcdata_wa.
      opt-dismode = 'E'.
      CALL TRANSACTION 'VL03N' USING bdcdata_tab OPTIONS FROM opt.

  ENDCASE.
ENDFORM.                    "execute_command
 
  1. REPORT zhymu001.
  2. TABLES: likp,zhymu001_t,tsege.
  3. TYPE-POOLS: slis.
  4. DATA: g_repid LIKE sy-repid.
  5. DATA: gt_fieldcat TYPE slis_t_fieldcat_alv .
  6. DATA: gs_fieldcat TYPE slis_fieldcat_alv .
  7. DATA: gs_layout TYPE slis_layout_alv.
  8. DATA: gs_variant LIKE disvariant.
  9. DATA: t_cat TYPE TABLE OF lvc_s_fcat,
  10. w_cat LIKE LINE OF t_cat.
  11. FIELD-SYMBOLS: TYPE table,
  12. ,
  13. .
  14. DATA: t_ref TYPE REF TO data.
  15. DATA: w_ref TYPE REF TO data.
  16. DATA vbelv TYPE vbeln_von.
  17. DATA line TYPE i.
  18. DATA t_nei LIKE zhymu001_t OCCURS 0 WITH HEADER LINE.
  19. DATA t_tsege LIKE tsege OCCURS 0 WITH HEADER LINE.
  20. DATA BEGIN OF t_order OCCURS 0.
  21. INCLUDE STRUCTURE zhymu001_s.
  22. DATA wadat_ist LIKE likp-wadat_ist.
  23. DATA END OF t_order.
  24. DATA dateb TYPE d.
  25. DATA datee TYPE d.
  26. DATA timeb TYPE t.
  27. DATA timee TYPE t.
  28. SELECTION-SCREEN BEGIN OF BLOCK bk1 WITH FRAME TITLE text-001.
  29. SELECT-OPTIONS vbeln FOR likp-vbeln obligatory.
  30. SELECT-OPTIONS erdat FOR likp-erdat .
  31. SELECT-OPTIONS kunnr FOR likp-kunnr .
  32. SELECTION-SCREEN END OF BLOCK bk1.
  33. START-OF-SELECTION.
  34. ***************获取数据
  35. REFRESH: t_order,t_tsege,t_nei.
  36. SELECT * INTO TABLE t_nei
  37. FROM zhymu001_t .
  38. SORT t_nei BY date_bn.
  39. SELECT vbeln kunnr handle wadat_ist
  40. INTO CORRESPONDING FIELDS OF TABLE t_order
  41. FROM likp
  42. WHERE vbeln IN vbeln AND erdat IN erdat
  43. AND kunnr IN kunnr.
  44. LOOP AT t_order.
  45. SELECT SINGLE vbelv INTO t_order-vbelv
  46. FROM vbfa
  47. WHERE vbeln = t_order-vbeln.
  48. SELECT SINGLE name1 INTO t_order-kunnr_n
  49. FROM kna1
  50. WHERE kunnr = t_order-kunnr .
  51. SELECT SINGLE lifnr INTO t_order-sp_no
  52. FROM vbpa
  53. WHERE vbeln = t_order-vbeln AND parvw = 'SP'.
  54. SELECT SINGLE name1 INTO t_order-sp_name
  55. FROM lfa1
  56. WHERE lifnr = t_order-sp_no .
  57. MODIFY t_order. CLEAR t_order.
  58. ENDLOOP.
  59. SELECT * INTO TABLE t_tsege
  60. FROM tsege
  61. FOR ALL ENTRIES IN t_order
  62. WHERE head_hdl = t_order-handle.
  63. LOOP AT t_nei.
  64. LOOP AT t_tsege WHERE even = t_nei-even
  65. AND even_verty = t_nei-even_verty .
  66. ENDLOOP.
  67. IF sy-subrc <> 0 .
  68. DELETE t_nei. CLEAR t_nei.
  69. ENDIF.
  70. ENDLOOP.
  71. *****************创建内表
  72. REFRESH t_cat .
  73. UNASSIGN: ,.
  74. CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
  75. EXPORTING
  76. i_structure_name = 'ZHYMU001_S'
  77. CHANGING
  78. ct_fieldcat = t_cat.
  79. DESCRIBE TABLE t_cat LINES line .
  80. SORT t_nei BY date_bn.
  81. LOOP AT t_nei.
  82. IF t_nei-date_bn IS NOT INITIAL.
  83. line = line + 1.
  84. w_cat-fieldname = t_nei-date_bn.
  85. w_cat-scrtext_m = t_nei-date_bt.
  86. w_cat-col_pos = line.
  87. w_cat-inttype = 'D'.
  88. w_cat-intlen = 10.
  89. APPEND w_cat TO t_cat. CLEAR w_cat.
  90. ENDIF.
  91. IF t_nei-time_bn IS NOT INITIAL.
  92. line = line + 1.
  93. w_cat-fieldname = t_nei-time_bn.
  94. w_cat-scrtext_m = t_nei-time_bt.
  95. w_cat-col_pos = line.
  96. w_cat-inttype = 'T'.
  97. w_cat-intlen = 8.
  98. APPEND w_cat TO t_cat. CLEAR w_cat.
  99. ENDIF.
  100. IF t_nei-date_en IS NOT INITIAL.
  101. line = line + 1.
  102. w_cat-fieldname = t_nei-date_en.
  103. w_cat-scrtext_m = t_nei-date_et.
  104. w_cat-col_pos = line.
  105. w_cat-inttype = 'D'.
  106. w_cat-intlen = 10.
  107. APPEND w_cat TO t_cat. CLEAR w_cat.
  108. ENDIF.
  109. IF t_nei-time_en IS NOT INITIAL.
  110. line = line + 1.
  111. w_cat-fieldname = t_nei-time_en.
  112. w_cat-scrtext_m = t_nei-time_et.
  113. w_cat-col_pos = line.
  114. w_cat-inttype = 'T'.
  115. w_cat-intlen = 8.
  116. APPEND w_cat TO t_cat. CLEAR w_cat.
  117. ENDIF.
  118. ENDLOOP.
  119. line = line + 1.
  120. w_cat-fieldname = 'WADAT_IST'.
  121. w_cat-scrtext_m = 'Act. gds mvmt'.
  122. w_cat-col_pos = line.
  123. w_cat-inttype = 'D'.
  124. w_cat-intlen = 10.
  125. APPEND w_cat TO t_cat. CLEAR w_cat.
  126. CALL METHOD cl_alv_table_create=>create_dynamic_table
  127. EXPORTING
  128. it_fieldcatalog = t_cat
  129. IMPORTING
  130. ep_table = t_ref.
  131. ASSIGN t_ref->* TO .
  132. CREATE DATA w_ref LIKE LINE OF .
  133. ASSIGN w_ref->* TO .
  134. *************填充动态内表
  135. LOOP AT t_order.
  136. ASSIGN COMPONENT 'VBELV' OF STRUCTURE TO .
  137. = t_order-vbelv.
  138. ASSIGN COMPONENT 'VBELN' OF STRUCTURE TO .
  139. = t_order-vbeln.
  140. ASSIGN COMPONENT 'HANDLE' OF STRUCTURE TO .
  141. = t_order-handle.
  142. ASSIGN COMPONENT 'KUNNR' OF STRUCTURE TO .
  143. = t_order-kunnr.
  144. ASSIGN COMPONENT 'KUNNR_N' OF STRUCTURE TO .
  145. = t_order-kunnr_n.
  146. ASSIGN COMPONENT 'SP_NO' OF STRUCTURE TO .
  147. = t_order-sp_no.
  148. ASSIGN COMPONENT 'SP_NAME' OF STRUCTURE TO .
  149. = t_order-sp_name.
  150. ASSIGN COMPONENT 'WADAT_IST' OF STRUCTURE TO .
  151. = t_order-wadat_ist.
  152. LOOP AT t_nei .
  153. LOOP AT t_tsege WHERE even = t_nei-even
  154. AND even_verty = t_nei-even_verty .
  155. CLEAR: dateb,timeb,datee,timee.
  156. CONVERT TIME STAMP t_tsege-even_tstfr
  157. TIME ZONE t_tsege-even_zonfr
  158. INTO DATE dateb TIME timeb.
  159. IF t_nei-date_bn IS NOT INITIAL.
  160. ASSIGN COMPONENT t_nei-date_bn OF STRUCTURE TO .
  161. = dateb.
  162. ENDIF.
  163. IF t_nei-time_bn IS NOT INITIAL.
  164. ASSIGN COMPONENT t_nei-time_bn OF STRUCTURE TO .
  165. = timeb.
  166. ENDIF.
  167. CONVERT TIME STAMP t_tsege-even_tstto
  168. TIME ZONE t_tsege-even_zonto
  169. INTO DATE datee TIME timee.
  170. IF t_nei-date_en IS NOT INITIAL.
  171. ASSIGN COMPONENT t_nei-date_en OF STRUCTURE TO .
  172. = datee.
  173. ENDIF.
  174. IF t_nei-time_en IS NOT INITIAL.
  175. ASSIGN COMPONENT t_nei-time_en OF STRUCTURE TO .
  176. = timee.
  177. ENDIF.
  178. ENDLOOP.
  179. ENDLOOP.
  180. APPEND TO .
  181. ENDLOOP.
  182. END-OF-SELECTION.
  183. ***************输出
  184. REFRESH gt_fieldcat. CLEAR gs_fieldcat.
  185. LOOP AT t_cat INTO w_cat .
  186. MOVE-CORRESPONDING w_cat TO gs_fieldcat.
  187. gs_fieldcat-seltext_m = w_cat-scrtext_m.
  188. IF w_cat-fieldname = 'VBELN'.
  189. gs_fieldcat-hotspot = 'X'.
  190. ENDIF.
  191. IF w_cat-fieldname = 'HANDLE'.
  192. gs_fieldcat-no_out = 'X'.
  193. ENDIF.
  194. APPEND gs_fieldcat TO gt_fieldcat .
  195. CLEAR: w_cat,gs_fieldcat .
  196. ENDLOOP .
  197. gs_layout-zebra = 'X'.
  198. gs_layout-cell_merge = 'X'.
  199. gs_layout-colwidth_optimize = 'X'.
  200. * gs_layout-info_fieldname = 'LINE_COLOR'.
  201. g_repid = sy-repid.
  202. gs_variant-report = sy-repid.
  203. CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
  204. EXPORTING
  205. * i_background_id = 'ALV_BACKGROUND'
  206. i_callback_pf_status_set = 'MENU_SET'
  207. i_callback_user_command = 'USER_COMMAND'
  208. i_callback_program = g_repid
  209. is_layout = gs_layout
  210. * i_save = 'A'
  211. * is_variant = gs_variant
  212. it_fieldcat = gt_fieldcat[]
  213. TABLES
  214. t_outtab = .
  215. *&--------------------------------------------------------------------*
  216. *& Form menu_set
  217. *&--------------------------------------------------------------------*
  218. * text
  219. *---------------------------------------------------------------------*
  220. * -->RT_EXTAB text
  221. *---------------------------------------------------------------------*
  222. FORM menu_set USING lt_extab TYPE slis_t_extab.
  223. DATA: ls_extab TYPE slis_extab.
  224. SET PF-STATUS '101'. "定义屏幕状态,然后在里面定义自己的按钮
  225. ENDFORM. "menu_set
  226. *&--------------------------------------------------------------------*
  227. *& Form execute_command
  228. *&--------------------------------------------------------------------*
  229. * text
  230. *---------------------------------------------------------------------*
  231. * -->R_UCOMM text
  232. * -->RS_SELFIELDtext
  233. *---------------------------------------------------------------------*
  234. FORM user_command USING ucomm LIKE sy-ucomm
  235. rs_selfield TYPE slis_selfield.
  236. DATA: bdcdata_wa TYPE bdcdata,
  237. bdcdata_tab TYPE TABLE OF bdcdata.
  238. DATA opt TYPE ctu_params.
  239. CASE ucomm.
  240. WHEN '&IC1'.
  241. READ TABLE INTO
  242. INDEX rs_selfield-tabindex .
  243. ASSIGN COMPONENT 'VBELN' OF STRUCTURE
  244. TO .
  245. CLEAR bdcdata_wa.
  246. bdcdata_wa-program = 'SAPMV50A'.
  247. bdcdata_wa-dynpro = '4004'.
  248. bdcdata_wa-dynbegin = 'X'.
  249. APPEND bdcdata_wa TO bdcdata_tab. CLEAR bdcdata_wa.
  250. bdcdata_wa-fnam = 'LIKP-VBELN'. "输入框名称
  251. bdcdata_wa-fval = . "传过去的值
  252. APPEND bdcdata_wa TO bdcdata_tab. CLEAR bdcdata_wa.
  253. bdcdata_wa-program = 'SAPMV50A'.
  254. bdcdata_wa-dynpro = '1000'.
  255. bdcdata_wa-dynbegin = 'X'.
  256. APPEND bdcdata_wa TO bdcdata_tab. CLEAR bdcdata_wa.
  257. bdcdata_wa-fnam = 'BDC_OKCODE'. "输入框名称
  258. bdcdata_wa-fval = '=HTER_T'. "传过去的值
  259. APPEND bdcdata_wa TO bdcdata_tab. CLEAR bdcdata_wa.
  260. opt-dismode = 'E'.
  261. CALL TRANSACTION 'VL03N' USING bdcdata_tab OPTIONS FROM opt.
  262. ENDCASE.
  263. ENDFORM. "execute_command
阅读(1464) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~