锐单电子商城 , 一站式电子元器件采购平台!
  • 电话:400-990-0325

SAP MM ME2M ME2L ME28 增强自定义字段

时间:2022-10-05 11:00:00 x4me2接近传感器

本人诚心接ABAP远程开发任务,价格合理,需要联系我,欢迎个人,甲方爸爸,乙方私信联系。

目前需要加强项目ME2L一开始,顾问要求增加客制字段copy标准程序,然后添加字段,查阅数据,

SAP增强出口预留标准:

SE18-->BADI ME_CHANGE_OUTTAB_CUS

然后代码如下

* When processing this source code, you activate the following functionality: * The reporting transactions for purchasing documents provide three main views * for display: basic list, delivery schedule, and account assignment. All * three views contain a column "Material". If the material of a purchasing * document item is a manufacturer part number (MPN) then this MPN is shown * as "Material". The internal inventory managed material is not visible. * The following source code replaces the MPN by the inventory managed material.   DATA: LS_EKPO TYPE EKPO.   FIELD-SYMBOLS:    TYPE ANY,                      TYPE EBELN,                      TYPE EBELP,                   TYPE MATNR. * check that a purchasing document view is displayed   CHECK IM_STRUCT_NAME EQ 'MEREP_OUTTAB_PURCHDOC'   .    "view: basic list     "上面的结构是ME2L增强结构。可以往里面APPEND 结构 增加客制化字段 *  OR    im_struct_name EQ 'MEREP_OUTTAB_SCHEDLINES'      "view: delivery schedule *  OR    im_struct_name EQ 'MEREP_OUTTAB_ACCOUNTING'.     "view: account assignment  * loop at the output table and assign a field symbol   LOOP AT CH_OUTTAB ASSIGNING .   CLEAR:LV_ORMNG,LV_LFIMG. *-- assign the purchasing document number to a field symbol     ASSIGN COMPONENT 'EBELN' OF STRUCTURE  TO .     CHECK SY-SUBRC = 0. *-- assign the purchasing document item number to a field symbol     ASSIGN COMPONENT 'EBELP' OF STRUCTURE  TO .     CHECK SY-SUBRC = 0. *-- assign the manufacturer part number to a field symbol     ASSIGN COMPONENT 'EMATN' OF STRUCTURE  TO .     CHECK SY-SUBRC = 0.      ASSIGN COMPONENT 'MENGE' OF STRUCTURE  TO .     CHECK SY-SUBRC = 0.      ASSIGN COMPONENT 'MGLIEF' OF STRUCTURE  TO .     CHECK SY-SUBRC = 0.  **-- read the corresponding purchasing document item *    CALL FUNCTION 'ME_EKPO_SINGLE_READ' *      EXPORTING *        PI_EBELN         =  *        PI_EBELP         =  *      IMPORTING *        PO_EKPO          = LS_EKPO *      EXCEPTIONS *        NO_RECORDS_FOUND = 1 *        OTHERS           = 2. *    CHECK SY-SUBRC = 0.     ENDLOOP.

锐单商城拥有海量元器件数据手册IC替代型号,打造电子元器件IC百科大全!

相关文章