• 在一个程序中调用另一个程序并且传输数据到选择屏幕执行这个程序


    *&---------------------------------------------------------------------*
    *&  Include           ZMM_GETDATA
    *&---------------------------------------------------------------------*
    REPORT zmm_getdata.
    TABLES:
          eina,eine.
    
    DATA: gs_infnr TYPE eina-infnr.
    
    DATA gt_infnr LIKE TABLE OF gs_infnr.
    
    
    DATA r_infnr TYPE RANGE OF eina-infnr.
    
    DATA wa_infnr LIKE LINE OF r_infnr .
    
     DATA:rspar_tab  TYPE TABLE OF rsparams,
          rspar_line LIKE LINE OF rspar_tab.
    
    
    SELECT DISTINCT eina~infnr INTO TABLE gt_infnr
    
             FROM eina
             INNER JOIN eine ON eina~infnr = eine~infnr.
    *         WHERE eina~loekz = ''
    *         AND   eine~loekz = ''
    *         AND   eine~werks <> ''
    *         AND   eine~prdat < sy-datum.
    
    SORT gt_infnr ASCENDING.
    
    
    LOOP AT gt_infnr INTO gs_infnr FROM 1 TO 2.
      rspar_line-selname =  'S_INFNR'.
      rspar_line-kind    = 'S'.
      rspar_line-sign = 'I'.
      rspar_line-option = 'EQ'.
      rspar_line-low = gs_infnr.
      APPEND rspar_line TO rspar_tab.
      CLEAR:  gs_infnr, rspar_line.
    ENDLOOP.
    
    LOOP AT gt_infnr INTO gs_infnr FROM 3 TO 3.
      rspar_line-selname =  'S_INFNR1'.
      rspar_line-kind    = 'S'.
      rspar_line-sign = 'I'.
      rspar_line-option = 'EQ'.
      rspar_line-low = gs_infnr.
      APPEND rspar_line TO rspar_tab.
      CLEAR:  gs_infnr, rspar_line.
    ENDLOOP.
    
    
    *
    *export r_infnr to MEMORY id 'T_OUT'.
    *submit ZMM_TEST and RETURN.
    
    BREAK-POINT.
    
    SUBMIT zmm_test WITH SELECTION-TABLE rspar_tab.
                   "AND RETURN.
    View Code

    被调用的程序:

    *&---------------------------------------------------------------------*
    *& Report  ZMM_TEST
    *&
    *&---------------------------------------------------------------------*
    *&
    *&
    *&---------------------------------------------------------------------*
    
    REPORT  ZMM_TEST.
    
    tables:eina.
    
    *SELECTION-SCREEN BEGIN OF BLOCK blk2.
    select-options: s_infnr for eina-infnr .
    select-options: s_infnr1 for eina-infnr .
    *SELECTION-SCREEN END OF BLOCK blk2.
    
    
    
    
    *DATA r_infnr TYPE RANGE OF eina-infnr.
    
    
    
    *import r_infnr from MEMORY id 'T_OUT'.
    
    
    start-of-selection.
    IF s_infnr IS NOT INITIAL.
      WRITE / s_infnr-LOW.
    
       WRITE / s_infnr1-LOW.
    ENDIF.
    break-point.
    View Code
  • 相关阅读:
    Android的读写文件及权限设置
    surfaceView和View的区别
    git的常见问题
    APP的缓存文件放在哪里?
    AndroidStudio遇到过的问题
    订单和支付状态不同步解决方法
    支付宝支付不成功原因
    格式化输出%s和%S的区别
    Android SDK更新下载失败以及Studio首次安装取消自动下载SDK
    SPOJ 104 HIGH
  • 原文地址:https://www.cnblogs.com/caizjian/p/3443558.html
Copyright © 2020-2023  润新知