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

news2024/11/17 9:37:37

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中调用其他的报表程序得到数据,然后返回给外围系统。

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

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

【Git通关之旅】从山脚到山顶(傲视群雄版)

Git分布式版本控制工具 版本控制器的方式 集中式版本控制工具 集中式版本控制工具&#xff0c;版本库是集中存放在中央服务器的&#xff0c;team里每个人work时从中央服务器下载代 码&#xff0c;是必须联网才能工作&#xff0c;局域网或互联网。个人修改后然后提交到中央版本库…

【蓝桥杯】求既约分数—>(全解)最大公约数与最小公倍数

前言&#xff1a; 通过对【蓝桥杯】2020初赛的一道求既约分数的题目的讲解&#xff0c;引出关于求“最大公约数与最小公倍数”的方法汇总。 对于“最大公约数与最小公倍数”来说&#xff0c;求解都有一些固定的方法&#xff0c;而这些方法一般都是固定的&#xff0c;只需要掌握…

亚马逊、Allegro卖家建立属于自己的测评系统,实现批量优质账号养成

卖家搭建一套完整的测评系统&#xff0c;卖家自己能够养出批量优质账号&#xff0c;并完全掌控真实买家的浏览、加购、下单和评价等风控数据规律。我们的系统能够自主加速推广&#xff0c;防御反击&#xff0c;同时节省运营成本&#xff0c;实现高效的测评运营。 我们的系统支…

传统印刷企业需要部署数字工厂管理系统吗

随着数字化技术的快速发展&#xff0c;传统印刷企业面临着巨大的市场竞争压力。为了提高生产效率&#xff0c;降低生产成本&#xff0c;越来越多的企业开始考虑部署印刷数字工厂管理系统。但是&#xff0c;对于许多企业来说&#xff0c;是否部署印刷数字工厂仍然是一个需要权衡…

【国产复旦微FMQL45教程】-小试牛刀之LED

本教程采用 FMQL7045 FPGA开发板来完成整个试验&#xff0c;板卡照片如下&#xff1a; 具有丰富的接口资源&#xff0c;系统框图如下&#xff1a; 本教程用于完成基于Vivado的FMQL45的LED实验&#xff0c;目标是能够将这款开发板PL端先跑起来。 对于纯 PL 设计&#xff0c;我们…

002、体系结构之TiDB Server

TiDB Server 1、TiDB总览1.1、TiDB Server架构1.2、TiDB Server 主要功能&#xff1a; 2、SQL语句处理语句的解析和编译SQL层协议层上下文解析层逻辑优化器物理优化器本地执行器分布式执行器 3、如何将表的数据转成kv形式4、在线DDL相关模块5、GC机制与相关模块6、TiDB Server …

pyecharts案例三——河南省疫情地图绘制

代码实现 代码的业务流程基本和全国疫情地图相同&#xff0c;注意城市名结尾必须有“市”才能识别 import json from pyecharts.charts import Map from pyecharts.options import *f open("./疫情.txt", "r", encoding"UTF-8") data f.read…

暴力破解测试-业务安全测试实操(1)

业务安全测试实践模版理论指导_luozhonghua2000的博客-CSDN博客 测试原理和方法 暴力破解测试是指针对应用系统用户登录账号与密码进行的穷举测试,针对账号或密码进行逐一比较,直到找出正确的账号与密码。 般分为以下三种情况: 在已知账号的情况下,加载密码字典针对密码进行…

从美颜算法到AI美颜SDK:美丽的背后隐藏着什么?

在年轻人的生活中&#xff0c;通过美颜SDK类型的美颜工具进行拍摄已经成为了一种全新的文化现象。时下&#xff0c;AI美颜、美颜SDK讨论热点极高&#xff0c;那么大家知道美颜算法和AI美颜到底有什么不同吗&#xff1f;它们背后隐藏着什么样的技术和思想&#xff1f; 一、美颜算…

java的StringBuilder、Stringjoiner

一、StringBuilder StringBuilder可以看成是一个容器&#xff0c;创建之后里面的内容是可变的。作用是提高字符串的操作效率。 注意&#xff1a;使用String创建字符串对象时&#xff0c;是不能改变字符串的内容的&#xff0c;例如&#xff1a; String s1 "aaa"; St…

【解决MySQL-jdbc连接问题】com.mysql.jdbc.Driver was not found, trying direct instantiat

启动服务时出现报错 com.zaxxer.hikari.util.DriverDataSource : Registered driver with driverClassNamecom.mysql.jdbc.Driver was not found, trying direct instantiation.而且接口有时候能访问成功&#xff0c;有时候的超时连接&#xff0c;异常的慢 经查询&#xff0c…

BUUCTF Alice与Bob 1

题目描述&#xff1a; 密码学历史中&#xff0c;有两位知名的杰出人物&#xff0c;Alice和Bob。他们的爱情经过置换和轮加密也难以混淆&#xff0c;即使是没有身份认证也可以知根知底。就像在数学王国中的素数一样&#xff0c;孤傲又热情。下面是一个大整数:98554799767,请分解…

HTMLCSS Day03 CSS字体及文本样式

文章目录 1.文本属性- 颜色属性在CSS中如何通过color属性来修改文字颜色英文单词rgbrgba十六进制 - font-style 用于打开和关闭斜体文本- font-weight 为字体设置粗细程度- font-size 为文字指定大小- font-family 为文字指定特殊的字体&#xff0c;浏览器只会使用浏览器可以访…

动态规划dp —— 23.等差数列划分

1.状态表示 是什么&#xff1f;dp表中里的值所表示的含义就是状态表示 dp[i]表示&#xff1a;以i位置为结尾的所有子数组中有多少个等差数列 2.状态转移方程 dp[i] 等于什么 以i位置为结尾的等差数列&#xff0c;也就是说i位置必须和i-1&#xff0c;i-2位置构成等差数列&am…

98.实战网页构建定价部分-第一节

通过之前的文章我们实现如下的页面&#xff1a; ● 这节课我们来完成价目的部分 <section class"section-pricing"><div class"container"><span class"subheading">定价</span><h2 class"heading-secondary…

目前音质好的几款音频功放芯片

“音频功率放大器”简称音频功放&#xff0c;是扩声系统不可缺少的音响设备&#xff1b;是指把来自音源或前级放大器输出的弱信号放大并推动一定功率的音箱发出声音的集成电路。 音频功放可分为模拟功放和数字功放&#xff0c;传统模拟功放主要有A、AB、B、G类等&#xff0c;区…

vscode 实时同步代码到远程服务器

&#xff08;1&#xff09;在本地新建一个工程文件夹quant&#xff0c;将要同步的文件或者代码或文件夹放到quant里面&#xff1a; &#xff08;2&#xff09;创建sftp配置 使用 ctrlshiftp 快捷键调出输入框&#xff0c;选择 SFTP:Config 回车 会在 .vscode 目录下创建一个 s…

实验篇(7.2) 11. 创建点对点安全隧道(FortiGate-IPsec) ❀ 远程访问

【简介】前面我们实验的是FortiClient客户端与防火墙进行VPN连接&#xff0c;现在我们要做的实验是防火墙与防火墙之间进行VPN连接。现在我们来看看两台防火墙之间要怎样创建VPN连接。 实验要求与环境 OldMei集团深圳总部部署了域服务器和ERP服务器&#xff0c;用来对集团总部进…

基于Java+Spring+vue+element实现唯美鲜花商城购物系统

基于JavaSpringvueelement实现唯美鲜花商城购物系统 博主介绍&#xff1a;5年java开发经验&#xff0c;专注Java开发、定制、远程、指导等,csdn特邀作者、专注于Java技术领域 作者主页 超级帅帅吴 Java项目精品实战案例《500套》 欢迎点赞 收藏 ⭐留言 文末获取源码联系方式 文…

unocss 基础用法

一、什么是unocss unocss是一个即时的原子CSS引擎&#xff0c;它可以让你用简短的类名来控制元素的样式&#xff0c;而不需要写复杂的CSS代码。 当然&#xff0c;原子样式也有很多选择&#xff0c;最著名的就是 Tailwind。 但由于Tailwind 会生成大量样式定义&#xff0c;会导…