Submit的使用,程序中调用其他报表

Submit的使用

  1. 项目需求:编写一个程序能够将实时的物料库存数据通过发送邮件的形式发送到对应的邮件。现有标准的事务码MB5B来查看对应的库存数据。可以在程序中使用submit将参数传递到MB5B中,然后将获取的数据返回到程序中,然后在执行发送邮件的逻辑。

  2. 使用代码如下:

    *&---------------------------------------------------------------------*
    *& Report ZMMR118
    *&---------------------------------------------------------------------*
    *&
    *&---------------------------------------------------------------------*
    REPORT zmmr118.
    TABLES:mkpf,mseg,sscrfields,mara,t001,t001l,mchb,mbew,bseg.
    
    TYPES:BEGIN OF ty_alv,
            index      TYPE i,
            matnr      TYPE mseg-matnr,
            werks      TYPE mseg-werks,
            name1      TYPE t001w-name1,
            start_date TYPE sy-datum, "开始日期
            end_date   TYPE sy-datum,   "结束日期
            anfmenge   TYPE mseg-menge, "期初库存
            endmenge   TYPE mseg-menge, "期末库存
            maktx      TYPE makt-maktx,
            bwkey      TYPE bwkey,
            charg      TYPE charg_d,
            sobkz      TYPE sobkz,
            meins      TYPE meins,
          END OF ty_alv.
    
    
    DATA:gs_alv  TYPE ty_alv,
         gt_alv  TYPE TABLE OF ty_alv,
         ls_data TYPE REF TO data.
    
    FIELD-SYMBOLS: <lt_data> TYPE STANDARD TABLE,
                   <l_data>  TYPE any.
    
    DATA: gs_layout   TYPE lvc_s_layo.
    DATA: gt_fieldcat TYPE lvc_t_fcat,
          gs_fieldcat TYPE lvc_s_fcat.
    
    DATA: gv_title TYPE string.
    
    "弹窗
    DATA : l_answer TYPE c LENGTH 1,
           ls_field TYPE sval,
           lt_field TYPE STANDARD TABLE OF sval.
    
    DATA:gs_functxt TYPE smp_dyntxt.
    
    *******************************
    *屏幕处理
    *******************************
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS : s_matnr FOR mseg-matnr,
                     s_mfrpn FOR mara-mfrpn,
                     s_bukrs FOR t001-bukrs,
                     s_hkont FOR bseg-hkont,
                     s_werks FOR mseg-werks DEFAULT '1000',
                     s_lgort FOR t001l-lgort,
                     s_charg FOR mchb-charg,
                     s_bwtar FOR mbew-bwtar,
                     s_bwart FOR mseg-bwart.
    PARAMETERS        p_sobkz TYPE mseg-sobkz.
    SELECT-OPTIONS :   s_budat FOR mkpf-budat DEFAULT sy-datum.
    SELECTION-SCREEN END OF BLOCK blk1.
    
    SELECTION-SCREEN BEGIN OF BLOCK blk2 WITH FRAME TITLE TEXT-002.
    
    PARAMETERS: p_lgbst TYPE c RADIOBUTTON GROUP g1 DEFAULT 'X',
                p_bwbst TYPE c RADIOBUTTON GROUP g1,
                p_sbbst TYPE c RADIOBUTTON GROUP g1.
    SELECTION-SCREEN END OF BLOCK blk2.
    
    SELECTION-SCREEN: FUNCTION KEY 1.
    *******************************
    *主程序入口
    *******************************
    *&--------------------------------------------------------------
    **初始化处理
    *&--------------------------------------------------------------
    INITIALIZATION.
      sscrfields-functxt_01 = '@1S@接收邮箱维护'."定义按钮
    
    
    *&--------------------------------------------------------------
    **选择屏幕控制
    *&--------------------------------------------------------------
    AT SELECTION-SCREEN OUTPUT.
    
    *&-------------------------------------------------------------*
    *& 参数输入检查
    *&-------------------------------------------------------------*
    AT SELECTION-SCREEN.
    *  //为控件页签单击事件, 选择不同页签显示不同子屏幕.
    
      CASE sscrfields-ucomm.
        WHEN 'FC01'."系统预留的功能码
          PERFORM frm_view_call USING 'ZTMM2099'.
        WHEN OTHERS.
      ENDCASE.
    *&-------------------------------------------------------------
    **程序开始处理
    *&-------------------------------------------------------------
    START-OF-SELECTION.
    ********************************
    *获取数据
    ********************************
      PERFORM frm_get_data.
    
      IF sy-batch = 'X'.
        PERFORM frm_send_email USING 'C'.
      ELSE.
    * ALV显示
        PERFORM frm_set_alv.          "设置ALV属性
        PERFORM frm_dis_alv.          "调用ALV
      ENDIF.
    
    
    END-OF-SELECTION.
    
    *&---------------------------------------------------------------------*
    *& Form FRM_GET_DATA
    *&---------------------------------------------------------------------*
    *& text
    *&---------------------------------------------------------------------*
    *& -->  p1        text
    *& <--  p2        text
    *&---------------------------------------------------------------------*
    FORM frm_get_data .
      DATA lv_index TYPE i.
      CALL METHOD cl_salv_bs_runtime_info=>set
        EXPORTING
          display  = abap_false
          metadata = abap_false
          data     = abap_true.
    
      SUBMIT rm07mlbd               "Tcode MB5B
    
                 WITH matnr IN s_matnr "物料编号
                 WITH mfrpn IN s_mfrpn "制造商零件编号
                 WITH bukrs IN s_bukrs "公司代码
                 WITH hkont IN s_hkont "总账科目
                 WITH werks IN s_werks "工厂
                 WITH lgort IN s_lgort "存储位置
                 WITH charg IN s_charg "批次
                 WITH bwtar IN s_bwtar "评估类型
                 WITH bwart IN s_bwart "移动类型
                 WITH sobkz EQ p_sobkz "特殊库存标识
                 WITH DATUM IN s_budat "选择日期
    
                 "库存类型
                 WITH lgbst EQ p_lgbst  "参储位置/批次库存
                 WITH bwbst EQ p_bwbst    "已评估库存
                 WITH sbbst EQ p_sbbst  "特殊库存
                 "清单范围
    *           WITH PA_WDZER EQ SPACE
    *           WITH PA_WDZEW EQ 'X'
    *           WITH PA_WDWIZ EQ 'X'
    *           WITH PA_WDWUW EQ 'X'
    *           WITH PA_WDWEW EQ 'X'
    *           WITH PA_NDZER EQ SPACE
    *           WITH PA_NDSTO EQ 'X'
                 "设置
    *           WITH PA_SFLVA EQ 'T1'
                 WITH pa_sumfl EQ 'X'
                 WITH p_grid EQ 'X'
    *           WITH XCHAR EQ SPACE
    *           WITH XNOMCHB EQ SPACE
    *           WITH XNOMCHB EQ SPACE
    *           WITH NOSTO EQ SPACE
    *           WITH PA_DBSTD EQ 'X'
    *           VIA SELECTION-SCREEN
                 AND RETURN
                 .
    
    
    
    
    
      TRY.
          CALL METHOD cl_salv_bs_runtime_info=>get_data_ref
            IMPORTING
              r_data = ls_data.
          ASSIGN ls_data->* TO <lt_data>.
        CATCH cx_salv_bs_sc_runtime_info.
      ENDTRY.
    
      cl_salv_bs_runtime_info=>clear_all( ).
    
      IF <lt_data> IS ASSIGNED.
        LOOP AT <lt_data> ASSIGNING <l_data>.
          MOVE-CORRESPONDING <l_data> TO gs_alv.
          gs_alv-matnr = |{ gs_alv-matnr ALPHA = OUT }|.
          lv_index = lv_index + 1.
          gs_alv-index = lv_index.
          APPEND gs_alv TO gt_alv.
          CLEAR gs_alv.
        ENDLOOP.
      ENDIF.
    ENDFORM.
    
    *&---------------------------------------------------------------------*
    *& Form FRM_SET_ALV
    *&---------------------------------------------------------------------*
    *& text
    *&---------------------------------------------------------------------*
    *& -->  p1        text
    *& <--  p2        text
    *&---------------------------------------------------------------------*
    FORM frm_set_alv .
      DATA: l_colpos TYPE lvc_s_fcat-col_pos VALUE 0.
    
    *&---------------------------------------------------------------------*
    *&      定义宏
    *&---------------------------------------------------------------------*
      DEFINE  macro_fill_fcat.
        CLEAR gs_fieldcat.
        &1 = &1 + 1.
        gs_fieldcat-col_pos       = &1.
        gs_fieldcat-fieldname     = &2.
        gs_fieldcat-coltext       = &3.
        APPEND gs_fieldcat TO gt_fieldcat.
      END-OF-DEFINITION.
    
      FIELD-SYMBOLS: <fs_fieldcat> TYPE lvc_s_fcat.
    
      CLEAR gt_fieldcat.
      macro_fill_fcat:  l_colpos  'INDEX' '序号'  ,
                        l_colpos  'MATNR' '物料编号'  ,
                        l_colpos  'MAKTX' '物料描述'  ,
                        l_colpos  'BWKEY' '估值范围'  ,
                        l_colpos  'WERKS' '工厂'  ,
                        l_colpos  'CHARG' '批次'  ,
                        l_colpos  'SOBKZ' '特殊库存标识'  ,
                        l_colpos  'NAME1' '名称'  ,
                        l_colpos  'START_DATE'  '开始日期'  ,
                        l_colpos  'END_DATE'  '结束日期'  ,
                        l_colpos  'ANFMENGE'  '期初库存'  ,
                        l_colpos  'ENDMENGE'  '期末库存' ,
                        l_colpos  'MEINS' '基本计量单位'   .
    
      CLEAR gs_layout.
      gs_layout-zebra = 'X'.
      gs_layout-cwidth_opt = 'X'.
    ENDFORM.
    *&---------------------------------------------------------------------*
    *& Form FRM_DIS_ALV
    *&---------------------------------------------------------------------*
    *& text
    *&---------------------------------------------------------------------*
    *& -->  p1        text
    *& <--  p2        text
    *&---------------------------------------------------------------------*
    FORM frm_dis_alv .
      DATA: lv_grid TYPE lvc_s_glay.
    
      lv_grid-edt_cll_cb = 'X'.
    
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
        EXPORTING
          i_callback_program       = sy-repid
          i_callback_pf_status_set = 'PF_STATUS_SET'
          i_callback_user_command  = 'FRM_USER_COMMAND'
          i_grid_settings          = lv_grid
          is_layout_lvc            = gs_layout
          it_fieldcat_lvc          = gt_fieldcat
        TABLES
          t_outtab                 = gt_alv.
    
    ENDFORM.
    
    *&---------------------------------------------------------------------*
    *&      Form  PF_STATUS_SET
    *&---------------------------------------------------------------------*
    *       gui状态
    *----------------------------------------------------------------------*
    *      -->TR_EXTAB   text
    *----------------------------------------------------------------------*
    FORM pf_status_set USING pr_extab TYPE slis_t_extab.
    
      SET PF-STATUS 'STANDARD' .
    
    ENDFORM.                 "   PF_STATUS_SET
    *&---------------------------------------------------------------------*
    *&      Form  frm_user_command
    *&---------------------------------------------------------------------*
    *       用戶响应事件
    *----------------------------------------------------------------------*
    *      -->R_UCOMM      text
    *      -->RS_SELFIELD  text
    *----------------------------------------------------------------------*
    
    FORM frm_user_command USING r_ucomm LIKE sy-ucomm
                               rs_selfield TYPE slis_selfield.
    *刷新alv
      DATA:lob_grid TYPE REF TO cl_gui_alv_grid.
      CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
        IMPORTING
          e_grid = lob_grid.
      CALL METHOD lob_grid->check_changed_data.
    
      CASE r_ucomm.
        WHEN '&UPD'.
          PERFORM frm_send_email USING 'C'.
      ENDCASE.
      rs_selfield-refresh = 'X'.
      gs_layout-cwidth_opt = 'X'.
      gs_layout-no_toolbar = 'X'.
      CALL METHOD lob_grid->set_frontend_layout
        EXPORTING
          is_layout = gs_layout.
      CALL METHOD lob_grid->refresh_table_display.
    ENDFORM.
    
    
    *&---------------------------------------------------------------------*
    *& Form FRM_VIEW_CALL
    *&---------------------------------------------------------------------*
    *& text
    *&---------------------------------------------------------------------*
    *&      --> P_
    *&---------------------------------------------------------------------*
    FORM frm_view_call  USING    fu_view TYPE dd02v-tabname.
    
      DATA:dba_sellist    LIKE  vimsellist OCCURS 0,
           excl_cua_funct LIKE  vimexclfun OCCURS 0,
           x_header       LIKE  vimdesc OCCURS 0 WITH HEADER LINE,
           x_namtab       LIKE  vimnamtab OCCURS 0,
           dpl_sellist    LIKE  vimsellist.
    
      CALL FUNCTION 'VIEW_GET_DDIC_INFO'
        EXPORTING
          viewname        = fu_view
    *     VARIANT_FOR_SELECTION       = ' '
    *     ZDM_CALL        =
        TABLES
          sellist         = dba_sellist
          x_header        = x_header
          x_namtab        = x_namtab
        EXCEPTIONS
          no_tvdir_entry  = 1
          table_not_found = 2
          OTHERS          = 3.
      IF sy-subrc <> 0.
    * Implement suitable error handling here
      ENDIF.
    
      DATA:lockuser  TYPE sy-uname,
           answer(1) TYPE c.
      CALL FUNCTION 'VIEW_ENQUEUE'
        EXPORTING
          view_name        = fu_view
          action           = 'E'
          enqueue_mode     = 'E'
        EXCEPTIONS
          foreign_lock     = 1
          system_failure   = 2
          table_not_found  = 5
          client_reference = 7.
    
      IF sy-subrc NE 0.
        MESSAGE 'Data locked' TYPE 'S' DISPLAY LIKE 'E'.
        RETURN.
      ENDIF.
    
    
      CALL FUNCTION 'VIEW_MAINTENANCE'
        EXPORTING
    *     CORR_NUMBER               = ' '
          view_action               = 'U'
          view_name                 = fu_view
    *     RFC_DESTINATION_FOR_UPGRADE       = ' '
    *     CLIENT_FOR_UPGRADE        = ' '
    *     COMPLEX_SELCONDS_USED     = ' '
    *     NO_WARNING_FOR_CLIENTINDEP        = ' '
    *     OC_INST                   =
        TABLES
          dba_sellist               = dba_sellist
          excl_cua_funct            = excl_cua_funct
          x_header                  = x_header
          x_namtab                  = x_namtab
    *     DPL_SELLIST               =
        EXCEPTIONS
          missing_corr_number       = 1
          no_database_function      = 2
          no_editor_function        = 3
          no_value_for_subset_ident = 4
          OTHERS                    = 5.
    
      CALL FUNCTION 'VIEW_ENQUEUE'
        EXPORTING
          view_name        = fu_view
          action           = 'D'
          enqueue_mode     = 'E'
        EXCEPTIONS
          foreign_lock     = 1
          system_failure   = 2
          table_not_found  = 5
          client_reference = 7.
    ENDFORM.
    
    
    
    **&---------------------------------------------------------------------*
    **& Form FRM_SEND_EMAIL
    **&---------------------------------------------------------------------*
    **& text
    **&---------------------------------------------------------------------*
    **& -->  p1        text
    **& <--  p2        text
    **&---------------------------------------------------------------------*
    FORM frm_send_email USING p_x.
    
    
      "------发送邮件参数定义
      DATA: ls_sendemail TYPE  zsxx_send_email01,
            ls_receiver  TYPE  zsxx_receiver.
      DATA: lt_to     TYPE TABLE OF so_rec_ext,
            ls_to     TYPE so_rec_ext,
            lt_body   TYPE TABLE OF solisti1,
            ls_body   TYPE solisti1,
            i_body    LIKE solisti1 OCCURS 0 WITH HEADER LINE,
            lt_meg    TYPE TABLE OF bapiret2,
            ls_attach TYPE zzs_attach01,
            ls_obj    TYPE zzs_obj,
            lt_obj    TYPE TABLE OF zzs_obj.
      DATA: lt_line   TYPE ztts_lines.
      DATA: lt_cs TYPE TABLE OF sysid,
            ls_cs TYPE sysid.
    
    
      "-----生成excel附件
      CLEAR lt_line.
      PERFORM frm_to_excel TABLES lt_line  USING p_x.
    
    
      "----附件处理
      ls_obj-obj_descr  = '每日库存数量明细'.
      ls_obj-doc_type   = 'XLS'.
      ls_obj-obj_name   = '每日库存数量明细'.
      ls_obj-head_start = 1.
      ls_obj-head_num   = 1.
      DESCRIBE TABLE ls_sendemail-attach-lines LINES ls_obj-body_start.
      ls_obj-body_start = ls_obj-body_start + 1.
      APPEND LINES OF lt_line TO ls_sendemail-attach-lines.
      DESCRIBE TABLE ls_sendemail-attach-lines LINES ls_obj-body_num.
      ls_obj-body_num = ls_obj-body_num + 1.
      ls_obj-doc_size = ( ls_obj-body_num - ls_obj-body_start ) * 255.
      ls_obj-obj_langu = sy-langu.
      APPEND ls_obj TO lt_obj.
      CLEAR ls_obj.
      ls_sendemail-attach-obj_pro = lt_obj.
    
    *************** begin add by 2021/11/05 ****************
      IF lt_line IS INITIAL.
        EXIT .
      ENDIF.
    *************** end add by 2021/11/05 *****************
    
    
      "----收件邮箱
      SELECT * FROM ztmm2099 INTO TABLE @DATA(lt_zt2099) WHERE zsx = @p_x.
      LOOP AT lt_zt2099 INTO DATA(ls_zt2099).
        ls_to = ls_zt2099-zemail.
        APPEND ls_to TO lt_to.
        CLEAR ls_to.
      ENDLOOP.
      ls_sendemail-to = lt_to.
    
      "---邮件标题
      ls_sendemail-subject = sy-datum(4) && '-' && sy-datum+4(2) && '-' && sy-datum+6(2) && ' -From ERP:' && gv_title && '每日库存数量提醒!'.
    
    
      "---邮件内容
      CLEAR: ls_body, lt_body[].
      ls_body-line ='<div><span id="_FoxCURSOR"></span></div> '.
      APPEND ls_body TO lt_body.
      CLEAR ls_body.
      ls_body-line ='<DIV>各部门请知悉:</DIV><br>'.
      APPEND ls_body TO lt_body.
      CLEAR ls_body.
      ls_body-line = '<div><span>&nbsp;&nbsp;&nbsp;&nbsp;您好!</span></div><br>'.
      APPEND ls_body TO lt_body.
      CLEAR ls_body.
    
      ls_body-line = '<div><span>&nbsp;&nbsp;&nbsp;&nbsp;附件是' && gv_title && '物料库存数据明细,请查阅!</span></div><br>'.
    
      APPEND ls_body TO lt_body.
      CLEAR ls_body.
      ls_body-line = '<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</nspan>'.
      APPEND ls_body TO lt_body.
      CLEAR ls_body.
      ls_body-line = '<div><span>&nbsp;&nbsp;&nbsp;&nbsp;广汽埃安新能源汽车有限公司 </span></div><br>'.
      APPEND ls_body TO lt_body.
      CLEAR ls_body.
      ls_body-line = '<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</nspan>'.
      CLEAR ls_body.
      ls_body-line = '<div><span>&nbsp;&nbsp;&nbsp;&nbsp;' && sy-datum(4) && '-' && sy-datum+4(2) && '-' && sy-datum+6(2) && '</span></div><br>'.
      APPEND ls_body TO lt_body.
      CLEAR ls_body.
      ls_body-line = '<div>FISystem</div>'.
      APPEND ls_body TO lt_body.
      CLEAR ls_body.
      ls_body-line = '<div>================================================================================</div>'.
      APPEND ls_body TO lt_body.
      CLEAR ls_body.
      ls_body-line = '<div><span>本邮件为系统自动发送,请勿直接回复,谢谢!</span></div>'.
      APPEND ls_body TO lt_body.
      ls_sendemail-body = lt_body.
    
    
    *    "----抄送人
    *      ls_receiver-email = lt_cs.
    
      CALL FUNCTION 'ZXX_SEND_EMAIL01'
        EXPORTING
          i_sendemail = ls_sendemail
          i_receiver  = ls_receiver
        TABLES
          t_messages  = lt_meg.
      WAIT UP TO 2 SECONDS.
      CLEAR: ls_sendemail,lt_obj,lt_to..
    
      READ TABLE lt_meg TRANSPORTING NO FIELDS WITH KEY type = 'E'.
      IF sy-subrc <> 0.
        "发送成功
        MESSAGE '邮件已生成,具体查看T-CODE:SBWP发件箱来查看邮件是否发送成功!' TYPE 'S'..
      ELSE.
        "发送失败
        DATA:gv_msg TYPE char100.
        LOOP AT lt_meg INTO DATA(ls_meg) WHERE type = 'E'.
          CONCATENATE gv_msg ls_meg-message INTO gv_msg.
          CLEAR ls_meg.
        ENDLOOP.
        MESSAGE gv_msg TYPE 'E'.
      ENDIF.
    
    
    ENDFORM.
    *
    *
    *
    **&---------------------------------------------------------------------*
    **& Form FRM_TO_EXCEL
    **&---------------------------------------------------------------------*
    **& text
    **&---------------------------------------------------------------------*
    **&      --> LT_LINE
    **&---------------------------------------------------------------------*
    FORM frm_to_excel  TABLES    pt_line TYPE table  USING p_x.
    
      "---参数及常量定义
      CONSTANTS:
        c_tab      TYPE c VALUE cl_bcs_convert=>gc_tab,
        c_crlf     TYPE c VALUE cl_bcs_convert=>gc_crlf,
        c_mimetype TYPE char64 VALUE 'APPLICATION/MSEXCEL;charset=utf-16le'.
      DATA v_xattach  TYPE xstring.
      DATA lv_string  TYPE string.
      DATA lv_shsl    TYPE string.
      DATA lv_hhsl    TYPE string.
      DATA lv_netpr   TYPE string.
    
      "-------附件内容
      CLEAR lv_string.
      CONCATENATE lv_string
      '物料编码'          c_tab
    *  '物料描述'          c_tab
    *  '估值范围'          c_tab
      '工厂'              c_tab
      '批次'              c_tab
    *  '特殊库存标识'      c_tab
      '名称'              c_tab
      '开始日期'          c_tab
      '结束日期'          c_tab
      '期初库存'          c_tab
      '期末库存'          c_tab
      '基本计量单位'      c_crlf "c_crlf  换行
      INTO lv_string.
    
    
      DATA: lv_string1 TYPE string,
            lv_string2 TYPE string,
            lv_string3 TYPE string,
            lv_string4 TYPE string.
    
    
      LOOP AT gt_alv INTO gs_alv .
        CLEAR: lv_string1, lv_string2, lv_string3, lv_string4.
        lv_string1 =  gs_alv-start_date .
        lv_string2 = gs_alv-end_date .
        lv_string3 = gs_alv-anfmenge.
        lv_string4 = gs_alv-endmenge .
    
        CONCATENATE lv_string
        gs_alv-matnr       c_tab
    *    gs_alv-maktx       c_tab
    *    gs_alv-bwkey       c_tab
        gs_alv-werks       c_tab
        gs_alv-charg       c_tab
    *    gs_alv-sobkz       c_tab
        gs_alv-name1       c_tab
        lv_string1         c_tab
        lv_string2         c_tab
        lv_string3         c_tab
        lv_string4         c_tab
        gs_alv-meins       c_crlf  "c_crlf  换行
        INTO lv_string.
        CLEAR gs_alv.
      ENDLOOP.
    
    
    
      CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
        EXPORTING
          text     = lv_string
          mimetype = c_mimetype
        IMPORTING
          buffer   = v_xattach
        EXCEPTIONS
          failed   = 1
          OTHERS   = 2.
      IF sy-subrc = 0.
        CONCATENATE cl_abap_char_utilities=>byte_order_mark_little
        v_xattach INTO v_xattach IN BYTE MODE.
      ENDIF.
      CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
        EXPORTING
          buffer     = v_xattach
        TABLES
          binary_tab = pt_line.
    
    ENDFORM.
    
  3. 参数名字:通过对应的事务码进入选择屏幕后,F1可进入如下界面。

    [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-8FOgALZp-1686535390262)(D:\学习计划笔记\问题解决办法\IMAGE\image-20221123221911655.png)]

**注意:**在程序中使用submit调用标准程序传递数据时,需要传递所有必要的参数,否则会到至在后台调用程序的时候失败。
**扩展: **也可在FUNCTION中调用其他的报表程序得到数据,然后返回给外围系统。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/28175.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

线程的生命周期

我是一个线程 第一回 初生牛犊 我是一个线程&#xff0c;我一出生就被编了个号: 0x3704&#xff0c;然后被领到一个昏暗的屋子里&#xff0c;在这里我发现了很多和我一模一样的同伴。 我身边…

计算机视觉 | 语义分割与Segmentation

前 言 「MMSegmentation」 是一个基于 PyTorch 的语义分割开源工具箱。它是 OpenMMLab 项目的一部分。 MMSegmentation v1.x 在 0.x 版本的基础上有了显著的提升&#xff0c;提供了更加灵活和功能丰富的体验。 主要特性 统一的基准平台 我们将各种各样的语义分割算法集成到了…

文件系统原理

文件及硬盘管理是计算机操作系统的重要组成部分&#xff0c;让微软走上成功之路的正是微软最早推出的个人电脑PC操作系统&#xff0c;这个操作系统就叫DOS&#xff0c;即Disk Operating System&#xff0c;硬盘操作系统。我们每天使用电脑都离不开硬盘&#xff0c;硬盘既有大小…

谷歌的passkey是什么?

谷歌的passkey是什么&#xff1f; 谷歌正在研发一种名为“Passkey”的新技术&#xff0c;它将用于用户身份验证。Passkey不同于传统的密码&#xff0c;它采用了硬件加密密钥&#xff08;如安全密钥或生物识别方式&#xff09;以及双因素身份验证等技术&#xff0c;可以更好地保…

OpenCV项目开发实战--对图像种的对象进行无缝克隆-附Python、C++的代码实现

文末附基于Python和C++两种方式实现的测试代码下载链接 图 1:无缝克隆示例:一架飞机被克隆到傍晚天空的图片中。 OpenCV 3 中引入的令人兴奋的新功能之一称为无缝克隆。有了这个新功能,您可以从一个图像中复制一个对象,然后将其粘贴到另一个图像中,从而使构图看起来无缝…

做完瑞吉外卖项目的一点笔记和源码

源码在 https://gitee.com/pluto8/take-out 一、软件开发整体介绍 1、软件开发流程 需求分析 &#xff1a;产品原型&#xff0c;需求规格说明书&#xff08;文档形式&#xff09;设计&#xff1a;产品文档、UI界面设计、概要设计、详细设计、数据库设计编码&#xff1a;项目…

怎么在eclipse中创建python项目

目录 方法一&#xff1a;借助Eclipse Marketplace安装PyDev插件 方法二&#xff1a;到官网下载手动安装插件 参考文件 方法一&#xff1a;借助Eclipse Marketplace安装PyDev插件 这可以通过Eclipse Marketplace完成。打开Eclipse&#xff0c;然后选择“Help” > “Eclips…

强光LED手电筒方案开发设计

在户外活动中&#xff0c;不管是徒步还是露营&#xff0c;经常需要使用多功能强光手电筒。宇凡微推出的多功能战术强光LED手电筒方案&#xff0c;具有十多年LED灯项目研发经验&#xff0c;方案成熟&#xff0c;支持定制开发。 一、战术强光LED手电筒方案功能介绍 户外使用的LED…

OceanBase 安全审计之身份鉴别

本文主要以 MySQL 和 OceanBase 对比的方式&#xff0c;来介绍 OceanBase&#xff08;MySQL 模式&#xff09;安全体系中关于身份鉴别的相关内容&#xff0c;包括身份鉴别机制、用户名组成、密码复杂度、密码过期策略等。 作者&#xff1a;金长龙 爱可生测试工程师&#xff0c;…

Linux环境变量配合权限维持手法

前言&#xff1a; 权限维持的时候有其中有两种&#xff0c;一种是alias别名、第二种是prompt_command&#xff0c;这里我们可以将其添加到环境变量中&#xff0c;每次运行的时候都可以使用&#xff0c;从而达到权限控制的效果&#xff0c;而不是临时执行的效果。 环境变量&am…

(一)初识 Kafka

文章目录 1.发布与订阅消息系统&#xff08;1&#xff09;什么是发布与订阅消息系统&#xff08;2&#xff09;为什么 Kafka 是数据驱动型应用程序的关键组件 2. Kafka 介绍&#xff08;1&#xff09;消息和批次&#xff08;2&#xff09;消息模式&#xff08;3&#xff09;主题…

【Python】Python进阶系列教程--Python AI 绘画(二十)

文章目录 前言Windows 环境安装Civitai 介绍 前言 往期回顾&#xff1a; Python进阶系列教程-- Python3 正则表达式&#xff08;一&#xff09;Python进阶系列教程-- Python3 CGI编程&#xff08;二&#xff09;Python进阶系列教程-- Python3 MySQL - mysql-connector 驱动&a…

Java程序员面试1000问,让你开挂的面试宝典,花点耐心看完offer拿到手软

前言: 本文收集整理了各大厂常见面试题N道&#xff0c;你想要的这里都有内容涵盖&#xff1a;Java、MyBatis、ZooKeeper、Dubbo、Elasticsearch、Memcached、Redis、MySQL、Spring、Spring Boot、Spring Cloud、RabbitMQ、Kafka、Linux 等技术栈&#xff0c;希望大家都能找到适…

全量程真空压力综合测量系统的高精度控制解决方案

摘要&#xff1a;针对工作范围在5~1.3Pa&#xff0c;控制精度在0.1%~0.5%读数的全量程真空压力综合测量系统技术要求&#xff0c;本文提出了稳压室真空压力精密控制的技术方案。为保证控制精度&#xff0c;基于动态平衡法&#xff0c;技术方案在高真空、低真空和正压三个区间内…

分布式Profinet IO模块

PROFINET IO模块是一种用于工业自动化控制系统中的设备控制模块。它使用以太网技术&#xff0c;在现场设备和处理器/控制器之间提供快速、精确和可靠的数据交换。PROFINET IO模块通常是面向过程的&#xff0c;可以用于监测和控制工业过程中的各种设备和参数&#xff0c;如传感器…

MiniConda、CUDA、CUDnn以及pytorch环境的配置以及坑

文章目录 一、MiniConda安装、介绍1.1 Conda是什么&#xff1f;1.2 MiniConda是什么&#xff1f;1.3 安装方法1.4 Conda常用命令1.4.1 如何导出库列表1.5 杂项 二、CUDA 以及 CUDnn三、Pytorch安装总结 首先需要说明一下&#xff0c;我想安装的是Pytorch GPU版&#xff0c;所以…

C#编写VBScript的Com组件

背景 前段时间学习了一下vbsript&#xff0c;做了马踏棋盘的广度搜索算法题&#xff0c;线性回归的深度学习算法题&#xff0c;虽然是做出来了&#xff0c;但是总感觉不太方便&#xff0c;很多细节都需要自己去实现&#xff0c;这样很不方便&#xff0c;不容易让大家更简单上手…

ASEMI代理艾赛斯IXFA14N85XHV功率MOSFET综合指南

编辑-Z 在当今世界&#xff0c;电力电子在各种应用中发挥着至关重要的作用&#xff0c;从电源和电机驱动到电动汽车和可再生能源系统。这些应用中的关键部件之一是功率MOSFET&#xff08;金属氧化物半导体场效应晶体管&#xff09;。IXFA14N85XHV是一款先进的功率MOSFET&#…

Layui项目实战

使用语言&#xff1a;C#&#xff0c;Js&#xff0c;Html 使用框架&#xff1a;MVC&#xff0c;Layui 使用插件&#xff1a;JQuery&#xff0c;Layui 一.Layui父窗体前端代码&#xff1a; 1.Html代码&#xff1a; <div class"layui-col-md12" style"paddin…

gismo调试-组总刚

文章目录 前言一、1 组总刚main文件的断点2 跳转到gsElasticityAssembler.hpp3 gsElasticityAssembler.hpp的177行进入gsVisitorLinearElasticity.h4 进入gsAssembler.h重新进入gsVisitorLinearElasticity.h进入gsSparseSystem.h1.14 进入gsAssembler.h1.21.31.4 二、2.12.22.3…