EWM RF 开发常用代码

转载 2015年07月09日 11:51:21

1. 设置RF警告消息

/scwm/cl_rf_bll_srvc=>message(
               iv_msg_view = '1'
               iv_flg_continue_flow = 'X'
               iv_msgid           = '/SCWM/WHO'
               iv_msgty           = 'W'
               iv_msgno           = '539' ).

2. 查询商品

TRY.
CALL FUNCTION '/SCWM/MATERIAL_READ_SINGLE'
EXPORTING
          iv_matid      = ls_stock-matid
          iv_langu      = sy-langu
IMPORTING
          es_mat_global = ls_mat_global
          et_mat_uom    = lt_mat_uom.
CATCH /scwm/cx_md.
ENDTRY.

屏幕输入商品代码

DATA lv_matean TYPE /scwm/de_rf_ean11.

CALL FUNCTION '/SCWM/RF_PRODUCT_INPUT'
EXPORTING
input = selection-matnr40
IMPORTING
ev_matid = iv_matid
ev_matnr = selection-matnr40
ev_matean = lv_matean.
IF iv_matid IS INITIAL.
* Product doesn't exists
MESSAGE e195(/scwm/rf_en).
ENDIF.
    .

* get the product details
CALL FUNCTION '/SCWM/SELECT_STOCK'
EXPORTING
      iv_lgnum      = lv_lgnum
      it_matid      = lt_matid
      it_guid_lgpla = lt_guid_loc
IMPORTING
      et_huitm      = lt_huitm
EXCEPTIONS
OTHERS   = 2.

获得商品GUID

CALL FUNCTION 'CONVERSION_EXIT_MDLPD_INPUT'
EXPORTING
INPUT         = ZEWM_HUHDR_HP-HUMATID
IMPORTING
OUTPUT        = lv_matid
              .

3. RF屏幕参数相关代码

* Initiate screen parameter
  /scwm/cl_rf_bll_srvc=>init_screen_param( ).
* Set screen parameter
  /scwm/cl_rf_bll_srvc=>set_screen_param('CT_INQ_ST_LOOP').
****************************
  /scwm/cl_rf_bll_srvc=>set_screen_param('CS_INQ_ST_PRD').
* Transfer table name into RF framework
  /scwm/cl_rf_bll_srvc=>set_screen_param('/SCWM/TT_RF_INQ_ST_LOOP').
CALL METHOD /scwm/cl_rf_bll_srvc=>set_line
EXPORTING
      iv_line = 1.
CALL METHOD /scwm/cl_rf_bll_srvc=>set_screen_param
EXPORTING
      iv_param_name = 'LS_INQ_ST_LOOP'.

4. 设置代码调试

  BREAK-POINT ID /scwm/rf_inquiry.

5. 获得用户资源

CALL FUNCTION '/SCWM/RSRC_RESOURCE_MEMORY'
EXPORTING
      iv_uname = sy-uname
CHANGING
      cs_rsrc  = ls_rsrc.

6. 转换日期和时间字段

*********** Conversion of Timestamp into date and time field
APPEND :lt_lagp-idatu TO lt_timestamp,
          lt_lagp-cleared_at TO lt_timestamp,
          lt_lagp-moved_at TO lt_timestamp.
CALL FUNCTION '/SCWM/CONVERT_TIMESTAMP'
EXPORTING
      iv_lgnum       = lv_lgnum
      it_timestamp   = lt_timestamp
IMPORTING
      et_date_time   = lt_timedate
EXCEPTIONS
      input_error    = 1
      data_not_found = 2
OTHERS         = 3.

LOOP AT lt_timedate INTO ls_timedate.
CASE sy-tabix.
WHEN 1.
WRITE ls_timedate-date DD/MM/YY TO cs_inq_st-idatu_d.
MOVE ls_timedate-time TO cs_inq_st-idatu_t.
WHEN 2.
WRITE ls_timedate-date DD/MM/YY TO cs_inq_st-cleared_d.
MOVE ls_timedate-time TO cs_inq_st-cleared_t.
WHEN 3.
WRITE ls_timedate-date DD/MM/YY TO cs_inq_st-moved_d.
MOVE ls_timedate-time TO cs_inq_st-moved_t.
ENDCASE.
ENDLOOP.

7. 获得功能代码

lv_fcode        TYPE /scwm/de_fcode,

lv_fcode = /scwm/cl_rf_bll_srvc=>get_fcode( ).

8. 设置仓库号

CALL METHOD /scwm/cl_tm=>set_lgnum( ls_rsrc-lgnum ).

9. 查询源HU信息

CALL FUNCTION '/SCWM/TO_READ_SRC'
EXPORTING
        iv_lgnum   = ls_rsrc-lgnum
        iv_huident = selection-huident
IMPORTING
        et_ordim_o = lt_ordim_o
        et_ordim_c = lt_ordim_c.

10. 查询目前的HU信息

CALL FUNCTION '/SCWM/TO_READ_DES'
EXPORTING
        iv_lgnum   = ls_rsrc-lgnum
        iv_huident = selection-huident
IMPORTING
        et_ordim_o = lt_ordim_o
        et_ordim_c = lt_ordim_c.

CALL FUNCTION '/SCWM/TO_READ_HU'
EXPORTING
        iv_lgnum       = ls_rsrc-lgnum
        iv_huident     = selection-huident
IMPORTING
        et_ordim_o_src = lt_ordim_o
        et_ordim_o_des = lt_ordim_o_des
        et_ordim_c_src = lt_ordim_c
        et_ordim_c_des = lt_ordim_c_des.

11. RF确认对话框

CALL METHOD /SCWM/CL_RF_BLL_SRVC=>POPUP_TO_CONFIRM(

IV_TITLE = ‘’,

IV_TEXT=’’

IV_FLG_CANCEL=’X’,

RV_ANSWER = RV_ANSWER)

/scwm/cl_rf_dynpro_srvc=>display_message(

iv_msgid = sy-msgid

iv_msgno = sy-msgno

iv_msgty = 'Q'

iv_msgv1 = sy-msgv1

iv_msgv2 = sy-msgv2

iv_msgv3 = sy-msgv3

iv_msgv4 = sy-msgv4 ) = /scwm/cl_rf_bll_srvc=>c_answer_yes

举报

相关文章推荐

浅析SAP EWM与WMS的差异

伴随互联网的发展,无论是传统制造企业,还是服装、物流、零售企业都越来越重视仓储物流的建设。这些企业中有很大一部分是SAP ERP客户,因此,在传统ERP中采用WMS或者在WMS基础上进行二次开发来满足...

Idoc学习笔记----获取查询Idoc信息

这两天需要实现一个idoc的查询功能,也就是类似于WE09那样的功能能,于是学习了一下如何实现。简单记录如下:       一,Idoc的Control record信息存储在EDIDC这个表中,从...

精选:深入理解 Docker 内部原理及网络配置

网络绝对是任何系统的核心,对于容器而言也是如此。Docker 作为目前最火的轻量级容器技术,有很多令人称道的功能,如 Docker 的镜像管理。然而,Docker的网络一直以来都比较薄弱,所以我们有必要深入了解Docker的网络知识,以满足更高的网络需求。

更正,displaytag不能代替DataTable,extrememtable不错

前面的一篇,提到用displaytag代替Jsf的datatble,其实不行,因为displaytag在排序和分页的时候采用get方式提交,jsf的jsf_state表单超长,不能用get方式提交。e...

SAP EWM模块-EWM的常用T-CODE整理

SAP EWM模块-EWM的常用T-CODE整理

iOS-常用开发代码

iOS-常用开发代码

RF常用库简介(robotframework)

标准库 Robot Framework可以直接导入使用的库,包括: Builtin:包含经常需要的关键字。自动导入无需import,因此总是可用的 Dialogs:提供了暂停测试执行和从用户的输入方...

Android开发常用代码

1、设置窗口格式为半透明 getWindow().setFormat(PixelFormat.TRANSLUCENT); 2、Android中在非UI线程里更新View的不同方法: * Activit...
  • zz_mm
  • zz_mm
  • 2012-02-03 13:43
  • 641

iOS开发常用代码

1,获取翻转事件,并开启翻转: 只要在viewcontroller的类中加入 -(BOOL)shouldAutorotateToInterfaceOrientation:(UIIn...
返回顶部
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

(最多只允许输入30个字)