发票校验部分增强

原创 2010年08月12日 10:30:00
Display customer fields in header of logistics invoice verification transactions Welcome Guest
View a printable version of the current page.

Added by Pablo Casamayor , last edited by Pablo Casamayor on Jun 28, 2008  (view change)  

Author: Pablo Casamayor
Submitted: 28.06.2008

The aim of this tutorial is to help in providing a solution when we want to display customer fields in logistics invoice verification transactions.


Figure 1 (customer fields in MIR7 transaction)

The requirement was to display additional fields in logistics invoice verification transactions.

The original idea was to use exit LMR1M001 but reading the documentation of EXIT_SAPLMR1M_003 I found out that:

As of Release 4.6A, transaction MR1M is no longer supported. Therefore this customer exit and its functions are obsolete.

Besides this I had to do the development in two different systems (SAP ERP Central Component 5.0 and SAP ECC 6.0).

So I gave up the exit and concentrated my efforts in finding an alternative.

For this I found badi BADI_FDCB_SUBBAS01

The documentation of this badi is:

Subscreen enhancement in function group FDCB, basic data screen 010 for vendors, 510 for customers.

These screens are accessed in the Enjoy transactions for FI document entry or MM invoice receipt. In FI, for example, these are the transactions FB60, FB65, FB70, FB75 or for parking, FV60, FV65, FV70, FV75.

In MM, screen 010 is accessed for example in transaction MIRO.

Screen fields: The fields must be in structure INVFO.

If the values in the FI document are to be saved, the fields must also be in table BKPF or BSEG. If the values in the MM document are to be saved, the fields must be in the structure ACMM_VENDOR_COMP, the view RBKP, and table RBKP.

My case was the one referring to MM.

First I tried to implement BADI_FDCB_SUBBAS01 but there was an implementation already running (FI_FDCB_SUBBAS01_EX).

Then I tried with the following one BADI_FDCB_SUBBAS02 but there was an implementation already running (FI_FDCB_SUBBAS02_EX).

Next I tried with BADI_FDCB_SUBBAS03 but there was an implementation already running (WRF_BADI_FDCB_BAS).

The only badi left then was BADI_FDCB_SUBBAS04.

Just having a look at the example implementation class CL_EXM_IM_BADI_FDCB_SUBBAS01 of badi BADI_FDCB_SUBBAS01 i found out that there were two methods available:

PUT_DATA_TO_SCREEN_OBJECT

GET_DATA_FROM_SCREEN_OBJECT

And within them I needed to add the following:

method IF_EX_BADI_FDCB_SUBBAS01~PUT_DATA_TO_SCREEN_OBJECT .
* fill interface attributes from importing paramters
  me->if_ex_badi_fdcb_subbas01~invfo  = im_invfo.
endmethod.

method IF_EX_BADI_FDCB_SUBBAS01~GET_DATA_FROM_SCREEN_OBJECT .
* fill export parameters from interface attributes
  ex_invfo  = me->if_ex_badi_fdcb_subbas01~invfo.
endmethod.

I just substituted subbas01 by subbas04.

Then based on tab subscreen of implementation FI_FDCB_SUBBAS01_EX i had to create dynpro 100 as well.

For this dynpro the flow logic was:

PROCESS BEFORE OUTPUT.
* MODULE STATUS_0100.
  MODULE receive_data.
*

PROCESS AFTER INPUT.
* get again actual data from main screen
  MODULE receive_actual_data.
*
* implement from here on customer coding
* enumerate ALL fields on the screen because of field transportation
* with or within a module
  FIELD:
   invfo-lotkz.
* send data back to main screen
  MODULE USER_COMMAND_0100.

*----------------------------------------------------------------------*
***INCLUDE LBADI_EXAMPLE_FDCB_BASO01 .
*----------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*&      Module  receive_data OUTPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE receive_data OUTPUT.
  IF o_badi_fdcb_subbas01 IS INITIAL.
    CALL METHOD cl_exithandler=>get_instance_for_subscreens
      CHANGING
        instance                      = o_badi_fdcb_subbas01
      EXCEPTIONS
        no_reference                  = 1
        no_interface_reference        = 2
        no_exit_interface             = 3
        data_incons_in_exit_managem   = 4
        class_not_implement_interface = 5
        OTHERS                        = 6.
    IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
  ENDIF.
* object created  ?
  CHECK NOT o_badi_fdcb_subbas01 IS INITIAL.
* get data from main screen

  CALL METHOD o_badi_fdcb_subbas01->get_data_from_screen_object
    IMPORTING
      ex_invfo = invfo.
ENDMODULE.                 " receive_data  OUTPUT


*----------------------------------------------------------------------*
***INCLUDE LBADI_EXAMPLE_FDCB_BASI01 .
*----------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*&      Module  receive_actual_data  INPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
module receive_actual_data input.
*  object created  ?
  CHECK NOT o_badi_fdcb_subbas01 IS INITIAL.
* get data from main screen

  CALL METHOD o_badi_fdcb_subbas01->get_data_from_screen_object
    IMPORTING
      ex_invfo  = invfo.
endmodule.                 " receive_actual_data  INPUT


*&---------------------------------------------------------------------*
*&      Module  USER_COMMAND_0100  INPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
module USER_COMMAND_0100 input.
 CHECK NOT o_badi_fdcb_subbas01 IS INITIAL.
* put data to main screen

  CALL METHOD o_badi_fdcb_subbas01->put_data_to_screen_object
    EXPORTING
      im_invfo  = invfo.
endmodule.                 " USER_COMMAND_0100  INPUT

 

and so I did for my implementation (instead of subbas01 I used subbas04).

In my case only MM invoice receipt was going to be affected.

So I created my customer fields in append structures of:

INVFO, RBKP, RBKP_V, ACMM_VENDOR_COMP.



Figure 2 (append structure to structure INVFO)



 
Figure 3 (append structure to table RBKP)



 
Figure 4 (append structure to view RBKP_V)



Figure 5 (append structure to structure ACMM_VENDOR_COMP)

From here on you can display additional fields in logistics invoice verification transactions. Just add the new fields in the screen and code the corresponding logic.

Tips: the following transactions will be affected  

'FB60'

'FB65'

'FB70'

'FB75'

'FV60'

'FV65'

'FV70'

'FV75'

'FV63'

'MIRO'

'MR8M'

'MIRA'

'MIR7'

'MIR4'

You´ll need to add what´s necessary to prevent the new custom fields from appearing in unwanted transactions.

MM MIRO发票校验增强 也可以定义MIRO的屏幕增强

LMR1M001      在后勤发票校验中用户退出 *&--------------------------------------------------------------------...
  • zeewjj
  • zeewjj
  • 2012年06月04日 13:16
  • 5875

Mir7增强 badi MRM_HEADER_CHECK

MRM_HEADER_CHECK
  • zeewjj
  • zeewjj
  • 2012年07月01日 13:06
  • 2626

SAP 发票校验(Tcode MIRO) 税额容差分析

  • 2009年04月10日 23:30
  • 105KB
  • 下载

SAP系统内的发票校验

SAP系统内的发票校验 SAP系统是由若干个组成部分连接在一起组成的,因此一个公司内的不同部门 可以互相合作。 发票校验是物料管理(MM)系统的一部分。它提供物料管理部分和财务会计, 成本控制 和...
  • chfeijj
  • chfeijj
  • 2011年09月06日 10:40
  • 2437

MIR7采购Invoice预制增强-INVOICE_UPDATE

SAP
  • kangliujie
  • kangliujie
  • 2017年07月07日 10:53
  • 437

MM--发票校验 及基于采购订单的MIRO发票校验过程

一、介绍 发票校验是物料管理(MM)系统的一部分。它提供物料管理部分和财务会计, 成本控制和资产管理部分的连接。 物料管理模块的发票校验为以下目的服务: 它完成物料采购的全过程 - 物料采购从采...
  • zhongguomao
  • zhongguomao
  • 2016年11月19日 14:43
  • 873

发票校验表

SAP采购相关表格:EKKO:采购订单抬头EKPO:采购订单行项目EKBE:采购凭证历史EKBZ:每个采购凭证的交货费用历史(带条件类型)RBKP:后勤发票抬头RSEG:后勤发票采购订单行项目RBCO...
  • bxy5511
  • bxy5511
  • 2010年06月11日 16:48
  • 1219

SAP用户登录增强示例--没有成功。

* Transaction CMOD -> Utiliteis -> SAP Enhancements   * Exit Name SUSR0001      * Double click EXIT_...
  • chfeijj
  • chfeijj
  • 2008年04月01日 10:22
  • 553

SAP模块常用增强总结

SAP模块常用增强总结
  • champaignwolf
  • champaignwolf
  • 2013年11月04日 09:14
  • 7024

SAP已发票校验采购订单退货 - 特殊业务

采购业务过程中,偶尔出现外购物料质量问题或采购订单价格输入错误等原因,需要在系统中做收货的冲销。外购物料退回给供应商在不同的业务场景中,可能出现的移动类型有102、122、162甚至是601等。 1...
  • marcyao
  • marcyao
  • 2017年03月15日 22:11
  • 1254
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:发票校验部分增强
举报原因:
原因补充:

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