Open nangnangchuai opened 5 years ago
st--结构体
用户输入-check购买组织-一览表查找出错--调用数据--取出数据库中的内容放到内表中-- 公司代码-购买组织--工厂决定财务报表--工厂和购买组织不是1对1,采购组-品目code就是物料
用户输入-check购买组织-一览表查找出错--调用数据--取出数据库中的内容放到内表中--查看表的关联条件--alv画面输出-实现全选功能,gui status,添加按钮,设置锁,备份数据(更新之前),
供应商名称取得, 品目-物料 备份-加一列变更前和变更后的数据-一列设置为不显示
每一个表都有解锁和加锁, lock 0bject- 排他锁 共享锁 pattern -enqueue---方法 dequeue--
CZUO011
&--------------------------------------------------------------------- & Report YY_SZDX_TEST1 &--------------------------------------------------------------------- &se11 lock object &--------------------------------------------------------------------- REPORT yy_szdx_test1.
TABLES : ekko,ekpo.
DATA : gt_ekorg TYPE TABLE OF ekko.
SELECTION-SCREEN BEGIN OF BLOCK bk1 WITH FRAME TITLE TEXT-001.
PARAMETERS : po_ekorg TYPE ekko-ekorg OBLIGATORY. " Purchasing organization SELECT-OPTIONS: so_bedat FOR ekko-bedat OBLIGATORY. " Date of purchase document SELECT-OPTIONS: so_ekgrp FOR ekko-ekgrp. " Purchasing Group SELECT-OPTIONS: so_lifnr FOR ekko-lifnr. " supplier SELECT-OPTIONS: so_ebeln FOR ekko-ebeln. " Purchase document number SELECT-OPTIONS: so_matnr FOR ekpo-matnr. " Item code SELECT-OPTIONS: so_werks FOR ekpo-werks. " plant
SELECTION-SCREEN END OF BLOCK bk1.
AT SELECTION-SCREEN.
PERFORM frm_check_ekorg.
&--------------------------------------------------------------------- & Form FRM_CHECK_EKORG &--------------------------------------------------------------------- & text &--------------------------------------------------------------------- & --> p1 text & <-- p2 text &--------------------------------------------------------------------- FORM frm_check_ekorg .
SELECT ekorg FROM ekko INTO TABLE gt_ekorg WHERE ekorg = po_ekorg.
IF sy-subrc = 0.
ELSE. MESSAGE '対象データが存在しません' TYPE 'E'. ENDIF. ENDFORM.
&--------------------------------------------------------------------- & Report YY_SZDX_TEST1_1 &--------------------------------------------------------------------- & &--------------------------------------------------------------------- REPORT YY_SZDX_TEST1_1.
TABLES : ekko,ekpo.
DATA : gt_ekorg TYPE TABLE OF ekko.
DATA : BEGIN OF ty_data,
LIFNR TYPE ekko-LIFNR ,
EKORG TYPE ekko-EKORG ,
EKGRP TYPE ekko-EKGRP ,
BEDAT TYPE ekko-BEDAT ,
EBELN TYPE ekko-EBELN ,
MEMORY TYPE ekko-MEMORY,
LOEKZ TYPE ekpo-LOEKZ ,
MATNR TYPE ekpo-MATNR ,
WERKS TYPE ekpo-WERKS ,
ELIKZ TYPE ekpo-ELIKZ ,
WEMNG TYPE eket-WEMNG ,
END OF ty_data.
DATA : gt_data like TABLE OF ty_data, gs_Data like ty_data.
SELECTION-SCREEN BEGIN OF BLOCK bk1 WITH FRAME TITLE TEXT-001.
PARAMETERS : po_ekorg TYPE ekko-ekorg OBLIGATORY. " Purchasing organization SELECT-OPTIONS: so_bedat FOR ekko-bedat OBLIGATORY. " Date of purchase document SELECT-OPTIONS: so_ekgrp FOR ekko-ekgrp. " Purchasing Group SELECT-OPTIONS: so_lifnr FOR ekko-lifnr. " supplier SELECT-OPTIONS: so_ebeln FOR ekko-ebeln. " Purchase document number SELECT-OPTIONS: so_matnr FOR ekpo-matnr. " Item code SELECT-OPTIONS: so_werks FOR ekpo-werks. " plant
SELECTION-SCREEN END OF BLOCK bk1.
AT SELECTION-SCREEN.
PERFORM frm_check_ekorg.
START-OF-SELECTION.
PERFORM frm_set_data. PERFORM frm_display_alc.
&--------------------------------------------------------------------- & Form FRM_CHECK_EKORG &--------------------------------------------------------------------- & text &--------------------------------------------------------------------- & --> p1 text & <-- p2 text &--------------------------------------------------------------------- FORM frm_check_ekorg .
SELECT ekorg FROM ekko INTO TABLE gt_ekorg WHERE ekorg = po_ekorg.
IF sy-subrc = 0.
ELSE. MESSAGE '対象データが存在しません' TYPE 'E'. ENDIF. ENDFORM.
&--------------------------------------------------------------------- & Form FRM_SET_DATA &--------------------------------------------------------------------- & text &--------------------------------------------------------------------- & --> p1 text & <-- p2 text &--------------------------------------------------------------------- FORM frm_set_data .
EKKO~EBELN EKPO~EBELP Ekpo~matnr Ekpo~menge Ekpo~meins Ekko~lifnr
*SELECT
ENDFORM.
&--------------------------------------------------------------------- & Form FRM_DISPLAY_ALC &--------------------------------------------------------------------- & text &--------------------------------------------------------------------- & --> p1 text & <-- p2 text &--------------------------------------------------------------------- FORM frm_display_alc .
ENDFORM.
对sap 标准的增强技术
BADI1 实现对标准的修改。
Customer Exit1
Smartforms 这个项目不需要
SAP HANA--sql语句的写法
练习: 概要设计--客户review---我们这边review--基于概要设计写详细设计--修改,指摘--写代码--测试报告--