ABAP知识点笔记

1,获取光标所在行

READ TABLE TD_ALV_DATA INTO TH_ALV_DATA
        INDEX RS_SELFIELD-TABINDEX.

2,获取alv可编辑单元格内容

DATA: LO_GUID TYPE REF TO CL_GUI_ALV_GRID.

** ALV GridControl full screen.
  CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
    IMPORTING
      E_GRID = LO_GUID.       
** Verification of Changes.
  CALL METHOD LO_GUID->CHECK_CHANGED_DATA.

CASE R_UCOMM.
  ......

3,根据alv编辑内容修改表

UPDATE T_NAME SET ZBZBM = FIELD = IT_TAB-FIELD
           WHERE FIELD1 = IT_TAB-FIELD1 
           AND FIELD2 = IT_TAB-FIELD2.

4,加帮助以及CheckBox复选器

   CASE I_FIELDNAME.                              "項目名

     WHEN 'ZBZBM'. "加帮助
       LTH_FIELDCAT-REF_TABNAME      = 'ZSD_TB_GSKBZ'.      "参考表
       LTH_FIELDCAT-REF_FIELDNAME    = 'ZBZBM'.      "参考表的字段
*     WHEN 'ZBZMS'.
*       LTH_FIELDCAT-REF_TABNAME      = 'ZSD_TB_GSKBZ'.      "参考表
*       LTH_FIELDCAT-REF_FIELDNAME    = 'ZBZMS'.      "参考表的字段
***
*****-  チェックボックス
     WHEN 'CHECK'. "CHECKBOX复选器
       LTH_FIELDCAT-CHECKBOX   = CNS_FLG_ON.      "チェックボックス
*       LTH_FIELDCAT-NO_OUT     = CNS_FLG_ON.      "非表示設定
****
       LTH_FIELDCAT-key_sel     = CNS_FLG_ON.      "

 

 

posted @ 2018-09-19 14:40  犹冷  阅读(501)  评论(0编辑  收藏  举报