20170228 METHOD handle_data_changed-
CALL METHOD er_data_changed->add_protocol_entry
DATA: ls_modi TYPE lvc_s_modi.
DATA: lv_valid TYPE c.
DATA: lt_lvc_t_modi TYPE lvc_t_modi .
DATA: ls_lvc_t_modi TYPE lvc_s_modi ,
l_matnr TYPE matnr,
l_datum TYPE datum,
l_datab TYPE datum,
lv_flag(1).
* CLEAR:LV_FLAG,L_DMBTR,L_CTCOD.
LOOP AT er_data_changed->mt_good_cells INTO ls_modi.
IF ls_modi-fieldname = 'MATNR'.
*****************获取CELL值
CALL METHOD er_data_changed->get_cell_value
EXPORTING
i_row_id = ls_modi-row_id
i_fieldname = ls_modi-fieldname
IMPORTING
e_value = l_matnr.
IF NOT l_matnr IS INITIAL.
SELECT SINGLE matnr INTO l_matnr FROM mara
WHERE matnr = l_matnr.
IF sy-subrc = 0.
SELECT SINGLE maktx INTO wa_out-maktx FROM makt
WHERE matnr = l_matnr
AND spras = sy-langu.
MODIFY gt_out FROM wa_out INDEX ls_modi-row_id TRANSPORTING maktx.
CLEAR: ls_lvc_t_modi,lt_lvc_t_modi[].
ls_lvc_t_modi-row_id = ls_modi-row_id. "自然数
ls_lvc_t_modi-fieldname = 'MAKTX'. "内部表字段的字段名称
ls_lvc_t_modi-value = wa_out-maktx." 单元格内容
ls_lvc_t_modi-tabix = ls_modi-row_id."自然数
APPEND ls_lvc_t_modi TO lt_lvc_t_modi.
CLEAR ls_lvc_t_modi.
CALL METHOD g_grid->set_delta_cells
EXPORTING
it_delta_cells = lt_lvc_t_modi[].
ELSE.
lv_flag = 'X'.
* CALL METHOD ER_DATA_CHANGED->ADD_PROTOCOL_ENTRY
* EXPORTING
* I_MSGID = 'Z_BH1'
* I_MSGNO = '000'
* I_MSGTY = 'E'
* I_MSGV1 = '你输入的商品不存在!'
* I_MSGV2 = ''
* I_MSGV3 = ''
* I_FIELDNAME = LS_MODI-FIELDNAME
* I_ROW_ID = LS_MODI-ROW_ID.
ENDIF.
ENDIF.
ENDIF.
IF ls_modi-fieldname = 'DATBI'.
CALL METHOD er_data_changed->get_cell_value
EXPORTING
i_row_id = ls_modi-row_id
i_fieldname = ls_modi-fieldname
IMPORTING
e_value = l_datum.
READ TABLE gt_out INTO wa_out INDEX ls_modi-row_id.
l_datab = wa_out-datab.
IF l_datum < l_datab.
lv_flag = 'X'.
CALL METHOD er_data_changed->add_protocol_entry
EXPORTING
i_msgid = 'Z_BH1'
i_msgno = '000'
i_msgty = 'E'
i_msgv1 = '你输入的起始日期大于结束日期!'
i_msgv2 = ''
i_msgv3 = ''
i_fieldname = ls_modi-fieldname
i_row_id = ls_modi-row_id.
ENDIF.
ENDIF.
ENDLOOP.
****************显示错误消息
* IF LV_FLAG = 'X'.
* CALL METHOD ER_DATA_CHANGED->DISPLAY_PROTOCOL.
* ENDIF.
ENDMETHOD. "HANDLE_DATA_CHANGED
20170228 METHOD handle_data_changed-的更多相关文章
- 20170228 ALV method中用E消息,会退出到初始界面;STOP 会dump;
再回车就处理界面了, 所以,Handel_data_change 做数据检查时,如果需要报错要用到, CALL METHOD er_data_changed->add_protocol_entr ...
- SAP 直营验单
*&---------------------------------------------------------------------* *& Report ZSDR005 ...
- 00 alv抬头等
*&---------------------------------------------------------------------* *& Report ZHJ_TEST0 ...
- ALV用例大全
一.ALV介绍 The ALV Grid Control (ALV = SAP List Viewer)是一个显示列表的灵活的工具,它提供了基本功能的列表操作,也可以通过自定义来进行增强,因此可以允 ...
- OO ALV 学习参考
http://blog.csdn.net/sapliumeng/article/details/18653491 一.ALV介绍 The ALV Grid Control (ALV = SAPLi ...
- alv行可编辑时带出描述
ALV显示可以编辑的状态下可以带出描述信息等,比如维护表程序输入公司代码时需要带出公司代码的描述,这时就需要通过下面事件来触发 定义一个类: CLASS lcl_event_receiver DEFI ...
- ABAP DEMO ALV-监听数据修改
*&---------------------------------------------------------------------* *& Report YDEMO_006 ...
- jsp中出现onclick函数提示Cannot return from outside a function or method
在使用Myeclipse10部署完项目后,原先不出错的项目,会有红色的叉叉,JSP页面会提示onclick函数错误 Cannot return from outside a function or m ...
- Apply Newton Method to Find Extrema in OPEN CASCADE
Apply Newton Method to Find Extrema in OPEN CASCADE eryar@163.com Abstract. In calculus, Newton’s me ...
随机推荐
- HackerRank# Red John is Back
原题地址 简单动归+素数判定,没用筛法也能过 代码: #include <cmath> #include <cstdio> #include <vector> #i ...
- BZOJ 3925 [Zjoi2015]地震后的幻想乡 ——期望DP
我们只需要考虑$\sum F(x)P(x)$的和, $F(x)$表示第x大边的期望,$P(x)$表示最大为x的概率. 经过一番化简得到$ans=\frac{\sum T(x-1)}{m+1}$ 所以就 ...
- BZOJ 1015: [JSOI2008]星球大战starwar【并查集】
题目可以表述成:给定一个无向图G,每次删除它的一个点和与点相关的边集,每次询问该操作后图G的连通度(连通分量的个数).和上一题一样都是考察逆向思维,虽然删除点的做法不会,但是每次加点后询问连通度却是并 ...
- charts 画饼图
统计某一天某类物体的百分比 新知识点:aggregate https://blog.csdn.net/congcong68/article/details/51619882 主要的 $group $m ...
- uva 10870 递推关系矩阵快速幂模
Recurrences Input: standard input Output: standard output Consider recurrent functions of the follow ...
- Virtualization基础
官方文档学习 https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/pdf/Virtualization_G ...
- Laravel 之Cache缓存
写入缓存 Cache::put('key','value',10);//设置10分钟 获取缓存 Cache::get('key'); 增加缓存 Cache::add('key','value',10) ...
- Mybatis resultMap空值映射问题
参考博客:https://www.oschina.net/question/1032714_224673 http://stackoverflow.com/questions/22852383/how ...
- jquery的固定定位效果
今天做了个固定定位的效果.比如对导航需要进行固定定位效果: 当没有滚动到导航下面,导航正常显示. 当滚动到导航下面,导航就固定到顶部. 这个效果使用了jquery的方法实现,具体思路为: 1)首先获取 ...
- MMT事务处理来源类型-INV_OBJECT_GENEALOGY.GETSOURCE
INV_OBJECT_GENEALOGY.GETSOURCE (MTL_MATERIAL_TRANSACTIONS.ORGANIZATION_ID, ...